In iOS, I have a function call that depends on vDSP_vgathr, a member of Apple's Accelerate framework:
int pix = image.size.height * image.size.width;
float * array = (float *)malloc(sizeof(float) * pix * 4);
float * colorPlane = (float *)malloc(sizeof(float) * pix);
float * y_r = (float *)malloc(sizeof(float) * pix)
int * malloc(sizeof(int) * pix)
vDSP_vgathr(colorPlane, (const vDSP_Length *)idx, 1, y_r, 1, (int)(rate*pix));
I've seen an SO question that relating to the error I get, EXC_I386_GPFLT
, and 64 bit systems and non-canonical pointers. The solution (and another one) I've seen suggest including tgmath.h
, but when used (with a successful compile), it does nothing and I still get EXC_I386_GPFLT
.
I've tried a host of other potential solutions including typecasting various objects and different function calls. How can I do I make this function call work with the 64 bit architecture?