From: Francis Russell Date: Sat, 19 May 2012 11:11:04 +0000 (+0100) Subject: Attempt to fix SPAM3 iteration. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=04687e7b722c3176e6b8b2dc88b345be52f3e94a;p=francis%2Fofc.git Attempt to fix SPAM3 iteration. --- diff --git a/src/ofc/generators/onetep/SPAM3.scala b/src/ofc/generators/onetep/SPAM3.scala index 064a0fc..2384f4b 100644 --- a/src/ofc/generators/onetep/SPAM3.scala +++ b/src/ofc/generators/onetep/SPAM3.scala @@ -39,22 +39,22 @@ class SPAM3(name : String, position: Seq[NamedIndex]) extends Scalar { context.addFooter(footer) val firstCol = new FunctionCall(OnetepFunctions.sparse_first_elem_on_node, - Seq(OnetepVariables.pub_first_atom_on_node.at(OnetepVariables.pub_my_node_id), + Seq(OnetepVariables.pub_my_node_id, mat, new CharLiteral('C'))) val lastCol = new FunctionCall(OnetepFunctions.sparse_first_elem_on_node, - Seq(OnetepVariables.pub_first_atom_on_node.at((OnetepVariables.pub_my_node_id: Expression[IntType])+1), + Seq((OnetepVariables.pub_my_node_id: Expression[IntType])+1, mat, new CharLiteral('C'))) - 1 val firstRow = new FunctionCall(OnetepFunctions.sparse_first_elem_on_node, - Seq(OnetepVariables.pub_first_atom_on_node.at(OnetepVariables.pub_my_node_id), + Seq(OnetepVariables.pub_my_node_id, mat, new CharLiteral('R'))) val lastRow = new FunctionCall(OnetepFunctions.sparse_first_elem_on_node, - Seq(OnetepVariables.pub_first_atom_on_node.at((OnetepVariables.pub_my_node_id: Expression[IntType])+1), + Seq((OnetepVariables.pub_my_node_id: Expression[IntType])+1, mat, new CharLiteral('R'))) - 1 @@ -62,7 +62,7 @@ class SPAM3(name : String, position: Seq[NamedIndex]) extends Scalar { val colAtom = context.addExpression("col_atom", new FunctionCall(OnetepFunctions.sparse_atom_of_elem, Seq(col, mat, new CharLiteral('C')))) val localColAtom = context.addExpression("local_col_atom", - colAtom - OnetepVariables.pub_first_atom_on_node.at(OnetepVariables.pub_my_node_id)) + colAtom - OnetepVariables.pub_first_atom_on_node.at(OnetepVariables.pub_my_node_id) + 1) val row = context.addIteration("row", firstRow, lastRow) val rowAtom = context.addExpression("row_atom", new FunctionCall(OnetepFunctions.sparse_atom_of_elem,