[opengtl-commits] [662] make enabling SIMD instructions a buildd option |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 662
Author: cyrille
Date: 2009-03-18 22:40:34 +0100 (Wed, 18 Mar 2009)
Log Message:
-----------
make enabling SIMD instructions a buildd option
Modified Paths:
--------------
trunk/OpenGTL/CMakeLists.txt
trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt
trunk/OpenGTL/OpenGTL/GTLCore/VirtualMachine_p.cpp
Modified: trunk/OpenGTL/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/CMakeLists.txt 2009-03-18 21:20:14 UTC (rev 661)
+++ trunk/OpenGTL/CMakeLists.txt 2009-03-18 21:40:34 UTC (rev 662)
@@ -39,10 +39,12 @@
# 32 bits
message(STATUS "OpenGTL detected that you use a 32 bit processor.")
set(OPENGTL_TESTS_DATA_RESULTS_DIR results32)
+ option(OPENGTL_ENABLE_SIMD "Enable SIMD (SSE/MMX/...) instructions" OFF)
else(CMAKE_SIZEOF_VOID_P EQUAL 4)
# 32 bits
message(STATUS "OpenGTL detected that you use a 64 bit processor.")
set(OPENGTL_TESTS_DATA_RESULTS_DIR results64)
+ option(OPENGTL_ENABLE_SIMD "Enable SIMD (SSE/MMX/...) instructions" ON)
# TODO check that llvm was build with -fPIC
endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/OpenGTL ${CMAKE_CURRENT_BINARY_DIR}
Modified: trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt 2009-03-18 21:20:14 UTC (rev 661)
+++ trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt 2009-03-18 21:40:34 UTC (rev 662)
@@ -87,6 +87,9 @@
add_definitions( "-D__STDC_LIMIT_MACROS" )
add_definitions( "-D__STDC_CONSTANT_MACROS" )
add_definitions( -DCOUMPONENT_NAME="GTLCore" )
+if(OPENGTL_ENABLE_SIMD)
+add_definitions( -DENABLE_SIMD )
+endif(OPENGTL_ENABLE_SIMD)
# installation
install(TARGETS GTLCore DESTINATION ${LIB_INSTALL_DIR} )
Modified: trunk/OpenGTL/OpenGTL/GTLCore/VirtualMachine_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VirtualMachine_p.cpp 2009-03-18 21:20:14 UTC (rev 661)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VirtualMachine_p.cpp 2009-03-18 21:40:34 UTC (rev 662)
@@ -45,7 +45,7 @@
VirtualMachine::VirtualMachine() : d(new Private)
{
d->executionEngine = 0;
-#if 0
+#ifndef ENABLE_SIMD
char** argv = new char*[2];
argv[0] = const_cast<char*>( "GTLVM");
argv[1] = const_cast<char*>( "-mattr=-3dnow,-3dnowa,-mmx,-sse,-sse2,-sse3,-ssse3" ); // WE ARE NOT AT A HACK MORE