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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1387 - (hide annotations)
Fri Jan 11 07:45:26 2008 UTC (11 years, 8 months ago) by trankine
Original Path: temp/escript/src/Utils.cpp
File size: 895 byte(s)
Restore the trunk that existed before the windows changes were committed to the (now moved to branches) old trunk.
1 gross 391
2 ksteube 1312 /* $Id$ */
3    
4     /*******************************************************
5     *
6     * Copyright 2003-2007 by ACceSS MNRF
7     * Copyright 2007 by University of Queensland
8     *
9     * http://esscc.uq.edu.au
10     * Primary Business: Queensland, Australia
11     * Licensed under the Open Software License version 3.0
12     * http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16 jgs 474 #include "Utils.h"
17 gross 797 #include "DataVector.h"
18 gross 391
19 jgs 478 #ifdef _OPENMP
20     #include <omp.h>
21     #endif
22    
23 gross 391 namespace escript {
24    
25 ksteube 1247 int getSvnVersion()
26     {
27     #ifdef SVN_VERSION
28     return SVN_VERSION;
29     #else
30     return 0;
31     #endif
32     }
33    
34 gross 391 void setNumberOfThreads(const int num_threads)
35     {
36    
37     #ifdef _OPENMP
38     omp_set_num_threads(num_threads);
39     #endif
40    
41     }
42    
43     int getNumberOfThreads()
44     {
45     #ifdef _OPENMP
46     return omp_get_max_threads();
47     #else
48     return 1;
49     #endif
50    
51     }
52    
53     } // end of namespace

  ViewVC Help
Powered by ViewVC 1.1.26