// RUN: c-index-test -test-print-type %s -cl-std=CL2.0 -target spir | FileCheck %s
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
typedef half half4 __attribute__;
typedef float float4 __attribute__;
typedef double double4 __attribute__;
void kernel testFloatTypes {
half scalarHalf;
half4 vectorHalf;
float scalarFloat;
float4 vectorFloat;
double scalarDouble;
double4 vectorDouble;
}
// CHECK: VarDecl=scalarHalf:11:8 {{ ?}} [type=__private half] [typekind=Half] [isPOD=1]
// CHECK: VarDecl=vectorHalf:12:9 [type=__private half4] [typekind=Typedef] [canonicaltype=half __private __attribute__ ] [canonicaltypekind=ExtVector] [isPOD=1]
// CHECK: VarDecl=scalarFloat:13:9 [type=__private float] [typekind=Float] [isPOD=1]
// CHECK: VarDecl=vectorFloat:14:10 [type=__private float4] [typekind=Typedef] [canonicaltype=float __private __attribute__ ] [canonicaltypekind=ExtVector] [isPOD=1]
// CHECK: VarDecl=scalarDouble:15:10 {{ ?}} [type=__private double] [typekind=Double] [isPOD=1]
// CHECK: VarDecl=vectorDouble:16:11 {{ ?}} [type=__private double4] [typekind=Typedef] [canonicaltype=double __private __attribute__ ] [canonicaltypekind=ExtVector] [isPOD=1]
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
void kernel OCLImage1dROTest;
void kernel OCLImage1dArrayROTest;
void kernel OCLImage1dBufferROTest;
void kernel OCLImage2dROTest;
void kernel OCLImage2dArrayROTest;
void kernel OCLImage2dDepthROTest;
void kernel OCLImage2dArrayDepthROTest;
void kernel OCLImage2dMSAAROTest;
void kernel OCLImage2dArrayMSAAROTest;
void kernel OCLImage2dMSAADepthROTest;
void kernel OCLImage2dArrayMSAADepthROTest;
void kernel OCLImage3dROTest;
// CHECK: ParmDecl=scalarOCLImage1dRO:28:50 [type=__private __read_only image1d_t] [typekind=OCLImage1dRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dArrayRO:29:61 [type=__private __read_only image1d_array_t] [typekind=OCLImage1dArrayRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dBufferRO:30:63 [type=__private __read_only image1d_buffer_t] [typekind=OCLImage1dBufferRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dRO:31:50 [type=__private __read_only image2d_t] [typekind=OCLImage2dRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayRO:32:61 [type=__private __read_only image2d_array_t] [typekind=OCLImage2dArrayRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dDepthRO:33:61 [type=__private __read_only image2d_depth_t] [typekind=OCLImage2dDepthRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayDepthRO:34:72 [type=__private __read_only image2d_array_depth_t] [typekind=OCLImage2dArrayDepthRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAARO:35:59 {{ ?}} [type=__private __read_only image2d_msaa_t] [typekind=OCLImage2dMSAARO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAARO:36:70 {{ ?}} [type=__private __read_only image2d_array_msaa_t] [typekind=OCLImage2dArrayMSAARO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAADepthRO:37:70 {{ ?}} [type=__private __read_only image2d_msaa_depth_t] [typekind=OCLImage2dMSAADepthRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAADepthRO:38:81 {{ ?}} [type=__private __read_only image2d_array_msaa_depth_t] [typekind=OCLImage2dArrayMSAADepthRO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage3dRO:39:50 [type=__private __read_only image3d_t] [typekind=OCLImage3dRO] [isPOD=1]
void kernel OCLImage1dWOTest;
void kernel OCLImage1dArrayWOTest;
void kernel OCLImage1dBufferWOTest;
void kernel OCLImage2dWOTest;
void kernel OCLImage2dArrayWOTest;
void kernel OCLImage2dDepthWOTest;
void kernel OCLImage2dArrayDepthWOTest;
void kernel OCLImage2dMSAAWOTest;
void kernel OCLImage2dArrayMSAAWOTest;
void kernel OCLImage2dMSAADepthWOTest;
void kernel OCLImage2dArrayMSAADepthWOTest;
void kernel OCLImage3dWOTest;
// CHECK: ParmDecl=scalarOCLImage1dWO:54:51 [type=__private __write_only image1d_t] [typekind=OCLImage1dWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dArrayWO:55:62 [type=__private __write_only image1d_array_t] [typekind=OCLImage1dArrayWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dBufferWO:56:64 [type=__private __write_only image1d_buffer_t] [typekind=OCLImage1dBufferWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dWO:57:51 [type=__private __write_only image2d_t] [typekind=OCLImage2dWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayWO:58:62 [type=__private __write_only image2d_array_t] [typekind=OCLImage2dArrayWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dDepthWO:59:62 [type=__private __write_only image2d_depth_t] [typekind=OCLImage2dDepthWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayDepthWO:60:73 [type=__private __write_only image2d_array_depth_t] [typekind=OCLImage2dArrayDepthWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAAWO:61:60 {{ ?}} [type=__private __write_only image2d_msaa_t] [typekind=OCLImage2dMSAAWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAAWO:62:71 {{ ?}} [type=__private __write_only image2d_array_msaa_t] [typekind=OCLImage2dArrayMSAAWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAADepthWO:63:71 {{ ?}} [type=__private __write_only image2d_msaa_depth_t] [typekind=OCLImage2dMSAADepthWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAADepthWO:64:82 {{ ?}} [type=__private __write_only image2d_array_msaa_depth_t] [typekind=OCLImage2dArrayMSAADepthWO] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage3dWO:65:51 {{ ?}} [type=__private __write_only image3d_t] [typekind=OCLImage3dWO] [isPOD=1]
void kernel OCLImage1dRWTest;
void kernel OCLImage1dArrayRWTest;
void kernel OCLImage1dBufferRWTest;
void kernel OCLImage2dRWTest;
void kernel OCLImage2dArrayRWTest;
void kernel OCLImage2dDepthRWTest;
void kernel OCLImage2dArrayDepthRWTest;
void kernel OCLImage2dMSAARWTest;
void kernel OCLImage2dArrayMSAARWTest;
void kernel OCLImage2dMSAADepthRWTest;
void kernel OCLImage2dArrayMSAADepthRWTest;
void kernel OCLImage3dRWTest;
// CHECK: ParmDecl=scalarOCLImage1dRW:80:51 [type=__private __read_write image1d_t] [typekind=OCLImage1dRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dArrayRW:81:62 [type=__private __read_write image1d_array_t] [typekind=OCLImage1dArrayRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage1dBufferRW:82:64 [type=__private __read_write image1d_buffer_t] [typekind=OCLImage1dBufferRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dRW:83:51 [type=__private __read_write image2d_t] [typekind=OCLImage2dRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayRW:84:62 [type=__private __read_write image2d_array_t] [typekind=OCLImage2dArrayRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dDepthRW:85:62 [type=__private __read_write image2d_depth_t] [typekind=OCLImage2dDepthRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayDepthRW:86:73 [type=__private __read_write image2d_array_depth_t] [typekind=OCLImage2dArrayDepthRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAARW:87:60 {{ ?}} [type=__private __read_write image2d_msaa_t] [typekind=OCLImage2dMSAARW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAARW:88:71 {{ ?}} [type=__private __read_write image2d_array_msaa_t] [typekind=OCLImage2dArrayMSAARW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dMSAADepthRW:89:71 {{ ?}} [type=__private __read_write image2d_msaa_depth_t] [typekind=OCLImage2dMSAADepthRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage2dArrayMSAADepthRW:90:82 {{ ?}} [type=__private __read_write image2d_array_msaa_depth_t] [typekind=OCLImage2dArrayMSAADepthRW] [isPOD=1]
// CHECK: ParmDecl=scalarOCLImage3dRW:91:51 [type=__private __read_write image3d_t] [typekind=OCLImage3dRW] [isPOD=1]
void kernel intPipeTestRO;
void kernel intPipeTestWO;
// CHECK: ParmDecl=scalarPipe:106:46 [type=__private read_only pipe int] [typekind=Pipe] [isPOD=0]
// CHECK: ParmDecl=scalarPipe:107:47 [type=__private write_only pipe int] [typekind=Pipe] [isPOD=0]
#define CLK_ADDRESS_CLAMP_TO_EDGE 2
#define CLK_NORMALIZED_COORDS_TRUE 1
#define CLK_FILTER_NEAREST 0x10
void kernel testMiscOpenCLTypes {
const sampler_t scalarOCLSampler = CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;
clk_event_t scalarOCLEvent;
queue_t scalarOCLQueue;
reserve_id_t scalarOCLReserveID;
}
// CHECK: VarDecl=scalarOCLSampler:117:19 [type=const sampler_t] [typekind=Typedef] const [canonicaltype=const sampler_t] [canonicaltypekind=OCLSampler] [isPOD=1]
// CHECK: VarDecl=scalarOCLEvent:118:15 [type=__private clk_event_t] [typekind=Typedef] [canonicaltype=__private clk_event_t] [canonicaltypekind=Unexposed] [isPOD=1]
// CHECK: VarDecl=scalarOCLQueue:119:11 [type=__private queue_t] [typekind=Typedef] [canonicaltype=__private queue_t] [canonicaltypekind=OCLQueue] [isPOD=1]
// CHECK: VarDecl=scalarOCLReserveID:120:16 [type=__private reserve_id_t] [typekind=Typedef] [canonicaltype=__private reserve_id_t] [canonicaltypekind=OCLReserveID] [isPOD=1]
#pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable
void kernel testExtOpenCLTypes {
intel_sub_group_avc_mce_payload_t mce_payload;
}
// CHECK: VarDecl=mce_payload:131:37 {{ ?}} [type=__private intel_sub_group_avc_mce_payload_t] [typekind=Typedef] [canonicaltype=__private intel_sub_group_avc_mce_payload_t] [canonicaltypekind=OCLIntelSubgroupAVCMcePayload] [isPOD=1]