Remove VTKm_ENABLE_VECTORIZATION, as VTKm_Vectorization handles all use cases.

This commit is contained in:
Robert Maynard 2015-11-30 11:08:21 -05:00
parent c06c54b1fb
commit 4ea567aee9
5 changed files with 20 additions and 29 deletions

@ -34,9 +34,7 @@ endif ()
#-----------------------------------------------------------------------------
# Set up the compiler flag optimizations
#-----------------------------------------------------------------------------
if(VTKm_ENABLE_VECTORIZATION)
include(VTKmCompilerOptimizations)
endif()
include(VTKmCompilerOptimizations)
if (VTKm_Serial_FOUND)
set(VTKm_Serial_initialize_complete TRUE)

@ -47,9 +47,7 @@ endif ()
#-----------------------------------------------------------------------------
# Set up the compiler flag optimizations
#-----------------------------------------------------------------------------
if(VTKm_ENABLE_VECTORIZATION)
include(VTKmCompilerOptimizations)
endif()
include(VTKmCompilerOptimizations)
#-----------------------------------------------------------------------------
# Set up all these dependent packages (if they were all found).

@ -116,28 +116,25 @@ endif()
# we are going to require.
#
#
if(VTKm_ENABLE_VECTORIZATION)
set(flags)
if(VTKm_Vectorization STREQUAL "avx")
get_property(flags GLOBAL PROPERTY VTKm_AVX_FLAGS)
elseif(VTKm_Vectorization STREQUAL "avx2")
get_property(avx GLOBAL PROPERTY VTKm_AVX_FLAGS)
get_property(avx2 GLOBAL PROPERTY VTKm_AVX2_FLAGS)
set(flags ${avx} ${avx2})
elseif(VTKm_Vectorization STREQUAL "avx512")
get_property(avx GLOBAL PROPERTY VTKm_AVX_FLAGS)
get_property(avx2 GLOBAL PROPERTY VTKm_AVX2_FLAGS)
get_property(avx512 GLOBAL PROPERTY VTKm_AVX512_FLAGS)
set(flags ${avx} ${avx2} ${avx512})
endif()
#have to specify each compile option separately, can't do them in bulk
foreach(flag ${flags})
add_compile_options( ${flag} )
endforeach()
set(flags)
if(VTKm_Vectorization STREQUAL "avx")
get_property(flags GLOBAL PROPERTY VTKm_AVX_FLAGS)
elseif(VTKm_Vectorization STREQUAL "avx2")
get_property(avx GLOBAL PROPERTY VTKm_AVX_FLAGS)
get_property(avx2 GLOBAL PROPERTY VTKm_AVX2_FLAGS)
set(flags ${avx} ${avx2})
elseif(VTKm_Vectorization STREQUAL "avx512")
get_property(avx GLOBAL PROPERTY VTKm_AVX_FLAGS)
get_property(avx2 GLOBAL PROPERTY VTKm_AVX2_FLAGS)
get_property(avx512 GLOBAL PROPERTY VTKm_AVX512_FLAGS)
set(flags ${avx} ${avx2} ${avx512})
endif()
#have to specify each compile option separately, can't do them in bulk
foreach(flag ${flags})
add_compile_options( ${flag} )
endforeach()
#
# Lastly we need to setup flags that can be configured into a vtk-m header
# file. so that the code understands that we have enabled vectorization

@ -43,7 +43,6 @@ set(VTKm_CMAKE_MODULE_PATH "@VTKm_CMAKE_MODULE_PATH_CONFIG@")
set(VTKm_ENABLE_CUDA "@VTKm_ENABLE_CUDA@")
set(VTKm_ENABLE_TBB "@VTKm_ENABLE_TBB@")
set(VTKm_ENABLE_VECTORIZATION "@VTKm_ENABLE_VECTORIZATION@")
# VTKm requires some CMake Find modules not included with CMake, so
# include the CMake modules distributed with VTKm.

@ -92,7 +92,6 @@ include(CMake/VTKmCompilerExtras.cmake)
# Configurable Options
option(VTKm_ENABLE_CUDA "Enable Cuda support" OFF)
option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
option(VTKm_ENABLE_VECTORIZATION "Enable compiler vectorization support" ON)
option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
@ -233,7 +232,7 @@ set(VTKM_USE_64BIT_IDS ${VTKm_USE_64BIT_IDS})
set(VTKM_ENABLE_CUDA ${VTKm_ENABLE_CUDA})
set(VTKM_ENABLE_TBB ${VTKm_ENABLE_TBB})
set(VTKM_ENABLE_VECTORIZATION ${VTKm_ENABLE_VECTORIZATION})
set(VTKM_ENABLE_VECTORIZATION ON)
if(VTKm_Vectorization STREQUAL "none")
set(VTKM_ENABLE_VECTORIZATION OFF)
endif()