#ifndef __cxz_avx_cc_h__ #define __cxz_avx_cc_h__ #include "avx.h" namespace CNORXZ { inline decltype(auto) MkConsecutive::make(const Double* d) { return *reinterpret_cast( d ); } inline decltype(auto) MkConsecutive::make(Double* d) { return *reinterpret_cast( d ); } template inline decltype(auto) MkConsecutive::makeA(Args&&... args) { static_assert(sizeof...(Args) == AVX_SIZE/sizeof(Double), "got inconsistent number of arguments"); return AVX::ConsecutiveD { _mm256_setr_pd(args...); } } inline decltype(auto) MkConsecutive::make(const Int* d) { return *reinterpret_cast( d ); } inline decltype(auto) MkConsecutive::make(Int* d) { return *reinterpret_cast( d ); } template inline decltype(auto) MkConsecutive::makeA(Args&&... args) { static_assert(sizeof(Int) == 32/8, "lib error: Int size has changed"); static_assert(sizeof...(Args) == AVX_SIZE/sizeof(Int), "got inconsistent number of arguments"); return AVX::ConsecutiveI { _mm256_setr_epi32(args...); } } } #endif