next up previous
Next: Common List Operations (list.ccl) Up: Math (math.ccl) Previous: Math (math.ccl)

External vs. Lambda

If you look at $CCL_ROOT/lib/math.ccl you will notice that mmult is defined as
external real matrix_mult ( real list list, real list list )
  "libcclmath.so" "ccl_matrix_mult";
mmult := \ A . \ B . matrix_mult ( A, B );
That is, the lambda abstraction mmult is just a wrapper around the external function matrix_mult. You can use either one. The designers of ccli could put wrappers around all external functions that take a fixed number of arguments, and maybe they will in a future release. For now, the goal is to make things fast, so computational overhead involved in computing the wrapper, although small, is significant after repeated calls.



Eric Klavins 2003-12-03