Skip to content

Commit 0f2367f

Browse files
authored
[SYCLomatic] Add 11 APIs for option --query-api-mapping (#2934)
Signed-off-by: intwanghao <hao3.wang@intel.com>
1 parent 897c916 commit 0f2367f

15 files changed

+170
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test(CUDA_ARRAY3D_DESCRIPTOR *desc, CUarray array) {
4+
// Start
5+
cuArray3DGetDescriptor(desc /*CUDA_ARRAY3D_DESCRIPTOR **/, array /*CUarray*/);
6+
// End
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test(CUDA_ARRAY_DESCRIPTOR *desc, CUarray array) {
4+
// Start
5+
cuArrayGetDescriptor(desc /*CUDA_ARRAY_DESCRIPTOR **/, array /*CUarray*/);
6+
// End
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
void test(CUcontext *ctx, CUexecAffinityParam *params_array, int num,
2+
unsigned int flags, CUdevice device) {
3+
// Start
4+
cuCtxCreate_v3(ctx /*CUcontext **/, params_array /*CUexecAffinityParam **/, num /*int*/, flags /*unsigned int*/, device /*CUdevice*/);
5+
// End
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
void test(CUcontext *ctx, CUctxCreateParams *params_array, unsigned int flags,
2+
CUdevice device) {
3+
// Start
4+
cuCtxCreate_v4(ctx /*CUcontext **/, params_array /*CUctxCreateParams **/, flags /*unsigned int*/, device /*CUdevice*/);
5+
// End
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
void test(CUresult r, const char **pstr) {
2+
// Start
3+
cuGetErrorName(r /*CUresult*/, pstr /*const char ***/);
4+
// End
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=bindless_images
2+
3+
void test(CUmipmappedArray *array, CUDA_ARRAY3D_DESCRIPTOR *desc,
4+
unsigned int levels) {
5+
// Start
6+
cuMipmappedArrayCreate(array /*CUmipmappedArray **/, desc /*CUDA_ARRAY3D_DESCRIPTOR **/, levels /*unsigned int*/);
7+
// End
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Option: --use-experimental-features=bindless_images
2+
template <typename T>
3+
__global__ void test(float data, cudaSurfaceObject_t surf, int x, int y,
4+
int layer) {
5+
// Start
6+
surf2DLayeredwrite<T>(data /*float*/, surf /*cudaSurfaceObject_t*/, x /*int*/,
7+
y /*int*/, layer /*int*/);
8+
// End
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=bindless_images
2+
template <typename T>
3+
__global__ void test(float data, cudaSurfaceObject_t surf, int x, int y) {
4+
// Start
5+
data /*float*/ =
6+
surf2Dread<T>(surf /*cudaSurfaceObject_t*/, x /*int*/, y /*int*/);
7+
// End
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Option: --use-experimental-features=bindless_images
2+
template <typename T>
3+
__global__ void test(float data, cudaSurfaceObject_t surf, int x, int y) {
4+
// Start
5+
surf2Dwrite<T>(data /*float*/, surf /*cudaSurfaceObject_t*/, x /*int*/,
6+
y /*int*/);
7+
// End
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Option: --use-experimental-features=bindless_images
2+
template <typename T>
3+
__global__ void test(float data, cudaSurfaceObject_t surf, int x, int y,
4+
int z) {
5+
// Start
6+
data /*float*/ = surf3Dread<T>(surf /*cudaSurfaceObject_t*/, x /*int*/,
7+
y /*int*/, z /*int*/);
8+
// End
9+
}

0 commit comments

Comments
 (0)