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

« back to all changes in this revision

Viewing changes to src/blas/level2/ATL_spr.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:
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
109
109
 */
110
110
   if( ( N == 0 ) || ( SCALAR_IS_ZERO( ALPHA ) ) ) return;
111
111
 
112
 
   if( ( INCX == 1 ) && ( SCALAR_IS_ONE( ALPHA ) ) )
113
 
   {
114
 
      x = y = (TYPE *)(X); incy = INCX;
115
 
   }
116
 
   else
117
 
   {
118
 
      vx = (void *)malloc( ATL_Cachelen + ATL_MulBySize( N ) );
119
 
      ATL_assert( vx ); x = ATL_AlignPtr( vx );
120
 
      Mjoin( PATL, cpsc )( N, ALPHA, X, INCX, x, 1 );
121
 
      y = (TYPE *)(X); incy = INCX;
122
 
   }
123
 
 
124
 
   ATL_GetPartP1( A, N, mb, nb );
125
 
 
126
 
   mb1  = N - ( ( N - 1 ) / mb ) * mb;
127
 
 
128
 
   if( UPLO == AtlasLower )
129
 
   {
130
 
      lda = lda0 = N; incA0 = ( incX = (mb SHIFT) );
131
 
 
132
 
      Mjoin( PATL, sprL )( mb1, x, y, incy, A, lda );
133
 
      A0 = (TYPE *)( A + (mb1 SHIFT) ); MLpnext( mb1, A, lda );
134
 
      x += (mb1 SHIFT);
135
 
 
136
 
      for( n = mb1; n < N; n += mb, A0 += incA0, x += incX )
137
 
      {
138
 
         gpr1L( mb, n, one, x, 1, y, incy, A0, lda0 );
139
 
         Mjoin( PATL, sprL )( mb, x, y + n*(incy SHIFT), incy, A, lda );
140
 
         MLpnext( mb, A, lda );
141
 
      }
142
 
   }
143
 
   else
144
 
   {
145
 
      incA0 = ( incX = (mb SHIFT) ); incY = incX * incy;
146
 
      lda0 = lda = 1; A0 = (TYPE *)(A); MUpnext( mb, A0, lda0 );
147
 
 
148
 
      for( n  = N - mb, y0 = y + incY; n > 0;
149
 
           n -= mb, x += incX, y += incY, y0 += incY )
150
 
      {
151
 
         Mjoin( PATL, sprU )( mb, x, y, incy, A, lda );
152
 
         gpr1U(  mb, n, one, x, 1, y0, incy, A0 - incA0, lda0 );
153
 
         lda = lda0; A = A0; MUpnext( mb, A0, lda0 );
154
 
      }
155
 
      Mjoin( PATL, sprU )( mb1, x, y, incy, A, lda );
156
 
   }
157
 
 
158
 
   if( vx ) free( vx );
 
112
   Mjoin(PATL,refspr)(UPLO, N, ALPHA, X, INCX, A);
159
113
/*
160
114
 * End of Mjoin( PATL, spr )
161
115
 */