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

« back to all changes in this revision

Viewing changes to src/blas/level2/ATL_hpmv.c

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot, Sylvestre Ledru, Sébastien Villemot
  • Date: 2013-06-11 15:58:16 UTC
  • mfrom: (1.1.4) (25 sid)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20130611155816-8xeeiziu1iml040c
Tags: 3.10.1-1
[ Sylvestre Ledru ]
* New upstream release (Closes: #609287)

[ Sébastien Villemot ]
* Provide architectural defaults (i.e. precomputed timings) for all
  release archs (except armel and mips for the time being, due to slow
  porterboxes). This will make the package build much faster and should
  eliminate transient build failures due to excessive variance in the
  timings.
* Move symlinks for lib{cblas,f77blas,atlas,lapack_atlas} out of the
  libblas.so.3 alternative and make them always present, so that
  software relying on these libs do not break when another alternative
  is selected for BLAS
* ATLAS now has improved ARM support with native asm constructs. This required
  the following tunes:
  + armel-is-v4t.diff: new patch, prevents FTBFS on armel; otherwise,
    ATLAS uses asm constructs too recent for the platform (armel is only v4t)
  + debian/rules: on armhf, define the ATL_ARM_HARDFP flag; otherwise the asm
    constructs use the soft-float ABI for passing floating points
  + on armhf, ensure that -mfloat-abi=softfp and -mcpu=vfpv3 flags are never
    used; this is implemented via a patch (armhf.diff) and by the use of fixed
    archdefs
* The generic package is now built without multi-threading, because otherwise
  the package fails to build on some single-processor machines (this required
  the introduction of a patch: fix-non-threaded-build.diff). As a side effect,
  the build of the custom package gracefully handles non-threaded
  builds. (Closes: #602524)
* Add libblas.a as slave in the libblas.so alternative (Closes: #701921)
* Add symlinks for lib{f77blas,atlas}.a in /usr/lib (Closes: #666203)
* Modify shlibs file of libatlas3-base, such that packages using
  libblas/liblapack depend on any BLAS/LAPACK alternative, while packages
  depending on ATLAS-specific libraries (e.g. libatlas.so) depend specifically
  on libatlas3-base.
* corei1.diff: remove patch, applied upstream
* Use my @debian.org email address
* Remove obsolete DM-Upload-Allowed flag
* Switch VCS to git
* Remove Conflicts/Replaces against pre-squeeze packages
* libatlas-base-dev now provides libblas.so, as libblas-dev
* No longer use -Wa,--noexecstack in CFLAGS, it makes the package FTBFS
* Do not use POWER3 arch for powerpcspe port (Closes: #701068)
* Bump to debhelper compat level 9
* README.Debian: mention that devscripts is needed to compile the custom
  package (Closes: #697431)
* Bump Standards-Version to 3.9.4. As a consequence, add Built-Using
  fields because the package embeds stuff from liblapack-pic

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * -- Automatically Tuned Linear Algebra Software (ATLAS)
4
4
 *    (C) Copyright 2000 All Rights Reserved
5
5
 *
6
 
 * -- ATLAS routine -- Version 3.2 -- December 25, 2000
 
6
 * -- ATLAS routine -- Version 3.9.24 -- December 25, 2000
7
7
 *
8
8
 * Author         : Antoine P. Petitet
9
9
 * Contributor(s) : R. Clint Whaley
124
124
      if( !( SCALAR_IS_ONE( BETA ) ) ) Mjoin( PATL, scal )( N, BETA, Y, INCY );
125
125
      return;
126
126
   }
127
 
 
128
 
   if( ( INCX != 1 ) || ( ( INCY == 1 ) && !( SCALAR_IS_ONE( ALPHA ) ) ) )
129
 
   {
130
 
      vx = (void *)malloc( ATL_Cachelen + ATL_MulBySize( N ) );
131
 
      ATL_assert( vx ); x = ATL_AlignPtr( vx );
132
 
      Mjoin( PATL, cpsc )( N, ALPHA, X, INCX, x, 1 );
133
 
      alphaY = one;
134
 
   }
135
 
   else { x = (TYPE *)(X); alphaY = ALPHA; }
136
 
 
137
 
   if( ( INCY != 1 ) || !( SCALAR_IS_ONE( alphaY ) ) )
138
 
   {
139
 
      vy = malloc( ATL_Cachelen + ATL_MulBySize( N ) );
140
 
      ATL_assert( vy ); y00 = y = ATL_AlignPtr( vy );
141
 
      beta0 = zero;
142
 
   }
143
 
   else { y00 = y = (TYPE *)(Y); beta0 = BETA; }
144
 
 
145
 
   ATL_GetPartSPMV( A, N, &mb, &nb );
146
 
 
147
 
   mb1 = N - ( ( N - 1 ) / mb ) * mb; incXY1 = (nb SHIFT);
148
 
 
149
 
   if( UPLO == AtlasUpper )
150
 
   {
151
 
      if(      SCALAR_IS_ZERO( beta0 ) )
152
 
         gpmv0 = Mjoin( PATL, gpmvUC_a1_x1_b0_y1 );
153
 
      else if( SCALAR_IS_ONE ( beta0 ) )
154
 
         gpmv0 = Mjoin( PATL, gpmvUC_a1_x1_b1_y1 );
155
 
      else
156
 
         gpmv0 = Mjoin( PATL, gpmvUC_a1_x1_bX_y1 );
157
 
      gpmv1 = Mjoin( PATL, gpmvUC_a1_x1_b1_y1 );
158
 
      gpmvN = Mjoin( PATL, gpmvUN_a1_x1_b1_y1 );
159
 
 
160
 
      lda = 1; lda0 = lda; A0 = (TYPE *)(A); MUpnext( mb, A0, lda0 );
161
 
      incXY = (mb SHIFT); x0 = x + incXY; y0 = y + incXY;
162
 
 
163
 
      for( n = N - mb; n > 0; n -= mb, x0 += incXY, x += incXY,
164
 
           y0 += incXY, y += incXY )
165
 
      {
166
 
         Mjoin( PATL, hpmvU )( mb, A, lda, x, beta0, y );
167
 
 
168
 
         for( j = 0, lda1 = lda0, A1 = A0 - (mb SHIFT), x1 = x0, y1 = y0; j < n;
169
 
              j += nb, x1 += incXY1, y1 += incXY1 )
170
 
         {
171
 
            jb = n - j; jb = Mmin( jb, nb );
172
 
            gpmv0( jb, mb, one, A1, lda1, x,  1, beta0, y1, 1 );
173
 
            gpmvN( mb, jb, one, A1, lda1, x1, 1, one,   y,  1 );
174
 
            MUpnext( jb, A1, lda1 ); A1 -= (jb SHIFT);
175
 
         }
176
 
         beta0 = one; gpmv0 = gpmv1; lda = lda0; A = A0; MUpnext( mb, A0, lda0 );
177
 
      }
178
 
      Mjoin( PATL, hpmvU )( mb1, A, lda, x, beta0, y );
179
 
   }
180
 
   else
181
 
   {
182
 
      if(      SCALAR_IS_ZERO( beta0 ) )
183
 
         gpmv0 = Mjoin( PATL, gpmvLC_a1_x1_b0_y1 );
184
 
      else if( SCALAR_IS_ONE ( beta0 ) )
185
 
         gpmv0 = Mjoin( PATL, gpmvLC_a1_x1_b1_y1 );
186
 
      else
187
 
         gpmv0 = Mjoin( PATL, gpmvLC_a1_x1_bX_y1 );
188
 
      gpmv1 = Mjoin( PATL, gpmvLC_a1_x1_b1_y1 );
189
 
      gpmvN = Mjoin( PATL, gpmvLN_a1_x1_b1_y1 );
190
 
 
191
 
      lda = N; lda0 = lda; A0 = (TYPE *)(A); MLpnext( N, A, lda );
192
 
      incXY = (mb SHIFT); x0 = x; y0 = y;
193
 
 
194
 
      for( n  = N - mb, x += ((N-mb) SHIFT), y += ((N-mb) SHIFT); n > 0;
195
 
           n -= mb, x -= incXY, y -= incXY )
196
 
      {
197
 
         MLpprev( mb, A, lda );
198
 
         Mjoin( PATL, hpmvL )( mb, A, lda, x, beta0, y );
199
 
 
200
 
         for( j = 0, lda1 = lda0, A1 = A0 + (n SHIFT), x1 = x0, y1 = y0; j < n;
201
 
              j += nb, x1 += incXY1, y1 += incXY1 )
202
 
         {
203
 
            jb = n - j; jb = Mmin( jb, nb );
204
 
            gpmv0( jb, mb, one, A1, lda1, x,  1, beta0, y1, 1 );
205
 
            gpmvN( mb, jb, one, A1, lda1, x1, 1, one,   y,  1 );
206
 
            MLpnext( jb, A1, lda1 ); A1 -= (jb SHIFT);
207
 
         }
208
 
         beta0 = one; gpmv0 = gpmv1;
209
 
      }
210
 
      Mjoin( PATL, hpmvL )( mb1, A0, lda0, x0, beta0, y0 );
211
 
   }
212
 
 
213
 
   if( vx ) free( vx );
214
 
   if( vy )
215
 
   { Mjoin( PATL, axpby )( N, alphaY, y00, 1, BETA, Y, INCY ); free( vy ); }
 
127
   Mjoin(PATL,refhpmv)(UPLO, N, ALPHA, A, X, INCX, BETA, Y, INCY);
 
128
 
216
129
/*
217
130
 * End of Mjoin( PATL, hpmv )
218
131
 */