callensxavier's picture
Upload folder using huggingface_hub
783ddfb verified
Raw
History Blame Contribute Delete
365 Bytes
#include <stdio.h>
#include <stdlib.h>
#define N 50000000
int main() {
float *a=malloc(N*sizeof(float)),*b=malloc(N*sizeof(float)),*c=malloc(N*sizeof(float));
for(int i=0;i<N;i++){a[i]=(float)i;b[i]=(float)(i*2);}
for(int i=0;i<N;i++)c[i]=a[i]+b[i];
for(int i=0;i<N;i++)c[i]=c[i]*a[i];
printf("%f\n",c[N/2]);free(a);free(b);free(c);return 0;
}