add determinism float flag to all platforms on test

This commit is contained in:
PrimedErwin 2025-05-21 21:51:41 +08:00
parent 32874a96e5
commit cd84458911
3 changed files with 5 additions and 8 deletions

View File

@ -36,7 +36,7 @@ jobs:
shell: bash shell: bash
run: | run: |
mkdir -p output/x86_64 mkdir -p output/x86_64
python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON -DPK_ENABLE_DETERMINISTIC_FLOAT=ON
cp main.exe output/x86_64 cp main.exe output/x86_64
cp pocketpy.dll output/x86_64 cp pocketpy.dll output/x86_64
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
@ -70,7 +70,7 @@ jobs:
run: | run: |
python scripts/check_pragma_once.py include python scripts/check_pragma_once.py include
mkdir -p output/x86_64 mkdir -p output/x86_64
python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON -DPK_ENABLE_DETERMINISTIC_FLOAT=ON
python scripts/run_tests.py python scripts/run_tests.py
cp main output/x86_64 cp main output/x86_64
cp libpocketpy.so output/x86_64 cp libpocketpy.so output/x86_64
@ -90,7 +90,7 @@ jobs:
submodules: true submodules: true
- name: Compile and Test - name: Compile and Test
run: | run: |
python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON python cmake_build.py Release -DPK_BUILD_MODULE_LZ4=ON -DPK_ENABLE_DETERMINISTIC_FLOAT=ON
python scripts/run_tests.py python scripts/run_tests.py
- name: Benchmark - name: Benchmark
run: python scripts/run_tests.py benchmark run: python scripts/run_tests.py benchmark

View File

@ -113,9 +113,6 @@ if(PK_BUILD_WITH_UNITY)
endif() endif()
############################################ ############################################
if(NOT MSVC)
target_link_libraries(${PROJECT_NAME} pthread)
endif()
if(PK_BUILD_MODULE_LZ4) if(PK_BUILD_MODULE_LZ4)
target_link_libraries(${PROJECT_NAME} lz4) target_link_libraries(${PROJECT_NAME} lz4)

View File

@ -579,8 +579,8 @@ static bool inverse(const c11_mat3x3* m, c11_mat3x3* restrict out) {
} }
static void trs(c11_vec2 t, float r, c11_vec2 s, c11_mat3x3* restrict out) { static void trs(c11_vec2 t, float r, c11_vec2 s, c11_mat3x3* restrict out) {
float cr = cosf(r); float cr = cos(r);
float sr = sinf(r); float sr = sin(r);
// clang-format off // clang-format off
*out = (c11_mat3x3){ *out = (c11_mat3x3){
._11 = s.x * cr, ._12 = -s.y * sr, ._13 = t.x, ._11 = s.x * cr, ._12 = -s.y * sr, ._13 = t.x,