1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-11-07 07:09:32 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
e7f51e5fb1 Timer pointers for hadrons compat.
Reluctantly, this interface is silly to pass timers around.
2025-08-11 21:11:36 +01:00
Peter Boyle
1ce5f70dd1 Update GridStd.h 2025-08-11 12:20:54 -04:00
2 changed files with 28 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ extern void * Grid_backtrace_buffer[_NBACKTRACE];
#include <random>
#include <functional>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
@@ -38,7 +39,7 @@ extern void * Grid_backtrace_buffer[_NBACKTRACE];
void GridAbort(void);
#define ASSLOG(A) ::write(STDERR_FILENO,A,strlen(A));
#define ASSLOG(A) ::write(STDERR_FILENO,A,::strlen(A));
#ifdef HAVE_EXECINFO_H
#define GRID_ASSERT(b) if(!(b)) { \
ASSLOG(" GRID_ASSERT failure: "); \

View File

@@ -63,15 +63,36 @@ public:
std::vector<Gamma::Algebra> gammas,
const std::vector<ComplexField > &mom,
int orthogdim);
template <typename TensorType>
static void MesonField(TensorType &mat,
const FermionField *lhs_wi,
const FermionField *rhs_vj,
std::vector<Gamma::Algebra> gammas,
const std::vector<ComplexField > &mom,
int orthogdim,double *timer)
{
MesonField(mat,lhs_wi,rhs_vj,gammas,mom,orthogdim);
}
template <typename TensorType> // output: rank 5 tensor, e.g. Eigen::Tensor<ComplexD, 5>
static void AslashField(TensorType &mat,
const FermionField *lhs_wi,
const FermionField *rhs_vj,
const std::vector<ComplexField> &emB0,
const std::vector<ComplexField> &emB1,
int orthogdim);
const FermionField *lhs_wi,
const FermionField *rhs_vj,
const std::vector<ComplexField> &emB0,
const std::vector<ComplexField> &emB1,
int orthogdim);
template <typename TensorType> // output: rank 5 tensor, e.g. Eigen::Tensor<ComplexD, 5>
static void AslashField(TensorType &mat,
const FermionField *lhs_wi,
const FermionField *rhs_vj,
const std::vector<ComplexField> &emB0,
const std::vector<ComplexField> &emB1,
int orthogdim,double *timer)
{
AslashField(mat,lhs_wi,rhs_vj,emB0,emB1,orthogdim);
}
template <typename TensorType>
typename std::enable_if<(std::is_same<Eigen::Tensor<ComplexD,3>, TensorType>::value ||
std::is_same<Eigen::TensorMap<Eigen::Tensor<Complex, 3, Eigen::RowMajor>>, TensorType>::value),