ColPack
Utilities/CoutLock.cpp
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 #include "Definitions.h"
00022 
00023 #include "CoutLock.h"
00024 
00025 using namespace std;
00026 
00027 namespace ColPack
00028 {
00029 #ifdef _OPENMP
00030         omp_lock_t CoutLock::coutLock;
00031 #endif
00032         
00033         int CoutLock::unset()
00034         {
00035 #ifdef _OPENMP
00036                 omp_unset_lock(&CoutLock::coutLock);
00037 #endif
00038                 return 0;
00039         }
00040         int CoutLock::set()
00041         {
00042 #ifdef _OPENMP
00043                 omp_set_lock(&CoutLock::coutLock);
00044 #endif
00045                 return 0;
00046         }
00047 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines