/[escript]/trunk/escript/src/Utils.cpp
ViewVC logotype

Annotation of /trunk/escript/src/Utils.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 478 - (hide annotations)
Tue Jan 31 02:21:49 2006 UTC (13 years, 7 months ago) by jgs
File size: 1226 byte(s)
rationalise #includes

1 gross 391 /*
2     ******************************************************************************
3     * *
4     * COPYRIGHT ACcESS 2004 - All Rights Reserved *
5     * *
6     * This software is the property of ACcESS. No part of this code *
7     * may be copied in any form or by any means without the expressed written *
8     * consent of ACcESS. Copying, use or modification of this software *
9     * by any unauthorised person is illegal unless that person has a software *
10     * license agreement with ACcESS. *
11     * *
12     ******************************************************************************
13     */
14    
15 jgs 474 #include "Utils.h"
16 gross 391
17 jgs 478 #ifdef _OPENMP
18     #include <omp.h>
19     #endif
20    
21 gross 391 namespace escript {
22    
23     void setNumberOfThreads(const int num_threads)
24     {
25    
26     #ifdef _OPENMP
27     omp_set_num_threads(num_threads);
28     #endif
29    
30     }
31    
32     int getNumberOfThreads()
33     {
34     #ifdef _OPENMP
35     return omp_get_max_threads();
36     #else
37     return 1;
38     #endif
39    
40     }
41    
42     } // end of namespace

  ViewVC Help
Powered by ViewVC 1.1.26