Skip to content

Commit

Permalink
Linux gcc fixes (#784)
Browse files Browse the repository at this point in the history
Fixes #774 and more.

Added Intel N100 benchmarks.
  • Loading branch information
erincatto authored Aug 31, 2024
1 parent 5fdbbc8 commit e6cbbfc
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benchmark/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int GetNumberOfCores()
#elif defined( __APPLE__ )
return (int)sysconf( _SC_NPROCESSORS_ONLN );
#elif defined( __linux__ )
(int)return sysconf( _SC_NPROCESSORS_ONLN );
return (int)sysconf( _SC_NPROCESSORS_ONLN );
#else
return 1;
#endif
Expand Down
5 changes: 5 additions & 0 deletions benchmark/n100_avx2/joint_grid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,115.85
2,209.251
3,266.537
4,319.147
5 changes: 5 additions & 0 deletions benchmark/n100_avx2/large_pyramid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,133.69
2,239.395
3,312.458
4,360.458
5 changes: 5 additions & 0 deletions benchmark/n100_avx2/many_pyramids.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,32.0345
2,56.8865
3,71.4046
4,76.2903
5 changes: 5 additions & 0 deletions benchmark/n100_avx2/smash.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,73.9639
2,115.759
3,138.925
4,157.394
5 changes: 5 additions & 0 deletions benchmark/n100_avx2/tumbler.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,163.663
2,261.691
3,317.057
4,362.4
5 changes: 5 additions & 0 deletions benchmark/n100_sse2/joint_grid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,119.293
2,213.357
3,268.455
4,321.339
5 changes: 5 additions & 0 deletions benchmark/n100_sse2/large_pyramid.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,128.152
2,229.067
3,302.297
4,348.367
5 changes: 5 additions & 0 deletions benchmark/n100_sse2/many_pyramids.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,30.9601
2,55.0378
3,69.5563
4,77.3663
5 changes: 5 additions & 0 deletions benchmark/n100_sse2/smash.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,73.2282
2,114.239
3,137.388
4,156.341
5 changes: 5 additions & 0 deletions benchmark/n100_sse2/tumbler.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
threads,fps
1,161.228
2,257.781
3,311.219
4,356.481
1 change: 1 addition & 0 deletions samples/sample_determinism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <GLFW/glfw3.h>
#include <imgui.h>
#include <stdio.h>

// This sample provides a visual representation of the cross platform determinism unit test.
// The scenario is designed to produce a chaotic result engaging:
Expand Down
2 changes: 1 addition & 1 deletion samples/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static bool ReadFile( char*& data, int& size, const char* filename )
}

data = (char*)malloc( size + 1 );
fread( data, size, 1, file );
size_t count = fread( data, size, 1, file );
fclose( file );
data[size] = 0;

Expand Down
2 changes: 1 addition & 1 deletion samples/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static GLuint sCreateShaderFromFile( const char* filename, GLenum type )
fseek( file, 0, SEEK_SET );

char* source = static_cast<char*>( malloc( size + 1 ) );
fread( source, size, 1, file );
size_t count = fread( source, size, 1, file );
fclose( file );

source[size] = 0;
Expand Down

0 comments on commit e6cbbfc

Please sign in to comment.