Text archives Help
- From: knolla@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1603 - in trunk/Model: Intersections Primitives
- Date: Thu, 2 Aug 2007 14:49:44 -0600 (MDT)
Author: knolla
Date: Thu Aug 2 14:49:44 2007
New Revision: 1603
Modified:
trunk/Model/Intersections/IsosurfaceImplicit.cc
trunk/Model/Intersections/IsosurfaceImplicit.h
trunk/Model/Primitives/OctreeVolume.cc
Log:
removed some warnings from OctreeVolume and IsosurfaceImplicit
Modified: trunk/Model/Intersections/IsosurfaceImplicit.cc
==============================================================================
--- trunk/Model/Intersections/IsosurfaceImplicit.cc (original)
+++ trunk/Model/Intersections/IsosurfaceImplicit.cc Thu Aug 2 14:49:44
2007
@@ -92,7 +92,6 @@
if (D0 * D1 >= 0)
return false;
- #pragma unroll(NEUBAUER_ITERATIONS)
for (int i=0;i<NEUBAUER_ITERATIONS;i++)
{
//compute linear interpolation
@@ -190,7 +189,6 @@
sse_t p0[3];
sse_t p1[3];
- #pragma unroll(3)
for(int axis=0; axis<3; axis++)
{
p0[axis] = sub4(add4(srp.orig[axis][smd],
mul4(srp.dir[axis][smd], tenter[smd])), set4(pmin[axis]));
@@ -216,7 +214,6 @@
if (int_thisvoxelmask == 0) //if none of them hit, don't bother
iterating any more
continue;
- #pragma unroll(NEUBAUER_ITERATIONS)
for (int i=0;i<NEUBAUER_ITERATIONS;i++)
{
//compute linear interpolation
@@ -249,13 +246,11 @@
{
sse_t normal[3];
sse_normal(srp, smd, normal, pmin, pmax, rho);
- #pragma unroll(3)
for(int axis=0; axis<3; axis++)
srp.normal[axis][smd] = mask4(sse_thisvoxelmask,
normal[axis], srp.normal[axis][smd]);
int sse_ray = smd << 2;
- #pragma unroll(4)
for(int ray=0; ray<4; ray++)
{
if (int_thisvoxelmask & (1<<ray))
@@ -283,7 +278,6 @@
const float rho[2][2][2])
{
sse_t phit[3];
- #pragma unroll(3)
for(int axis=0; axis<3; axis++)
phit[axis] = add4(srp.orig[axis][smd], mul4(srp.dir[axis][smd],
srp.minT[smd]));
Modified: trunk/Model/Intersections/IsosurfaceImplicit.h
==============================================================================
--- trunk/Model/Intersections/IsosurfaceImplicit.h (original)
+++ trunk/Model/Intersections/IsosurfaceImplicit.h Thu Aug 2 14:49:44
2007
@@ -143,7 +143,6 @@
sse_t e1[3];
sse_t d1[3];
- #pragma unroll(3)
for(int axis=0; axis<3; axis++)
{
e0[axis] = sub4(_mm_one, p0[axis]);
Modified: trunk/Model/Primitives/OctreeVolume.cc
==============================================================================
--- trunk/Model/Primitives/OctreeVolume.cc (original)
+++ trunk/Model/Primitives/OctreeVolume.cc Thu Aug 2 14:49:44 2007
@@ -70,7 +70,7 @@
if(!in)
{
cerr << "Error opening header: " << buf << endl;
- exit(1);
+ return;
}
in >> nx >> ny >> nz;
@@ -124,7 +124,7 @@
if(!in)
{
cerr << "Error reading header: " << buf << '\n';
- exit(1);
+ return;
}
//read in the single-resolution data
@@ -140,7 +140,7 @@
if (!din)
{
cerr << "Error opening original data file: " <<
filebase_numbered << '\n';
- exit(1);
+ return;
}
cerr << "(size of unsigned long is " << sizeof(unsigned long) <<
")" << endl;
@@ -368,7 +368,6 @@
//if all children are scalar
leaves
char chsum = 0;
- #pragma unroll(8)
for(int ch=0; ch<8; ch++)
chsum +=
bnode.offsets[ch];
if (chsum == -8)
@@ -479,7 +478,6 @@
memcpy(onode.offsets, bnode.offsets,
8*sizeof(ST));
Vec3i child_coords = coords * 2;
- #pragma unroll(8)
for(int c=0; c<8; c++)
{
BuildNode& child_bnode =
buildnodes[d+1](child_coords.data[0] + ((c&4)!=0), child_coords.data[1] +
((c&2)!=0), child_coords.data[2] + (c&1));
@@ -609,22 +607,22 @@
for(int d=0; d<max_depth-1; d++)
{
steps[ts].nodes[d] = new
OctNode[steps[ts].num_nodes[d]];
- int num_read = fread((char*)steps[ts].nodes[d],
sizeof(OctNode), steps[ts].num_nodes[d],in2);
+ unsigned int num_read = (unsigned
int)fread((char*)steps[ts].nodes[d], sizeof(OctNode),
steps[ts].num_nodes[d],in2);
cerr << "Read " << num_read << " nodes" << " at depth
" << d << endl;
if (num_read != steps[ts].num_nodes[d])
{
cerr << "OctreeVolume: error reading
octnodes" << endl;
- exit(0);
+ return false;
}
}
//read in the caps
steps[ts].caps = new OctCap[steps[ts].num_caps];
- int num_read =
fread((char*)steps[ts].caps,sizeof(OctCap),steps[ts].num_caps,in2);
+ unsigned int num_read = (unsigned
int)fread((char*)steps[ts].caps,sizeof(OctCap),steps[ts].num_caps,in2);
cerr << "Read " << num_read << " caps" << endl;
if (num_read != steps[ts].num_caps)
{
cerr << "OctreeVolume: error reading octcaps" << endl;
- exit(0);
+ return false;
}
}
fclose(in2);
@@ -635,7 +633,7 @@
if (!din)
{
cerr << "Error opening original data file: " << filename << '\n';
- exit(1);
+ return false;
}
indata.resize(int_dims.data[0], int_dims.data[1], int_dims.data[2]);
cerr << "Reading indata at " << filename << "...";
@@ -684,19 +682,19 @@
//write out the nodes
for(int d=0; d<max_depth-1; d++)
{
- int num_written =
fwrite(reinterpret_cast<void*>(steps[ts].nodes[d]), sizeof(OctNode),
steps[ts].num_nodes[d], out2);
+ unsigned int num_written = (unsigned
int)fwrite(reinterpret_cast<void*>(steps[ts].nodes[d]), sizeof(OctNode),
steps[ts].num_nodes[d], out2);
if (num_written != steps[ts].num_nodes[d])
{
cerr << "OctreeVolume: error writing
octnodes" << endl;
- exit(0);
+ return false;
}
}
//write out the caps
- int num_written =
fwrite(reinterpret_cast<void*>(steps[ts].caps), sizeof(OctCap),
steps[ts].num_caps, out2);
+ unsigned int num_written = (unsigned
int)fwrite(reinterpret_cast<void*>(steps[ts].caps), sizeof(OctCap),
steps[ts].num_caps, out2);
if (num_written != steps[ts].num_caps)
{
cerr << "OctreeVolume: error writing octcaps" << endl;
- exit(0);
+ return false;
}
}
fclose(out2);
- [MANTA] r1603 - in trunk/Model: Intersections Primitives, knolla, 08/02/2007
Archive powered by MHonArc 2.6.16.