/[escript]/trunk/escript/src/BufferGroup.h
ViewVC logotype

Annotation of /trunk/escript/src/BufferGroup.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2549 - (hide annotations)
Mon Jul 20 06:43:47 2009 UTC (10 years, 2 months ago) by jfenwick
File MIME type: text/plain
File size: 1006 byte(s)
Remainder of copyright date fixes
1 jfenwick 2227
2     /*******************************************************
3     *
4 jfenwick 2549 * Copyright (c) 2008-2009 by University of Queensland
5 jfenwick 2227 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13    
14    
15     /** \file BufferGroup.h */
16    
17     #ifndef BUFFERGROUP_H
18     #define BUFFERGROUP_H
19    
20     #include "DataVector.h"
21     #ifdef _OPENMP
22     #include <omp.h>
23     #endif
24    
25     namespace escript
26     {
27    
28     class BufferGroup
29     {
30     public:
31     BufferGroup(size_t buffersize,size_t numbuffs);
32     ~BufferGroup();
33     DataVector& getBuffer(size_t buffnum);
34     size_t getOffset(size_t buffnum);
35    
36     private:
37     DataVector m_vec;
38     size_t m_numbuffs;
39     size_t m_step;
40     };
41    
42     inline DataVector& BufferGroup::getBuffer(size_t buffnum)
43     {
44     return m_vec;
45     }
46    
47     inline size_t BufferGroup::getOffset(size_t buffnum)
48     {
49     return m_step*buffnum;
50     }
51    
52     } // end namespace
53    
54 gross 2278 #endif // BUFFERGROUP_H
55    

  ViewVC Help
Powered by ViewVC 1.1.26