16 #ifndef LLVM_SUPPORT_AMDHSAKERNELDESCRIPTOR_H 17 #define LLVM_SUPPORT_AMDHSAKERNELDESCRIPTOR_H 24 #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE*)0)->MEMBER) 29 #ifndef AMDHSA_BITS_ENUM_ENTRY 30 #define AMDHSA_BITS_ENUM_ENTRY(NAME, SHIFT, WIDTH) \ 31 NAME ## _SHIFT = (SHIFT), \ 32 NAME ## _WIDTH = (WIDTH), \ 33 NAME = (((1 << (WIDTH)) - 1) << (SHIFT)) 34 #endif // AMDHSA_BITS_ENUM_ENTRY 37 #ifndef AMDHSA_BITS_GET 38 #define AMDHSA_BITS_GET(SRC, MSK) ((SRC & MSK) >> MSK ## _SHIFT) 39 #endif // AMDHSA_BITS_GET 42 #ifndef AMDHSA_BITS_SET 43 #define AMDHSA_BITS_SET(DST, MSK, VAL) \ 45 DST |= ((VAL << MSK ## _SHIFT) & MSK) 46 #endif // AMDHSA_BITS_SET 76 #define COMPUTE_PGM_RSRC1(NAME, SHIFT, WIDTH) \ 77 AMDHSA_BITS_ENUM_ENTRY(COMPUTE_PGM_RSRC1_ ## NAME, SHIFT, WIDTH) 95 #undef COMPUTE_PGM_RSRC1 98 #define COMPUTE_PGM_RSRC2(NAME, SHIFT, WIDTH) \ 99 AMDHSA_BITS_ENUM_ENTRY(COMPUTE_PGM_RSRC2_ ## NAME, SHIFT, WIDTH) 121 #undef COMPUTE_PGM_RSRC2 124 #define KERNEL_CODE_PROPERTY(NAME, SHIFT, WIDTH) \ 125 AMDHSA_BITS_ENUM_ENTRY(KERNEL_CODE_PROPERTY_ ## NAME, SHIFT, WIDTH) 136 #undef KERNEL_CODE_PROPERTY 153 "invalid size for kernel_descriptor_t");
156 "invalid offset for group_segment_fixed_size");
159 "invalid offset for private_segment_fixed_size");
162 "invalid offset for reserved0");
165 "invalid offset for kernel_code_entry_byte_offset");
168 "invalid offset for reserved1");
171 "invalid offset for compute_pgm_rsrc1");
174 "invalid offset for compute_pgm_rsrc2");
177 "invalid offset for kernel_code_properties");
180 "invalid offset for reserved2");
185 #endif // LLVM_SUPPORT_AMDHSAKERNELDESCRIPTOR_H int64_t kernel_code_entry_byte_offset
This class represents lattice values for constants.
uint32_t compute_pgm_rsrc2
uint32_t private_segment_fixed_size
uint32_t group_segment_fixed_size
uint16_t kernel_code_properties
#define offsetof(TYPE, MEMBER)
uint32_t compute_pgm_rsrc1