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
Todd Kordenbrock
VTK-m
Commits
d6027843
Commit
d6027843
authored
May 14, 2018
by
Allison Vacanti
Browse files
Specialize swap for ArrayPortalValueReference types.
parent
761f8986
Changes
1
Hide whitespace changes
Inline
Side-by-side
vtkm/internal/ArrayPortalValueReference.h
View file @
d6027843
...
...
@@ -101,6 +101,26 @@ void swap(vtkm::internal::ArrayPortalValueReference<T> a,
{
a
.
Swap
(
b
);
}
template
<
typename
T
>
void
swap
(
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>
a
,
typename
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>::
ValueType
&
b
)
{
using
ValueType
=
typename
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>::
ValueType
;
const
ValueType
tmp
=
a
;
a
=
b
;
b
=
tmp
;
}
template
<
typename
T
>
void
swap
(
typename
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>::
ValueType
&
a
,
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>
b
)
{
using
ValueType
=
typename
vtkm
::
internal
::
ArrayPortalValueReference
<
T
>::
ValueType
;
const
ValueType
tmp
=
b
;
b
=
a
;
a
=
tmp
;
}
}
}
// namespace vtkm::internal
...
...
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