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

« back to all changes in this revision

Viewing changes to src/pthreads/blas/level3/ATL_Ssymm.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:
1
 
 
2
 
/* ---------------------------------------------------------------------
3
 
 *
4
 
 * -- Automatically Tuned Linear Algebra Software (ATLAS)
5
 
 *    (C) Copyright 2000 All Rights Reserved
6
 
 *
7
 
 * -- ATLAS routine -- Version 3.2 -- December 25, 2000
8
 
 *
9
 
 * Author         : Antoine P. Petitet
10
 
 * Originally developed at the University of Tennessee,
11
 
 * Innovative Computing Laboratory, Knoxville TN, 37996-1301, USA.
12
 
 *
13
 
 * ---------------------------------------------------------------------
14
 
 *
15
 
 * -- Copyright notice and Licensing terms:
16
 
 *
17
 
 *  Redistribution  and  use in  source and binary forms, with or without
18
 
 *  modification, are  permitted provided  that the following  conditions
19
 
 *  are met:
20
 
 *
21
 
 * 1. Redistributions  of  source  code  must retain the above copyright
22
 
 *    notice, this list of conditions and the following disclaimer.
23
 
 * 2. Redistributions in binary form must reproduce  the above copyright
24
 
 *    notice,  this list of conditions, and the  following disclaimer in
25
 
 *    the documentation and/or other materials provided with the distri-
26
 
 *    bution.
27
 
 * 3. The name of the University,  the ATLAS group,  or the names of its
28
 
 *    contributors  may not be used to endorse or promote products deri-
29
 
 *    ved from this software without specific written permission.
30
 
 *
31
 
 * -- Disclaimer:
32
 
 *
33
 
 * THIS  SOFTWARE  IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34
 
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,  BUT NOT
35
 
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36
 
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
37
 
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,  INDIRECT, INCIDENTAL, SPE-
38
 
 * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
39
 
 * TO,  PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
40
 
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
41
 
 * RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (IN-
42
 
 * CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
43
 
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
 
 *
45
 
 * ---------------------------------------------------------------------
46
 
 */
47
 
 
48
 
/*
49
 
 * Include files
50
 
 */
51
 
#include "atlas_ptmisc.h"
52
 
#include "atlas_ptlvl3.h"
53
 
#include "atlas_ptlevel3.h"
54
 
 
55
 
PT_TREE_T ATL_Ssymm
56
 
(
57
 
   const PT_LVL3_TYPE_T       * PLVL3,
58
 
   const unsigned int         NODE,
59
 
   const unsigned int         NTHREADS,
60
 
   pthread_attr_t             * ATTR,
61
 
   const int                  NB,
62
 
   const enum ATLAS_TRANS     TGEMM,
63
 
   const enum ATLAS_SIDE      SIDE,
64
 
   const enum ATLAS_UPLO      UPLO,
65
 
   const int                  M,
66
 
   const int                  N,
67
 
   const void                 * ALPHA,
68
 
   const void                 * A,
69
 
   const int                  LDA,
70
 
   const void                 * B,
71
 
   const int                  LDB,
72
 
   const void                 * BETA,
73
 
   void                       * C,
74
 
   const int                  LDC
75
 
)
76
 
