Skip to content

Commit 4de6b85

Browse files
committed
Tweak non-op
1 parent 7f05f8b commit 4de6b85

File tree

6 files changed

+37
-23
lines changed

6 files changed

+37
-23
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ option(SSE_FRSML ON)
3131
option(AVX_FRSML OFF)
3232
option(NEON_FRSML OFF)
3333

34-
if (DEFINED DYNAMIC_FRSML)
34+
if (DYNAMIC_FRSML)
3535
set(FRSML_DYNAMIC 1)
3636
set(FRSML_DYNAMIC_EXPORTS 1)
3737
endif()
3838

39-
if (DEFINED SSE_FRSML)
39+
add_definitions(-DFRSML_NORMAL)
40+
41+
if (SSE_FRSML)
4042
add_definitions(-DFRSML_SSE)
41-
elseif (DEFINED NEON_FRSML)
43+
elseif (NEON_FRSML)
4244
add_definitions(-DFRSML_NEON)
4345
else ()
4446
add_definitions(-DFRSML_NORMAL)

changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@
1919
- Smooth damp implementation - **0% - Map = / 5%**
2020
- Implement NEON optimizations - **0% - Map = / 50%**
2121

22+
# FRSML 3.0.4 Milestone: **28%/100%**
23+
- Implement non-optimization methods:
24+
+ Matrix: **70%/100% - Map = 28%/40%**
25+
+ Quaternion: **0/100% - Map = 0/50%**
26+
27+
- CMake for users: 0/10%
28+
+ Add FindFRSML.cmake module: 0/5%
29+
+ Add SSE flag: 0/5%
30+
31+
# FRSML 3.0.3.1 -8/2/2018 11:08PM
32+
- Correct non-optimization functions (some compiler gives error about **x**f not presented)
33+
2234
# FRSML 3.0.3 - 31/1/2018 10:51PM
2335
- Correct the lerp, sin functions
2436
- Add fade function

include/frsml/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define FRSML_MAJOR_VERSION_PUBLIC 3
22
#define FRSML_MINOR_VERSION_PUBLIC 0
33

4-
#define FRSML_DYNAMIC
5-
#define FRSML_DYNAMIC_EXPORTS
4+
/* #undef FRSML_DYNAMIC */
5+
/* #undef FRSML_DYNAMIC_EXPORTS */
66

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ set (SOURCES
1414
add_subdirectory(norm)
1515
add_subdirectory(sse)
1616

17-
if (DEFINED DYNAMIC_FRSML)
17+
if (DYNAMIC_FRSML)
1818
add_library(frsml MODULE ${SOURCES} ${HEADERS})
1919
else()
2020
add_library(frsml ${SOURCES} ${HEADERS})
2121
endif()
2222

23-
if (DEFINED SSE_FRSML)
23+
if (SSE_FRSML)
2424
target_link_libraries(frsml frsml_sse)
2525
else()
2626
target_link_libraries(frsml frsml_normal)

src/Standard.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ namespace frsml {
102102

103103
float cot(float p_num) {
104104
#ifdef FRSML_SSE
105-
return _mm_cvtss_f32(nmmintrin::_cot(_mm_set1_ps(p_num)))
105+
return _mm_cvtss_f32(nmmintrin::_cot(_mm_set1_ps(p_num)));
106106
#else
107107
return 1 / tan(p_num);
108108
#endif
@@ -135,31 +135,31 @@ namespace frsml {
135135
#ifdef FRSML_SSE
136136
return _mm_cvtss_f32(nmmintrin::_asin(_mm_set1_ps(p_num)));
137137
#else
138-
return norm::asin(p_num);
138+
return norm::_asin(p_num);
139139
#endif
140140
}
141141

142142
float acos(float p_num) {
143143
#ifdef FRSML_SSE
144144
return _mm_cvtss_f32(nmmintrin::_acos(_mm_set1_ps(p_num)));
145145
#else
146-
return norm::acos(p_num);
146+
return norm::_acos(p_num);
147147
#endif
148148
}
149149

150150
float atan(float p_num) {
151151
#ifdef FRSML_SSE
152152
return _mm_cvtss_f32(nmmintrin::_atan(_mm_set1_ps(p_num)));
153153
#else
154-
return norm::atan(p_num);
154+
return norm::_atan(p_num);
155155
#endif
156156
}
157157

158158
float atan2(float p_y, float p_x) {
159159
#ifdef FRSML_SSE
160160
return _mm_cvtss_f32(nmmintrin::_atan2(_mm_set1_ps(p_y), _mm_set1_ps(p_x)));
161161
#else
162-
return norm::atan2(p_y, p_x);
162+
return norm::_atan2(p_y, p_x);
163163
#endif
164164
}
165165

@@ -175,7 +175,7 @@ namespace frsml {
175175
#ifdef FRSML_SSE
176176
return _mm_cvtss_f32(nmmintrin::_sqrtf(_mm_set1_ps(p_num)));
177177
#else
178-
return norm::sqrt(p_num);
178+
return norm::_sqrt(p_num);
179179
#endif
180180
}
181181

src/norm/norm_standard.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
namespace frsml {
66
namespace norm {
77
float _exp(float x) {
8-
return std::expf(x);
8+
return std::exp(x);
99
}
1010

1111
float _log(float x) {
12-
return std::logf(x);
12+
return std::log(x);
1313
}
1414

1515
float _log2(float x) {
@@ -25,35 +25,35 @@ namespace frsml {
2525
}
2626

2727
float _sin(float p_num) {
28-
return std::sinf(p_num);
28+
return std::sin(p_num);
2929
}
3030

3131
float _cos(float p_num) {
32-
return std::cosf(p_num);
32+
return std::cos(p_num);
3333
}
3434

3535
float _tan(float p_num) {
36-
return std::tanf(p_num);
36+
return std::tan(p_num);
3737
}
3838

3939
float _asin(float p_num) {
40-
return std::asinf(p_num);
40+
return std::asin(p_num);
4141
}
4242

4343
float _acos(float p_num) {
44-
return std::acosf(p_num);
44+
return std::acos(p_num);
4545
}
4646

4747
float _atan(float p_num) {
48-
return std::atanf(p_num);
48+
return std::atan(p_num);
4949
}
5050

5151
float _atan2(float p_y, float p_x) {
52-
return std::atan2f(p_y, p_x);
52+
return std::atan2(p_y, p_x);
5353
}
5454

5555
float _sqrt(float p_num) {
56-
return std::sqrtf(p_num);
56+
return std::sqrt(p_num);
5757
}
5858

5959
float _fade(float p_num) {

0 commit comments

Comments
 (0)