LCOV - code coverage report
Current view: top level - Src/AVX2 - InaVecAVX2Double.hpp (source / functions) Hit Total Coverage
Test: Coverage inastemp Lines: 4 4 100.0 %
Date: 2022-03-17 09:48:28 Functions: 0 0 -

          Line data    Source code
       1             : ///////////////////////////////////////////////////////////////////////////
       2             : // Inastemp - Berenger Bramas MPCDF - 2016
       3             : // Under MIT Licence, please you must read the LICENCE file.
       4             : ///////////////////////////////////////////////////////////////////////////
       5             : #ifndef INAVECAVX2DOUBLE_HPP
       6             : #define INAVECAVX2DOUBLE_HPP
       7             : 
       8             : #include "InastempGlobal.h"
       9             : #include "AVX/InaVecAVXDouble.hpp"
      10             : 
      11             : #ifndef INASTEMP_USE_AVX2
      12             : #error InaVecAVX2<double> is included but AVX2 is not enable in the configuration
      13             : #endif
      14             : 
      15             : #include <tmmintrin.h>
      16             : #include <emmintrin.h>
      17             : 
      18             : template <class RealType>
      19             : class InaVecAVX2;
      20             : 
      21             : template <>
      22             : class alignas(32) InaVecAVX2<double> : public InaVecAVX<double> {
      23             :     using Parent = InaVecAVX<double>;
      24             : 
      25             : public:
      26             :     using Parent::GetVecLength;
      27             : 
      28        6226 :     using InaVecAVX<double>::InaVecAVX;
      29             : 
      30         123 :     inline InaVecAVX2(){}
      31             : 
      32             :     inline InaVecAVX2(const InaVecAVX<double>& other)
      33         540 :         : Parent(other){}
      34             : 
      35             :     inline static const char* GetName() {
      36             :         return "InaVecAVX2<double>";
      37             :     }
      38             : 
      39             : #ifdef __FMA__
      40             :     static constexpr bool IsRealFma(){
      41             :         return true;
      42             :     }
      43             : #endif
      44             : 
      45             :     inline static InaIfElse< InaVecAVX2<double> >::ThenClass If(const typename Parent::MaskType& inTest) {
      46          29 :         return InaIfElse< InaVecAVX2<double> >::IfClass().If(inTest);
      47             :     }
      48             : 
      49             : #ifdef __FMA__
      50             :     inline static InaVecAVX2<double> Fma(const InaVecAVX2<double>& inValAdd, const InaVecAVX2<double>& inValMul1, const InaVecAVX2<double>& inValMul2){
      51             :         return _mm256_fmadd_pd(inValMul1.Parent::vec,inValMul2.Parent::vec, inValAdd.Parent::vec);
      52             :     }
      53             : #endif
      54             : };
      55             : 
      56             : 
      57             : #endif

Generated by: LCOV version 1.13