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

Add member representing layout transformed field to IR_DataBuffer.

parent 2cf95be6
......@@ -263,7 +263,7 @@ case class IR_PrintXdmfSWE(
accessPattern = IR_RegularAccessPattern(IR_AccessFieldFunction(field, slot)),
datasetName = datasetFields(getBasenameDiscField(discField))(fid),
name = field.codeName,
fieldLayoutTransformed = IR_DataBuffer.inLayoutTransformationCollection(field),
layoutTransformationTarget = Some(field).filter(IR_DataBuffer.inLayoutTransformationCollection),
canonicalStorageLayout = false,
accessBlockwise = false,
isTemporaryBuffer = false
......
......@@ -82,7 +82,7 @@ object IR_DataBuffer {
accessPattern = pattern getOrElse IR_RegularAccessPattern(IR_AccessFieldFunction(field, Duplicate(slot))),
datasetName = dataset getOrElse IR_NullExpression,
canonicalStorageLayout = canonicalOrder,
fieldLayoutTransformed = inLayoutTransformationCollection(field),
layoutTransformationTarget = Some(field).filter(inLayoutTransformationCollection),
accessBlockwise = false,
isTemporaryBuffer = false
)
......@@ -124,7 +124,7 @@ object IR_DataBuffer {
accessPattern = pattern,
datasetName = dataset getOrElse IR_NullExpression,
canonicalStorageLayout = canonicalOrder,
fieldLayoutTransformed = inLayoutTransformationCollection(matField),
layoutTransformationTarget = Some(matField).filter(inLayoutTransformationCollection),
accessBlockwise = false,
isTemporaryBuffer = false
)
......@@ -152,7 +152,7 @@ object IR_DataBuffer {
accessPattern = pattern getOrElse IR_RegularAccessPattern(IR_AccessTempBufferFunction(tmpBuf)),
datasetName = dataset getOrElse IR_NullExpression,
canonicalStorageLayout = false,
fieldLayoutTransformed = false,
layoutTransformationTarget = None,
accessBlockwise = true, // currently only implemented as block-wise to reduce number of file accesses
isTemporaryBuffer = true
)
......@@ -177,7 +177,7 @@ case class IR_DataBuffer(
var domainIdx : Int, // ID of the (sub)domain the buffer lives on
var name : String, // name of the buffer
var datasetName : IR_Expression, // dataset name to be used in netCDF/HDF5 files
var fieldLayoutTransformed : Boolean, // field layout transformed
var layoutTransformationTarget : Option[IR_Field], // original field with layout transform
var canonicalStorageLayout : Boolean, // describes the data layout in the file
var accessBlockwise : Boolean, // specifies if the data is stored per fragment (field/temp. buffers) or block (temp. buffers)
var isTemporaryBuffer : Boolean // specified if underlying buffer is a temp. buffer
......
......@@ -15,7 +15,7 @@ trait IR_Iostream {
def isAccessForWholeBlockAllowed(buf : IR_DataBuffer, conditionSpecified : Boolean) : IR_Expression = {
conditionSpecified AndAnd // condition specified?
!buf.fieldLayoutTransformed AndAnd // was field layout transformed?
buf.layoutTransformationTarget.isEmpty AndAnd // was field's layout transformed?
buf.accessWithoutExclusion AndAnd // is any layer excluded (e.g. ghost)?
!(buf.numDimsData > buf.numDimsGrid) AndAnd // do we write a higher dim. datatype?
!buf.accessPattern.isInstanceOf[IR_SWEAccessPattern] // compatible with access pattern?
......
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