Ticket #63717: static.h.patch

File static.h.patch, 5.5 KB (added by TruePath (Peter Gerdes), 3 years ago)
  • .h

    old new  
    2525#define STATIC
    2626#endif
    2727
    28 STATIC float FNAME(sdsdot)( const int* N, const float* alpha, const float* X, const int* incX, const float* Y, const int* incY )
    29 {
    30   DEBUG_S( "sdsdot" )
    31   return cblas_sdsdot( *N, *alpha, X, *incX, Y, *incY );
    32 }
    33 
    34 STATIC float FNAME(sdot)( const int* N, const float* X, const int* incX, const float* Y, const int* incY )
    35 {
    36   DEBUG_S( "sdot" )
    37   return cblas_sdot( *N, X, *incX, Y, *incY );
    38 }
    39 
    40 STATIC float FNAME(snrm2)( const int* N, const float* X, const int* incX )
    41 {
    42   DEBUG_S( "snrm2" )
    43   return cblas_snrm2( *N, X, *incX );
    44 }
    45 
    46 STATIC float FNAME(sasum)( const int* N, const float *X, const int* incX )
    47 {
    48   DEBUG_S( "sasum" )
    49   return cblas_sasum( *N, X, *incX );
    50 }
    51 
    52 STATIC c_float FNAME(cdotu)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
    53 {
    54   DEBUG_S( "cdotu" )
    55   c_float ans;
    56   cblas_cdotu_sub( *N, X, *incX, Y, *incY, &ans );
    57   return ans;
    58 }
    59 
    60 STATIC c_float FNAME(cdotc)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
    61 {
    62   DEBUG_S( "cdotc" )
    63   c_float ans;
    64   cblas_cdotc_sub( *N, X, *incX, Y, *incY, &ans );
    65   return ans;
    66 }
    67 
    68 STATIC float FNAME(scnrm2)( const int* N, const void* X, const int* incX )
    69 {
    70   DEBUG_S( "scnrm2" )
    71   return cblas_scnrm2( *N, X, *incX );
    72 }
    73 
    74 STATIC float FNAME(scasum)( const int* N, const void *X, const int* incX )
    75 {
    76   DEBUG_S( "scasum" )
    77   return cblas_scasum( *N, X, *incX );
    78 }
    79 
    80 STATIC c_double FNAME(zdotu)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
    81 {
    82   DEBUG_S( "zdotu" )
    83   c_double ans;
    84   cblas_zdotu_sub( *N, X, *incX, Y, *incY, &ans );
    85   return ans;
    86 }
    87 
    88 STATIC c_double FNAME(zdotc)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
    89 {
    90   DEBUG_S( "zdotc" )
    91   c_double ans;
    92   cblas_zdotc_sub( *N, X, *incX, Y, *incY, &ans );
    93   return ans;
    94 }
    95 
    96 #ifdef VECLIBFORT_SGEMV
    97 STATIC void FNAME(sgemv)( const char* trans, const int* m, const int* n,
    98   const float* alpha, const float* A, const int* ldA,
    99   const float* X, const int* incX,
    100   const float* beta, float* Y, const int* incY )
    101 {
    102   DEBUG_S( "sgemv" )
    103   enum CBLAS_TRANSPOSE T;
    104   switch ( trans[0] ) {
    105     case 'T': case 't':
    106       if ( (long)X % 32 == 0 ) { T = CblasTrans; break; }
    107       /* Implement as alpha * X^T * A + beta * Y^T */
    108       cblas_sgemm( CblasColMajor, CblasNoTrans, CblasNoTrans, 1, *n, *m, *alpha, X, *incX, A, *ldA, *beta, Y, *incY );
    109       return;
    110     default:
    111       T = CblasNoTrans;
    112   }
    113   cblas_sgemv( CblasColMajor, T, *m, *n, *alpha, A, *ldA, X, *incX, *beta, Y, *incY );
    114 }
    115 #endif
     28// STATIC float FNAME(sdsdot)( const int* N, const float* alpha, const float* X, const int* incX, const float* Y, const int* incY )
     29// {
     30//   DEBUG_S( "sdsdot" )
     31//   return cblas_sdsdot( *N, *alpha, X, *incX, Y, *incY );
     32// }
     33
     34// STATIC float FNAME(sdot)( const int* N, const float* X, const int* incX, const float* Y, const int* incY )
     35// {
     36//   DEBUG_S( "sdot" )
     37//   return cblas_sdot( *N, X, *incX, Y, *incY );
     38// }
     39
     40// STATIC float FNAME(snrm2)( const int* N, const float* X, const int* incX )
     41// {
     42//   DEBUG_S( "snrm2" )
     43//   return cblas_snrm2( *N, X, *incX );
     44// }
     45
     46// STATIC float FNAME(sasum)( const int* N, const float *X, const int* incX )
     47// {
     48//   DEBUG_S( "sasum" )
     49//   return cblas_sasum( *N, X, *incX );
     50// }
     51
     52// STATIC c_float FNAME(cdotu)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
     53// {
     54//   DEBUG_S( "cdotu" )
     55//   c_float ans;
     56//   cblas_cdotu_sub( *N, X, *incX, Y, *incY, &ans );
     57//   return ans;
     58// }
     59
     60// STATIC c_float FNAME(cdotc)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
     61// {
     62//   DEBUG_S( "cdotc" )
     63//   c_float ans;
     64//   cblas_cdotc_sub( *N, X, *incX, Y, *incY, &ans );
     65//   return ans;
     66// }
     67
     68// STATIC float FNAME(scnrm2)( const int* N, const void* X, const int* incX )
     69// {
     70//   DEBUG_S( "scnrm2" )
     71//   return cblas_scnrm2( *N, X, *incX );
     72// }
     73
     74// STATIC float FNAME(scasum)( const int* N, const void *X, const int* incX )
     75// {
     76//   DEBUG_S( "scasum" )
     77//   return cblas_scasum( *N, X, *incX );
     78// }
     79
     80// STATIC c_double FNAME(zdotu)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
     81// {
     82//   DEBUG_S( "zdotu" )
     83//   c_double ans;
     84//   cblas_zdotu_sub( *N, X, *incX, Y, *incY, &ans );
     85//   return ans;
     86// }
     87
     88// STATIC c_double FNAME(zdotc)( const int* N, const void* X, const int* incX, const void* Y, const int* incY )
     89// {
     90//   DEBUG_S( "zdotc" )
     91//   c_double ans;
     92//   cblas_zdotc_sub( *N, X, *incX, Y, *incY, &ans );
     93//   return ans;
     94// }
     95
     96// #ifdef VECLIBFORT_SGEMV
     97// STATIC void FNAME(sgemv)( const char* trans, const int* m, const int* n,
     98//   const float* alpha, const float* A, const int* ldA,
     99//   const float* X, const int* incX,
     100//   const float* beta, float* Y, const int* incY )
     101// {
     102//   DEBUG_S( "sgemv" )
     103//   enum CBLAS_TRANSPOSE T;
     104//   switch ( trans[0] ) {
     105//     case 'T': case 't':
     106//       if ( (long)X % 32 == 0 ) { T = CblasTrans; break; }
     107//       /* Implement as alpha * X^T * A + beta * Y^T */
     108//       cblas_sgemm( CblasColMajor, CblasNoTrans, CblasNoTrans, 1, *n, *m, *alpha, X, *incX, A, *ldA, *beta, Y, *incY );
     109//       return;
     110//     default:
     111//       T = CblasNoTrans;
     112//   }
     113//   cblas_sgemv( CblasColMajor, T, *m, *n, *alpha, A, *ldA, X, *incX, *beta, Y, *incY );
     114// }
     115// #endif
    116116
    117117#undef FNAME
    118118#undef STATIC