1 #ifndef DataFormat_Math_ExtVec_H 2 #define DataFormat_Math_ExtVec_H 6 #define VECTOR_EXT(N) __attribute__((vector_size(N))) 15 typedef
long double VECTOR_EXT(32) cms_float128x2_t;
16 typedef
long double VECTOR_EXT(64) cms_float128x4_t;
17 typedef
long double VECTOR_EXT(128) cms_float128x8_t;
56 template <
typename T,
int N>
65 template <
typename W,
typename V>
72 for (
int i = 0;
i !=
N; ++
i)
89 template <
typename Vec,
typename F>
94 for (
int i = 0;
i !=
N; ++
i)
99 template <
typename Vec>
103 Vec x1200{
x[1],
x[2],
x[0],
x[0]};
104 Vec y2010{
y[2],
y[0],
y[1],
y[0]};
105 Vec x2010{
x[2],
x[0],
x[1],
x[0]};
106 Vec y1200{
y[1],
y[2],
y[0],
y[0]};
107 return x1200 * y2010 - x2010 * y1200;
110 template <
typename V1,
typename V2>
112 return x[0] *
y[1] -
x[1] *
y[0];
141 template <
typename V>
146 for (
int i = 0;
i !=
N; ++
i)
151 template <
typename V1,
typename V2>
153 return x[0] *
y[0] +
x[1] *
y[1];
156 template <
typename V1,
typename V2>
159 return z[0] +
z[1] +
z[2];
179 template <
typename V>
184 template <
typename V>
191 template <
typename T>
196 constexpr Rot3() :
axis{{(
Vec){
T(1), 0, 0, 0}}, {(
Vec){0,
T(1), 0, 0}}, {(
Vec){0, 0,
T(1), 0}}} {}
201 :
axis{{(
Vec){
xx,
xy,
xz, 0}}, {(
Vec){yx,
yy,
yz, 0}}, {(
Vec){zx, zy,
zz, 0}}} {}
232 template <
typename T>
234 return lh.rotateBack(rh);
237 template <
typename T>
271 template <
typename T>
273 return lh.rotateBack(rh);
282 std::ostream& operator<<(std::ostream& out, As3D<Vec4F>
const&
v);
283 std::ostream& operator<<(std::ostream& out, As3D<Vec4D>
const&
v);
293 return out <<
'(' <<
v[0] <<
", " <<
v[1] <<
", " <<
v[2] <<
", " <<
v[3] <<
')';
296 return out <<
'(' <<
v[0] <<
", " <<
v[1] <<
", " <<
v[2] <<
", " <<
v[3] <<
')';
301 std::ostream& operator<<(std::ostream& out, ::As3D<Vec4F>
const&
v) {
302 return out <<
'(' <<
v.v[0] <<
", " <<
v.v[1] <<
", " <<
v.v[2] <<
')';
305 std::ostream& operator<<(std::ostream& out, ::As3D<Vec4D>
const&
v) {
306 return out <<
'(' <<
v.v[0] <<
", " <<
v.v[1] <<
", " <<
v.v[2] <<
')';
constexpr Vec2< T > x() const
auto cross2(V1 x, V2 y) -> typename std::remove_reference< decltype(x[0])>::type
constexpr Rot2(T xx, T xy, T yx, T yy)
ret
prodAgent to be discontinued
constexpr Rot2 rotateBack(Rot2 const &r) const
constexpr Rot3 rotateBack(Rot3 const &r) const
auto xy(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
auto dot3(V1 x, V2 y) -> typename std::remove_reference< decltype(x[0])>::type
std::ostream & operator<<(std::ostream &out, Vec2D const &v)
constexpr Vec2< T > rotate(Vec2< T > v) const
typename ExtVecTraits< T, N >::type ExtVec
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t V
Rot3 rotate(Rot3 const &r) const
constexpr Vec4< T > rotate(Vec4< T > v) const
def template(fileName, svg, replaceme="REPLACEME")
constexpr Vec4< T > z() const
constexpr Rot2 transpose() const
constexpr Vec4< T > y() const
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
constexpr Rot3< T > operator*(Rot3< T > const &rh, Rot3< T > const &lh)
constexpr Rot3(T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz)
Rot2 rotate(Rot2 const &r) const
alpaka::Vec< TDim, Idx > Vec
constexpr Rot3(Vec4< T > ix, Vec4< T > iy, Vec4< T > iz)
auto dot(V x, V y) -> typename std::remove_reference< decltype(x[0])>::type
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
As3D< V > as3D(V const &v)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
constexpr Vec4< T > rotateBack(Vec4< T > v) const
constexpr Vec2< T > y() const
auto dot2(V1 x, V2 y) -> typename std::remove_reference< decltype(x[0])>::type
constexpr Rot3 transpose() const
constexpr Rot2(Vec2< T > ix, Vec2< T > iy)
constexpr Vec4< T > x() const
constexpr Vec2< T > rotateBack(Vec2< T > v) const