~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to src/blas/level3/kernel/ATL_trsmL.c

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2013-06-11 15:58:16 UTC
  • mfrom: (1.1.3 upstream)
  • mto: (2.2.21 experimental)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20130611155816-b72z8f621tuhbzn0
Tags: upstream-3.10.1
Import upstream version 3.10.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *             Automatically Tuned Linear Algebra Software v3.8.4
 
2
 *             Automatically Tuned Linear Algebra Software v3.10.1
3
3
 *                    (C) Copyright 1997 R. Clint Whaley
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
29
29
 */
30
30
#include "atlas_kern3.h"
31
31
 
 
32
#ifdef Transpose_
 
33
   #define ATL_TRANS AtlasTrans
 
34
#elif defined(ConjTrans_)
 
35
   #define ATL_TRANS AtlasConjTrans
 
36
#else
 
37
   #define ATL_TRANS AtlasNoTrans
 
38
#endif
 
39
#ifdef UnitDiag_
 
40
   #define ATL_UNIT AtlasUnit
 
41
#else
 
42
   #define ATL_UNIT AtlasNonUnit
 
43
#endif
32
44
#ifdef Upper_
 
45
   #define ATL_UPLO AtlasUpper
33
46
   #ifdef Transpose_
34
47
      #ifdef UnitDiag_
35
48
         #define ATLP  UTU
66
79
      #endif
67
80
   #endif
68
81
#else
 
82
   #define ATL_UPLO AtlasLower
69
83
   #ifdef Transpose_
70
84
      #ifdef UnitDiag_
71
85
         #define ATL_trcopy Mjoin(PATL,trcopyL2U_U)
122
136
{
123
137
   const TYPE *alpha = valpha;
124
138
#ifdef TREAL
125
 
   #if defined(Transpose_) || defined(ConjTrans_)
126
 
      if ( N > (M<<2) )
127
 
      {
128
 
         void *va;
129
 
         TYPE *a;
130
 
 
131
 
         va = malloc(ATL_Cachelen + (ATL_MulBySize(M*M)));
132
 
         ATL_assert(va);
133
 
         a = ATL_AlignPtr(va);
134
 
         #ifdef TREAL
135
 
            Mjoin(ATL_trcopy,_a1)(M, ATL_rone, A, lda, a);
136
 
         #else
137
 
            ATL_trcopy(M, A, lda, a);
138
 
         #endif
139
 
         Mjoin(Mjoin(PATL,trsmKL),ATLPt)(M, N, *alpha, a, M, C, ldc);
140
 
         free(va);
141
 
      }
142
 
      else Mjoin(PATL,reftrsm)(AtlasLeft, Uplo_, Trans_, Unit_, M, N, *alpha,
143
 
                               A, lda, C, ldc);
144
 
   #else
145
 
      Mjoin(Mjoin(PATL,trsmKL),ATLP)(M, N, *alpha, A, lda, C, ldc);
146
 
   #endif
 
139
   int ierr=1;
 
140
   int Mjoin(PATL,trsmKL_rk4)(enum ATLAS_SIDE Side, enum ATLAS_UPLO Uplo,
 
141
      enum ATLAS_TRANS TA, enum ATLAS_DIAG Diag, ATL_CINT M, ATL_CINT N,
 
142
      const SCALAR alpha, const TYPE *A, ATL_CINT lda, TYPE *B, ATL_CINT ldb);
 
143
   if (N >= 8 && M >= 8)  /* must get reuse of A, and call rk4 */
 
144
      ierr = Mjoin(PATL,trsmKL_rk4)(AtlasLeft, ATL_UPLO, ATL_TRANS, ATL_UNIT,
 
145
                                    M, N, *alpha, A, lda, C, ldc);
 
146
   if (ierr)
 
147
      Mjoin(PATL,reftrsm)(AtlasLeft, ATL_UPLO, ATL_TRANS, ATL_UNIT,
 
148
                          M, N, *alpha, A, lda, C, ldc);
147
149
#else
148
 
   if (N > (M<<2) && M <= 4)
149
 
      Mjoin(PATL,CtrsmKL)(Uplo_, Trans_, Unit_, M, N, valpha, A, lda, C, ldc);
150
 
   else
151
 
      Mjoin(PATL,reftrsm)(AtlasLeft, Uplo_, Trans_, Unit_, M, N, valpha,
152
 
                          A, lda, C, ldc);
153
 
 
 
150
   int ierr=1;
 
151
   int Mjoin(PATL,trsmKL_rk2)(enum ATLAS_SIDE Side, enum ATLAS_UPLO Uplo,
 
152
      enum ATLAS_TRANS TA, enum ATLAS_DIAG Diag, ATL_CINT M, ATL_CINT N,
 
153
      const SCALAR alpha, const TYPE *A, ATL_CINT lda, TYPE *B, ATL_CINT ldb);
 
154
   if (N >= 8 && M >= 8)  /* must get reuse of A, and call rk2 */
 
155
      ierr = Mjoin(PATL,trsmKL_rk2)(AtlasLeft, ATL_UPLO, ATL_TRANS, ATL_UNIT,
 
156
                                    M, N, valpha, A, lda, C, ldc);
 
157
   if (ierr)
 
158
      Mjoin(PATL,reftrsm)(AtlasLeft, ATL_UPLO, ATL_TRANS, ATL_UNIT,
 
159
                          M, N, valpha, A, lda, C, ldc);
154
160
#endif
155
161
}