nlib
SimdVector3.h
[詳解]
1 
2 /*--------------------------------------------------------------------------------*
3  Project: CrossRoad
4  Copyright (C)Nintendo All rights reserved.
5 
6  These coded instructions, statements, and computer programs contain proprietary
7  information of Nintendo and/or its licensed developers and are protected by
8  national and international copyright laws. They may not be disclosed to third
9  parties or copied or duplicated in any form, in whole or in part, without the
10  prior written consent of Nintendo.
11 
12  The content herein is highly confidential and should be handled accordingly.
13  *--------------------------------------------------------------------------------*/
14 
15 #pragma once
16 #ifndef INCLUDE_NN_NLIB_SIMD_SIMDVECTOR3_H_
17 #define INCLUDE_NN_NLIB_SIMD_SIMDVECTOR3_H_
18 
19 #include "nn/nlib/simd/SimdFloat.h"
22 
23 NLIB_NAMESPACE_BEGIN
24 namespace simd {
25 
27  public:
28  static SimdVector __vectorcall LoadFloat3(const Float3* p) NLIB_NOEXCEPT;
29  template<typename MyVector3>
30  static SimdVector __vectorcall LoadFloat3(const MyVector3* p) NLIB_NOEXCEPT;
31  static void __vectorcall StoreFloat3(Float3* p, SimdVectorArg vec) NLIB_NOEXCEPT;
32  template<typename MyVector3>
33  static void __vectorcall StoreFloat3(MyVector3* p, SimdVectorArg vec) NLIB_NOEXCEPT;
34  static bool __vectorcall CmpEq(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
35  static bool __vectorcall CmpLt(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
36  static bool __vectorcall CmpLe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
37  static bool __vectorcall CmpGt(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
38  static bool __vectorcall CmpGe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
39  static bool __vectorcall CmpNe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
40  static bool __vectorcall CmpNearEq(SimdVectorArg vec1, SimdVectorArg vec2,
42  static bool __vectorcall IsNaN(SimdVectorArg vec) NLIB_NOEXCEPT;
43  static bool __vectorcall IsInfinite(SimdVectorArg vec) NLIB_NOEXCEPT;
44  static bool __vectorcall InBound(SimdVectorArg vec, SimdVectorArg bounds) NLIB_NOEXCEPT;
45  static f128 __vectorcall Dot(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
46  template<bool SetLane0, bool SetLane1, bool SetLane2, bool SetLane3>
47  static f128 __vectorcall DotEx(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
48  static SimdVector __vectorcall Cross(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT;
49  static SimdVector __vectorcall Normalize(SimdVectorArg vec) NLIB_NOEXCEPT;
50  static SimdVector __vectorcall NormalizeEst(SimdVectorArg vec) NLIB_NOEXCEPT;
51  static float __vectorcall Normalize(SimdVector* normalized, SimdVectorArg vec) NLIB_NOEXCEPT;
52  static float __vectorcall NormalizeEst(SimdVector* normalized, SimdVectorArg vec) NLIB_NOEXCEPT;
53  static f128 __vectorcall LengthSq(SimdVectorArg vec) NLIB_NOEXCEPT;
54  static f128 __vectorcall Length(SimdVectorArg vec) NLIB_NOEXCEPT;
55  static f128 __vectorcall LengthEst(SimdVectorArg vec) NLIB_NOEXCEPT;
56  static f128 __vectorcall RecpLength(SimdVectorArg vec) NLIB_NOEXCEPT;
57  static f128 __vectorcall RecpLengthEst(SimdVectorArg vec) NLIB_NOEXCEPT;
58  static f128 __vectorcall GetAngle(SimdVectorArg vec1_normalized,
59  SimdVectorArg vec2_normalized) NLIB_NOEXCEPT;
60  static SimdVector __vectorcall Reflect(SimdVectorArg vec, SimdVectorArg normal) NLIB_NOEXCEPT;
61  static SimdVector __vectorcall Orthogonal(SimdVector vec) NLIB_NOEXCEPT; // not implemented yet
62 
63  static SimdVector __vectorcall Transform(SimdVectorArg vec, SimdMatrixArg m) NLIB_NOEXCEPT;
64  static SimdVector __vectorcall TransformCoord(SimdVectorArg vec, SimdMatrixArg m) NLIB_NOEXCEPT;
65  static SimdVector __vectorcall TransformNormal(SimdVectorArg vec,
67 
68  static SimdVector __vectorcall Rotate(SimdVectorArg vec,
69  SimdQuaternionArg q_normalized) NLIB_NOEXCEPT;
70  static SimdVector __vectorcall InvRotate(SimdVectorArg vec,
71  SimdQuaternionArg q_normalized) NLIB_NOEXCEPT;
72 
73  // Transform****Stream
74  // Project, Unproject
75 
76  private:
77  Vector3(); // forbidden
78 };
79 
80 #ifndef NLIB_DOXYGEN
81 
82 #define NLIB_M(tp) inline tp __vectorcall
83 #define NLIB_MH(tp) inline tp __vectorcall
84 
85 // p is 4 bytes aligned
86 NLIB_M(SimdVector) Vector3::LoadFloat3(const Float3* p) NLIB_NOEXCEPT {
87 #ifdef NLIB_F128_SIMD_NOUSE
88  f128 ret;
89  ret.vec.v[0] = p->x;
90  ret.vec.v[1] = p->y;
91  ret.vec.v[2] = p->z;
92  ret.vec.v[3] = 0.f;
93  return ret;
94 #elif defined(NLIB_SSE41)
95  __m128 x = _mm_load_ss(&p->x);
96  __m128 y = _mm_load_ss(&p->y);
97  __m128 z = _mm_load_ss(&p->z);
98  __m128 xy = _mm_unpacklo_ps(x, y);
99  return _mm_shuffle_ps(xy, z, _MM_SHUFFLE(1, 0, 1, 0));
100 #elif defined(NLIB_NEON)
101  float32x2_t xy = vld1_f32(&p->x);
102  float32x2_t z = vld1_lane_f32(&p->z, xy, 0);
103  return vcombine_f32(xy, z);
104 #elif defined(CAFE)
105  f128 ret;
106  ret.vec.ps[0][0] = p->x;
107  ret.vec.ps[0][1] = p->y;
108  ret.vec.ps[1][0] = p->z;
109  return ret;
110 #endif
111 }
112 
113 template<typename MyVector3>
114 // MyVector is a structure like 'struct MyVector3 { float x, y, z; };'
115 // DirectX::XMFLOAT3, DirectX::XMFLOAT3A for example
116 NLIB_MH(SimdVector) Vector3::LoadFloat3(const MyVector3* p) NLIB_NOEXCEPT {
117  NLIB_STATIC_ASSERT(sizeof(p->x) == 4);
118  NLIB_STATIC_ASSERT(sizeof(p->y) == 4);
119  NLIB_STATIC_ASSERT(sizeof(p->z) == 4);
120  return Vector3::LoadFloat3(reinterpret_cast<const Float3*>(&p->x));
121 }
122 
123 // p is 4 bytes aligned
124 NLIB_M(void) Vector3::StoreFloat3(Float3* p, SimdVectorArg vec) NLIB_NOEXCEPT {
125 #ifdef NLIB_F128_SIMD_NOUSE
126  p->x = vec.vec.v[0];
127  p->y = vec.vec.v[1];
128  p->z = vec.vec.v[2];
129 #elif defined(NLIB_SSE41)
130  f128 y = _mm_shuffle_ps(vec, vec, _MM_SHUFFLE(1, 1, 1, 1));
131  f128 z = _mm_shuffle_ps(vec, vec, _MM_SHUFFLE(2, 2, 2, 2));
132  _mm_store_ss(&p->x, vec);
133  _mm_store_ss(&p->y, y);
134  _mm_store_ss(&p->z, z);
135 #elif defined(NLIB_NEON)
136  float32x2_t lo = vget_low_f32(vec);
137  vst1_f32(&p->x, lo);
138  vst1q_lane_f32(&p->z, vec, 2);
139 #elif defined(CAFE)
140  p->x = vec.vec.ps[0][0];
141  p->y = vec.vec.ps[0][1];
142  p->z = vec.vec.ps[1][0];
143 #endif
144 }
145 
146 template<typename MyVector3>
147 NLIB_MH(void)
148 Vector3::StoreFloat3(MyVector3* p, SimdVectorArg vec) NLIB_NOEXCEPT {
149  // MyVector is a structure like 'struct MyVector3 { float x, y, z; };'
150  // DirectX::XMFLOAT3, DirectX::XMFLOAT3A for example
151  NLIB_STATIC_ASSERT(sizeof(p->x) == 4);
152  NLIB_STATIC_ASSERT(sizeof(p->y) == 4);
153  NLIB_STATIC_ASSERT(sizeof(p->z) == 4);
154  Vector3::StoreFloat3(reinterpret_cast<Float3*>(&p->x), vec);
155 }
156 
157 // true if vec1[xyz] == vec2[xyz]
158 inline bool __vectorcall Vector3::CmpEq(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
159  f128 mask = F128::CmpEq(vec1, vec2);
160  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
161 }
162 
163 // true if vec1[xyz] < vec2[xyz]
164 inline bool __vectorcall Vector3::CmpLt(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
165  f128 mask = F128::CmpLt(vec1, vec2);
166  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
167 }
168 
169 // true if vec1[xyz] <= vec2[xyz]
170 inline bool __vectorcall Vector3::CmpLe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
171  f128 mask = F128::CmpLe(vec1, vec2);
172  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
173 }
174 
175 // true if vec1[xyz] > vec2[xyz]
176 inline bool __vectorcall Vector3::CmpGt(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
177  f128 mask = F128::CmpGt(vec1, vec2);
178  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
179 }
180 
181 // true if vec1[xyz] >= vec2[xyz]
182 inline bool __vectorcall Vector3::CmpGe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
183  f128 mask = F128::CmpGe(vec1, vec2);
184  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
185 }
186 
187 // vec1.x != vec2.x || vec1.y != vec2.y || vec1.z != vec2.z
188 inline bool __vectorcall Vector3::CmpNe(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
189  f128 mask = F128::CmpNe(vec1, vec2);
190  return !F128::IsAllMaskFalse(F128::Swizzle<0, 1, 2, 2>(mask));
191 }
192 
193 inline bool __vectorcall Vector3::CmpNearEq(SimdVectorArg vec1, SimdVectorArg vec2,
195  f128 mask = F128::CmpNearEq(vec1, vec2, eps);
196  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
197 }
198 
199 // isnan(vec.x) || isnan(vec.y) || isnan(vec.z)
200 inline bool __vectorcall Vector3::IsNaN(SimdVectorArg vec) NLIB_NOEXCEPT {
201  f128 mask = F128::IsNaN(vec);
202  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
203 }
204 
205 // isinf(vec.x) || isinf(vec.y) || isinf(vec.z)
206 inline bool __vectorcall Vector3::IsInfinite(SimdVectorArg vec) NLIB_NOEXCEPT {
207  f128 mask = F128::IsInfinite(vec);
208  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
209 }
210 
211 // true if abs(vec[xyz]) <= bounds[xyz]
212 inline bool __vectorcall Vector3::InBound(SimdVectorArg vec, SimdVectorArg bounds) NLIB_NOEXCEPT {
213  f128 mask = F128::InBound(vec, bounds);
214  return F128::IsAllMaskTrue(F128::Swizzle<0, 1, 2, 2>(mask));
215 }
216 
217 // r = { dot, dot, dot, dot }
218 NLIB_M(f128) Vector3::Dot(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
219 #ifdef NLIB_F128_SIMD_NOUSE
220  float tmp = vec1.vec.v[0] * vec2.vec.v[0] + vec1.vec.v[1] * vec2.vec.v[1] +
221  vec1.vec.v[2] * vec2.vec.v[2];
222  f128 rval;
223  rval.vec.v[0] = rval.vec.v[1] = rval.vec.v[2] = rval.vec.v[3] = tmp;
224  return rval;
225 #elif defined(NLIB_SSE41)
226  return _mm_dp_ps(vec1, vec2, 0x7F);
227 #elif defined(NLIB_NEON)
228 #ifdef __aarch64__
229  float32x4_t tmp = vmulq_f32(vec1, vec2);
230  tmp = F128::Permute<0, 1, 2, 6>(tmp, vdupq_n_f32(0.f));
231  tmp = vpaddq_f32(tmp, tmp);
232  tmp = vpaddq_f32(tmp, tmp);
233  return tmp;
234 #else
235  f128 tmp = vmulq_f32(vec1, vec2);
236  float32x2_t lo = vget_low_f32(tmp);
237  lo = vpadd_f32(lo, lo);
238  float32x2_t hi = vdup_lane_f32(vget_high_f32(tmp), 0);
239  lo = vadd_f32(lo, hi);
240  return vcombine_f32(lo, lo);
241 #endif
242 #elif defined(CAFE)
243  f128 tmp = F128::Mult(vec1, vec2);
244  f32x2 val = __PS_SUM0(tmp.vec.ps[0], tmp.vec.ps[0], tmp.vec.ps[0]);
245  val = __PS_ADD(val, tmp.vec.ps[1]);
246  f128 ret;
247  ret.vec.ps[0] = ret.vec.ps[1] = __PS_FDUP(val[0]);
248  return ret;
249 #endif
250 }
251 
252 template<bool SetLane0, bool SetLane1, bool SetLane2, bool SetLane3>
253 // r[i] = SetLane[i] ? dot : 0.f
254 NLIB_MH(f128) Vector3::DotEx(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
255 #if !defined(NLIB_F128_SIMD_NOUSE) && defined(NLIB_SSE41)
256  return _mm_dp_ps(
257  vec1, vec2,
258  (0x70 | (SetLane0 ? 1 : 0) | (SetLane1 ? 2 : 0) | (SetLane2 ? 4 : 0) | (SetLane3 ? 8 : 0)));
259 #else
260  return F128::Splat<SetLane0, SetLane1, SetLane2, SetLane3>(F128::SetZero(), Dot(vec1, vec2));
261 #endif
262 }
263 
264 // 'w' component is arbitrary
265 NLIB_M(SimdVector) Vector3::Cross(SimdVectorArg vec1, SimdVectorArg vec2) NLIB_NOEXCEPT {
266  SimdVector rval =
267  F128::Mult(F128::Swizzle<1, 2, 0, -1>(vec1), F128::Swizzle<2, 0, 1, -1>(vec2));
268  // yz, zx, xy, *
269  rval = F128::MultSub(F128::Swizzle<2, 0, 1, -1>(vec1), F128::Swizzle<1, 2, 0, -1>(vec2), rval);
270  // yz - zy, zx - xz, xy - yx, *
271  return rval;
272 }
273 
274 // nan if |vec| is too big, 0 if |vec| = 0
275 NLIB_M(SimdVector) Vector3::Normalize(SimdVectorArg vec) NLIB_NOEXCEPT {
276  f128 dot = Vector3::Dot(vec, vec);
277 #if defined(NLIB_NEON) && !defined(NLIB_F128_SIMD_NOUSE)
278  float32x4_t x;
279  x = vrsqrteq_f32(dot);
280  x = vmulq_f32(x, vrsqrtsq_f32(dot, vmulq_f32(x, x)));
281  f128 rsqrt = vmulq_f32(x, vrsqrtsq_f32(dot, vmulq_f32(x, x)));
282 #else
283  f128 rsqrt = F128::RecpSqrt(dot);
284 #endif
285  f128 inf = F128::SetInfinity();
286  f128 eqzero = F128::CmpEqZero(dot);
287  f128 eqinf = F128::CmpEq(dot, inf);
288  SimdVector ret = F128::Mult(vec, rsqrt);
289  f128 nan = F128::SetNaN();
290  ret = F128::AndNot(eqzero, ret);
291  ret = F128::Select(eqinf, nan, ret);
292  return ret;
293 }
294 
295 NLIB_M(float) Vector3::Normalize(SimdVector* normalized, SimdVectorArg vec) NLIB_NOEXCEPT {
296  f128 dot = Vector3::Dot(vec, vec);
297  f128 rsqrt = F128::RecpSqrt(dot);
298  *normalized = F128::Mult(vec, rsqrt);
299  return F128::GetFloatFromLane<0>(dot);
300 }
301 
302 // r = { lensq, lensq, lensq, lensq }
303 NLIB_M(f128) Vector3::LengthSq(SimdVectorArg vec) NLIB_NOEXCEPT {
304  return Dot(vec, vec);
305 }
306 
307 // r = { len, len, len, len }
308 NLIB_M(f128) Vector3::Length(SimdVectorArg vec) NLIB_NOEXCEPT {
309  return F128::Sqrt(Dot(vec, vec));
310 }
311 
312 // r = { len, len, len, len }
313 NLIB_M(f128) Vector3::LengthEst(SimdVectorArg vec) NLIB_NOEXCEPT {
314  return F128::SqrtEst(Dot(vec, vec));
315 }
316 
317 // r = { recpLen, recpLen, recpLen, recpLen }
318 NLIB_M(f128) Vector3::RecpLength(SimdVectorArg vec) NLIB_NOEXCEPT {
319  return F128::RecpSqrt(Dot(vec, vec));
320 }
321 
322 // r = { recpLen, recpLen, recpLen, recpLen }
323 NLIB_M(f128) Vector3::RecpLengthEst(SimdVectorArg vec) NLIB_NOEXCEPT {
324  return F128::RecpSqrtEst(Dot(vec, vec));
325 }
326 
327 NLIB_M(SimdVector) Vector3::NormalizeEst(SimdVectorArg vec) NLIB_NOEXCEPT {
328  return F128::Mult(vec, RecpLengthEst(vec));
329 }
330 
331 NLIB_M(float) Vector3::NormalizeEst(SimdVector* normalized, SimdVectorArg vec) NLIB_NOEXCEPT {
332  f128 dot = Vector3::Dot(vec, vec);
333  f128 rsqrt = F128::RecpSqrtEst(dot);
334  *normalized = F128::Mult(vec, rsqrt);
335  return F128::GetFloatFromLane<0>(dot);
336 }
337 
338 // { radian, radian, radian, radian }
339 NLIB_M(f128)
340 Vector3::GetAngle(SimdVectorArg vec1_normalized, SimdVectorArg vec2_normalized) NLIB_NOEXCEPT {
341  f128 ret = Dot(vec1_normalized, vec2_normalized);
342  ret = F128::Clamp(ret, F128::SetNegativeOne(), F128::SetOne());
343  return F128::ArcCos(ret);
344 }
345 
346 NLIB_M(SimdVector) Vector3::Reflect(SimdVectorArg vec, SimdVectorArg normal) NLIB_NOEXCEPT {
347  f128 s = Dot(vec, normal);
348  s = F128::Add(s, s);
349  return F128::MultSub(s, normal, vec);
350 }
351 
352 /*
353 // Vector3::Transform(vec, m) is better in performance
354 NLIB_M(SimdVector) Vector3::Transform(SimdMatrixArg m, SimdVectorArg vec) NLIB_NOEXCEPT {
355  f128 v = F128::SetFloatToLane<3>(vec, 1.f);
356  return Vector4::Transform(m, v);
357 }
358 */
359 
360 // r = { vec.x, vec.y, vec.z, 1 } * m
361 NLIB_M(SimdVector) Vector3::Transform(SimdVectorArg vec, SimdMatrixArg m) NLIB_NOEXCEPT {
362  f128 ret = F128::Mult<0>(vec, m.r[0], each_select32);
363  ret = F128::MultAdd<1>(vec, m.r[1], ret, each_select32);
364  ret = F128::MultAdd<2>(vec, m.r[2], ret, each_select32);
365  return F128::Add(m.r[3], ret);
366 }
367 
368 // r = { vec.x, vec.y, vec.z, 1.f } * m, r = r / r.w
369 NLIB_M(SimdVector) Vector3::TransformCoord(SimdVectorArg vec, SimdMatrixArg m) NLIB_NOEXCEPT {
370  f128 tmp = Vector3::Transform(vec, m);
371  return F128::Div(tmp, F128::SetValue<3>(tmp, each_select32));
372 }
373 
374 /*
375 // Vector3::TransformNormal(vec, m) is better in performance
376 NLIB_M(SimdVector) Vector3::TransformNormal(SimdMatrixArg m, SimdVectorArg vec) NLIB_NOEXCEPT {
377  f128 v = F128::SetZeroToLane<3>(vec);
378  return Vector4::Transform(m, v);
379 }
380 */
381 
382 // r = { vec.x, vec.y, vec.z, 0 } * m
383 NLIB_M(SimdVector) Vector3::TransformNormal(SimdVectorArg vec, SimdMatrixArg m) NLIB_NOEXCEPT {
384  f128 ret = F128::Mult<0>(vec, m.r[0], each_select32);
385  ret = F128::MultAdd<1>(vec, m.r[1], ret, each_select32);
386  ret = F128::MultAdd<2>(vec, m.r[2], ret, each_select32);
387  return ret;
388 }
389 
390 NLIB_M(SimdVector)
391 Vector3::Rotate(SimdVectorArg vec, SimdQuaternionArg q_normalized) NLIB_NOEXCEPT {
392  SimdVector v = F128::SetZeroToLane<3>(vec);
393  SimdQuaternion conj = Quaternion::Conjugate(q_normalized);
394  return Quaternion::Mult(Quaternion::Mult(conj, v), q_normalized);
395 }
396 
397 NLIB_M(SimdVector)
398 Vector3::InvRotate(SimdVectorArg vec, SimdQuaternionArg q_normalized) NLIB_NOEXCEPT {
399  SimdVector v = F128::SetZeroToLane<3>(vec);
400  SimdQuaternion conj = Quaternion::Conjugate(q_normalized);
401  return Quaternion::Mult(Quaternion::Mult(q_normalized, v), conj);
402 }
403 
404 #undef NLIB_M
405 #undef NLIB_MH
406 
407 #endif // NLIB_DOXYGEN
408 
409 } // namespace simd
410 NLIB_NAMESPACE_END
411 
412 #endif // INCLUDE_NN_NLIB_SIMD_SIMDVECTOR3_H_
クォータニオンが定義されています。
f128arg SimdVectorArg
f128argがtypedefされています。
Definition: SimdFloat.h:4157
#define NLIB_VIS_HIDDEN
関数やクラス等のシンボルをライブラリの外部に公開しません。
Definition: Platform_unix.h:86
f128arg SimdQuaternionArg
f128argがtypedefされています。
Definition: SimdFloat.h:4159
3次元ベクトルの計算を行う関数が集められたクラスです。全ての関数でレーン3に設定された値は無視されます...
Definition: SimdVector3.h:26
4x4行列を保持する構造体です。
Definition: SimdFloat.h:4168
ドキュメント作成上の都合によるダミークラスで存在しません。
Definition: manual_ja_z.h:8
#define NLIB_NOEXCEPT
環境に合わせてnoexcept 又は同等の定義がされます。
Definition: Config.h:109
単精度浮動小数点数のSIMD演算を行うためのクラスや関数が定義されています。
3次元ベクトルをメモリから読み出したりメモリに書き出したりするための型です。float型のx, y, zをデータメンバとして保持します。
Definition: SimdFloat.h:4298
constexpr const each_select32_tag each_select32
each_select32_tag型の定数オブジェクトで、32bitのレーンを選択することを示すためのタグです。 ...
Definition: SimdInt.h:63
nlib_f128_t f128
nlib_f128_tがtypedefされています。
Definition: SimdFloat.h:77
#define NLIB_STATIC_ASSERT(exp)
静的アサートが定義されます。利用可能であればstatic_assertを利用します。
Definition: Config.h:174
4次元ベクトルが定義されています。
f128 SimdQuaternion
f128がtypedefされています。クォータニオンを扱う場合に利用されます。
Definition: SimdFloat.h:4158
f128 SimdVector
f128がtypedefされています。3次元ベクトル又は4次元ベクトルを扱う場合に利用されます。 ...
Definition: SimdFloat.h:4156