Commit 69c0db1b authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Merge branch 'devel/fix_cuda_nodePos_comm' into 'master'

Use fragment index from fielddata in CUDA transfer generation instead of...

See merge request exastencils/exastencils!86
parents 4e8193f9 fef06520
...@@ -66,14 +66,14 @@ case class CUDA_UpdateHostData(var fieldData : IR_IV_FieldData) extends CUDA_Hos ...@@ -66,14 +66,14 @@ case class CUDA_UpdateHostData(var fieldData : IR_IV_FieldData) extends CUDA_Hos
val field = fieldData.field val field = fieldData.field
IR_IfCondition( IR_IfCondition(
CUDA_DeviceDataUpdated(field, Duplicate(fieldData.slot), fieldData.fragmentIdx), CUDA_DeviceDataUpdated(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
ListBuffer[IR_Statement]( ListBuffer[IR_Statement](
CUDA_TransferUtil.genTransfer( CUDA_TransferUtil.genTransfer(
IR_IV_FieldData(field, Duplicate(fieldData.slot)), IR_IV_FieldData(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
CUDA_FieldDeviceData(field, Duplicate(fieldData.slot)), CUDA_FieldDeviceData(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
(0 until field.layout.numDimsData).map(dim => field.layout.idxById("TOT", dim)).reduceLeft(_ * _) * IR_SizeOf(field.resolveBaseDatatype), (0 until field.layout.numDimsData).map(dim => field.layout.idxById("TOT", dim)).reduceLeft(_ * _) * IR_SizeOf(field.resolveBaseDatatype),
"D2H"), "D2H"),
IR_Assignment(CUDA_DeviceDataUpdated(field, Duplicate(fieldData.slot)), IR_BooleanConstant(false)))) IR_Assignment(CUDA_DeviceDataUpdated(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)), IR_BooleanConstant(false))))
} }
} }
...@@ -92,14 +92,14 @@ case class CUDA_UpdateDeviceData(var fieldData : IR_IV_FieldData) extends CUDA_H ...@@ -92,14 +92,14 @@ case class CUDA_UpdateDeviceData(var fieldData : IR_IV_FieldData) extends CUDA_H
val field = fieldData.field val field = fieldData.field
IR_IfCondition( IR_IfCondition(
CUDA_HostDataUpdated(field, Duplicate(fieldData.slot), fieldData.fragmentIdx), CUDA_HostDataUpdated(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
ListBuffer[IR_Statement]( ListBuffer[IR_Statement](
CUDA_TransferUtil.genTransfer( CUDA_TransferUtil.genTransfer(
IR_IV_FieldData(field, Duplicate(fieldData.slot)), IR_IV_FieldData(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
CUDA_FieldDeviceData(field, Duplicate(fieldData.slot)), CUDA_FieldDeviceData(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)),
(0 until field.layout.numDimsData).map(dim => field.layout.idxById("TOT", dim)).reduceLeft(_ * _) * IR_SizeOf(field.resolveBaseDatatype), (0 until field.layout.numDimsData).map(dim => field.layout.idxById("TOT", dim)).reduceLeft(_ * _) * IR_SizeOf(field.resolveBaseDatatype),
"H2D"), "H2D"),
IR_Assignment(CUDA_HostDataUpdated(field, Duplicate(fieldData.slot)), IR_BooleanConstant(false)))) IR_Assignment(CUDA_HostDataUpdated(field, Duplicate(fieldData.slot), Duplicate(fieldData.fragmentIdx)), IR_BooleanConstant(false))))
} }
} }
......
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