/[escript]/branches/arrayview_from_1695_trunk/escript/src/Utils.cpp
ViewVC logotype

Contents of /branches/arrayview_from_1695_trunk/escript/src/Utils.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1247 - (show annotations)
Tue Aug 14 01:29:20 2007 UTC (12 years, 1 month ago) by ksteube
Original Path: trunk/escript/src/Utils.cpp
File size: 1020 byte(s)
New python method getVersion() which returns the Subversion revision
from which escript was compiled

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 #include "Utils.h"
14 #include "DataVector.h"
15
16 #ifdef _OPENMP
17 #include <omp.h>
18 #endif
19
20 namespace escript {
21
22 int getSvnVersion()
23 {
24 #ifdef SVN_VERSION
25 return SVN_VERSION;
26 #else
27 return 0;
28 #endif
29 }
30
31 void setNumberOfThreads(const int num_threads)
32 {
33
34 #ifdef _OPENMP
35 omp_set_num_threads(num_threads);
36 #endif
37
38 }
39
40 int getNumberOfThreads()
41 {
42 #ifdef _OPENMP
43 return omp_get_max_threads();
44 #else
45 return 1;
46 #endif
47
48 }
49
50 } // end of namespace

  ViewVC Help
Powered by ViewVC 1.1.26