Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
dbc325ab
There was an error fetching the commit references. Please try again later.
Commit
dbc325ab
authored
5 years ago
by
Jakub Klinkovský
Committed by
Tomáš Oberhuber
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Simplified comparison operators in ArrayView
parent
2781e3e8
No related branches found
No related tags found
1 merge request
!29
Revision
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Containers/ArrayView.h
+0
-26
0 additions, 26 deletions
src/TNL/Containers/ArrayView.h
src/TNL/Containers/ArrayView.hpp
+2
-28
2 additions, 28 deletions
src/TNL/Containers/ArrayView.hpp
with
2 additions
and
54 deletions
src/TNL/Containers/ArrayView.h
+
0
−
26
View file @
dbc325ab
...
...
@@ -374,19 +374,6 @@ public:
__cuda_callable__
const
Value
&
operator
[](
Index
i
)
const
;
/**
* \brief Comparison operator with another array view \e view.
*
* \tparam Value_ is the value type of the right-hand-side array view.
* \tparam Device_ is the device type of the right-hand-side array view.
* \tparam Index_ is the index type of the right-hand-side array view.
* \param view is reference to the right-hand-side array view.
*
* \return True if both array views are equal element-wise and false otherwise.
*/
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
bool
operator
==
(
const
ArrayView
<
Value_
,
Device_
,
Index_
>&
view
)
const
;
/**
* \brief Comparison operator with another array-like container \e array.
*
...
...
@@ -398,19 +385,6 @@ public:
template
<
typename
ArrayT
>
bool
operator
==
(
const
ArrayT
&
array
)
const
;
/**
* \brief Comparison negation operator with another array view \e view.
*
* \tparam Value_ is the value type of the right-hand-side array view.
* \tparam Device_ is the device type of the right-hand-side array view.
* \tparam Index_ is the index type of the right-hand-side array view.
* \param view is reference to the right-hand-side array view.
*
* \return True if both array views are not equal element-wise and false otherwise.
*/
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
bool
operator
!=
(
const
ArrayView
<
Value_
,
Device_
,
Index_
>&
view
)
const
;
/**
* \brief Comparison negation operator with another array-like container \e array.
*
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Containers/ArrayView.hpp
+
2
−
28
View file @
dbc325ab
...
...
@@ -279,24 +279,9 @@ operator[]( Index i ) const
template
<
typename
Value
,
typename
Device
,
typename
Index
>
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
bool
ArrayView
<
Value
,
Device
,
Index
>::
operator
==
(
const
ArrayView
<
Value_
,
Device_
,
Index_
>&
view
)
const
{
if
(
view
.
getSize
()
!=
getSize
()
)
return
false
;
if
(
getSize
()
==
0
)
return
true
;
return
Algorithms
::
ArrayOperations
<
Device
,
Device_
>::
compareMemory
(
getData
(),
view
.
getData
(),
getSize
()
);
}
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
template
<
typename
ArrayT
>
bool
ArrayView
<
Value
_
,
Device
_
,
Index
_
>::
ArrayView
<
Value
,
Device
,
Index
>::
operator
==
(
const
ArrayT
&
array
)
const
{
if
(
array
.
getSize
()
!=
this
->
getSize
()
)
...
...
@@ -312,20 +297,9 @@ operator==( const ArrayT& array ) const
template
<
typename
Value
,
typename
Device
,
typename
Index
>
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
bool
ArrayView
<
Value
,
Device
,
Index
>::
operator
!=
(
const
ArrayView
<
Value_
,
Device_
,
Index_
>&
view
)
const
{
return
!
(
*
this
==
view
);
}
template
<
typename
Value_
,
typename
Device_
,
typename
Index_
>
template
<
typename
ArrayT
>
bool
ArrayView
<
Value
_
,
Device
_
,
Index
_
>::
ArrayView
<
Value
,
Device
,
Index
>::
operator
!=
(
const
ArrayT
&
array
)
const
{
return
!
(
*
this
==
array
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment