mirror of https://github.com/QMCPACK/qmcpack.git
Add coefs_size to UBspline_3d_x.
git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@5728 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
parent
34484a768f
commit
ff660a1faa
|
@ -492,12 +492,11 @@ create_UBspline_3d_s (Ugrid x_grid, Ugrid y_grid, Ugrid z_grid,
|
|||
spline->x_stride = Ny*Nz;
|
||||
spline->y_stride = Nz;
|
||||
|
||||
|
||||
size_t Nxyz=(size_t)Nx*(size_t)Ny*(size_t)Nz;
|
||||
spline->coefs_size=(size_t)Nx*(size_t)Ny*(size_t)Nz;
|
||||
#ifndef HAVE_SSE2
|
||||
spline->coefs = malloc (sizeof(float)*Nxyz);
|
||||
spline->coefs = malloc (sizeof(float)*spline->coefs_size);
|
||||
#else
|
||||
posix_memalign ((void**)&spline->coefs, 16, (sizeof(float)*Nxyz));
|
||||
posix_memalign ((void**)&spline->coefs, 16, (sizeof(float)*spline->coefs_size));
|
||||
#endif
|
||||
|
||||
// First, solve in the X-direction
|
||||
|
@ -1372,10 +1371,12 @@ create_UBspline_3d_d (Ugrid x_grid, Ugrid y_grid, Ugrid z_grid,
|
|||
spline->x_stride = Ny*Nz;
|
||||
spline->y_stride = Nz;
|
||||
|
||||
spline->coefs_size=(size_t)Nx*(size_t)Ny*(size_t)Nz;
|
||||
|
||||
#ifndef HAVE_SSE2
|
||||
spline->coefs = malloc (sizeof(double)*Nx*Ny*Nz);
|
||||
spline->coefs = malloc (sizeof(double)*spline->coefs_size);
|
||||
#else
|
||||
posix_memalign ((void**)&spline->coefs, 16, (sizeof(double)*Nx*Ny*Nz));
|
||||
posix_memalign ((void**)&spline->coefs, 16, (sizeof(double)*spline->coefs_size));
|
||||
#endif
|
||||
|
||||
if(data != NULL) // only data is provided
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#ifndef BSPLINE_STRUCTS_STD_H
|
||||
#define BSPLINE_STRUCTS_STD_H
|
||||
#include <stdlib.h>
|
||||
|
||||
///////////////////////////
|
||||
// Single precision real //
|
||||
|
@ -51,6 +52,7 @@ typedef struct
|
|||
int x_stride, y_stride;
|
||||
Ugrid x_grid, y_grid, z_grid;
|
||||
BCtype_s xBC, yBC, zBC;
|
||||
size_t coefs_size;
|
||||
} UBspline_3d_s;
|
||||
|
||||
|
||||
|
@ -84,6 +86,7 @@ typedef struct
|
|||
int x_stride, y_stride;
|
||||
Ugrid x_grid, y_grid, z_grid;
|
||||
BCtype_d xBC, yBC, zBC;
|
||||
size_t coefs_size;
|
||||
} UBspline_3d_d;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue