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
05b7ac24
There was an error fetching the commit references. Please try again later.
Commit
05b7ac24
authored
5 years ago
by
Lukas Cejka
Committed by
Tomáš Oberhuber
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed debugging couts. Fixed print test to be the same output as other working formats.
parent
9f5d4ed2
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_impl.h
+28
-12
28 additions, 12 deletions
src/TNL/Matrices/AdEllpack_impl.h
with
28 additions
and
12 deletions
src/TNL/Matrices/AdEllpack_impl.h
+
28
−
12
View file @
05b7ac24
...
...
@@ -147,6 +147,10 @@ warpList< MatrixType >::~warpList()
delete
temp
;
}
delete
this
->
head
;
// TEST
std
::
cout
<<
"List destructor."
<<
std
::
endl
;
this
->
printList
();
}
...
...
@@ -200,6 +204,10 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths )
if
(
std
::
is_same
<
DeviceType
,
Devices
::
Host
>::
value
)
{
// TEST
std
::
cout
<<
"
\t
Starting host setup."
<<
std
::
endl
;
RealType
average
=
0.0
;
for
(
IndexType
row
=
0
;
row
<
this
->
getRows
();
row
++
)
average
+=
rowLengths
.
getElement
(
row
);
...
...
@@ -211,6 +219,9 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths )
warpList
<
ThisType
>*
list
=
new
warpList
<
ThisType
>
();
// TEST
list
->
printList
();
// TEST
std
::
cout
<<
"
\t\t
New warpList created."
<<
std
::
endl
;
...
...
@@ -239,13 +250,17 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths )
//cout << "Testing row lengths" << std::endl;
//cout << "========================" << std::endl;
//this->performRowLengthsTest( rowLengths );
}
// TEST
std
::
cout
<<
"
\t
Completed host setup."
<<
std
::
endl
;
// TEST
std
::
cout
<<
"
\t
Completed host setup."
<<
std
::
endl
;
}
if
(
std
::
is_same
<
DeviceType
,
Devices
::
Cuda
>::
value
)
{
// TEST
std
::
cout
<<
"
\t
Starting device setup."
<<
std
::
endl
;
AdEllpack
<
RealType
,
Devices
::
Host
,
IndexType
>
hostMatrix
;
hostMatrix
.
setDimensions
(
this
->
getRows
(),
this
->
getColumns
()
);
Containers
::
Vector
<
IndexType
,
Devices
::
Host
,
IndexType
>
hostRowLengths
;
...
...
@@ -264,10 +279,10 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths )
this
->
totalLoad
=
hostMatrix
.
getTotalLoad
();
this
->
allocateMatrixElements
(
this
->
offset
.
getElement
(
this
->
offset
.
getSize
()
-
1
)
);
// TEST
std
::
cout
<<
"
\t
Completed device setup."
<<
std
::
endl
;
}
// TEST
std
::
cout
<<
"
\t
Completed device setup."
<<
std
::
endl
;
}
template
<
typename
Real
,
...
...
@@ -676,7 +691,7 @@ void AdEllpack< Real, Device, Index >::print( std::ostream& str ) const
{
for
(
IndexType
row
=
0
;
row
<
this
->
getRows
();
row
++
)
{
str
<<
"Row: "
<<
row
<<
" ->
\t
"
;
str
<<
"Row: "
<<
row
<<
" -> "
;
IndexType
warp
=
this
->
getWarp
(
row
);
IndexType
inWarpOffset
=
this
->
getInWarpOffset
(
row
,
warp
);
...
...
@@ -691,8 +706,8 @@ void AdEllpack< Real, Device, Index >::print( std::ostream& str ) const
for
(
IndexType
i
=
0
;
i
<
this
->
localLoad
.
getElement
(
warp
);
i
++
)
{
if
(
this
->
columnIndexes
.
getElement
(
elementPtr
)
!=
this
->
getPaddingIndex
()
)
str
<<
"
c
ol
umn:
"
<<
this
->
columnIndexes
.
getElement
(
elementPtr
)
<<
"
->
"
<<
" value: "
<<
this
->
values
.
getElement
(
elementPtr
)
<<
std
::
endl
;
str
<<
"
C
ol
:
"
<<
this
->
columnIndexes
.
getElement
(
elementPtr
)
<<
"->"
<<
this
->
values
.
getElement
(
elementPtr
)
<<
"
\t
"
;
elementPtr
+=
this
->
warpSize
;
}
if
(
(
inWarpOffset
<
this
->
warpSize
-
1
)
&&
...
...
@@ -707,6 +722,7 @@ void AdEllpack< Real, Device, Index >::print( std::ostream& str ) const
else
found
=
true
;
}
str
<<
std
::
endl
;
}
}
...
...
@@ -931,11 +947,11 @@ void AdEllpack< Real, Device, Index >::computeWarps( const IndexType SMs,
temp
=
temp
->
next
;
// TEST
std
::
cout
<<
"
\t\t\t\t\t
temp after temp->next:"
<<
std
::
endl
;
std
::
cout
<<
"
\t\t\t\t\t
temp->localLoad = "
<<
temp
->
localLoad
<<
"
\t
temp->offset = "
<<
temp
->
offset
<<
"
\t
temp->rowOffset = "
<<
temp
->
rowOffset
<<
std
::
endl
;
//
std::cout << "\t\t\t\t\ttemp after temp->next:" << std::endl;
//
std::cout << "\t\t\t\t\ttemp->localLoad = " << temp->localLoad << "\ttemp->offset = " << temp->offset << "\ttemp->rowOffset = " << temp->rowOffset << std::endl;
// TEST
system
(
"read -p 'Press Enter to continue...' var"
);
//
system("read -p 'Press Enter to continue...' var");
}
remainingThreads
=
list
->
getNumberOfWarps
();
...
...
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