<commit_before>
# Copyright (c) 2012 <NAME> <<EMAIL>>
# Distributed under the Modified BSD License, see license.txt.

include(schism_platform)

option(SCHISM_CUDA_BUILD_DEBUG                     "Build debug"                            OFF)
option(SCHISM_CUDA_BUILD_VERBOSE                   "Verbose Output"                         OFF)
option(SCHISM_CUDA_BUILD_COMPUTE20                 "Enable Compute 2.0"                     ON)
option(SCHISM_CUDA_BUILD_COMPUTE30                 "Enable Compute 3.0"                     OFF)
option(SCHISM_CUDA_BUILD_COMPUTE35                 "Enable Compute 3.5"                     OFF)
option(SCHISM_CUDA_BUILD_USE_FAST_MATH             "Use lower precision math calculations"  ON)
option(SCHISM_CUDA_BUILD_KEEP_INTERMEDIATE_FILES   "Keep the generated intermediate files"  ON)

if (WIN32)
    set(SCM_CUDA_SHARED_LIB_NAME "cudart64_50_32" CACHE STRING "schism cuda internal" FORCE)
endif (WIN32)

if (WIN32)
    #todo make gencode variable
    set(SCM_CUDA_NVCC_OPTIONS --use-local-env --cl-version 2010 --compile CACHE STRING "schism cuda internal" FORCE)
    set(SCM_CUDA_NVCC_PATH                  ${GLOBAL_EXT_DIR}/bin/cuda           CACHE PATH   "schism cuda internal")
    if (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
        set(SCM_CUDA_NVCC_OPTIONS  ${SCM_CUDA_NVCC_OPTIONS} --machine 64 -ccbin \"$(VCInstallDir)bin/x86_amd64/cl.exe\"  CACHE STRING "schism cuda internal" FORCE)
	else (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
        set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS}  --machine 32 -ccbin \"$(VCInstallDir)bin/x86_amd64/cl.exe\"  CACHE STRING "schism cuda internal" FORCE)
	endif (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
elseif (UNIX)
    set(SCM_CUDA_NVCC_PATH                  /opt/cuda/current/cuda/bin                CACHE PATH   "schism cuda internal")
endif (WIN32)

set(SCM_CUDA_NVCC_COMMAND "${SCM_CUDA_NVCC_PATH}/nvcc" CACHE STRING "schism cuda internal")

# convert CXX compiler options into comma separated list
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS          ${CMAKE_CXX_FLAGS})
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS_RELEASE  ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS_DEBUG    ${CMAKE_CXX_FLAGS_DEBUG})

string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS          ${SCM_CUDA_NVCC_CXX_FLAGS})
string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS_RELEASE  ${SCM_CUDA_NVCC_CXX_FLAGS_RELEASE})
string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS_DEBUG    ${SCM_CUDA_NVCC_CXX_FLAGS_DEBUG})

set(SCM_CUDA_NVCC_DEFINITIONS           "")
set(SCM_CUDA_NVCC_INCLUDE_DIRECTORIES   "")

if (SCHISM_CUDA_BUILD_DEBUG)
    set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS} -Xcompiler ${SCM_CUDA_NVCC_CXX_FLAGS_DEBUG}${SCM_CUDA_NVCC_CXX_FLAGS} CACHE STRING "schism cuda internal" FORCE)<commit_msg>fix for cuda 5.5 bin directory structure<commit_after>
# Copyright (c) 2012 <NAME> <<EMAIL>>
# Distributed under the Modified BSD License, see license.txt.

include(schism_platform)

option(SCHISM_CUDA_BUILD_DEBUG                     "Build debug"                            OFF)
option(SCHISM_CUDA_BUILD_VERBOSE                   "Verbose Output"                         OFF)
option(SCHISM_CUDA_BUILD_COMPUTE20                 "Enable Compute 2.0"                     ON)
option(SCHISM_CUDA_BUILD_COMPUTE30                 "Enable Compute 3.0"                     OFF)
option(SCHISM_CUDA_BUILD_COMPUTE35                 "Enable Compute 3.5"                     OFF)
option(SCHISM_CUDA_BUILD_USE_FAST_MATH             "Use lower precision math calculations"  ON)
option(SCHISM_CUDA_BUILD_KEEP_INTERMEDIATE_FILES   "Keep the generated intermediate files"  ON)

if (WIN32)
    if (MSVC10)
        set (SCM_CUDA_NVCC_OPTIONS --cl-version 2010 CACHE STRING "schism cuda internal" FORCE)
        set(SCM_CUDA_SHARED_LIB_NAME "cudart64_50_32" CACHE STRING "schism cuda internal" FORCE)
    endif(MSVC10)

    if (MSVC11)
        set (SCM_CUDA_NVCC_OPTIONS --cl-version 2012 CACHE STRING "schism cuda internal" FORCE)
        set(SCM_CUDA_SHARED_LIB_NAME "cudart64_55" CACHE STRING "schism cuda internal" FORCE)
    endif(MSVC11)

    set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS} --use-local-env --compile CACHE STRING "schism cuda internal" FORCE)
    set(SCM_CUDA_NVCC_PATH                  ${GLOBAL_EXT_DIR}/bin/cuda/bin       CACHE PATH   "schism cuda internal")
    if (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
        set(SCM_CUDA_NVCC_OPTIONS  ${SCM_CUDA_NVCC_OPTIONS} --machine 64 -ccbin \"$(VCInstallDir)bin/x86_amd64/cl.exe\"  CACHE STRING "schism cuda internal" FORCE)
	else (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
        set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS}  --machine 32 -ccbin \"$(VCInstallDir)bin/x86_amd64/cl.exe\"  CACHE STRING "schism cuda internal" FORCE)
	endif (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
elseif (UNIX)
    set(SCM_CUDA_NVCC_PATH                  /opt/cuda/current/cuda/bin                CACHE PATH   "schism cuda internal")
endif (WIN32)

set(SCM_CUDA_NVCC_COMMAND "${SCM_CUDA_NVCC_PATH}/nvcc" CACHE STRING "schism cuda internal")

# convert CXX compiler options into comma separated list
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS          ${CMAKE_CXX_FLAGS})
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS_RELEASE  ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE " " "," SCM_CUDA_NVCC_CXX_FLAGS_DEBUG    ${CMAKE_CXX_FLAGS_DEBUG})

string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS          ${SCM_CUDA_NVCC_CXX_FLAGS})
string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS_RELEASE  ${SCM_CUDA_NVCC_CXX_FLAGS_RELEASE})
string(REPLACE ",-std=c++0x" "," SCM_CUDA_NVCC_CXX_FLAGS_DEBUG    ${SCM_CUDA_NVCC_CXX_FLAGS_DEBUG})

set(SCM_CUDA_NVCC_DEFINITIONS           "")
set(SCM_CUDA_NVCC_INCLUDE_DIRECTORIES   "")

if (SCHISM_CUDA_BUILD_DEBUG)
    set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS} -Xcompiler ${SCM_CUDA_NVCC_CXX_FLAGS_DEBUG}${SCM_CUDA_NVCC_CXX_FLAGS} CACHE STRING "schism cuda internal" FORCE)
{'fraction_non_alphanumeric': 0.09406104844061049, 'fraction_numerical': 0.0205706702057067, 'mean_word_length': 3.616385911179173, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5890394', 'n_tokens_mistral': 2448, 'n_tokens_neox': 2235, 'n_words': 400}