Bindings implementation

Implementation details must be added to the ``Impl'' files generated in Subsection 6.4.1. Changes to these files must be made between code splicer pairs to ensure their retention in subsequent invocations of Babel. The following is an example of a code splicer pair in C$:$


/* DO-NOT-DELETE splicer.begin(num.Linsol._includes) */
/* Insert-Code-Here {num.Linsol._includes} (includes and arbitrary code) */
/* DO-NOT-DELETE splicer.end(num.Linsol._includes) */

A snippet from the Babel-generated implementation file for the solve example from Subsection 5.4 is given below, wherein r-array data are presented as double pointers, and index variables are normal integers.


void
impl_num_Linsol_solve(/* in */ num_Linsol self,
                      /* in rarray[m,n] */ double* A,
                      /* inout rarray[n] */ double* x,
                      /* in */ int32_t m,
                      /* in */ int32_t n,
                      /* out */ sidl_BaseInterface *_ex)
{
  *_ex = 0;
  /* DO-NOT-DELETE splicer.begin(num.Linsol.solve) */
  /* Insert-Code-Here {num.Linsol.solve} (solve method) */
  /* DO-NOT-DELETE splicer.end(num.Linsol.solve) */
}

Data for the 2-D array, A, is in column-major order. The RarrayElem2 helper macro, described in Subsection 6.2.3, can be used to access A.





babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov