Commit bd5e2894 authored by Jean-Matthieu Gallard's avatar Jean-Matthieu Gallard
Browse files

KernelGen - minor fix linear STP templates

parent 66f0ff2f
......@@ -88,8 +88,12 @@ int {{codeNamespace}}::fusedSpaceTimePredictorVolumeIntegral{{nameSuffix}}(
__assume_aligned(FRCoeff, ALIGNMENT);
#endif
// TODO JMG set matmul
{{ m.setupMatmul('flux_x_sck_aosoa2') | indent(2) }}{##}
{{ m.setupMatmul('flux_y_sck_aosoa2') | indent(2) }}{##}
{{ m.setupMatmul('flux_z_sck_aosoa2') | indent(2) }}{##}
{{ m.setupMatmul('gradQ_x_sck_aosoa2')| indent(2) }}{##}
{{ m.setupMatmul('gradQ_y_sck_aosoa2')| indent(2) }}{##}
{{ m.setupMatmul('gradQ_z_sck_aosoa2')| indent(2) }}{##}
const double invDt = 1. / dt;
const double invDx = 1. / dx;
......@@ -101,10 +105,10 @@ int {{codeNamespace}}::fusedSpaceTimePredictorVolumeIntegral{{nameSuffix}}(
double negativeDudx_by_dx[{{nDof*nDofPad}}] __attribute__((aligned(ALIGNMENT)));
{% if useLibxsmm %}
#if defined(USE_IPO) && ! defined(UNSAFE_IPO)
double doNotOptimizeAway1 = dudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
double doNotOptimizeAway2 = dudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
double doNotOptimizeAway3 = negativeDudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
double doNotOptimizeAway4 = negativeDudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
volatile double doNotOptimizeAway1 = dudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
volatile double doNotOptimizeAway2 = dudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
volatile double doNotOptimizeAway3 = negativeDudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
volatile double doNotOptimizeAway4 = negativeDudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
#endif
{% endif %}
......@@ -163,7 +167,7 @@ int {{codeNamespace}}::fusedSpaceTimePredictorVolumeIntegral{{nameSuffix}}(
// 0. precompute 1/dx * dudx_T. Assume dx[0] == dx[1] == dx[2]
#pragma omp simd aligned(dudxT_by_dx,negativeDudxT_by_dx,dudx_by_dx,negativeDudx_by_dx,dudx_T:ALIGNMENT)
#pragma omp simd aligned(dudxT_by_dx,negativeDudxT_by_dx,dudx_by_dx,negativeDudx_by_dx,dudx_T,dudx:ALIGNMENT)
for (int it = 0; it < {{nDof*nDofPad}}; it++) {
dudxT_by_dx[it] = invDx * dudx_T[it];
negativeDudxT_by_dx[it] = -dudxT_by_dx[it];
......
......@@ -106,10 +106,10 @@ int {{codeNamespace}}::fusedSpaceTimePredictorVolumeIntegral{{nameSuffix}}(
double negativeDudx_by_dx[{{nDof*nDofPad}}] __attribute__((aligned(ALIGNMENT)));
{% if useLibxsmm %}
#if defined(USE_IPO) && ! defined(UNSAFE_IPO)
double doNotOptimizeAway1 = dudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
double doNotOptimizeAway2 = dudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
double doNotOptimizeAway3 = negativeDudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
double doNotOptimizeAway4 = negativeDudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
volatile double doNotOptimizeAway1 = dudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
volatile double doNotOptimizeAway2 = dudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
volatile double doNotOptimizeAway3 = negativeDudxT_by_dx[0]; // used to prevent the compiler from optimizing dudxT_by_dx away
volatile double doNotOptimizeAway4 = negativeDudx_by_dx[0]; // used to prevent the compiler from optimizing dudx_by_dx away
#endif
{% endif %}
......@@ -168,7 +168,7 @@ int {{codeNamespace}}::fusedSpaceTimePredictorVolumeIntegral{{nameSuffix}}(
// 0. precompute 1/dx * dudx_T. Assume dx[0] == dx[1] == dx[2]
#pragma omp simd aligned(dudxT_by_dx,negativeDudxT_by_dx,dudx_by_dx,negativeDudx_by_dx,dudx_T:ALIGNMENT)
#pragma omp simd aligned(dudxT_by_dx,negativeDudxT_by_dx,dudx_by_dx,negativeDudx_by_dx,dudx_T,dudx:ALIGNMENT)
for (int it = 0; it < {{nDof*nDofPad}}; it++) {
dudxT_by_dx[it] = invDx * dudx_T[it];
negativeDudxT_by_dx[it] = -dudxT_by_dx[it];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment