c - Dynamically allocate SIMD Vector as array of doubles -


i'm new vectors , i've been having read of gcc documentation trying head around it.

is possible dynamically allocate size of vector @ run time? appears though have in typedef like:

typedef double v4sf __attribute__((vector_size (16))); 

i want set values of vector array of doubles. i've tried so:

v4sf curr_vect = double_array; 

where double_array array of doubles. fails compile. possible either of these things?

if platform posix-compliant, can achieve aligned dynamic memory allocation using posix_memalign() function:

double *p; if (posix_memalign((void **)&p, 16, sizeof(*p) * 16) != 0) {     perror("posix_memalign");     abort(); }  p[0] = 3.1415927; // ...  free(p); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -