[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drop in sgemm

Greetings!  The last stuff I released to Clint can still be found at


These unpack into the new beta atlas developer's version at Clint's
site just fine.  There are a few minor edits to my routines, though,
which are needed for the latest gcc.  I described these earlier on the
list.  Briefly, one needs to replace the 'static __inline__ void' with
simply 'void' in dpa.h, ga.h, and maa.h, and to replace the
ATL_sger_nx32.c file in include with the almost identical one below.

I hope to be making a new tarball soon once the double precision stuff
is finished.

Take care,


#include <stdio.h>
#include <stdlib.h>

#define Mjoin(a,b) mjoin(a,b)
#define mjoin(a,b) a ## b

#define EXT5 5g
#define EXT4 4g
#define EXT3 3g
#define EXT2 2g
#define EXT1 1g

#define NDP 5
#define EXT EXT5
#include "ga.h"
#undef NDP
#define NDP 4
#undef EXT
#define EXT EXT4
#include "ga.h"
#undef NDP
#define NDP 3
#undef EXT
#define EXT EXT3
#include "ga.h"
#undef NDP
#define NDP 2
#undef EXT
#define EXT EXT2
#include "ga.h"
#undef NDP
#define NDP 1
#undef EXT
#define EXT EXT1
#include "ga.h"
#undef NDP

#define NDP NDPM
#undef EXT
#define EXT Mjoin(Mjoin(NDP,g),m)
#include "ga.h"

ATL_sger1_a1_x1_yX(int m,int n,float alpha,const float *c,int cinc,
		   const float *b,int binc,float *a,int lda) {

  int i,mm,nn;
  const float *ae;


#if NDPM == 1
  for (;a<ae;a+=lda,b+=binc)

  while (a+NDPM*nn<=ae) {
    for (i=0;i<STRIDE;i++,a+=lda,b+=binc) 


  for (i=0;a<ae && i<STRIDE;i++,a+=lda,b+=binc) {

    if (((ae-a)/lda)%STRIDE)
    if (mm == 1)

    else if (mm == 2)

    else if (mm == 3)

    else if (mm == 4)

    else if (mm == 5)





Doug ABERDEEN <daa@discus.anu.edu.au> writes:

> Hi guys, 
> Some time ago there was a discussion of drop in gemv/ger. Camm was
> working on SSI GEMV/GER, and atlas_goto.tgz was an example of a drop
> in gemm. A new developer release with this stuff was on the way?
> I haven't heard anything for a while. I've got time now to
> incorporate my SSE SGEMM into ATLAS. Of course I'd like to do this 
> on a bugfixed dist with a couple of examples to work from. Is there any
> chance of getting a copy of a release with the SSE GEMV/GER stuff in
> it and the fixes that Clint and Camm described on this list?
> Otherwise I'll work with the goto version.
> -- 
> -Doug  -- http://beaker.anu.edu.au, Ph:(02) 6279-8608, Fax:(02) 6279-8651

Camm Maguire			     			camm@enhanced.com
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah