Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r982 - in trunk: . Model/Groups


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r982 - in trunk: . Model/Groups
  • Date: Thu, 9 Mar 2006 17:40:36 -0700 (MST)

Author: abe
Date: Thu Mar  9 17:40:35 2006
New Revision: 982

Modified:
   trunk/CMakeLists.txt
   trunk/Model/Groups/CMakeLists.txt
   trunk/Model/Groups/KDTreeLoaderIW.cc
Log:


Fixed compiler warnings on icc.
M    Model/Groups/KDTreeLoaderIW.cc

Changed conditional so that it is possible to include SSE kdtree traversal, 
previously this was hard coded to include the stubs. Which was a bit of a 
surprise.
M    Model/Groups/CMakeLists.txt

Added test to check if SSE intrinisics are available on the system.
M    CMakeLists.txt


Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt        (original)
+++ trunk/CMakeLists.txt        Thu Mar  9 17:40:35 2006
@@ -165,6 +165,19 @@
   FIRST_TIME_SET(CMAKE_CXX_FLAGS_RELEASE "-DSCI_ASSERTION_LEVEL=0 -O3 -g 
-fgcse-sm -funroll-loops -fstrict-aliasing -fsched-interblock 
-falign-loops=16 -falign-jumps=16 -falign-functions=16 
-falign-jumps-max-skip=15 -falign-loops-max-skip=15 -ffast-math 
-freorder-blocks -mpowerpc-gpopt -force_cpusubtype_ALL -mtune=G5 -mcpu=G5 
-mpowerpc64 -faltivec -mabi=altivec -mpowerpc-gfxopt -malign-natural" STRING 
"Optimized Flags")
 ENDIF (APPLE)
 
+##################################################################
+# Check to see if the system supports SSE.
+FILE(WRITE ${CMAKE_BINARY_DIR}/test/sse_test.c "#include 
<xmmintrin.h>\nstatic __m128 foo;\n\n")
+
+EXEC_PROGRAM(${CMAKE_C_COMPILER}
+  ARGS -c -o /dev/null ${CMAKE_BINARY_DIR}/test/sse_test.c
+  OUTPUT_VARIABLE OUTPUT
+  RETURN_VALUE NOT_MANTA_SSE )
+
+IF(NOT NOT_MANTA_SSE)
+  FIRST_TIME_SET(MANTA_SSE TRUE BOOL "Compile SSE code.")
+  FIRST_TIME_SET(MANTA_REAL float STRING "Typedef for Real")
+ENDIF(NOT NOT_MANTA_SSE)
 
 ##################################################################
 ## No more setting CXX_FLAGS beyond this point.  Only appending.

Modified: trunk/Model/Groups/CMakeLists.txt
==============================================================================
--- trunk/Model/Groups/CMakeLists.txt   (original)
+++ trunk/Model/Groups/CMakeLists.txt   Thu Mar  9 17:40:35 2006
@@ -33,8 +33,7 @@
 )
 
 # Determine if VerticalKDTree can be included
-#IF(${MANTA_REAL} MATCHES float)
-IF(0)
+IF(MANTA_SSE)
   SET(Manta_Groups_SRCS
     ${Manta_Groups_SRCS}
     Groups/SSEKDTree.cc
@@ -44,8 +43,7 @@
     )
 
 # Otherwise include a stub implementation.
-#ELSE(${MANTA_REAL} MATCHES float)
-ELSE(0)
+ELSE(MANTA_SSE)
   SET(Manta_Groups_SRCS
     ${Manta_Groups_SRCS}
     Groups/SSEKDTree-stub.cc
@@ -53,7 +51,4 @@
     Groups/VerticalKDTree.h
     Groups/VerticalKDTree-stub.cc
     )
-#ENDIF(${MANTA_REAL} MATCHES float)
-ENDIF(0)
-
-
+ENDIF(MANTA_SSE)

Modified: trunk/Model/Groups/KDTreeLoaderIW.cc
==============================================================================
--- trunk/Model/Groups/KDTreeLoaderIW.cc        (original)
+++ trunk/Model/Groups/KDTreeLoaderIW.cc        Thu Mar  9 17:40:35 2006
@@ -110,7 +110,7 @@
   char line[LINE_WIDTH];
   fgets(line, LINE_WIDTH, geomf);
   char token[LINE_WIDTH];
-  sscanf(line, "%s %*\n", token);
+  sscanf(line, "%s %%*\n", token);
   // Check to see if the token matches newobject
   if (strcmp(token, "newobject")) {
     fprintf(stderr, "First string (%s) is not newobject\n", token);
@@ -196,7 +196,7 @@
   fprintf(stderr, "vertices       :%10u\n", num_vertices);
   fprintf(stderr, "vertex normals :%10u\n", num_vtxnormals);
   fprintf(stderr, "triangles      :%10u\n", num_tris);
-  
+   
   // Cleanup memory
   free(vertices);
   free(vtxnormals);
@@ -206,5 +206,6 @@
 
   fclose(bspf);
 
+  return 1;
 } // int loadIW()
 




  • [MANTA] r982 - in trunk: . Model/Groups, abe, 03/09/2006

Archive powered by MHonArc 2.6.16.

Top of page