clang  14.0.0git
Namespaces | Macros
__clang_cuda_texture_intrinsics.h File Reference

Go to the source code of this file.

Namespaces

 __cuda_tex
 

Macros

#define __nv_tex_surf_handler(__op, __ptr, ...)
 
#define __ID(__op)   __Tag<__tex_op_hash(__op)>
 
#define __IDV(__op, __variant)   __Tag<10000 + __tex_op_hash(__op) * 100 + __variant>
 
#define __Args(...)   __VA_ARGS__
 
#define __STRIP_PARENS(__X)   __X
 
#define __L(__X)   __STRIP_PARENS(__Args __X)
 
#define __ASM_OUT(__t)   ("=" __t(__r.x), "=" __t(__r.y), "=" __t(__r.z), "=" __t(__r.w))
 
#define __ASM_OUTP(__t)   (__L(__ASM_OUT(__t)), "=h"(*__ir))
 
#define __IMPL_F1(__rt, __dt, __args, __asm_op, __asm_outs, __asm_args)
 
#define __IMPL_F3(__args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_F3S(__args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_F3N(__args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3I(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3SI(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3NI(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_SI(__op, __opn, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)   __IMPL_S3I(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3S(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)   __IMPL_S3SI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S3N(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)   __IMPL_S3NI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_S(__op, __opn, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
 
#define __IMPL_ALIASI(__op, __opn)   template <> struct __tex_fetch_v4<__op> : __tex_fetch_v4<__opn> {}
 
#define __IMPL_ALIAS(__op, __opn)   __IMPL_ALIASI(__ID(__op), __ID(__opn))
 
#define __IMPL_2DGATHER(variant, instr)
 

Macro Definition Documentation

◆ __Args

#define __Args (   ...)    __VA_ARGS__

Definition at line 193 of file __clang_cuda_texture_intrinsics.h.

◆ __ASM_OUT

#define __ASM_OUT (   __t)    ("=" __t(__r.x), "=" __t(__r.y), "=" __t(__r.z), "=" __t(__r.w))

Definition at line 201 of file __clang_cuda_texture_intrinsics.h.

◆ __ASM_OUTP

#define __ASM_OUTP (   __t)    (__L(__ASM_OUT(__t)), "=h"(*__ir))

Definition at line 204 of file __clang_cuda_texture_intrinsics.h.

◆ __ID

#define __ID (   __op)    __Tag<__tex_op_hash(__op)>

Definition at line 140 of file __clang_cuda_texture_intrinsics.h.

◆ __IDV

#define __IDV (   __op,
  __variant 
)    __Tag<10000 + __tex_op_hash(__op) * 100 + __variant>

Definition at line 143 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_2DGATHER

#define __IMPL_2DGATHER (   variant,
  instr 
)
Value:
__IMPL_SI(__IDV("__tex2Dgather_v2", variant), \
__IDV("__tex2Dgather_rmnf_v2", variant), \
(float __x, float __y, int __comp), instr, "f32", \
"{%0, %1, %2, %3}, [%4, {%5, %6}];", ("f"(__x), "f"(__y))); \
__IMPL_ALIASI(__IDV("__itex2Dgather", variant), \
__IDV("__tex2Dgather_v2", variant)); \
__IMPL_S3SI(__IDV("__itex2Dgather_sparse", variant), \
(float __x, float __y, unsigned char *__ir, int __comp), \
"{.reg .pred %%p0;\n\t" instr, "f32", \
"{%0, %1, %2, %3}|%%p0, [%5, {%6, %7}];\n\t" \
"selp.u16 %4, 1, 0, %%p0; }", \
("f"(__x), "f"(__y)));

Definition at line 441 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_ALIAS

#define __IMPL_ALIAS (   __op,
  __opn 
)    __IMPL_ALIASI(__ID(__op), __ID(__opn))

Definition at line 298 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_ALIASI

#define __IMPL_ALIASI (   __op,
  __opn 
)    template <> struct __tex_fetch_v4<__op> : __tex_fetch_v4<__opn> {}

Definition at line 296 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_F1

#define __IMPL_F1 (   __rt,
  __dt,
  __args,
  __asm_op,
  __asm_outs,
  __asm_args 
)
Value:
template <> \
__device__ __rt __run<__dt>(cudaTextureObject_t __obj, __L(__args)) { \
__rt __r; \
asm(__asm_op : __L(__asm_outs) : "l"(__obj), __L(__asm_args)); \
return __r; \
}

Definition at line 207 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_F3

#define __IMPL_F3 (   __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
__IMPL_F1(int4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
__ASM_OUT("r"), __asm_args) \
__IMPL_F1(uint4, uint4, __args, __asm_op ".u32." __ctype "\t" __asm_op_args, \
__ASM_OUT("r"), __asm_args) \
__IMPL_F1(float4, float4, __args, \
__asm_op ".f32." __ctype "\t" __asm_op_args, __ASM_OUT("f"), \
__asm_args)

