Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1128 - in trunk: Core/Util Engine/Display Engine/ImageTraversers Interface Model/Intersections Model/Materials Model/Primitives
- Date: Mon, 26 Jun 2006 15:31:39 -0600 (MDT)
Author: bigler
Date: Mon Jun 26 15:31:38 2006
New Revision: 1128
Removed:
trunk/Interface/Texture.cc
Modified:
trunk/Core/Util/Align.h
trunk/Engine/Display/PureOpenGLDisplay.cc
trunk/Engine/Display/PureOpenGLDisplay.h
trunk/Engine/ImageTraversers/TiledImageTraverser.cc
trunk/Interface/Texture.h
trunk/Model/Intersections/IsosurfaceImplicit.cc
trunk/Model/Materials/Phong.cc
trunk/Model/Primitives/DynPLTGridSpheres.cc
trunk/Model/Primitives/IsosurfaceOctreeVolume.cc
trunk/Model/Primitives/IsosurfaceOctreeVolume.h
Log:
Core/Util/Align.h
__ECC is only for the ia64 version of the Intel compiler it
appears. __ICC is used elsewhere. We should be using
__INTEL_COMPILER instead.
Engine/Display/PureOpenGLDisplay.cc
Engine/Display/PureOpenGLDisplay.h
Changed setMode to not return anything. If there was a problem, an
exception is thrown.
Engine/ImageTraversers/TiledImageTraverser.cc
Added a clarifying comment.
Interface/Texture.cc
Interface/Texture.h
I'm not sure why basically empty functions are not included in the
header file. For non GCC compilers this was broken and resulted in
undefined symbols.
Model/Intersections/IsosurfaceImplicit.cc
Cosmetic changes.
Model/Materials/Phong.cc
Local stack variables used for SSE need to be declared aligned for ICC.
Model/Primitives/DynPLTGridSpheres.cc
Removed code that compared unsigned int to < 0.
Model/Primitives/IsosurfaceOctreeVolume.cc
Removed misplaced 's'.
Model/Primitives/IsosurfaceOctreeVolume.h
ICC doesn't like the use of ClassName::function in the class
definition.
Modified: trunk/Core/Util/Align.h
==============================================================================
--- trunk/Core/Util/Align.h (original)
+++ trunk/Core/Util/Align.h Mon Jun 26 15:31:38 2006
@@ -30,7 +30,7 @@
#define _CORE_UTIL_ALIGN__H
-#if defined (__ECC)
+#if defined (__INTEL_COMPILER)
#define MANTA_ALIGN(size) \
__declspec( align( (size) ) )
#elif defined (__GNUC__)
Modified: trunk/Engine/Display/PureOpenGLDisplay.cc
==============================================================================
--- trunk/Engine/Display/PureOpenGLDisplay.cc (original)
+++ trunk/Engine/Display/PureOpenGLDisplay.cc Mon Jun 26 15:31:38 2006
@@ -246,7 +246,7 @@
big_endian = false;
}
-bool
+void
PureOpenGLDisplay::setMode(const string& new_mode)
{
if (new_mode != "") {
Modified: trunk/Engine/Display/PureOpenGLDisplay.h
==============================================================================
--- trunk/Engine/Display/PureOpenGLDisplay.h (original)
+++ trunk/Engine/Display/PureOpenGLDisplay.h Mon Jun 26 15:31:38 2006
@@ -61,7 +61,7 @@
PureOpenGLDisplay(const string& new_mode);
virtual ~PureOpenGLDisplay();
- bool setMode(const string& new_mode);
+ void setMode(const string& new_mode);
// Called once after obtaining the OpenGL context
void init();
Modified: trunk/Engine/ImageTraversers/TiledImageTraverser.cc
==============================================================================
--- trunk/Engine/ImageTraversers/TiledImageTraverser.cc (original)
+++ trunk/Engine/ImageTraversers/TiledImageTraverser.cc Mon Jun 26 15:31:38
2006
@@ -135,6 +135,10 @@
int fsize = SCIRun::Min(Fragment::MaxSize, xend-xstart);
for(int eye = 0; eye < numEyes; eye++){
#ifdef MANTA_SSE
+ // This finds the upper bound of the groups of 4. Even if you
+ // write more than you need (say 8 for a fragment size of 6),
+ // you won't blow the top of the array, because
+ // (Fragment::MaxSize+3)&(~3) == Fragment::MaxSize.
int e = (fsize+3)&(~3);
__m128i vec_eye = _mm_set1_epi32(eye);
for(int i=0;i<e;i+=4)
Modified: trunk/Interface/Texture.h
==============================================================================
--- trunk/Interface/Texture.h (original)
+++ trunk/Interface/Texture.h Mon Jun 26 15:31:38 2006
@@ -10,8 +10,8 @@
template<typename ValueType>
class Texture {
public:
- Texture();
- virtual ~Texture();
+ Texture() {};
+ virtual ~Texture() {};
virtual void mapValues(Packet<ValueType>& results,
const RenderContext&,
@@ -21,10 +21,5 @@
Texture& operator=(const Texture&);
};
}
-
-#ifdef __GNUG__
-// This should instead be a configure variable...
-#include <Interface/Texture.cc>
-#endif
#endif
Modified: trunk/Model/Intersections/IsosurfaceImplicit.cc
==============================================================================
--- trunk/Model/Intersections/IsosurfaceImplicit.cc (original)
+++ trunk/Model/Intersections/IsosurfaceImplicit.cc Mon Jun 26 15:31:38
2006
@@ -125,7 +125,6 @@
const Manta::Primitive* prim, const Manta::Material* matl)
{
//cerr << "sse_intersect: first=" << (int)first << ",last=" << (int)last
<< endl;
-
for(int smd=first; smd<=last; smd++)
{
sse_t sse_thisvoxelmask = hitmask[smd];
@@ -165,7 +164,7 @@
if (int_thisvoxelmask == 0) //if none of them hit, don't bother
iterating any more
continue;
-
+
#define NEUBAUER_ITERATIONS 3
#pragma unroll(NEUBAUER_ITERATIONS)
for (int i=0;i<NEUBAUER_ITERATIONS;i++)
Modified: trunk/Model/Materials/Phong.cc
==============================================================================
--- trunk/Model/Materials/Phong.cc (original)
+++ trunk/Model/Materials/Phong.cc Mon Jun 26 15:31:38 2006
@@ -102,11 +102,11 @@
rays.computeNormals(context);
// Compute ambient contributions for all rays
- ColorArray ambientAndDiffuseLight;
+ MANTA_ALIGN(16) ColorArray ambientAndDiffuseLight;
activeLights->getAmbientLight()->computeAmbient(context, rays,
ambientAndDiffuseLight);
// Initialize specular to zero
- ColorArray specularLight;
+ MANTA_ALIGN(16) ColorArray specularLight;
for(int i = rays.begin(); i < rays.end(); i++)
for(int j=0;j<Color::NumComponents;j++)
specularLight[j][i] = 0;
Modified: trunk/Model/Primitives/DynPLTGridSpheres.cc
==============================================================================
--- trunk/Model/Primitives/DynPLTGridSpheres.cc (original)
+++ trunk/Model/Primitives/DynPLTGridSpheres.cc Mon Jun 26 15:31:38 2006
@@ -235,14 +235,10 @@
unsigned int newi=i;
if (newi >= width)
newi=newi - width;
- else if (newi < 0)
- newi += width;
unsigned int newj=j;
if (newj >= height)
newj=height - 1;
- else if (newj < 0)
- newj=0;
// Determine neighbor's contribution
Real contributer=inside[newi][newj];
Modified: trunk/Model/Primitives/IsosurfaceOctreeVolume.cc
==============================================================================
--- trunk/Model/Primitives/IsosurfaceOctreeVolume.cc (original)
+++ trunk/Model/Primitives/IsosurfaceOctreeVolume.cc Mon Jun 26 15:31:38
2006
@@ -519,7 +519,7 @@
this_rho = octdata->lookup_neighbor<1,0,1>(child_cell,
offset, stop_depth, leaf_depth, index_trace);
min_rho = MIN(min_rho, this_rho);
max_rho = MAX(max_rho, this_rho);
- }s
+ }
else
this_rho = scalar;
rho[1][0][1] = static_cast<float>(this_rho);
Modified: trunk/Model/Primitives/IsosurfaceOctreeVolume.h
==============================================================================
--- trunk/Model/Primitives/IsosurfaceOctreeVolume.h (original)
+++ trunk/Model/Primitives/IsosurfaceOctreeVolume.h Mon Jun 26 15:31:38
2006
@@ -78,8 +78,9 @@
char DU, char DV) const;
template<char K, char U, char V, char DK>
- void IsosurfaceOctreeVolume::sse_traverse_node(SSERayPacket&
srp,
- char first, char last, char DU, char DV, const
FrustumInterval& fi,
+ void sse_traverse_node(SSERayPacket& srp,
+ char first, char last, char DU, char DV,
+ const FrustumInterval& fi,
Vec3i& cell, char stop_depth, char depth, unsigned int
index,
unsigned int index_trace[]) const;
@@ -90,7 +91,7 @@
unsigned int index_trace[]) const;
template<char K, char U, char V, char DK>
- void IsosurfaceOctreeVolume::sse_traverse_cap(SSERayPacket& srp,
+ void sse_traverse_cap(SSERayPacket& srp,
char first, char last, char DU, char DV, const
FrustumInterval& fi,
Vec3i& cell, char stop_depth, char depth, unsigned int
index,
unsigned int index_trace[]) const;
- [MANTA] r1128 - in trunk: Core/Util Engine/Display Engine/ImageTraversers Interface Model/Intersections Model/Materials Model/Primitives, bigler, 06/26/2006
Archive powered by MHonArc 2.6.16.