Skip to content

Commit

Permalink
switch more code to the SVM type macros
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Aug 12, 2024
1 parent 3ed4b6b commit 8a2ef6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions samples/usvm/100_udmemhelloworld/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ int main(
cl_uint* d_src = (cl_uint*)clSVMAllocWithPropertiesEXP(
context(),
props,
CL_SVM_CAPABILITY_DEVICE_OWNED_EXP,
CL_SVM_TYPE_MACRO_DEVICE_EXP,
CL_MEM_READ_WRITE,
gwx * sizeof(cl_uint),
0,
nullptr );
cl_uint* d_dst = (cl_uint*)clSVMAllocWithPropertiesEXP(
context(),
props,
CL_SVM_CAPABILITY_DEVICE_OWNED_EXP,
CL_SVM_TYPE_MACRO_DEVICE_EXP,
CL_MEM_READ_WRITE,
gwx * sizeof(cl_uint),
0,
Expand Down
4 changes: 2 additions & 2 deletions samples/usvm/101_udmemlinkedlist/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void init( cl::Context& context, cl::Device& device )
d_head = (Node*)clSVMAllocWithPropertiesEXP(
context(),
props,
CL_SVM_CAPABILITY_DEVICE_OWNED_EXP,
CL_SVM_TYPE_MACRO_DEVICE_EXP,
CL_MEM_READ_WRITE,
sizeof(Node),
0,
Expand All @@ -75,7 +75,7 @@ static void init( cl::Context& context, cl::Device& device )
h_cur.pNext = (Node*)clSVMAllocWithPropertiesEXP(
context(),
props,
CL_SVM_CAPABILITY_DEVICE_OWNED_EXP,
CL_SVM_TYPE_MACRO_DEVICE_EXP,
CL_MEM_READ_WRITE,
sizeof(Node),
0,
Expand Down
4 changes: 2 additions & 2 deletions samples/usvm/200_uhmemhelloworld/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ int main(
cl_uint* h_src = (cl_uint*)clSVMAllocWithPropertiesEXP(
context(),
nullptr,
CL_SVM_CAPABILITY_HOST_OWNED_EXP,
CL_SVM_TYPE_MACRO_HOST_EXP,
CL_MEM_READ_WRITE,
gwx * sizeof(cl_uint),
0,
nullptr );
cl_uint* h_dst = (cl_uint*)clSVMAllocWithPropertiesEXP(
context(),
nullptr,
CL_SVM_CAPABILITY_HOST_OWNED_EXP,
CL_SVM_TYPE_MACRO_HOST_EXP,
CL_MEM_READ_WRITE,
gwx * sizeof(cl_uint),
0,
Expand Down
4 changes: 2 additions & 2 deletions samples/usvm/201_uhmemlinkedlist/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void init( cl::Context& context, cl::Device& device )
h_head = (Node*)clSVMAllocWithPropertiesEXP(
context(),
nullptr,
CL_SVM_CAPABILITY_HOST_OWNED_EXP,
CL_SVM_TYPE_MACRO_HOST_EXP,
CL_MEM_READ_WRITE,
sizeof(Node),
0,
Expand All @@ -69,7 +69,7 @@ static void init( cl::Context& context, cl::Device& device )
h_cur->pNext = (Node*)clSVMAllocWithPropertiesEXP(
context(),
nullptr,
CL_SVM_CAPABILITY_HOST_OWNED_EXP,
CL_SVM_TYPE_MACRO_HOST_EXP,
CL_MEM_READ_WRITE,
sizeof(Node),
0,
Expand Down

0 comments on commit 8a2ef6a

Please sign in to comment.