Skip to content

Commit

Permalink
Added operations for CPU (#7)
Browse files Browse the repository at this point in the history
* Operations have been added to core for CPU
  • Loading branch information
czgdp1807 authored Feb 16, 2020
1 parent 8f6bbe9 commit f104191
Show file tree
Hide file tree
Showing 11 changed files with 982 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ before_scirpt:
- cd ../
- wget https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz
- tar -zxvf cmake-3.10.2-Linux-x86_64.tar.gz
- git clone https://github.com/google/googletest
- wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
- tar -zxvf release-1.10.0.tar.gz
- ls -a
- mkdir googletest-build
- cd googletest-build
- sudo ../cmake-3.10.2-Linux-x86_64/bin/cmake ../googletest
- sudo ../cmake-3.10.2-Linux-x86_64/bin/cmake ../googletest-release-1.10.0
- sudo make -j5
- sudo make install
- cd ../
Expand All @@ -21,4 +23,4 @@ before_scirpt:
- sudo make -j5

script:
- ./bin/*
- ./bin/test_core
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install(DIRECTORY adaboost DESTINATION ${CMAKE_INSTALL_PREFIX}/include
PATTERN "*.cpp" EXCLUDE
PATTERN "tests" EXCLUDE
)
install(DIRECTORY
install(FILES
${CMAKE_BINARY_DIR}/libs/libadaboost_core.so
${CMAKE_BINARY_DIR}/libs/libadaboost_utils.so
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
9 changes: 5 additions & 4 deletions adaboost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ include_directories(utils core)
add_library(adaboost_utils SHARED
utils/utils_impl.cpp)
add_library(adaboost_core SHARED
core/data_structures_impl.cpp)
core/data_structures_impl.cpp
core/operations_impl.cpp)
if(BUILD_TESTS)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LINK_LIBRARIES gtest gtest_main pthread)
add_executable(test_data_structures tests/test_data_structures.cpp)
target_link_libraries(test_data_structures ${LINK_LIBRARIES} adaboost_core adaboost_utils)
set(LINK_LIBRARIES gtest gtest_main pthread adaboost_core adaboost_utils)
add_executable(test_core tests/test_core.cpp)
target_link_libraries(test_core ${LINK_LIBRARIES})
endif()
1 change: 1 addition & 0 deletions adaboost/core/data_structures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ namespace adaboost
void multiply(const Matrix<data_type_matrix>& mat1,
const Matrix<data_type_matrix>& mat2,
Matrix<data_type_matrix>& result);

} // namespace core
} // namespace adaboost

Expand Down
4 changes: 2 additions & 2 deletions adaboost/core/data_structures_impl.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef ADABOOST_CORE_DATA_STRUCTURES_CPP
#define ADABOOST_CORE_DATA_STRUCTURES_CPP
#ifndef ADABOOST_CORE_DATA_STRUCTURES_IMPL_CPP
#define ADABOOST_CORE_DATA_STRUCTURES_IMPL_CPP

#include<adaboost/core/data_structures.hpp>
#include<adaboost/utils/utils.hpp>
Expand Down
Loading

0 comments on commit f104191

Please sign in to comment.