Skip to content

Commit

Permalink
remove simde references
Browse files Browse the repository at this point in the history
m2 air benchmarks
  • Loading branch information
erincatto committed Aug 19, 2024
1 parent 51b5c04 commit 5bea931
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:

- name: Configure CMake
# some problem with simde
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBOX2D_SANITIZE=ON -DBUILD_SHARED_LIBS=OFF
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBOX2D_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
Expand Down
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

# The Box2D library uses simde https://github.com/simd-everywhere/simde
# add_subdirectory(extern/simde)
add_subdirectory(src)

# This hides samples, test, and doxygen from apps that use box2d via FetchContent
Expand Down Expand Up @@ -95,6 +93,7 @@ if(PROJECT_IS_TOP_LEVEL)
if(NOT BUILD_SHARED_LIBS AND BOX2D_UNIT_TESTS)
message(STATUS "Adding Box2D unit tests")
add_subdirectory(test)
set_target_properties(test PROPERTIES XCODE_GENERATE_SCHEME TRUE)
else()
message(STATUS "Skipping Box2D unit tests")
endif()
Expand All @@ -108,19 +107,19 @@ if(PROJECT_IS_TOP_LEVEL)
set_property(TARGET samples PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
endif()

if (XCODE)
set_target_properties(samples PROPERTIES
XCODE_GENERATE_SCHEME TRUE
XCODE_SCHEME_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
endif()
endif()

if(BOX2D_BENCHMARKS)
add_subdirectory(benchmark)
set_target_properties(benchmark PROPERTIES XCODE_GENERATE_SCHEME TRUE)
endif()

if(BOX2D_DOCS)
add_subdirectory(docs)
set_target_properties(docs PROPERTIES XCODE_GENERATE_SCHEME TRUE)
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ if(MSVC)
# target_compile_options(benchmark PRIVATE /experimental:c11atomics)
endif()

target_link_libraries(benchmark PRIVATE box2d enkiTS simde)
target_link_libraries(benchmark PRIVATE box2d enkiTS)
8 changes: 4 additions & 4 deletions benchmark/m2air/joint_grid.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
threads,fps
1,510.67
2,955.752
3,1384.14
4,1651.69
1,515.583
2,968.592
3,1393.95
4,1652.07
8 changes: 4 additions & 4 deletions benchmark/m2air/large_pyramid.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
threads,fps
1,284.342
2,526.955
3,728.772
4,911.715
1,327.475
2,606.037
3,843.779
4,1057.89
8 changes: 4 additions & 4 deletions benchmark/m2air/many_pyramids.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
threads,fps
1,73.9053
2,139.551
3,193.414
4,234.215
1,85.4238
2,159.788
3,219.475
4,261.439
8 changes: 4 additions & 4 deletions benchmark/m2air/smash.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
threads,fps
1,161.17
2,256.422
3,321.137
4,385.797
1,166.289
2,262.228
3,329.267
4,393.513
8 changes: 4 additions & 4 deletions benchmark/m2air/tumbler.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
threads,fps
1,340.404
2,538.587
3,661.721
4,781.784
1,351.845
2,549.496
3,674.889
4,801.015
4 changes: 0 additions & 4 deletions src/contact_solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,6 @@ static inline b2FloatW b2MulW( b2FloatW a, b2FloatW b )
return _mm256_mul_ps( a, b );
}

// todo SIMDE implementation of simde_mm256_fnmadd_ps is slow if FMA is not available
// #define b2MulAddW(a, b, c) simde_mm256_fmadd_ps(b, c, a)
// #define b2MulSubW(a, b, c) simde_mm256_fnmadd_ps(b, c, a)

static inline b2FloatW b2MulAddW( b2FloatW a, b2FloatW b, b2FloatW c )
{
return _mm256_add_ps( a, _mm256_mul_ps( b, c ) );
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ if(MSVC)
target_compile_options(test PRIVATE /experimental:c11atomics)
endif()

target_link_libraries(test PRIVATE box2d enkiTS simde)
target_link_libraries(test PRIVATE box2d enkiTS)

source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "" FILES ${BOX2D_TESTS})

0 comments on commit 5bea931

Please sign in to comment.