mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Intel vs. Clang intrinsics differences absorbed
This commit is contained in:
parent
202078eb1b
commit
20a091c3ed
@ -42,6 +42,22 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
namespace Grid{
|
namespace Grid{
|
||||||
namespace Optimization {
|
namespace Optimization {
|
||||||
|
|
||||||
|
template<class vtype>
|
||||||
|
union uconv {
|
||||||
|
__m512 f;
|
||||||
|
vtype v;
|
||||||
|
};
|
||||||
|
|
||||||
|
union u512f {
|
||||||
|
__m512 v;
|
||||||
|
float f[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
union u512d {
|
||||||
|
__m512 v;
|
||||||
|
double f[4];
|
||||||
|
};
|
||||||
|
|
||||||
struct Vsplat{
|
struct Vsplat{
|
||||||
//Complex float
|
//Complex float
|
||||||
inline __m512 operator()(float a, float b){
|
inline __m512 operator()(float a, float b){
|
||||||
@ -361,8 +377,9 @@ namespace Optimization {
|
|||||||
// Some Template specialization
|
// Some Template specialization
|
||||||
|
|
||||||
// Hack for CLANG until mm512_reduce_add_ps etc... are implemented in GCC and Clang releases
|
// Hack for CLANG until mm512_reduce_add_ps etc... are implemented in GCC and Clang releases
|
||||||
#undef GNU_CLANG_COMPILER
|
|
||||||
#ifdef GNU_CLANG_COMPILER
|
#ifndef __INTEL_COMPILER
|
||||||
|
#warning "Slow reduction due to incomplete reduce intrinsics"
|
||||||
//Complex float Reduce
|
//Complex float Reduce
|
||||||
template<>
|
template<>
|
||||||
inline Grid::ComplexF Reduce<Grid::ComplexF, __m512>::operator()(__m512 in){
|
inline Grid::ComplexF Reduce<Grid::ComplexF, __m512>::operator()(__m512 in){
|
||||||
|
Loading…
Reference in New Issue
Block a user