COSC-3P93-Project/Step 3/include/engine/mpi.h

39 lines
870 B
C
Raw Normal View History

2022-11-23 11:55:40 -05:00
//
// Created by brett on 22/11/22.
//
#ifndef STEP_3_MPI_H
#define STEP_3_MPI_H
2022-12-02 23:32:18 -05:00
#include <config.h>
2022-11-23 11:55:40 -05:00
#ifdef USE_MPI
2022-11-23 11:55:40 -05:00
#include <mpi.h>
2022-12-02 23:32:18 -05:00
#include <queue>
#include <engine/raytracing.h>
2022-11-23 11:55:40 -05:00
namespace Raytracing {
2022-11-23 11:55:40 -05:00
extern int numberOfProcesses;
extern int currentProcessID;
2022-11-23 11:55:40 -05:00
class MPI {
public:
2022-12-13 01:33:31 -05:00
/**
* Create the OpenMPI instance
* @param argc argc provided as inputs to the main function
* @param argv argv provided as inputs to the main function
*/
static void init(int argc, char** argv);
2022-12-13 01:33:31 -05:00
/**
* @return the queue of image bounds which this process needs to do work on
*/
2022-12-13 17:36:01 -05:00
static std::queue<RayCasterImageBounds> getCurrentImageRegionAssociation(RayCaster& raycaster);
2022-11-23 11:55:40 -05:00
};
}
#endif
#endif //STEP_3_MPI_H