Definition at line 216 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_F3N

#define __IMPL_F3N (   __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
__IMPL_F1(float4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
__ASM_OUT("r"), __asm_args) \
__IMPL_F1(float4, uint4, __args, \
__asm_op ".u32." __ctype "\t" __asm_op_args, __ASM_OUT("r"), \
__asm_args)

Definition at line 238 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_F3S

#define __IMPL_F3S (   __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
__IMPL_F1(int4, int4, __args, __asm_op ".s32." __ctype "\t" __asm_op_args, \
__ASM_OUTP("r"), __asm_args) \
__IMPL_F1(uint4, uint4, __args, __asm_op ".u32." __ctype "\t" __asm_op_args, \
__ASM_OUTP("r"), __asm_args) \
__IMPL_F1(float4, float4, __args, \
__asm_op ".f32." __ctype "\t" __asm_op_args, __ASM_OUTP("f"), \
__asm_args)

Definition at line 227 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S

#define __IMPL_S (   __op,
  __opn,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
__IMPL_SI(__ID(__op), __ID(__opn), __args, __asm_op, __ctype, __asm_op_args, \
__asm_args)

Definition at line 289 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3

#define __IMPL_S3 (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)    __IMPL_S3I(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)

Definition at line 283 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3I

#define __IMPL_S3I (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
template <> struct __tex_fetch_v4<__op> { \
template <class T> \
__device__ static T __run(cudaTextureObject_t __obj, __L(__args)); \
__IMPL_F3(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
}

Definition at line 246 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3N

#define __IMPL_S3N (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)    __IMPL_S3NI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)

Definition at line 287 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3NI

#define __IMPL_S3NI (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
template <> struct __tex_fetch_v4<__op> { \
template <class T> \
__device__ static float4 __run(cudaTextureObject_t __obj, __L(__args)); \
__IMPL_F3N(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
}

Definition at line 267 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3S

#define __IMPL_S3S (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)    __IMPL_S3SI(__ID(__op), __args, __asm_op, __ctype, __asm_op_args, __asm_args)

Definition at line 285 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_S3SI

#define __IMPL_S3SI (   __op,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
template <> struct __tex_fetch_v4<__op> { \
template <class T> \
__device__ static T __run(cudaTextureObject_t __obj, __L(__args)); \
__IMPL_F3S(__args, __asm_op, __ctype, __asm_op_args, __asm_args) \
}

Definition at line 255 of file __clang_cuda_texture_intrinsics.h.

◆ __IMPL_SI

#define __IMPL_SI (   __op,
  __opn,
  __args,
  __asm_op,
  __ctype,
  __asm_op_args,
  __asm_args 
)
Value:
__IMPL_S3I(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args); \
__IMPL_S3NI(__opn, __args, __asm_op, __ctype, __asm_op_args, __asm_args)

Definition at line 277 of file __clang_cuda_texture_intrinsics.h.

◆ __L

#define __L (   __X)    __STRIP_PARENS(__Args __X)

Definition at line 195 of file __clang_cuda_texture_intrinsics.h.

◆ __nv_tex_surf_handler

#define __nv_tex_surf_handler (   __op,
  __ptr,
  ... 
)
Value:
::__cuda_tex::__tex_fetch< \
::__cuda_tex::__Tag<::__cuda_tex::__tex_op_hash(__op)>>(__ptr, \
__VA_ARGS__)

Definition at line 21 of file __clang_cuda_texture_intrinsics.h.

◆ __STRIP_PARENS

#define __STRIP_PARENS (   __X)    __X

Definition at line 194 of file __clang_cuda_texture_intrinsics.h.

__IDV
#define __IDV(__op, __variant)
Definition: __clang_cuda_texture_intrinsics.h:143
__x
static __inline unsigned char unsigned int __x
Definition: adxintrin.h:22
__ASM_OUT
#define __ASM_OUT(__t)
Definition: __clang_cuda_texture_intrinsics.h:201
__IMPL_SI
#define __IMPL_SI(__op, __opn, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
Definition: __clang_cuda_texture_intrinsics.h:277
__IMPL_S3I
#define __IMPL_S3I(__op, __args, __asm_op, __ctype, __asm_op_args, __asm_args)
Definition: __clang_cuda_texture_intrinsics.h:246
__ASM_OUTP
#define __ASM_OUTP(__t)
Definition: __clang_cuda_texture_intrinsics.h:204
__y
static __inline unsigned char unsigned int unsigned int __y
Definition: adxintrin.h:22
__IMPL_F1
#define __IMPL_F1(__rt, __dt, __args, __asm_op, __asm_outs, __asm_args)
Definition: __clang_cuda_texture_intrinsics.h:207
__ID
#define __ID(__op)
Definition: __clang_cuda_texture_intrinsics.h:140
__L
#define __L(__X)
Definition: __clang_cuda_texture_intrinsics.h:195