File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,13 @@ typedef char __bool4 __attribute__((ext_vector_type(4)));
153153typedef char __bool8 __attribute__((ext_vector_type (8 )));
154154typedef char __bool16 __attribute__((ext_vector_type (16 )));
155155
156+ typedef __bf16 bfloat ;
157+ typedef bfloat bfloat2 __attribute__((ext_vector_type (2 )));
158+ typedef bfloat bfloat3 __attribute__((ext_vector_type (3 )));
159+ typedef bfloat bfloat4 __attribute__((ext_vector_type (4 )));
160+ typedef bfloat bfloat8 __attribute__((ext_vector_type (8 )));
161+ typedef bfloat bfloat16 __attribute__((ext_vector_type (16 )));
162+
156163#define INTEL_PIPE_RESERVE_ID_VALID_BIT (1U << 30)
157164#define CLK_NULL_RESERVE_ID \
158165 (__builtin_astype(((void *)(~INTEL_PIPE_RESERVE_ID_VALID_BIT)), __spirv_ReserveId))
Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ SPDX-License-Identifier: MIT
132132#define as_double8 (x ) __builtin_astype((x), double8)
133133#define as_double16 (x ) __builtin_astype((x), double16)
134134
135+ #define as_bfloat (x ) __builtin_astype((x), bfloat)
136+ #define as_bfloat2 (x ) __builtin_astype((x), bfloat2)
137+ #define as_bfloat3 (x ) __builtin_astype((x), bfloat3)
138+ #define as_bfloat4 (x ) __builtin_astype((x), bfloat4)
139+ #define as_bfloat8 (x ) __builtin_astype((x), bfloat8)
140+ #define as_bfloat16 (x ) __builtin_astype((x), bfloat16)
141+
135142#define ONE_EIGHTY_OVER_PI_DBL (as_double(0x404CA5DC1A63C1F8)) // 57.295779513082320876798154814105
136143#define ONE_EIGHTY_OVER_PI_FLT (as_float(0x42652EE1)) // 57.295779513082320876798154814105f
137144#define ONE_EIGHTY_OVER_PI_HLF (as_half((ushort)0x5329)) // 57.295779513082320876798154814105h
You can’t perform that action at this time.
0 commit comments