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
38584f29
There was an error fetching the commit references. Please try again later.
Commit
38584f29
authored
5 years ago
by
Lukas Cejka
Committed by
Tomáš Oberhuber
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added comparison and assignment operators.
parent
b0cd1bf5
No related branches found
No related tags found
1 merge request
!45
Matrices revision
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Matrices/AdEllpack.h
+24
-1
24 additions, 1 deletion
src/TNL/Matrices/AdEllpack.h
with
24 additions
and
1 deletion
src/TNL/Matrices/AdEllpack.h
+
24
−
1
View file @
38584f29
...
...
@@ -107,6 +107,15 @@ private:
template
<
typename
Real
,
typename
Device
,
typename
Index
>
class
AdEllpack
:
public
Sparse
<
Real
,
Device
,
Index
>
{
private:
// convenient template alias for controlling the selection of copy-assignment operator
template
<
typename
Device2
>
using
Enabler
=
std
::
enable_if
<
!
std
::
is_same
<
Device2
,
Device
>::
value
>
;
// friend class will be needed for templated assignment operators
template
<
typename
Real2
,
typename
Device2
,
typename
Index2
>
friend
class
ChunkedEllpack
;
public:
typedef
Real
RealType
;
...
...
@@ -135,6 +144,12 @@ public:
void
setLike
(
const
AdEllpack
<
Real2
,
Device2
,
Index2
>&
matrix
);
void
reset
();
template
<
typename
Real2
,
typename
Device2
,
typename
Index2
>
bool
operator
==
(
const
AdEllpack
<
Real2
,
Device2
,
Index2
>&
matrix
)
const
;
template
<
typename
Real2
,
typename
Device2
,
typename
Index2
>
bool
operator
!=
(
const
AdEllpack
<
Real2
,
Device2
,
Index2
>&
matrix
)
const
;
bool
setElement
(
const
IndexType
row
,
const
IndexType
column
,
...
...
@@ -172,8 +187,16 @@ public:
typename
OutVector
>
void
vectorProduct
(
const
InVector
&
inVector
,
OutVector
&
outVector
)
const
;
// copy assignment
AdEllpack
&
operator
=
(
const
AdEllpack
&
matrix
);
void
save
(
File
&
file
)
const
;
// cross-device copy assignment
template
<
typename
Real2
,
typename
Device2
,
typename
Index2
,
typename
=
typename
Enabler
<
Device2
>
::
type
>
AdEllpack
&
operator
=
(
const
AdEllpack
<
Real2
,
Device2
,
Index2
>&
matrix
);
bool
save
(
File
&
file
)
const
;
void
load
(
File
&
file
);
...
...
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