Constructors
The ShellMatrix should be returned from the Operator class via create_ShellMatrix(…).
All member functions are const
can not be modified after creation.
We choose this design to ensure the correct communication patter when MPI is used.
Hence, the constructors are protected
and can by only used by the Operator class.
If MPI is not enable, it is constructed by
-
danceq::internal::ShellMatrix::ShellMatrix(const Op *operator_)
Otherwise, the following constructor (with MPI) is used:
Note
MPI requires additional memory for the communication between its processes. This can by limited by overhead_in_GB_per_core in Operator class via create_ShellMatrix(…).
-
danceq::internal::ShellMatrix::ShellMatrix(const Op *operator_ptr_, const int32_t myrank_, const int32_t world_size_, const uint64_t start_, const uint64_t end_, const uint64_t number_of_communication_steps_, const uint64_t maximal_number_of_elements_to_recv_, const uint64_t maximal_number_of_elements_to_send_, const std::vector<uint64_t> dim_per_step_, const std::vector<uint64_t> total_number_of_elements_to_recv_per_step_, const std::vector<uint64_t> total_number_of_elements_to_send_per_step_, const std::vector<uint64_t> ownership_per_rank_, const std::vector<std::vector<uint64_t>> number_of_elements_to_send_per_rank_per_step_, const std::vector<std::vector<uint64_t>> number_of_elements_to_recv_per_rank_per_step_)
Constructor used by the Operator class.
The full communication pattern was generated by the Operator class when calling create_ShellMatrix(…). The memory overhead can be limited by overhead_in_GB_per_core.
The members as listed here.
- Parameters:
operator_ptr_ – Sets Pointer to the Operator
myrank_ – Sets myrank
world_size_ – Sets world_size
start_ – Sets start
end_ – Sets end
number_of_communication_steps_ – Sets number_of_communication_steps
maximal_number_of_elements_to_recv_ – Sets maximal_number_of_elements_to_recv
maximal_number_of_elements_to_send_ – Sets maximal_number_of_elements_to_send
dim_per_step_ – Sets dim_per_step
total_number_of_elements_to_recv_per_step_ – Sets total_number_of_elements_to_recv_per_step
total_number_of_elements_to_send_per_step_ – Sets total_number_of_elements_to_send_per_step
ownership_per_rank_ – Sets ownership_per_rank
number_of_elements_to_send_per_rank_per_step_ – Sets number_of_elements_to_send_per_rank_per_step
number_of_elements_to_recv_per_rank_per_step_ – Sets number_of_elements_to_send_per_rank_per_step