diff --git a/benchmark/m2air/joint_grid.csv b/benchmark/m2air/joint_grid.csv new file mode 100644 index 00000000..9e9d17a8 --- /dev/null +++ b/benchmark/m2air/joint_grid.csv @@ -0,0 +1,5 @@ +threads,fps +1,510.67 +2,955.752 +3,1384.14 +4,1651.69 diff --git a/benchmark/m2air/large_pyramid.csv b/benchmark/m2air/large_pyramid.csv new file mode 100644 index 00000000..60f80a59 --- /dev/null +++ b/benchmark/m2air/large_pyramid.csv @@ -0,0 +1,5 @@ +threads,fps +1,284.342 +2,526.955 +3,728.772 +4,911.715 diff --git a/benchmark/m2air/many_pyramids.csv b/benchmark/m2air/many_pyramids.csv new file mode 100644 index 00000000..75774668 --- /dev/null +++ b/benchmark/m2air/many_pyramids.csv @@ -0,0 +1,5 @@ +threads,fps +1,73.9053 +2,139.551 +3,193.414 +4,234.215 diff --git a/benchmark/m2air/smash.csv b/benchmark/m2air/smash.csv new file mode 100644 index 00000000..fdc6057e --- /dev/null +++ b/benchmark/m2air/smash.csv @@ -0,0 +1,5 @@ +threads,fps +1,161.17 +2,256.422 +3,321.137 +4,385.797 diff --git a/benchmark/m2air/tumbler.csv b/benchmark/m2air/tumbler.csv new file mode 100644 index 00000000..ca11db24 --- /dev/null +++ b/benchmark/m2air/tumbler.csv @@ -0,0 +1,5 @@ +threads,fps +1,340.404 +2,538.587 +3,661.721 +4,781.784 diff --git a/benchmark/main.c b/benchmark/main.c index 8a6be501..7797cefe 100644 --- a/benchmark/main.c +++ b/benchmark/main.c @@ -11,12 +11,12 @@ #include #include #include +#include +#include #if defined(_WIN64) #include #elif defined(__APPLE__) - // #include - // #include #include #elif defined(__linux__) #include @@ -60,27 +60,9 @@ int GetNumberOfCores() GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors; #elif defined(__APPLE__) - // int nm[2]; - // size_t len = 4; - // uint32_t count; - - // nm[0] = CTL_HW; - // nm[1] = HW_AVAILCPU; - // sysctl(nm, 2, &count, &len, NULL, 0); - - // if (count < 1) - //{ - // nm[1] = HW_NCPU; - // sysctl(nm, 2, &count, &len, NULL, 0); - // if (count < 1) - // { - // count = 1; - // } - // } - // return count; - return sysconf(_SC_NPROCESSORS_ONLN); + return (int)sysconf(_SC_NPROCESSORS_ONLN); #elif defined(__linux__) - return sysconf(_SC_NPROCESSORS_ONLN); + (int)return sysconf(_SC_NPROCESSORS_ONLN); #else return 1; #endif diff --git a/samples/sample_shapes.cpp b/samples/sample_shapes.cpp index fac6a049..2c01ffe5 100644 --- a/samples/sample_shapes.cpp +++ b/samples/sample_shapes.cpp @@ -715,8 +715,8 @@ class CustomFilter : public Sample return true; } - int indexA = reinterpret_cast(userDataA); - int indexB = reinterpret_cast(userDataB); + int indexA = static_cast(reinterpret_cast(userDataA)); + int indexB = static_cast(reinterpret_cast(userDataB)); return ((indexA & 1) + (indexB & 1)) != 1; }