ColPack
Utilities/CoutLock.h
Go to the documentation of this file.
00001 /************************************************************************************
00002     Copyright (C) 2005-2008 Assefaw H. Gebremedhin, Arijit Tarafdar, Duc Nguyen,
00003     Alex Pothen
00004 
00005     This file is part of ColPack.
00006 
00007     ColPack is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU Lesser General Public License as published
00009     by the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     ColPack is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public License
00018     along with ColPack.  If not, see <http://www.gnu.org/licenses/>.
00019 ************************************************************************************/
00020 
00021 #ifndef COUTLOCK_H
00022 #define COUTLOCK_H
00023 
00024 #ifdef _OPENMP
00025         #include <omp.h>
00026 #endif
00027 
00028 using namespace std;
00029 
00030 namespace ColPack 
00031 {
00040         class CoutLock
00041         {
00042         public:
00043 #ifdef _OPENMP
00044                 static omp_lock_t coutLock;
00045 #endif
00046 
00047                 static int set();
00048                 static int unset();
00049         };
00050 }
00051 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines