Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ExaStencils
exastencils-release
Commits
eef8aae6
Commit
eef8aae6
authored
Feb 24, 2022
by
Richard Angersbach
Browse files
Minor fix in IR_FileAccess_HDF5
parent
1bed3b79
Changes
2
Show whitespace changes
Inline
Side-by-side
Compiler/src/exastencils/io/ir/IR_FileAccess.scala
View file @
eef8aae6
...
...
@@ -155,7 +155,7 @@ abstract class IR_FileAccess(interfaceName : String) extends IR_Statement with I
IR_VariableDeclaration
(
IR_LoopOverFragments
.
defIt
,
0
),
IR_Lower
(
IR_LoopOverFragments
.
defIt
,
1
),
IR_PreIncrement
(
IR_LoopOverFragments
.
defIt
),
stmts
.
to
[
ListBuffer
])
IR_Comment
(
"Loop over blocks"
)
+:
stmts
.
to
[
ListBuffer
])
// core methods for file access
def
read
(
bufIdx
:
Int
)
:
ListBuffer
[
IR_Statement
]
...
...
Compiler/src/exastencils/io/ir/IR_FileAccess_HDF5.scala
View file @
eef8aae6
...
...
@@ -288,12 +288,12 @@ case class IR_FileAccess_HDF5(
val
buffer
=
dataBuffers
(
bufIdx
)
// set global starting index for block and select hyperslab in global domain
val
setOffsetBlock
=
IR_LoopOverBlocks
(
buffer
.
startIndexGlobalKJI
.
indices
.
map
(
d
=>
IR_Assignment
(
IR_ArrayAccess
(
globalStart
(
bufIdx
),
d
),
buffer
.
startIndexGlobalKJI
(
d
))
:
IR_Statement
).
to
[
ListBuffer
]
)
val
setOffsetBlock
=
buffer
.
startIndexGlobalKJI
.
indices
.
map
(
d
=>
IR_Assignment
(
IR_ArrayAccess
(
globalStart
(
bufIdx
),
d
),
buffer
.
startIndexGlobalKJI
(
d
))
:
IR_Statement
).
to
[
ListBuffer
]
val
selectHyperslab
=
H5Sselect_hyperslab
(
err
,
dataspace
(
bufIdx
),
IR_VariableAccess
(
"H5S_SELECT_SET"
,
IR_UnknownDatatype
),
globalStart
(
bufIdx
),
stride
(
bufIdx
),
count
(
bufIdx
))
IR_LoopOverBlocks
(
IR_IfCondition
(
IR_IV_IsValidForDomain
(
buffer
.
domainIdx
),
setOffsetBlock
+
:
(
selectHyperslab
++
accessStatements
)))
setOffsetBlock
+
+
(
selectHyperslab
++
accessStatements
)))
}
// set data- and memspace to an empty space for "invalid" frags in order to perform a NOP read/write
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment