next up previous contents
Next: What to do if Up: Contributing a complete GEMM Previous: Contributing a complete GEMM   Contents

Supplying ATLAS with what it needs

ATLAS expects that the contributed GEMM will have its own architecture- specific subdirectory, just as with all other ATLAS source directories. That directory is indicated to ATLAS by the UMMdir macro set in Make.<arch>. For instance, on the alpha platform, Mr. Goto's GEMM is used by ATLAS, and UMMdir is therefore set to: $(TOPdir)/src/blas/gemm/GOTO/$(ARCH).

In this directory, there must be a master makefile, called Makefile, which minimally contains the following targets:

For each precision, ATLAS calls the user's GEMM using this API:

int ATL_U<pre>usergemm(const enum ATLAS_TRANS TA, const enum ATLAS_TRANS TB,
                       const int M, const int N, const int K,
                       const SCALAR alpha, const TYPE *A, const int lda,
                       const TYPE *B, const int ldb, const SCALAR beta,
                       TYPE *C, const int ldc)
where,
<pre> : s d c z
SCALAR float double float* float*
TYPE float double float float


This routine should return 0 upon successful invocation, and -1 if unable to malloc enough memory. Other errors may be signaled by returning a value of 2. On error in this routine, ATLAS will call the no-copy code to get the answer, so a return value of 1 indicates that ATLAS should do this. If a fatal error occurs, or if an error occurs after operands have been modified (i.e., calling the no-copy code will no longer produce the correct answer), then execution should be halted.

ATLAS's interface routines have already done all required error checking, so the user need not check the input arguments in this routine, or any of the lower-level user contributed routines.


next up previous contents
Next: What to do if Up: Contributing a complete GEMM Previous: Contributing a complete GEMM   Contents
R. Clint Whaley 2001-08-04