HILA
Loading...
Searching...
No Matches
hilapp_vector.h
1#ifndef HILAPP_VECTOR_H_
2#define HILAPP_VECTOR_H_
3
4#include "../defs.h"
5
6/////////////////////////////////////////////////////////
7/// This header introduces vector classes vec4d etc. for hilapp
8/// Needed because (statically compiled) hilapp cannot use gcc avx header files
9/// (these are understandable only by gcc)
10/////////////////////////////////////////////////////////
11
12class Vec4i {
13 private:
14 int v[4];
15
16 public:
17 void store(int *) const;
18 Vec4i &load(const int *);
19 void insert(int, int);
20};
21
22class Vec4d {
23 private:
24 double v[4];
25
26 public:
27 void store(double *) const;
28 Vec4d &load(const double *);
29};
30
31class Vec4q {
32 private:
33 int64_t v[4];
34
35 public:
36 void store(int64_t *) const;
37 Vec4q &load(const int64_t *);
38};
39
40class Vec4uq {
41 private:
42 uint64_t v[4];
43
44 public:
45 void store(uint64_t *) const;
46 Vec4uq &load(const uint64_t *);
47};
48
49class Vec8f {
50 private:
51 float v[8];
52
53 public:
54 void store(float *) const;
55 Vec8f &load(const float *);
56};
57
58class Vec8i {
59 private:
60 int v[8];
61
62 public:
63 void store(int *) const;
64 Vec8i &load(const int *);
65 void insert(int, int);
66};
67
68class Vec8ui {
69 private:
70 unsigned int v[8];
71
72 public:
73 void store(unsigned int *) const;
74 Vec8ui &load(const unsigned int *);
75};
76
77class Vec8d {
78 private:
79 double v[8];
80
81 public:
82 void store(double *) const;
83 Vec8d &load(const double *);
84};
85
86class Vec8q {
87 private:
88 int64_t v[8];
89
90 public:
91 void store(int64_t *) const;
92 Vec8q &load(const int64_t *);
93};
94
95class Vec8uq {
96 private:
97 uint64_t v[8];
98
99 public:
100 void store(uint64_t *) const;
101 Vec8uq &load(const uint64_t *);
102};
103
104class Vec16f {
105 private:
106 float v[16];
107
108 public:
109 void store(float *) const;
110 Vec16f &load(const float *);
111};
112
113class Vec16i {
114 private:
115 int v[16];
116
117 public:
118 void store(int *) const;
119 Vec16i &load(const int *);
120 void insert(int, int);
121};
122
123class Vec16ui {
124 private:
125 unsigned int v[16];
126
127 public:
128 void store(unsigned int *) const;
129 Vec16ui &load(const unsigned int *);
130};
131
132
133Vec4i operator*(const Vec4i, const Vec4i);
134Vec4d operator*(const Vec4d, const Vec4d);
135Vec4q operator*(const Vec4q, const Vec4q);
136Vec8f operator*(const Vec8f, const Vec8f);
137Vec8i operator*(const Vec8i, const Vec8i);
138Vec8d operator*(const Vec8d, const Vec8d);
139Vec8q operator*(const Vec8q, const Vec8q);
140Vec16f operator*(const Vec16f, const Vec16f);
141Vec16i operator*(const Vec16i, const Vec16i);
142
143#endif