05.03., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 5c89b509 authored by Jean-Matthieu's avatar Jean-Matthieu

Toolkit/KernelGen - add VectStride and VectLength constexpr parameters

parent b2f53eb6
......@@ -32,6 +32,10 @@ namespace {{namespaceName}} {
constexpr bool isLinear() {return {{isLinearCText}};}
// Vect methods configuration
constexpr int getVectStride() {return {{nDofPad}};}
constexpr int getVectLength() {return {{nDof}};}
// Array sizes
constexpr int getlQiSize() {return {{lQiSize}};}
constexpr int getlFiSize() {return {{lFiSize}};}
......
......@@ -41,6 +41,13 @@ public:
static constexpr double CFL = {{CFL}};
static constexpr double PNPM = {{PNPM}};
// vectorisation parameters not used by the solver but required to compile vectorised user method if present
// array stride of the fastest dim to vectorize upon.
static constexpr int VectStride = 1;
// length of the useful data in the array's fastest dim.
// If VectLength < VectStride the rest is padding (might contain junk values).
static constexpr int VectLength = 1;
// quadrature weights and operators
static constexpr bool UseLobattoBasis = {{"true" if basis == "lobatto" else "false"}};
// [order][node i]
......
......@@ -49,6 +49,14 @@ public:
static constexpr double CFL = {{CFL}};
static constexpr double PNPM = {{PNPM}};
// TODO JMG make it true for nonlinear vect methods too
// vectorisation parameters used by vectorised user method if present
// array stride of the fastest dim to vectorize upon.
static constexpr int VectStride = {{optNamespace}}::getVectStride();
// length of the useful data in the array's fastest dim.
// If VectLength < VectStride the rest is padding (might contain junk values).
static constexpr int VectLength = {{optNamespace}}::getVectLength();
// [order][node i]
static kernels::UnivariateFunction** basisFunction;
static kernels::UnivariateFunction** basisFunctionFirstDerivative;
......
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