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
53762829
There was an error fetching the commit references. Please try again later.
Commit
53762829
authored
5 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Avoiding Matrix::getCompressedRowLengths.
parent
71a1f300
No related branches found
No related tags found
1 merge request
!48
Segments
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Python/pytnl/tnl/SparseMatrix.h
+1
-1
1 addition, 1 deletion
src/Python/pytnl/tnl/SparseMatrix.h
src/TNL/Matrices/Matrix.h
+1
-1
1 addition, 1 deletion
src/TNL/Matrices/Matrix.h
src/TNL/Matrices/Matrix.hpp
+5
-5
5 additions, 5 deletions
src/TNL/Matrices/Matrix.hpp
with
7 additions
and
7 deletions
src/Python/pytnl/tnl/SparseMatrix.h
+
1
−
1
View file @
53762829
...
@@ -51,7 +51,7 @@ void export_Matrix( py::module & m, const char* name )
...
@@ -51,7 +51,7 @@ void export_Matrix( py::module & m, const char* name )
using
VectorType
=
TNL
::
Containers
::
Vector
<
typename
Matrix
::
RealType
,
typename
Matrix
::
DeviceType
,
typename
Matrix
::
IndexType
>
;
using
VectorType
=
TNL
::
Containers
::
Vector
<
typename
Matrix
::
RealType
,
typename
Matrix
::
DeviceType
,
typename
Matrix
::
IndexType
>
;
void
(
Matrix
::*
_getCompressedRowLengths
)(
typename
Matrix
::
CompressedRowLengthsVector
&
)
const
=
&
Matrix
::
getCompressedRowLengths
;
void
(
Matrix
::*
_getCompressedRowLengths
)(
typename
Matrix
::
CompressedRowLengthsVector
View
)
const
=
&
Matrix
::
getCompressedRowLengths
;
auto
matrix
=
py
::
class_
<
Matrix
,
TNL
::
Object
>
(
m
,
name
)
auto
matrix
=
py
::
class_
<
Matrix
,
TNL
::
Object
>
(
m
,
name
)
.
def
(
py
::
init
<>
())
.
def
(
py
::
init
<>
())
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Matrices/Matrix.h
+
1
−
1
View file @
53762829
...
@@ -57,7 +57,7 @@ public:
...
@@ -57,7 +57,7 @@ public:
// TODO: implementation is not parallel
// TODO: implementation is not parallel
// TODO: it would be nice if padding zeros could be stripped
// TODO: it would be nice if padding zeros could be stripped
void
getCompressedRowLengths
(
CompressedRowLengthsVector
&
rowLengths
)
const
;
//
void getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const;
virtual
void
getCompressedRowLengths
(
CompressedRowLengthsVectorView
rowLengths
)
const
;
virtual
void
getCompressedRowLengths
(
CompressedRowLengthsVectorView
rowLengths
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Matrices/Matrix.hpp
+
5
−
5
View file @
53762829
...
@@ -56,7 +56,7 @@ void Matrix< Real, Device, Index, RealAllocator >::setDimensions( const IndexTyp
...
@@ -56,7 +56,7 @@ void Matrix< Real, Device, Index, RealAllocator >::setDimensions( const IndexTyp
this
->
columns
=
columns
;
this
->
columns
=
columns
;
}
}
template
<
typename
Real
,
/*
template< typename Real,
typename Device,
typename Device,
typename Index,
typename Index,
typename RealAllocator >
typename RealAllocator >
...
@@ -64,7 +64,7 @@ void Matrix< Real, Device, Index, RealAllocator >::getCompressedRowLengths( Comp
...
@@ -64,7 +64,7 @@ void Matrix< Real, Device, Index, RealAllocator >::getCompressedRowLengths( Comp
{
{
rowLengths.setSize( this->getRows() );
rowLengths.setSize( this->getRows() );
getCompressedRowLengths( rowLengths.getView() );
getCompressedRowLengths( rowLengths.getView() );
}
}
*/
template
<
typename
Real
,
template
<
typename
Real
,
typename
Device
,
typename
Device
,
...
@@ -72,9 +72,9 @@ template< typename Real,
...
@@ -72,9 +72,9 @@ template< typename Real,
typename
RealAllocator
>
typename
RealAllocator
>
void
Matrix
<
Real
,
Device
,
Index
,
RealAllocator
>::
getCompressedRowLengths
(
CompressedRowLengthsVectorView
rowLengths
)
const
void
Matrix
<
Real
,
Device
,
Index
,
RealAllocator
>::
getCompressedRowLengths
(
CompressedRowLengthsVectorView
rowLengths
)
const
{
{
//
TNL_ASSERT_EQ( rowLengths.getSize(), this->getRows(), "invalid size of the rowLengths vector" );
TNL_ASSERT_EQ
(
rowLengths
.
getSize
(),
this
->
getRows
(),
"invalid size of the rowLengths vector"
);
//
for( IndexType row = 0; row < this->getRows(); row++ )
for
(
IndexType
row
=
0
;
row
<
this
->
getRows
();
row
++
)
//
rowLengths.setElement( row, this->getRowLength( row ) );
rowLengths
.
setElement
(
row
,
this
->
getRowLength
(
row
)
);
}
}
template
<
typename
Real
,
template
<
typename
Real
,
...
...
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