Skip to content

Commit fec86bc

Browse files
committed
Fixed Ubuntu bug
1 parent 96fc73c commit fec86bc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set (CMAKE_CXX_STANDARD 20)
99
if (MSVC)
1010

1111
else()
12-
add_compile_options(-mavx)
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
1313
endif()
1414

1515

src/profiling/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ set (DOTPROD_PROFILE_SOURCE
66
)
77

88
if (BUILD_CUDA_LIBRARY)
9-
set(DOTPROD_PROFILE_CUDA_SOURCE gpu/dp.cu)
9+
set(DOTPROD_PROFILE_CUDA_SOURCE gpu/dp.cu)
1010
endif()
1111

1212
message(PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
1313
add_executable(dotprod_profiling ${DOTPROD_PROFILE_SOURCE} ${DOTPROD_PROFILE_CUDA_SOURCE} helpers.h)
1414

15-
target_include_directories(dotprod_profiling PRIVATE /)
15+
target_include_directories(dotprod_profiling PRIVATE "${PROJECT_SOURCE_DIR}/src/profiling")
1616

1717
target_link_libraries(dotprod_profiling PRIVATE dotprod_lib benchmark::benchmark)
1818
target_compile_definitions (dotprod_profiling PRIVATE ${DOTPROD_DEFINITIONS})

src/profiling/helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <random>
55
#include <memory>
66
#include <iostream>
7-
#include <windows.h>
7+
//#include <windows.h>
88

99
constexpr int PERFORMANCE_TEST_LOWER_LIMIT=64;
1010
constexpr int PERFORMANCE_TEST_UPPER_LIMIT=1<<27;

src/tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif()
99

1010

1111
add_executable(dotprod_test ${DOTPROD_TEST_SOURCE} ${DOTPROD_CUDA_SOURCE} helpers.h)
12-
target_include_directories(dotprod_test PRIVATE /)
12+
target_include_directories(dotprod_test PRIVATE "${PROJECT_SOURCE_DIR}/src/tests")
1313

1414
target_link_libraries(dotprod_test PRIVATE dotprod_lib gtest_main)
1515
target_compile_definitions (dotprod_test PRIVATE ${DOTPROD_DEFINITIONS})

0 commit comments

Comments
 (0)