Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #import <Foundation/Foundation.h>
  2. #import <Accelerate/Accelerate.h>
  3.  
  4. int main(int argc, const char * argv[]) {
  5. @autoreleasepool {
  6. NSLog(@"start");
  7. int count = 10000000;
  8. float *x = malloc(count * sizeof(float));
  9. float initial = 0;
  10. float increment = drand48()*count;
  11. vDSP_vramp(&initial, &increment, x, 1, count);
  12.  
  13. float *y = malloc(count * sizeof(float));
  14. vvsqrtf(&*y, x, &count);
  15. NSLog(@"number x: %f", x[100]);
  16. NSLog(@"number y: %f", y[100]);
  17. NSLog(@"end");
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement