MulticoreBSP for C  Version 1.1
mcbsp-internal.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 by Albert-Jan N. Yzelman
3  *
4  * This file is part of MulticoreBSP in C --
5  * a port of the original Java-based MulticoreBSP.
6  *
7  * MulticoreBSP for C is distributed as part of the original
8  * MulticoreBSP and is free software: you can redistribute
9  * it and/or modify it under the terms of the GNU Lesser
10  * General Public License as published by the Free Software
11  * Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  * MulticoreBSP is distributed in the hope that it will be
14  * useful, but WITHOUT ANY WARRANTY; without even the
15  * implied warranty of MERCHANTABILITY or FITNESS FOR A
16  * PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General
20  * Public License along with MulticoreBSP. If not, see
21  * <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef _HPP_MCBSP_INTERNAL
25 #define _HPP_MCBSP_INTERNAL
26 
27 #include <iostream>
28 
29 //for documentation of the public parts, see mcbsp.hpp
30 
31 extern "C" {
32  #include "mcinternal.h"
33  #include "mcutil.h"
34 }
35 
36 namespace mcbsp {
37 
50  void mcbsp_cpp_callback();
51 
52  class BSP_program {
53 
54  private:
55 
57 
58  protected:
59 
61 
62  virtual void spmd() = 0;
63 
64  virtual BSP_program * newInstance() = 0;
65 
66  public:
67 
69 
70  virtual ~BSP_program() {};
71 
72  friend void mcbsp_cpp_callback();
73  };
74 
75 }
76 
77 #endif
78