From c1c222eb944c294af38e9f0bb6d54f682fe142e8 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 1 Jun 2011 11:53:20 -0700 Subject: [PATCH] icl fixes --- build/config-icl12-msv2010-win32.py | 4 ++-- build/config-icl12-msv2010-win64.py | 4 ++-- include/mitsuba/render/gkdtree.h | 4 ++++ src/shapes/ply/ply.cpp | 2 +- src/shapes/ply/ply/ply_parser.hpp | 11 ++++++++--- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/build/config-icl12-msv2010-win32.py b/build/config-icl12-msv2010-win32.py index 01283a92..bf30a0c2 100644 --- a/build/config-icl12-msv2010-win32.py +++ b/build/config-icl12-msv2010-win32.py @@ -2,12 +2,12 @@ BUILDDIR = '#build/release' CXX = 'icl' CC = 'icl' LINK = 'xilink' -CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] +CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/W3', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] SHCXXFLAGS = CXXFLAGS TARGET_ARCH = 'x86' MSVC_VERSION = '10.0' INTEL_COMPILER = True -LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST'] +LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024'] BASEINCLUDE = ['#include', '#dependencies/windows/include'] BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32'] OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR'] diff --git a/build/config-icl12-msv2010-win64.py b/build/config-icl12-msv2010-win64.py index 632d59f5..3739099e 100644 --- a/build/config-icl12-msv2010-win64.py +++ b/build/config-icl12-msv2010-win64.py @@ -2,12 +2,12 @@ BUILDDIR = '#build/release' CXX = 'icl' CC = 'icl' LINK = 'xilink' -CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] +CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp'] SHCXXFLAGS = CXXFLAGS TARGET_ARCH = 'x86_64' MSVC_VERSION = '10.0' INTEL_COMPILER = True -LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST'] +LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024'] BASEINCLUDE = ['#include', '#dependencies/windows/include'] BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32'] OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR'] diff --git a/include/mitsuba/render/gkdtree.h b/include/mitsuba/render/gkdtree.h index a9ae4292..7454ab06 100644 --- a/include/mitsuba/render/gkdtree.h +++ b/include/mitsuba/render/gkdtree.h @@ -617,7 +617,9 @@ protected: #if defined(WIN32) /* Use strict IEEE 754 floating point computations for the following kd-tree building code */ +MTS_NAMESPACE_END #pragma float_control(precise, on) +MTS_NAMESPACE_BEGIN #endif #define KDLog(level, fmt, ...) Thread::getThread()->getLogger()->log(\ @@ -2636,7 +2638,9 @@ protected: #if defined(WIN32) /* Revert back to fast / non-strict IEEE 754 floating point computations */ +MTS_NAMESPACE_END #pragma float_control(precise, off) +MTS_NAMESPACE_BEGIN #endif template diff --git a/src/shapes/ply/ply.cpp b/src/shapes/ply/ply.cpp index 3312427d..7267c51a 100644 --- a/src/shapes/ply/ply.cpp +++ b/src/shapes/ply/ply.cpp @@ -418,7 +418,7 @@ void PLYLoader::loadPLY(const fs::path &path) { ply::at(list_property_definition_callbacks) = std::tr1::bind( &PLYLoader::list_property_definition_callback, this, _1, _2); - + ply::at(list_property_definition_callbacks) = std::tr1::bind( &PLYLoader::list_property_definition_callback, this, _1, _2); diff --git a/src/shapes/ply/ply/ply_parser.hpp b/src/shapes/ply/ply/ply_parser.hpp index 1e14b2cd..a0f50a8d 100644 --- a/src/shapes/ply/ply/ply_parser.hpp +++ b/src/shapes/ply/ply/ply_parser.hpp @@ -17,6 +17,11 @@ # else # define MTS_USE_BOOST_TR1 0 # endif +#define ADT_WORKAROUND 1 +#endif + +#if defined(__INTEL_COMPILER) +#define ADT_WORKAROUND 1 #endif #if MTS_USE_BOOST_TR1 @@ -118,7 +123,7 @@ public: { return static_cast&>(callbacks_).callback; } -#if !defined(__clang__) +#if !defined(ADT_WORKAROUND) template friend typename scalar_property_definition_callback_type::type& at(scalar_property_definition_callbacks_type& scalar_property_definition_callbacks) { @@ -210,7 +215,7 @@ public: { return static_cast >&>(callbacks_).callback; } -#if !defined(__clang__) +#if !defined(ADT_WORKAROUND) template friend typename list_property_definition_callback_type::type& at(list_property_definition_callbacks_type& list_property_definition_callbacks) { @@ -549,7 +554,7 @@ inline bool ply::ply_parser::parse_list_property(format_type format, std::istrea } } -#if defined(__clang__) +#if defined(ADT_WORKAROUND) // Horrible workaround for ADT failure as of Clang 2.8 namespace ply {