vSMC
vSMC: Scalable Monte Carlo
Macros
simd.hpp File Reference
#include <vsmc/internal/common.hpp>

Go to the source code of this file.

Macros

#define VSMC_DEFINE_UTILITY_SIMD_INTEGER_BINARY_OP( Type, CType, op, bin, assign)
 
#define VSMC_DEFINE_UTILITY_SIMD_REAL_BINARY_OP(Type, CType, op, bin, assign)
 

Macro Definition Documentation

#define VSMC_DEFINE_UTILITY_SIMD_INTEGER_BINARY_OP (   Type,
  CType,
  op,
  bin,
  assign 
)

Definition at line 37 of file simd.hpp.

#define VSMC_DEFINE_UTILITY_SIMD_REAL_BINARY_OP (   Type,
  CType,
  op,
  bin,
  assign 
)
Value:
inline Type &assign(Type &a, const Type &b) \
{ \
a = a op b; \
\
return a; \
} \
\
inline Type bin(const Type &a, CType b) \
{ \
Type x; \
x.set1(b); \
\
return a + x; \
} \
\
inline Type bin(CType a, const Type &b) \
{ \
Type x; \
x.set1(a); \
\
return x + b; \
} \
\
inline Type &assign(Type &a, CType b) \
{ \
a = a + b; \
\
return a; \
}

Definition at line 73 of file simd.hpp.