#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include "tools.h"
Go to the source code of this file.
|
void | vecacc (int n, float src1[n], float src2[n], float result[n]) |
|
int | main (int argc, char **argv) |
|
◆ vmalloc
Value: do { \
p=(
float*)
malloc(n*
sizeof(
float));\
} while(0);
◆ xmalloc
Value: do { \
if (posix_memalign((void **) &p, 32, n * sizeof(float))) \
return 3; \
} while(0);
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 14 of file vecacc.c.
17 float *src1, *src2, *result;
22 if (posix_memalign((void **) &p, 32, n * sizeof(float))) \
28 p=(float*)malloc(n*sizeof(float));\
40 vecacc(n, src1, src2, result);
void vecacc(int n, float src1[n], float src2[n], float result[n])
References close_data_file(), free(), init_data_file(), init_data_float(), vecacc(), and vmalloc.
◆ vecacc()
void vecacc |
( |
int |
n, |
|
|
float |
src1[n], |
|
|
float |
src2[n], |
|
|
float |
result[n] |
|
) |
| |
Definition at line 7 of file vecacc.c.
11 result[i]+=src1[i]*src2[i];
Referenced by main().