diff --git a/CMakeLists.txt b/CMakeLists.txt index c1f922247814d06fa697746fd6f7a6b415aa115c..3d672df902e6b1046fcd742d7ef9eee1d542a901 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,15 +92,18 @@ sharedLibs() include(${CMAKE_SOURCE_DIR}/${cmakeMacroPath}/general/FindCompiler.cmake) configure_file(src/VirtualFluidsDefinitions.in.h VirtualFluidsDefinitions.h) -if(MSVC) +IF(MSVC) SET( CMAKE_CXX_FLAGS "/FI${CMAKE_BINARY_DIR}/VirtualFluidsDefinitions.h ${CMAKE_CXX_FLAGS}" ) ELSE(MSVC) SET( CMAKE_CXX_FLAGS "-include ${CMAKE_BINARY_DIR}/VirtualFluidsDefinitions.h ${CMAKE_CXX_FLAGS}" ) ENDIF(MSVC) # only use this with device of CC larger than 6.0 -set(CMAKE_CUDA_FLAGS " -arch=sm_60" CACHE STRING "" FORCE) - +IF(VF_DOUBLE_ACCURACY) + set(CMAKE_CUDA_FLAGS " -arch=sm_60" CACHE STRING "" FORCE) +ELSE(VF_DOUBLE_ACCURACY) + set(CMAKE_CUDA_FLAGS "" CACHE STRING "" FORCE) +ENDIF(VF_DOUBLE_ACCURACY) set(CMAKE_CUDA_FLAGS_DEBUG " -G" CACHE STRING "" FORCE) diff --git a/src/GksGpu/Definitions/AccumulatorDataType.h b/src/GksGpu/Definitions/AccumulatorDataType.h index 83657c0b3e6a55334b2b86637fac434fae5ad4e7..cda429e493d44e799a7ae0c2d2b0936ecefdd9b1 100644 --- a/src/GksGpu/Definitions/AccumulatorDataType.h +++ b/src/GksGpu/Definitions/AccumulatorDataType.h @@ -40,7 +40,7 @@ //! precision accumulator can prevent undeterministic behavior //! that stems from the order of addition to the accumulator. -//typedef float realAccumulator; -typedef double realAccumulator; +typedef float realAccumulator; +//typedef double realAccumulator; #endif diff --git a/src/VirtualFluids_GPU/Output/FileWriter.h b/src/VirtualFluids_GPU/Output/FileWriter.h index c39d0acd618b041c49f776a826a37086309bbb52..6576a087745746da29682bfff3aa1391cfb08928 100644 --- a/src/VirtualFluids_GPU/Output/FileWriter.h +++ b/src/VirtualFluids_GPU/Output/FileWriter.h @@ -34,6 +34,7 @@ #define FILE_WRITER_H #include <vector> +#include <string> #include "DataWriter.h"