#include <iostream>
#include <experimental/simd>
Go to the source code of this file.
|
struct | vspline::simd_type< _value_type, _vsize > |
| class template simd_type provides a fixed-size container type for small sets of fundamentals which are stored in a C vector. The type offers arithmetic capabilities which are implemented by using loops over the elements in the vector, expecting that the compiler will autovectorize these loops into 'proper' SIMD code. The interface of this type is modelled to be compatible with Vc's SimdArray. Unfortunately, Vc::SimdArray requires additional template arguments, so at times it's difficult to use the two types instead of each other. The interface compatibility does not mean that the arithmetic will produce the same results - this is intended but neither tested nor enforced. More...
|
|
struct | vspline::simd_type< _value_type, _vsize >::masked_type |
|
|
#define | VSPLINE_VECTOR_NBYTES 64 |
|
#define | BUILD_FROM_CONTAINER(SIZE_TYPE, VSZ) |
|
#define | GS_LAMBDA |
|
#define | BROADCAST_STD_FUNC(FUNC) |
|
#define | BROADCAST_STD_FUNC2(FUNC) |
|
#define | BROADCAST_STD_FUNC3(FUNC) |
|
#define | INTEGRAL_ONLY |
|
#define | BOOL_ONLY |
|
#define | OPEQ_FUNC(OPFUNC, OPEQ, CONSTRAINT) |
|
#define | C_PROMOTE(A, B) |
|
#define | OP_FUNC(OPFUNC, OP, CONSTRAINT) |
|
#define | OP_FUNC(OPFUNC, OP, CONSTRAINT) |
|
#define | COMPARE_FUNC(OP, OPFUNC) |
|
#define | OPEQ_FUNC(OPFUNC, OPEQ, CONSTRAINT) |
|
#define | CLAMP(FNAME, REL) |
|
◆ BOOL_ONLY
Value: static_assert ( std::is_same < value_type , bool > :: value , \
"this operation is only allowed for booleans" ) ;
Definition at line 478 of file std_simd_type.h.
◆ BROADCAST_STD_FUNC
#define BROADCAST_STD_FUNC |
( |
|
FUNC | ) |
|
Value: friend simd_type FUNC ( simd_type arg ) \
{ \
return FUNC ( arg.to_base() ) ; \
}
Definition at line 372 of file std_simd_type.h.
◆ BROADCAST_STD_FUNC2
#define BROADCAST_STD_FUNC2 |
( |
|
FUNC | ) |
|
Value: friend simd_type FUNC ( simd_type arg1 , \
simd_type arg2 ) \
{ \
return FUNC ( arg1.to_base() , arg2.to_base() ) ; \
}
Definition at line 441 of file std_simd_type.h.
◆ BROADCAST_STD_FUNC3
#define BROADCAST_STD_FUNC3 |
( |
|
FUNC | ) |
|
Value: friend simd_type FUNC ( simd_type arg1 , \
simd_type arg2 , \
simd_type arg3 ) \
{ \
return FUNC ( arg1.to_base() , arg2.to_base() , arg3.to_base() ) ; \
}
Definition at line 456 of file std_simd_type.h.
◆ BUILD_FROM_CONTAINER
#define BUILD_FROM_CONTAINER |
( |
|
SIZE_TYPE, |
|
|
|
VSZ |
|
) |
| |
Value: template < typename U , template < typename , SIZE_TYPE > class V > \
simd_type & operator= ( const V < U , VSZ > & rhs ) \
{ \
for ( size_type i = 0 ; i <
vsize ; i++ ) \
to_base() [ i ] = value_type ( rhs [ i ] ) ; \
return *this ; \
} \
template < typename U , template < typename , SIZE_TYPE > class V > \
simd_type ( const V < U ,
VSZ > & ini ) \
{ \
*this = ini ; \
}
Definition at line 168 of file std_simd_type.h.
◆ C_PROMOTE
#define C_PROMOTE |
( |
|
A, |
|
|
|
B |
|
) |
| |
Value: typename std::conditional \
< std::is_same < A , B > :: value , \
A , \
decltype ( std::declval < A > () \
+ std::declval < B > () ) \
> :: type
Definition at line 523 of file std_simd_type.h.
◆ CLAMP
#define CLAMP |
( |
|
FNAME, |
|
|
|
REL |
|
) |
| |
Value: simd_type FNAME ( simd_type threshold ) const \
{ \
return REL ( to_base() , threshold.to_base() ) ; \
} \
simd_type FNAME ( value_type threshold ) const \
{ \
return REL ( to_base() , threshold ) ; \
} \
Definition at line 736 of file std_simd_type.h.
◆ COMPARE_FUNC
#define COMPARE_FUNC |
( |
|
OP, |
|
|
|
OPFUNC |
|
) |
| |
Value: friend mask_type OPFUNC ( simd_type lhs , \
simd_type rhs ) \
{ \
return lhs.to_base() OP rhs.to_base() ; \
} \
friend mask_type OPFUNC ( simd_type lhs , \
value_type rhs ) \
{ \
return lhs.to_base() OP rhs ; \
} \
friend mask_type OPFUNC ( value_type lhs , \
simd_type rhs ) \
{ \
return lhs OP rhs.to_base() ; \
}
Definition at line 628 of file std_simd_type.h.
◆ GS_LAMBDA
◆ INTEGRAL_ONLY
Value: static_assert ( std::is_integral < value_type > :: value , \
"this operation is only allowed for integral types" ) ;
Definition at line 474 of file std_simd_type.h.
◆ OP_FUNC [1/2]
#define OP_FUNC |
( |
|
OPFUNC, |
|
|
|
OP, |
|
|
|
CONSTRAINT |
|
) |
| |
◆ OP_FUNC [2/2]
#define OP_FUNC |
( |
|
OPFUNC, |
|
|
|
OP, |
|
|
|
CONSTRAINT |
|
) |
| |
Value: simd_type OPFUNC() const \
{ \
return OP this->to_base() ; \
}
Definition at line 613 of file std_simd_type.h.
◆ OPEQ_FUNC [1/2]
#define OPEQ_FUNC |
( |
|
OPFUNC, |
|
|
|
OPEQ, |
|
|
|
CONSTRAINT |
|
) |
| |
Value: simd_type & OPFUNC ( value_type rhs ) \
{ \
CONSTRAINT \
to_base() OPEQ rhs ; \
return *this ; \
} \
simd_type & OPFUNC ( simd_type rhs ) \
{ \
CONSTRAINT \
to_base() OPEQ rhs.to_base() ; \
return *this ; \
}
Definition at line 685 of file std_simd_type.h.
◆ OPEQ_FUNC [2/2]
#define OPEQ_FUNC |
( |
|
OPFUNC, |
|
|
|
OPEQ, |
|
|
|
CONSTRAINT |
|
) |
| |
Value: simd_type & OPFUNC ( value_type rhs ) \
{ \
CONSTRAINT \
we_t ( whether , whither.to_base() ) OPEQ rhs ; \
return whither ; \
} \
simd_type & OPFUNC ( simd_type rhs ) \
{ \
CONSTRAINT \
we_t ( whether , whither.to_base() ) OPEQ rhs.to_base() ; \
return whither ; \
}
Definition at line 685 of file std_simd_type.h.
◆ VSPLINE_VECTOR_NBYTES
#define VSPLINE_VECTOR_NBYTES 64 |