00001 #include "Teuchos_BLAS.hpp"
00002 #include "Teuchos_Version.hpp"
00003
00004 int main(int argc, char* argv[])
00005 {
00006 std::cout << Teuchos::Teuchos_Version() << std::endl << std::endl;
00007
00008
00009 Teuchos::BLAS<int, double> blas;
00010
00011
00012 const int n = 10;
00013 double alpha = 2.0;
00014 double x[ n ];
00015 for ( int i=0; i<n; i++ ) { x[i] = i; }
00016 blas.SCAL( n, alpha, x, 1 );
00017 int max_idx = blas.IAMAX( n, x, 1 );
00018 std::cout<< "The index of the maximum magnitude entry of x[] is the "
00019 << max_idx <<"-th and x[ " << max_idx-1 << " ] = "<< x[max_idx-1]
00020 << std::endl;
00021
00022 return 0;
00023 }