mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-19 20:42:50 +01:00
Memory alignment in qmckl_malloc
This commit is contained in:
parent
d5fcd2e0fe
commit
cd6de216b8
@ -6536,7 +6536,7 @@ qmckl_compute_ao_vgl_hpc_gaussian (
|
||||
|
||||
|
||||
/* --- */
|
||||
switch (512) {
|
||||
switch (8) {
|
||||
case(5):
|
||||
|
||||
for (int i=0 ; i<nucleus_shell_num[inucl] ; ++i) {
|
||||
@ -6556,7 +6556,7 @@ qmckl_compute_ao_vgl_hpc_gaussian (
|
||||
|
||||
for (int i=0 ; i<nucleus_shell_num[inucl] ; ++i) {
|
||||
#ifdef HAVE_OPENMP
|
||||
#pragma omp simd simdlen(8)
|
||||
#pragma omp simd
|
||||
#endif
|
||||
for (int j=0 ; j<8 ; ++j) {
|
||||
ce_mat[i][j] = 0.;
|
||||
@ -6564,7 +6564,7 @@ qmckl_compute_ao_vgl_hpc_gaussian (
|
||||
for (int k=0 ; k<nidx; ++k) {
|
||||
const double cm = coef_mat[inucl][i][k];
|
||||
#ifdef HAVE_OPENMP
|
||||
#pragma omp simd simdlen(8)
|
||||
#pragma omp simd
|
||||
#endif
|
||||
for (int j=0 ; j<8 ; ++j) {
|
||||
ce_mat[i][j] += cm * exp_mat[k][j];
|
||||
|
@ -119,7 +119,11 @@ void* qmckl_malloc(qmckl_context context, const qmckl_memory_info_struct info) {
|
||||
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
|
||||
|
||||
/* Allocate memory and zero it */
|
||||
#ifdef HAVE_HPC
|
||||
void * pointer = aligned_alloc(64, ((info.size+64) >> 6) << 6 );
|
||||
#else
|
||||
void * pointer = malloc(info.size);
|
||||
#endif
|
||||
if (pointer == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user