1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

Reproducibility checks for inner product

This commit is contained in:
Guido Cossu
2016-11-23 11:42:04 +00:00
parent f1908c7bc9
commit 7144ee7ae8
6 changed files with 117 additions and 56 deletions

View File

@ -66,6 +66,9 @@ namespace Optimization {
double f[4];
};
struct Vsplat{
//Complex float
inline __m256 operator()(float a, float b){

View File

@ -146,6 +146,23 @@ class Grid_simd {
Grid_simd(const Grid_simd &rhs) : v(rhs.v){}; // compiles in movaps
Grid_simd(const Grid_simd &&rhs) : v(rhs.v){};
/////////////////////////////
// Comparisons
/////////////////////////////
inline bool operator==(const Grid_simd& lhs){
Grid_simd::conv_t conv1;
Grid_simd::conv_t conv2;
conv1.v = v;
conv2.v = lhs.v;
return std::equal(std::begin(conv1.s), std::end(conv1.s), std::begin(conv2.s));
}
inline bool operator!=(const Grid_simd& lhs){
return !(*this == lhs);
}
/////////////////////////////
// Constructors
/////////////////////////////