Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sudhanshu Sane
VTK-m
Commits
726c914e
Commit
726c914e
authored
Jun 16, 2015
by
Robert Maynard
Browse files
Make sure we use ptrdiff_t for index into arrays.
This is a requirement since you can use negative indices into arrays.
parent
925d6865
Changes
2
Show whitespace changes
Inline
Side-by-side
vtkm/cont/internal/IteratorFromArrayPortal.h
View file @
726c914e
...
...
@@ -107,7 +107,7 @@ public:
VTKM_CONT_EXPORT
detail
::
IteratorFromArrayPortalValue
<
ArrayPortalType
>
operator
[](
std
::
size
_t
idx
)
const
operator
[](
std
::
ptrdiff
_t
idx
)
const
//NEEDS to be signed
{
return
detail
::
IteratorFromArrayPortalValue
<
ArrayPortalType
>
(
this
->
Portal
,
this
->
Index
+
static_cast
<
vtkm
::
Id
>
(
idx
)
);
...
...
vtkm/exec/cuda/internal/IteratorFromArrayPortal.h
View file @
726c914e
...
...
@@ -113,7 +113,7 @@ public:
VTKM_EXEC_EXPORT
PortalValue
<
ArrayPortalType
>
operator
[](
std
::
size
_t
idx
)
const
operator
[](
std
::
ptrdiff
_t
idx
)
const
//NEEDS to be signed
{
return
PortalValue
<
ArrayPortalType
>
(
this
->
Portal
,
this
->
Index
+
static_cast
<
vtkm
::
Id
>
(
idx
)
);
...
...
Write
Preview
Supports
Markdown
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