Equalizer  1.6.1
computeContext.h
1 
2 /* Copyright (c) 2009, Philippe Robert <philippe.robert@gmail.com>
3  * 2010-2011, Stefan Eilemann <eile@eyescale.ch>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_COMPUTE_CONTEXT_H
20 #define EQ_COMPUTE_CONTEXT_H
21 
22 #include <eq/client/api.h>
23 #include <eq/client/types.h>
24 
25 namespace eq
26 {
36  {
37  public:
41  EQ_API ComputeContext( Pipe* parent );
42 
44  EQ_API virtual ~ComputeContext();
45 
49  Pipe* getPipe() { return _pipe; }
50 
52  const Pipe* getPipe() const { return _pipe; }
54 
58  EQ_API virtual bool configInit() = 0;
59 
61  EQ_API virtual void configExit() = 0;
63 
64  protected:
76  void setError( const uint32_t error );
78 
79  private:
81  Pipe* const _pipe;
82 
83  struct Private;
84  Private* _private; // placeholder for binary-compatible changes
85 
86  };
87 }
88 
89 #endif // EQ_COMPUTE_CONTEXT_H
ComputeContext(Pipe *parent)
Create a new ComputeContext for the given accelerator.
virtual ~ComputeContext()
Destroy the ComputeContext.
A Pipe represents a graphics card (GPU) on a Node.
void setError(const uint32_t error)
Set a reason why the last operation failed.
virtual void configExit()=0
De-initialize the ComputeContext.
virtual bool configInit()=0
Initialize the ComputeContext.
const Pipe * getPipe() const
The interface definition for API-specific GPGPU handling.