MulticoreBSP for C
Version 1.1
Main Page
Namespaces
Data Structures
Files
File List
Globals
mcbsp.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
25
#define _HPP_MCBSP
26
27
//#include <cstdarg>
28
//#include <cstddef>
29
30
extern
"C"
{
31
#include "
mcbsp.h
"
32
}
33
34
#ifndef SIZE_MAX
35
39
#define SIZE_MAX ((size_t)-1)
40
#endif
41
46
namespace
mcbsp {
47
73
class
BSP_program {
74
75
private
:
76
78
MCBSP_PROCESSOR_INDEX_DATATYPE
P;
79
80
protected
:
81
86
BSP_program
() {}
87
89
virtual
void
spmd
() = 0;
90
108
virtual
BSP_program
*
newInstance
() = 0;
109
110
public
:
111
127
void
begin
(
const
MCBSP_PROCESSOR_INDEX_DATATYPE
P =
bsp_nprocs
() );
128
130
virtual
~BSP_program
() {};
131
};
132
133
}
134
135
#endif
136
Generated by
1.8.1.1