GetFEM  5.5
getfem_locale.h
Go to the documentation of this file.
1 /* -*- c++ -*- (enables emacs c++ mode) */
2 /*===========================================================================
3 
4  Copyright (C) 2002-2026 Yves Renard
5 
6  This file is a part of GetFEM
7 
8  GetFEM is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Lesser General Public License as published
10  by the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version along with the GCC Runtime Library
12  Exception either version 3.1 or (at your option) any later version.
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  License and GCC Runtime Library Exception for more details.
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program. If not, see https://www.gnu.org/licenses/.
19 
20  As a special exception, you may use this file as it is a part of a free
21  software library without restriction. Specifically, if other files
22  instantiate templates or use macros or inline functions from this file,
23  or you compile this file and link it with other files to produce an
24  executable, this file does not by itself cause the resulting executable
25  to be covered by the GNU Lesser General Public License. This exception
26  does not however invalidate any other reasons why the executable file
27  might be covered by the GNU Lesser General Public License.
28 
29 ===========================================================================*/
30 
31 /**@file getfem_locale.h
32  @author Andriy Andreykiv andriy.andreykiv@gmail.com
33  @date November 29, 2018
34  @brief thread safe standard locale with RAII semantics
35 */
36 
37 #pragma once
38 
39 #include <locale.h>
40 #include <string>
41 
42 #include "getfem_omp.h"
43 
44 namespace getfem {
45 
46  /**Identical to gmm::standard_locale, but does not
47  change std::locale in multi-threaded sections
48  of the code, which is not thread-safe*/
50  std::string cloc;
51  std::locale cinloc;
52  public :
54  ~standard_locale();
55  };
56 
57 } /* end of namespace getfem. */
Identical to gmm::standard_locale, but does not change std::locale in multi-threaded sections of the ...
Definition: getfem_locale.h:49
Tools for multithreaded, OpenMP and Boost based parallelization.
GEneric Tool for Finite Element Methods.