This repository was archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvm.c
More file actions
40 lines (36 loc) · 1.22 KB
/
svm.c
File metadata and controls
40 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "api.h"
extern void cl22GoSvmFreeCallback(cl_command_queue commandQueue, cl_uint svmPointerCount, void *svmPointers, uintptr_t *userData);
static CL_CALLBACK void cl22CSvmFreeCallback(
cl_command_queue commandQueue,
cl_uint svmPointerCount, void *svmPointers[],
void *userData)
{
cl22GoSvmFreeCallback(commandQueue, svmPointerCount, svmPointers, (uintptr_t *)(userData));
}
cl_int cl22EnqueueSVMFree(cl_command_queue commandQueue,
cl_uint svmPointerCount, void *svmPointers,
uintptr_t *userData,
cl_uint waitListCount, cl_event const *waitList,
cl_event *event)
{
return clEnqueueSVMFree(
commandQueue,
svmPointerCount, (void **)(svmPointers),
(userData != NULL) ? cl22CSvmFreeCallback : NULL, userData,
waitListCount, waitList,
event);
}
cl_int cl22EnqueueSVMMigrateMem(
cl_command_queue commandQueue,
cl_uint svmPointerCount, void *svmPointers,
size_t *sizes, cl_mem_migration_flags flags,
cl_uint waitListCount, cl_event const *waitList,
cl_event *event)
{
return clEnqueueSVMMigrateMem(
commandQueue,
svmPointerCount, (void const **)(svmPointers),
sizes, flags,
waitListCount, waitList,
event);
}