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

Re: Mail archives



Greetings again!  One more change is necessary to take into account
incY!=1 for ger:


=============================================================================
ATL_sger_nx32.c
=============================================================================

#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"


void 
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;


  ae=a+n*lda;
  nn=STRIDE*lda;

#if NDPM == 1
  for (;a<ae;a+=lda,b+=binc)
    Mjoin(g,EXT)(b,STRIDE,a,nn,c,m);
#else

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

    a+=(NDPM-1)*nn;
    b+=(NDPM-1)*STRIDE*binc;
  }

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

    mm=(ae-a)/nn;
    if (((ae-a)/lda)%STRIDE)
      mm++;
    
    if (mm == 1)
      Mjoin(g,EXT1)(b,STRIDE,a,nn,c,m);

    else if (mm == 2)
      Mjoin(g,EXT2)(b,STRIDE,a,nn,c,m);

    else if (mm == 3)
      Mjoin(g,EXT3)(b,STRIDE,a,nn,c,m);

    else if (mm == 4)
      Mjoin(g,EXT4)(b,STRIDE,a,nn,c,m);

    else if (mm == 5)
      Mjoin(g,EXT5)(b,STRIDE,a,nn,c,m);

  }

#endif

}

=============================================================================

Take care,


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