void ATL_F77wrap_sdsdot ( F77_INTEGER * N, float * B, float * X, F77_INTEGER * INCX, float * Y, F77_INTEGER * INCY, float * DOT ) { /* * Purpose * ======= * * ATL_F77wrap_sdsdot computes the dot product b + x^T * y of two n vec- * tors x and y. The result is internally computed using double preci- * sion arithmetic and casted to a single precision scalar just before * being returned. * * Notes * ===== * * This routine is an internal wrapper function written in C called by * the corresponding Fortran 77 user callable subroutine. It calls the * appropriate ATLAS routine performing the actual computation. * * This wrapper layer resolves the following portability issues: * * - the routines' name sheme translation imposed by the Fortran / C * compilers of your target computer, * - the translation of Fortran characters into the ATLAS correspon- * ding C enumerated type (in cooperation with the Fortan user cal- * lable subroutine), * - the translation of Fortran integers into the proper C correspon- * ding native type; * * and the following ease-of-programming issue: * * - a pointer to the the first entry of vector operands (when appli- * cable) is passed to the ATLAS computational routine even if the * corresponding input increment value is negative. This allows for * a more natural expression in C of the computation performed by * these ATLAS functions. * * --------------------------------------------------------------------- */ /* .. * .. Executable Statements .. * */ if( (*INCX) < 0 ) { if( (*INCY) < 0 ) { *DOT = ATL_sdsdot( *N, *B, X, -(*INCX), Y, -(*INCY) ); } else { *DOT = ATL_sdsdot( *N, *B, V1N( N, X, INCX ), *INCX, Y, *INCY ); } } else if( (*INCY) < 0 ) { *DOT = ATL_sdsdot( *N, *B, VN1( N, X, INCX ), -(*INCX), Y, -(*INCY) ); } else { *DOT = ATL_sdsdot( *N, *B, X, *INCX, Y, *INCY ); } /* * End of ATL_F77wrap_sdsdot */ }
void Mjoin( PATLF77WRAP, dotc ) ( F77_INTEGER * N, TYPE * X, F77_INTEGER * INCX, TYPE * Y, F77_INTEGER * INCY, TYPE * DOT ) { /* * Purpose * ======= * * ATL_F77wrap_dotc computes the dot-product of two n-vectors x and y. * * Notes * ===== * * This routine is an internal wrapper function written in C called by * the corresponding Fortran 77 user callable subroutine. It calls the * appropriate ATLAS routine performing the actual computation. * * This wrapper layer resolves the following portability issues: * * - the routines' name sheme translation imposed by the Fortran / C * compilers of your target computer, * - the translation of Fortran characters into the ATLAS correspon- * ding C enumerated type (in cooperation with the Fortan user cal- * lable subroutine), * - the translation of Fortran integers into the proper C correspon- * ding native type; * * and the following ease-of-programming issue: * * - a pointer to the the first entry of vector operands (when appli- * cable) is passed to the ATLAS computational routine even if the * corresponding input increment value is negative. This allows for * a more natural expression in C of the computation performed by * these ATLAS functions. * * --------------------------------------------------------------------- */ /* .. * .. Executable Statements .. * */ if( (*INCX) < 0 ) { if( (*INCY) < 0 ) { Mjoin( PATL, dotc_sub )( *N, X, -(*INCX), Y, -(*INCY), DOT ); } else { Mjoin( PATL, dotc_sub )( *N, V1N( N, X, INCX ), *INCX, Y, *INCY, DOT ); } } else if( (*INCY) < 0 ) { Mjoin( PATL, dotc_sub )( *N, VN1( N, X, INCX ), -(*INCX), Y, -(*INCY), DOT ); } else { Mjoin( PATL, dotc_sub )( *N, X, *INCX, Y, *INCY, DOT ); } /* * End of Mjoin( PATLF77WRAP, dotc ) */ }