-
-
Save maweigert/6c0be17e82b2eb0b2faf047282ffb975 to your computer and use it in GitHub Desktop.
kernel test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src =""" | |
#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable | |
__kernel void img3d_to_img(__read_only image3d_t src, | |
__write_only image3d_t dest){ | |
uint i = get_global_id(0); | |
uint j = get_global_id(1); | |
uint k = get_global_id(2); | |
write_imagef(dest,(int4)(i,j,k,0),0.f); | |
} | |
""" | |
import pyopencl as cl | |
ctx = cl.create_some_context() | |
prog = cl.Program(ctx,src).build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment