General observations on OpenCL C Language: It's more flexible than GLSL, and a larger subset of C Most of the time, you can pretend it's GLSL with different buffer specification methods It would be nice if it were unified with GLSL Goal here seems to be very flexible OpenCL 2.2 supports C++ Types in OpenCL, as_type, etc https://www.khronos.org/registry/OpenCL/specs/opencl-2.0-openclc.pdf Let's look at the table Vector types, alignment issue is the same as OpenGL But, we do have vector types still dot and cross too Casting, and reinterpreting things: C pointer manipulation tricks should work I think Summarizing the document... as_type: Could be useful Negatives: No function pointers No recursion Other stuff that's not as big of deal Can we use these in the image processing kernel? Sure, but alignment... There's a function for packed alignment in OpenCL! vload3 and vstore3 Locality: __global, __local, __constant, __private Looks like you can leave __ off, maybe just in OpenCL 2.0+ __kernel: Somebody asked about it It's an entry point marker, basically If unmarked, functions can only be called within the kernel The leading underscores look to be optional Another demo: Entropy of a picture Side note: Maxwell's demon / daemon Anyway: Difference between pixels, like we've been working with Sort of Summarizing it! Don't transfer everything back to the CPU right away