{
77
 
/*
78
 
 * .. Local Variables ..
79
 
 */
80
 
   PT_TREE_T                  left, right, tree = NULL;
81
 
   PT_SYMM_ARGS_T             * a_mm = NULL;
82
 
   double                     rm, rn;
83
 
   DIM_1DSPLIT_T              splitM, splitN;
84
 
   size_t                     size;
85
 
   unsigned int               next = ( NODE << 1 ), ntm1, ntm2, ntn1, ntn2;
86
 
   int                        incB, incC, m1, m2, n1, n2;
87
 
/* ..
88
 
 * .. Executable Statements ..
89
 
 *
90
 
 */
91
 
   if( NTHREADS < 1 ) return( tree );
92
 
 
93
 
   size = PLVL3->size;
94
 
 
95
 
   if( SIDE == AtlasLeft )
96
 
   {
97
 
      splitN = ATL_1dsplit( NTHREADS, N, NB, &ntn1, &ntn2, &n1, &n2, &rn );
98
 
 
99
 
      if( splitN == Atlas1dSplit )
100
 
      {
101
 
         left  = ATL_Ssymm( PLVL3, next+1, ntn1, ATTR, NB, TGEMM, SIDE, UPLO,
102
 
                            M, n1, ALPHA, A, LDA, B, LDB, BETA, C, LDC );
103
 
         incB  = n1 * LDB;
104
 
         incC  = n1 * LDC;
105
 
         right = ATL_Ssymm( PLVL3, next+2, ntn2, ATTR, NB, TGEMM, SIDE, UPLO,
106
 
                            M, n2, ALPHA, A, LDA, Mvpt3( B, incB, size ), LDB,
107
 
                            BETA, Mvpt3( C, incC, size ), LDC );
108
 
         tree  = ATL_init_node( NODE, left, right, NULL, NULL, NULL, NULL );
109
 
      }
110
 
      else
111
 
      {
112
 
         a_mm = (PT_SYMM_ARGS_T *)malloc( sizeof( PT_SYMM_ARGS_T ) );
113
 
         ATL_assert( a_mm != NULL );
114
 
         a_mm->si = SIDE; a_mm->up = UPLO;
115
 
         a_mm->m  = M;    a_mm->n  = N;    a_mm->al = ALPHA;
116
 
         a_mm->a  = A;    a_mm->la = LDA;  a_mm->b  = B;     a_mm->lb = LDB;
117
 
         a_mm->be = BETA; a_mm->c  = C;    a_mm->lc = LDC;
118
 
         tree = ATL_init_node( NODE, NULL, NULL, NULL, NULL,
119
 
                               ( TGEMM == AtlasConjTrans ? PLVL3->hemm0 :
120
 
                               PLVL3->symm0 ), (void *)(a_mm) );
121
 
      }
122
 
   }
123
 
   else
124
 
   {
125
 
      splitM = ATL_1dsplit( NTHREADS, M, NB, &ntm1, &ntm2, &m1, &m2, &rm );
126
 
 
127
 
      if( splitM == Atlas1dSplit )
128
 
      {
129
 
         left  = ATL_Ssymm( PLVL3, next+1, ntm1, ATTR, NB, TGEMM, SIDE, UPLO,
130
 
                            m1, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC );
131
 
         incB  = m1;
132
 
         incC  = m1;
133
 
         right = ATL_Ssymm( PLVL3, next+2, ntm2, ATTR, NB, TGEMM, SIDE, UPLO,
134
 
                            m2, N, ALPHA, A, LDA, Mvpt3( B, incB, size ), LDB,
135
 
                            BETA, Mvpt3( C, incC, size ), LDC );
136
 
         tree  = ATL_init_node( NODE, left, right, NULL, NULL, NULL, NULL );
137
 
      }
138
 
      else
139
 
      {
140
 
         a_mm = (PT_SYMM_ARGS_T *)malloc( sizeof( PT_SYMM_ARGS_T ) );
141
 
         ATL_assert( a_mm != NULL );
142
 
         a_mm->si = SIDE; a_mm->up = UPLO;
143
 
         a_mm->m  = M;    a_mm->n  = N;    a_mm->al = ALPHA;
144
 
         a_mm->a  = A;    a_mm->la = LDA;  a_mm->b  = B;     a_mm->lb = LDB;
145
 
         a_mm->be = BETA; a_mm->c  = C;    a_mm->lc = LDC;
146
 
         tree = ATL_init_node( NODE, NULL, NULL, NULL, NULL,
147
 
                               ( TGEMM == AtlasConjTrans ? PLVL3->hemm0 :
148
 
                               PLVL3->symm0 ), (void *)(a_mm) );
149
 
      }
150
 
   }
151
 
 
152
 
   return( tree );
153
 
/*
154
 
 * End of ATL_Ssymm
155
 
 */
156
 
}