/* LA: linear algebra C++ interface library Copyright (C) 2008 Jiri Pittner or This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ // LA and general error handler #include #include "laerror.h" #include #include #include #include #include #include "cuda_la.h" #ifdef USE_TRACEBACK #include "traceback.h" #endif namespace LA { //enforce GPU initialization by a global class instantization constructor #ifdef CUDALA GPU_START gpu_start_instant; #endif bool _LA_count_check=true; extern "C" void _findme(void) {}; //for autoconf test we need a function with C linkage void laerror(const char *s1) { std::cerr << "LA:ERROR - "; std::cout << "LA:ERROR - "; if(s1) { std::cerr << s1 << "\n"; std::cout << s1 << "\n"; } #ifdef CUDALA { cublasStatus s=cublasGetError(); std::cerr << "CUBLAS status = "<