Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- #import <Accelerate/Accelerate.h>
- int main(int argc, const char * argv[]) {
- @autoreleasepool {
- NSLog(@"start");
- int count = 10000000;
- float *x = malloc(count * sizeof(float));
- float initial = 0;
- float increment = drand48()*count;
- vDSP_vramp(&initial, &increment, x, 1, count);
- float *y = malloc(count * sizeof(float));
- vvsqrtf(&*y, x, &count);
- NSLog(@"number x: %f", x[100]);
- NSLog(@"number y: %f", y[100]);
- NSLog(@"end");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement