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 ...@@ -155,7 +155,7 @@ abstract class IR_FileAccess(interfaceName : String) extends IR_Statement with I
IR_VariableDeclaration(IR_LoopOverFragments.defIt, 0), IR_VariableDeclaration(IR_LoopOverFragments.defIt, 0),
IR_Lower(IR_LoopOverFragments.defIt, 1), IR_Lower(IR_LoopOverFragments.defIt, 1),
IR_PreIncrement(IR_LoopOverFragments.defIt), IR_PreIncrement(IR_LoopOverFragments.defIt),
stmts.to[ListBuffer]) IR_Comment("Loop over blocks") +: stmts.to[ListBuffer])
// core methods for file access // core methods for file access
def read(bufIdx : Int) : ListBuffer[IR_Statement] def read(bufIdx : Int) : ListBuffer[IR_Statement]
......
...@@ -288,12 +288,12 @@ case class IR_FileAccess_HDF5( ...@@ -288,12 +288,12 @@ case class IR_FileAccess_HDF5(
val buffer = dataBuffers(bufIdx) val buffer = dataBuffers(bufIdx)
// set global starting index for block and select hyperslab in global domain // set global starting index for block and select hyperslab in global domain
val setOffsetBlock = IR_LoopOverBlocks(buffer.startIndexGlobalKJI.indices.map(d => val setOffsetBlock = buffer.startIndexGlobalKJI.indices.map(d =>
IR_Assignment(IR_ArrayAccess(globalStart(bufIdx), d), buffer.startIndexGlobalKJI(d)) : IR_Statement).to[ListBuffer]) 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)) 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), 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 // 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