<commit_before>cmake_minimum_required(VERSION 2.8)
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
project( CaffePrediction )
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -flto")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Ofast -flto")
if (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "arm-linux-gnueabihf")
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fvect-cost-model")
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fvect-cost-model")
else()
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -march=native")
endif()

find_package( OpenCV REQUIRED )
find_package( CUDA REQUIRED )
find_package( ZED QUIET )
if (${ZED_FOUND})
  add_definitions(-DZED_SUPPORT)
endif()
find_package( Boost COMPONENTS system REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} ${ZED_INCLUDE_DIRS} /home/ubuntu/caffe /home/ubuntu/caffe/build/include /home/ubuntu/caffe/include ${Boost_INCLUDE_DIR} ../bindetection)

link_directories( ${ZED_LIBRARY_DIR} )

find_library (LibCaffe caffe PATH  /home/ubuntu/caffe/build/lib)
find_library (LibGLOG  glog)
find_library (LibProtobuf protobuf)

cuda_add_executable( CaffeBatchPrediction CaffeBatchPrediction.cpp fast_nms.cpp scalefactor.cpp main.cpp detect.cpp )
cuda_add_executable( DetectCheck CaffeBatchPrediction.cpp detectcheck.cpp fast_nms.cpp scalefactor.cpp detect.cpp ../bindetection/mediain.cpp ../bindetection/zedin.cpp)
target_link_libraries( CaffeBatchPrediction ${OpenCV_LIBS} ${LibCaffe} ${Boost_LIBRARIES} ${LibGLOG} ${LibProtobuf} )
target_link_libraries( DetectCheck ${ZED_LIBRARIES} ${OpenCV_LIBS} ${LibCaffe} ${Boost_LIBRARIES} ${LibGLOG} ${LibProtobuf} )<commit_msg>Add cuda libs for DetectCheck<commit_after>cmake_minimum_required(VERSION 2.8)
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
project( CaffePrediction )
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -flto")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Ofast -flto")
if (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "arm-linux-gnueabihf")
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fvect-cost-model")
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mcpu=cortex-a15 -mfpu=neon-vfpv4 -fvect-cost-model")
else()
  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -march=native")
endif()

find_package( OpenCV REQUIRED )
find_package( CUDA REQUIRED )
find_package( ZED QUIET )
if (${ZED_FOUND})
  add_definitions(-DZED_SUPPORT)
endif()
find_package( Boost COMPONENTS system REQUIRED )

set (CAFFE_BASE_DIR "/home/ubuntu/caffe")

include_directories( ${OpenCV_INCLUDE_DIRS} ${ZED_INCLUDE_DIRS} ${CAFFE_BASE_DIR}/build/include ${CAFFE_BASE_DIR}/include ${Boost_INCLUDE_DIR} ../bindetection)

link_directories( ${ZED_LIBRARY_DIR} )

find_library (LibCaffe caffe PATH  ${CAFFE_BASE_DIR}/build/lib)
find_library (LibGLOG  glog)
find_library (LibProtobuf protobuf)

cuda_add_executable( CaffeBatchPrediction CaffeBatchPrediction.cpp fast_nms.cpp scalefactor.cpp main.cpp detect.cpp )
cuda_add_executable( DetectCheck CaffeBatchPrediction.cpp detectcheck.cpp fast_nms.cpp scalefactor.cpp detect.cpp ../bindetection/mediain.cpp ../bindetection/zedin.cpp)
target_link_libraries( CaffeBatchPrediction ${OpenCV_LIBS} ${LibCaffe} ${Boost_LIBRARIES} ${LibGLOG} ${LibProtobuf} )
target_link_libraries( DetectCheck ${ZED_LIBRARIES} ${OpenCV_LIBS} ${LibCaffe} ${Boost_LIBRARIES} ${LibGLOG} ${LibProtobuf} ${CUDA_LIBRARIES} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY} )
{'fraction_non_alphanumeric': 0.11886886886886887, 'fraction_numerical': 0.008008008008008008, 'mean_word_length': 8.40470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3604527', 'n_tokens_mistral': 1705, 'n_tokens_neox': 1558, 'n_words': 243}