2 #include "Class_Comm_Buffer.hpp"
4 Class_Comm_Buffer::Class_Comm_Buffer(){
12 Class_Comm_Buffer::Class_Comm_Buffer(MPI_Comm comm_) : comm(comm_){
19 Class_Comm_Buffer::Class_Comm_Buffer(uint32_t size,
char value, MPI_Comm comm_) : comm(comm_){
21 commBufferSize = size;
22 commBuffer =
new char [size];
23 for(uint32_t i = 0; i < size; ++i)
24 commBuffer[i] = value;
30 commBufferSize = other.commBufferSize;
35 commBuffer =
new char [commBufferSize];
36 for(uint32_t i = 0; i < commBufferSize; ++i)
37 commBuffer[i] = other.commBuffer[i];
42 Class_Comm_Buffer::~Class_Comm_Buffer() {
50 char* new_array =
new char[rhs.commBufferSize];
51 copy(rhs.commBuffer,rhs.commBuffer+rhs.commBufferSize,new_array);
55 commBuffer = new_array;
56 commBufferSize = rhs.commBufferSize;
Bundle char container for communications.