26 #ifndef _HPP_MCBSP_INTERNAL
27 #define _HPP_MCBSP_INTERNAL
29 #define MCBSP_CPLUSPLUS
66 virtual void spmd() = 0;
static bsp_pid_t bsp_nprocs(void)
Returns the number of available processors or processes, depending on whether we are inside or outsid...
Definition: bsp.h:745
friend void mcbsp_cpp_callback()
This function enables C++ wrapping of MulticoreBSP for C.
Abstract class which a user can extend to write BSP programs.
Definition: bsp.hpp:105
BSP_program()
Definition: mcbsp.hpp:64
virtual ~BSP_program()
Abstract classes should have virtual destructors.
void mcbsp_cpp_callback()
This function enables C++ wrapping of MulticoreBSP for C.
virtual void spmd()=0
The parallel SPMD code to be implemented by user.
virtual void destroyInstance(BSP_program *const instance)
Code that destroys instances creatured using the newInstance() function.
void begin(const bsp_pid_t P=bsp_nprocs())
Initialises and starts the current BSP program.
unsigned int bsp_pid_t
Data type used for thread IDs.
Definition: bsp.h:252
virtual BSP_program * newInstance()=0
Creates a new instance of the implementing class, which will be used by new threads spawned by bsp_be...