Commit eef8aae6 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Minor fix in IR_FileAccess_HDF5

parent 1bed3b79
......@@ -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]
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment