Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
caddies
caddies-api
Commits
ba35e132
Commit
ba35e132
authored
Jan 09, 2017
by
mjg226
Browse files
Fixed casting issue in Table.hpp
updated logic in boxlist::add for when a box is completely within another
parent
0d420400
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
impls/common/BoxList.hpp
impls/common/BoxList.hpp
+12
-2
impls/square-cell/vn-neighbours/1-levels/opencl/Table.hpp
impls/square-cell/vn-neighbours/1-levels/opencl/Table.hpp
+1
-1
No files found.
impls/common/BoxList.hpp
View file @
ba35e132
...
...
@@ -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
...
...
impls/square-cell/vn-neighbours/1-levels/opencl/Table.hpp
View file @
ba35e132
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment