...
This commit is contained in:
@@ -109,8 +109,8 @@ float *allocFloat(float *ptr, int count)
|
|||||||
void *allocated;
|
void *allocated;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (!posix_memalign(&allocated, 16, count * sizeof(float)))
|
if (!posix_memalign(&allocated, 16, count * sizeof(float)))
|
||||||
allocated = malloc(count * sizeof(float));
|
|
||||||
#endif
|
#endif
|
||||||
|
allocated = malloc(count * sizeof(float));
|
||||||
for (int i = 0; i < count; ++i) ((float *)allocated)[i] = 0.f;
|
for (int i = 0; i < count; ++i) ((float *)allocated)[i] = 0.f;
|
||||||
return (float *)allocated;
|
return (float *)allocated;
|
||||||
}
|
}
|
||||||
@@ -131,8 +131,8 @@ double *allocDouble(double *ptr, int count)
|
|||||||
void *allocated;
|
void *allocated;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (!posix_memalign(&allocated, 16, count * sizeof(double)))
|
if (!posix_memalign(&allocated, 16, count * sizeof(double)))
|
||||||
allocated = malloc(count * sizeof(double));
|
|
||||||
#endif
|
#endif
|
||||||
|
allocated = malloc(count * sizeof(double));
|
||||||
for (int i = 0; i < count; ++i) ((double *)allocated)[i] = 0.f;
|
for (int i = 0; i < count; ++i) ((double *)allocated)[i] = 0.f;
|
||||||
return (double *)allocated;
|
return (double *)allocated;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user