/* * This file is part of libcxxsupport. * * libcxxsupport 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 2 of the License, or * (at your option) any later version. * * libcxxsupport 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 libcxxsupport; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * libcxxsupport is being developed at the Max-Planck-Institut fuer Astrophysik * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt * (DLR). */ /* * This file contains the implementation of various convenience functions * used by the Planck LevelS package. * * Copyright (C) 2002-2011 Max-Planck-Society * Authors: Martin Reinecke, Reinhard Hell */ // if we are using g++, check for version 4.0 or higher #ifdef __GNUC__ #if (__GNUC__<4) #error your C++ compiler is too old. g++ version 4.0 or higher is required. #endif #endif #include #include "announce.h" #include "openmp_support.h" using namespace std; namespace { void openmp_status() { #ifndef _OPENMP cout << "OpenMP: not supported by this binary" << endl; #else int threads = openmp_max_threads(); if (threads>1) cout << "OpenMP active: max. " << threads << " threads." << endl; else cout << "OpenMP active, but running with 1 thread only." << endl; #endif } extern "C" { int sharp_veclen(void); } void vec_status() { cout << "Supported vector length: " << sharp_veclen() << endl; } } //unnamed namespace void announce (const string &name) { #ifndef VERSION #define VERSION "?.?" #endif string version = "v" VERSION; string name2 = name+" "+version; cout << endl << "+-"; for (tsize m=0; m=2, string("Usage:\n ")+name+" \nor:\n " +name+" par1=val1 par2=val2 ...", verbose); }