Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
solverstack
ScalFMM
Commits
e52e5861
Commit
e52e5861
authored
9 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
update hmat
parent
8e073b8f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Addons/HMat/Src/Containers/FBlockPMapping.hpp
+32
-8
32 additions, 8 deletions
Addons/HMat/Src/Containers/FBlockPMapping.hpp
Addons/HMat/Tests/testPartitionsMappingGemvBlock.cpp
+1
-1
1 addition, 1 deletion
Addons/HMat/Tests/testPartitionsMappingGemvBlock.cpp
with
33 additions
and
9 deletions
Addons/HMat/Src/Containers/FBlockPMapping.hpp
+
32
−
8
View file @
e52e5861
...
@@ -96,11 +96,11 @@ public:
...
@@ -96,11 +96,11 @@ public:
colBlocks
=
new
ColNode
[
nbPartitions
];
colBlocks
=
new
ColNode
[
nbPartitions
];
for
(
int
idxPartCol
=
0
;
idxPartCol
<
nbPartitions
;
++
idxPartCol
){
for
(
int
idxPartCol
=
0
;
idxPartCol
<
nbPartitions
;
++
idxPartCol
){
colBlocks
[
idxPart
Row
].
infos
.
row
=
0
;
colBlocks
[
idxPart
Col
].
infos
.
row
=
0
;
colBlocks
[
idxPart
Row
].
infos
.
col
=
partitionsOffset
[
idxPartCol
];
colBlocks
[
idxPart
Col
].
infos
.
col
=
partitionsOffset
[
idxPartCol
];
colBlocks
[
idxPart
Row
].
infos
.
nbRows
=
dim
;
colBlocks
[
idxPart
Col
].
infos
.
nbRows
=
dim
;
colBlocks
[
idxPart
Row
].
infos
.
nbCols
=
partitions
[
idxPart
Row
];
colBlocks
[
idxPart
Col
].
infos
.
nbCols
=
partitions
[
idxPart
Col
];
colBlocks
[
idxPart
Row
].
infos
.
level
=
0
;
colBlocks
[
idxPart
Col
].
infos
.
level
=
0
;
}
}
}
}
...
@@ -140,8 +140,8 @@ public:
...
@@ -140,8 +140,8 @@ public:
for
(
int
idxPartRow
=
0
;
idxPartRow
<
nbPartitions
;
++
idxPartRow
){
for
(
int
idxPartRow
=
0
;
idxPartRow
<
nbPartitions
;
++
idxPartRow
){
callback
(
cells
[
idxPartCol
*
nbPartitions
+
idxPartRow
].
infos
,
callback
(
cells
[
idxPartCol
*
nbPartitions
+
idxPartRow
].
infos
,
cells
[
idxPartCol
*
nbPartitions
+
idxPartRow
].
cell
,
cells
[
idxPartCol
*
nbPartitions
+
idxPartRow
].
cell
,
rowBlocks
[
idxPartRow
],
rowBlocks
[
idxPartRow
]
.
cell
,
colBlocks
[
idxPartCol
]);
colBlocks
[
idxPartCol
]
.
cell
);
}
}
}
}
}
}
...
@@ -171,11 +171,35 @@ public:
...
@@ -171,11 +171,35 @@ public:
return
colBlocks
[
idxColPart
].
cell
;
return
colBlocks
[
idxColPart
].
cell
;
}
}
const
Col
Block
Class
&
getColCellInfo
(
const
int
idxColPart
)
const
{
const
F
Block
Descriptor
&
getColCellInfo
(
const
int
idxColPart
)
const
{
return
colBlocks
[
idxColPart
].
infos
;
return
colBlocks
[
idxColPart
].
infos
;
}
}
// Operations
// Operations
void
gemv
(
FReal
res
[],
const
FReal
vec
[])
const
{
for
(
int
idxPartCol
=
0
;
idxPartCol
<
nbPartitions
;
++
idxPartCol
){
for
(
int
idxPartRow
=
0
;
idxPartRow
<
nbPartitions
;
++
idxPartRow
){
// &res[cells[idxPartCol*nbPartitions + idxPartRow].infos.row],
// &vec[cells[idxPartCol*nbPartitions + idxPartRow].infos.col])
// cells[idxPartCol*nbPartitions + idxPartRow].cell,
// rowBlocks[idxPartRow].cell,
// colBlocks[idxPartCol].cell;
}
}
}
void
gemm
(
FReal
res
[],
const
FReal
mat
[],
const
int
nbRhs
)
const
{
for
(
int
idxPartCol
=
0
;
idxPartCol
<
nbPartitions
;
++
idxPartCol
){
for
(
int
idxPartRow
=
0
;
idxPartRow
<
nbPartitions
;
++
idxPartRow
){
// &res[cells[idxPartCol*nbPartitions + idxPartRow].infos.row],
// &vec[cells[idxPartCol*nbPartitions + idxPartRow].infos.col])
// cells[idxPartCol*nbPartitions + idxPartRow].cell,
// rowBlocks[idxPartRow].cell,
// colBlocks[idxPartCol].cell;
// nbRhs, dim
}
}
}
};
};
#endif // FBLOCKPMAPPING_HPP
#endif // FBLOCKPMAPPING_HPP
...
...
This diff is collapsed.
Click to expand it.
Addons/HMat/Tests/testPartitionsMappingGemvBlock.cpp
+
1
−
1
View file @
e52e5861
...
@@ -116,7 +116,7 @@ int main(int argc, char** argv){
...
@@ -116,7 +116,7 @@ int main(int argc, char** argv){
std
::
unique_ptr
<
FReal
[]
>
resDense
(
new
FReal
[
dim
]);
std
::
unique_ptr
<
FReal
[]
>
resDense
(
new
FReal
[
dim
]);
FSetToZeros
(
resDense
.
get
(),
dim
);
FSetToZeros
(
resDense
.
get
(),
dim
);
grid
.
gemv
(
resDense
.
get
(),
vec
.
get
());
//
grid.gemv(resDense.get(), vec.get());
FMath
::
FAccurater
<
FReal
>
testDense
(
resTest
.
get
(),
resDense
.
get
(),
dim
);
FMath
::
FAccurater
<
FReal
>
testDense
(
resTest
.
get
(),
resDense
.
get
(),
dim
);
...
...
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