NW4F Sys
Loading...
Searching...
No Matches
math_Config.h
Go to the documentation of this file.
1#ifndef NW_MATH_CONFIG_H_
2#define NW_MATH_CONFIG_H_
3
4#include <nw/types.h>
5
6#define NW_MATH_AS_INLINE
7#define NW_MATH_INLINE inline
8
9#if defined(NW_PLATFORM_CAFE) && defined(__GHS_VERSION_NUMBER) && (__GHS_VERSION_NUMBER >= 536)
10 #define NW_MATH_ENABLE_INTRINSICS
11 #define NW_MATH_USE_INTRINSICS
12 #define NW_MATH_IMPL_NS ::nw::math::internal::intrinsics
13#else
14 #define NW_MATH_IMPL_NS ::nw::math::internal::standard
15#endif
16
17#if defined(NW_MATH_ENABLE_INTRINSICS)
18
19namespace nw { namespace math { namespace internal {
20
21inline f32x2& tof32x2(f32& x)
22{
23 return *reinterpret_cast<f32x2*>(&x);
24}
25
26inline const f32x2& tof32x2(const f32& x)
27{
28 return *reinterpret_cast<const f32x2*>(&x);
29}
30
31inline f32x2* tof32x2(f32* x)
32{
33 return reinterpret_cast<f32x2*>(x);
34}
35
36inline const f32x2* tof32x2(const f32* x)
37{
38 return reinterpret_cast<const f32x2*>(x);
39}
40
41} } } // namespace nw::math::internal
42
43#endif // NW_MATH_ENABLE_INTRINSICS
44
45#endif // NW_MATH_CONFIG_H_
#define NW_PLATFORM_CAFE
Definition types.h:8