From: Francis Russell Date: Thu, 31 May 2012 23:22:44 +0000 (+0100) Subject: Update generation for latest ONETEP version (untested). X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=95734922503db0a5049e88affe0352c15de7cfbf;p=francis%2Fofc.git Update generation for latest ONETEP version (untested). --- diff --git a/src/ofc/generators/onetep/OnetepFunctions.scala b/src/ofc/generators/onetep/OnetepFunctions.scala index f8b3869..268232e 100644 --- a/src/ofc/generators/onetep/OnetepFunctions.scala +++ b/src/ofc/generators/onetep/OnetepFunctions.scala @@ -2,11 +2,14 @@ package ofc.generators.onetep import ofc.codegen._ object OnetepFunctions { - val basis_copy_function_to_fftbox = new FortranSubroutineSignature("basis_copy_function_to_fftbox", - Seq(("fa_fftbox", new ArrayType[FloatType](3)), - ("fa_start1", new IntType), - ("fa_start2", new IntType), - ("fa_start3", new IntType), + val basis_copy_function_to_box = new FortranSubroutineSignature("basis_copy_function_to_box", + Seq(("fa_box", new ArrayType[FloatType](3)), + ("box_n1", new IntType), + ("box_n2", new IntType), + ("box_n3", new IntType), + ("offset1", new IntType), + ("offset2", new IntType), + ("offset3", new IntType), ("fa_tightbox", OnetepTypes.TightBox), ("fa_on_grid", new ArrayType[FloatType](1)), ("fa_sphere", OnetepTypes.Sphere))) diff --git a/src/ofc/generators/onetep/PPDFunctionSet.scala b/src/ofc/generators/onetep/PPDFunctionSet.scala index c1456ff..61fe3a9 100644 --- a/src/ofc/generators/onetep/PPDFunctionSet.scala +++ b/src/ofc/generators/onetep/PPDFunctionSet.scala @@ -136,12 +136,13 @@ class PPDFunctionSet(val basis: Expression[StructType], val data: Expression[Arr var basisCopyParams : Seq[Expression[_]] = Nil basisCopyParams :+= (fftbox: Expression[ArrayType[FloatType]]) + basisCopyParams ++= fftboxSize basisCopyParams ++= fftboxOffset.map(new VarRef[IntType](_)) basisCopyParams :+= tightbox basisCopyParams :+= (parent.data: Expression[ArrayType[FloatType]]) basisCopyParams :+= sphere - context += new FunctionCallStatement(new FunctionCall(OnetepFunctions.basis_copy_function_to_fftbox, basisCopyParams)) + context += new FunctionCallStatement(new FunctionCall(OnetepFunctions.basis_copy_function_to_box, basisCopyParams)) for (dim <- 0 to 2) yield { import OnetepTypes._