Skip to content

Instantly share code, notes, and snippets.

@madebyjeffrey
Created July 5, 2011 04:48
Show Gist options
  • Save madebyjeffrey/1064261 to your computer and use it in GitHub Desktop.
Save madebyjeffrey/1064261 to your computer and use it in GitHub Desktop.
Intrinsic Neon functions
float inputX[4] = { 2, 4, 8, 16 };
float inputY[4] = { 2, 4, 8, 16 };
float resultZ[4] = { 0, 0, 0, 0 };
float32x4_t sample1, sample2, result;
sample1 = vld1q_f32(inputX);
sample2 = vld1q_f32(inputY);
result = vmulq_f32(sample1, sample2);
vst1q_f32(resultZ, result);
NSLog(@"Result: %f, %f, %f, %f", resultZ[0], resultZ[1], resultZ[2], resultZ[3]);
// Outputs: Result: 4.000000, 16.000000, 64.000000, 256.000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment