Commit ba35e132 authored by mjg226's avatar mjg226
Browse files

Fixed casting issue in Table.hpp

updated logic in boxlist::add for when a box is completely within another
parent 0d420400
......@@ -178,10 +178,20 @@ namespace CA {
for(Boxes::iterator iorg = _boxes.begin(); iorg!= _boxes.end(); ++iorg)
{
// Cycle trough all the boxes to add.
for(Boxes::iterator iadd = toadd.begin(); iadd!= toadd.end(); ++iadd)
for(Boxes::iterator iadd = toadd.begin(); iadd!= toadd.end() && !toadd.empty(); ++iadd)
{
// if box to add is completely within an existing box, then
if ((*iorg).Union((*iadd), (*iorg)) == (*iorg)) {
toadd.remove(*iadd);
continue;
}
// Check if they intersect.
if( (*iorg).intersect((*iadd)) )
if( (*iorg).intersect((*iadd))
)
{
// The boxes can be defined in terms of their spans on each
// axis - It is possible find the interesting points on each
......
......@@ -183,7 +183,7 @@ namespace CA {
if(std::min(stop-start,mem_num)<=0)
return;
Unsigned mem_size = std::min<CA::Real>(std::min<CA::Real>(stop - start, mem_num)*sizeof(T), _buff_size);
Unsigned mem_size = std::min<CA::Unsigned>(std::min<CA::Unsigned>(stop - start, mem_num)*sizeof(T), _buff_size);
#ifdef CA_OCL_USE_EVENTS
// Create the list of event t0 wait.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment