Skip to content

Instantly share code, notes, and snippets.

@robb
Created January 2, 2013 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robb/4431330 to your computer and use it in GitHub Desktop.
Save robb/4431330 to your computer and use it in GitHub Desktop.
OpenCL vectors with Clang
typedef float float3 __attribute__((ext_vector_type(3)));
- (void)test;
{
float3 a = {1, 2, 3};
a = 2.0f * a;
NSLog(@"%f %f %f", a.x, a.y, a.z);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment