Created
January 2, 2013 00:43
-
-
Save robb/4431330 to your computer and use it in GitHub Desktop.
OpenCL vectors with Clang
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
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