use constexpr

This commit is contained in:
conrad
2022-05-02 15:59:09 +10:00
parent 71eab10ca5
commit 72afefcd22
+20 -20
View File
@@ -264,8 +264,8 @@ eglue_core<eglue_type>::apply(outT& out, const eGlue<T1, T2, eglue_type>& x)
typedef typename T1::elem_type eT;
const bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
const bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
constexpr bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
// NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing;
// size setting and alias checking is done by either the Mat contructor or operator=()
@@ -371,8 +371,8 @@ eglue_core<eglue_type>::apply_inplace_plus(Mat<typename T1::elem_type>& out, con
eT* out_mem = out.memptr();
const bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
const bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
constexpr bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -469,8 +469,8 @@ eglue_core<eglue_type>::apply_inplace_minus(Mat<typename T1::elem_type>& out, co
eT* out_mem = out.memptr();
const bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
const bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
constexpr bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -567,8 +567,8 @@ eglue_core<eglue_type>::apply_inplace_schur(Mat<typename T1::elem_type>& out, co
eT* out_mem = out.memptr();
const bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
const bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
constexpr bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -665,8 +665,8 @@ eglue_core<eglue_type>::apply_inplace_div(Mat<typename T1::elem_type>& out, cons
eT* out_mem = out.memptr();
const bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
const bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (Proxy<T1>::use_at || Proxy<T2>::use_at);
constexpr bool use_mp = (Proxy<T1>::use_mp || Proxy<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -761,8 +761,8 @@ eglue_core<eglue_type>::apply(Cube<typename T1::elem_type>& out, const eGlueCube
typedef typename T1::elem_type eT;
const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
constexpr bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
// NOTE: we're assuming that the cube has already been set to the correct size and there is no aliasing;
// size setting and alias checking is done by either the Cube contructor or operator=()
@@ -870,8 +870,8 @@ eglue_core<eglue_type>::apply_inplace_plus(Cube<typename T1::elem_type>& out, co
eT* out_mem = out.memptr();
const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
constexpr bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -969,8 +969,8 @@ eglue_core<eglue_type>::apply_inplace_minus(Cube<typename T1::elem_type>& out, c
eT* out_mem = out.memptr();
const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
constexpr bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -1068,8 +1068,8 @@ eglue_core<eglue_type>::apply_inplace_schur(Cube<typename T1::elem_type>& out, c
eT* out_mem = out.memptr();
const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
constexpr bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{
@@ -1167,8 +1167,8 @@ eglue_core<eglue_type>::apply_inplace_div(Cube<typename T1::elem_type>& out, con
eT* out_mem = out.memptr();
const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
constexpr bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at);
constexpr bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp) && (arma_config::openmp);
if(use_at == false)
{