125 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
Abstract class which a user can extend to write BSP programs.
Definition: bsp.hpp:105
BSP_program()
Base constructor is only accessible by self, derived instances, and friends.
Definition: bsp.hpp:118
virtual ~BSP_program()
Abstract classes should have virtual destructors.
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...