1 //===----- hlsl_intrinsics.h - HLSL definitions for intrinsics ----------===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef _HLSL_HLSL_INTRINSICS_H_
10 #define _HLSL_HLSL_INTRINSICS_H_
12 __attribute__((availability(shadermodel
, introduced
= 6.0)))
13 __attribute__((clang_builtin_alias(__builtin_hlsl_wave_active_count_bits
))) uint
14 WaveActiveCountBits(bool bBit
);
16 #ifdef __HLSL_ENABLE_16_BIT
17 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
19 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
20 int16_t2
abs(int16_t2
);
21 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
22 int16_t3
abs(int16_t3
);
23 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
24 int16_t4
abs(int16_t4
);
25 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) half
abs(half
);
26 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
28 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
30 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
34 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) int abs(int);
35 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) int2
abs(int2
);
36 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) int3
abs(int3
);
37 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) int4
abs(int4
);
38 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) float
40 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
42 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
44 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
46 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
48 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
49 int64_t2
abs(int64_t2
);
50 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
51 int64_t3
abs(int64_t3
);
52 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
53 int64_t4
abs(int64_t4
);
54 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
))) double
56 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
58 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
60 __attribute__((clang_builtin_alias(__builtin_elementwise_abs
)))
63 #endif //_HLSL_HLSL_INTRINSICS_H_