From 04687e7b722c3176e6b8b2dc88b345be52f3e94a Mon Sep 17 00:00:00 2001 From: Francis Russell Date: Sat, 19 May 2012 12:11:04 +0100 Subject: [PATCH] Attempt to fix SPAM3 iteration. --- src/ofc/generators/onetep/SPAM3.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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, -- 2.47.3