Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-15 08:32:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-15 08:32:49 +0300
commit8fee9836193c6321dd2d43ee30a6c2a773d4098e (patch)
treec88e139879ad930896afc9825f5861c8c877f99e
parent1a12d6d1d85f116893ba32ec1a2155795a206a28 (diff)
patch from Dan Eicher to support intel C++ compiler for CMake on *nix.
-rw-r--r--CMakeLists.txt46
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_defocus.c4
2 files changed, 44 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce1e9d9a03f..85989ee6617 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -311,24 +311,58 @@ IF(UNIX AND NOT APPLE)
SET(BINRELOC_INC ${BINRELOC}/include)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- IF(WITH_OPENMP)
- LIST(APPEND LLIBS -lgomp)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
- ENDIF(WITH_OPENMP)
-
SET(PLATFORM_LINKFLAGS "-pthread")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+ # GNU Compiler
IF(CMAKE_COMPILER_IS_GNUCC)
+ IF(WITH_OPENMP)
+ LIST(APPEND LLIBS -lgomp)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+ ENDIF(WITH_OPENMP)
+
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
# Better warnings
# note: -Wunused-parameter is added below for all GCC compilers
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+
+ # Intel C++ Compiler
+ ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+ IF(WITH_OPENMP)
+ LIST(APPEND LLIBS -lgomp)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -openmp")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -openmp")
+ ENDIF(WITH_OPENMP)
+
+ # think these next two are broken
+ FIND_PROGRAM(XIAR xiar)
+ IF(XIAR)
+ SET(CMAKE_AR "${XIAR}")
+ ENDIF(XIAR)
+ MARK_AS_ADVANCED(XIAR)
+
+ FIND_PROGRAM(XILD xild)
+ IF(XILD)
+ SET(CMAKE_LINKER "${XILD}")
+ ENDIF(XILD)
+ MARK_AS_ADVANCED(XILD)
+
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
+
+ SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+
+ # SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
+
+ SET(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas")
+ SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+
+ SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(UNIX AND NOT APPLE)
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
index 5c25bffa5d9..a18ae13b438 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
@@ -378,7 +378,11 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
//------------------------------------------------------------------
// main loop
+#ifdef __INTEL_COMPILER /* icc doesn't like the compound statement -- internal error: 0_1506 */
+ #pragma omp parallel for private(y) if(!nqd->preview) schedule(guided)
+#else
#pragma omp parallel for private(y) if(!nqd->preview && img->y*img->x > 16384) schedule(guided)
+#endif
for (y=0; y<img->y; y++) {
unsigned int p, p4, zp, cp, cp4;
float *ctcol, u, v, ct_crad, cR2=0;