Debian Codegraph @

libclc/clc/lib/ptx-nvidiacl/relational/clc_isinf.cl

raw
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include <clc/relational/clc_isinf.h>
10
11 int __nv_isinff(float);
12 int __nv_isinfd(double);
13
14 _CLC_OVERLOAD _CLC_DEF int __clc_isinf(float x) { return __nv_isinff(x); }
15
16 #ifdef cl_khr_fp64
17 #pragma OPENCL EXTENSION cl_khr_fp64 : enable
18
19 _CLC_OVERLOAD _CLC_DEF int __clc_isinf(double x) { return __nv_isinfd(x); }
20
21 #endif
22
23 #ifdef cl_khr_fp16
24 #pragma OPENCL EXTENSION cl_khr_fp16 : enable
25
26 _CLC_OVERLOAD _CLC_DEF int __clc_isinf(half x) { return __clc_isinf((float)x); }
27
28 #endif
29
30 #define __CLC_FUNCTION __clc_isinf
31 #define __CLC_BODY <clc/shared/unary_def_scalarize.inc>
32 #define __CLC_RET_TYPE __CLC_BIT_INT
33 #include <clc/math/gentype.inc>