/Predicates-in-MPI

A header file for processing predicates in parallel using MPI

Primary LanguageC++MIT LicenseMIT

Predicates-in-MPI

A header file for processing predicates in parallel using MPI

This project implements efficient parallel C++/OpenMPI function mpi_extract_if. The function works as follows: given a sequence X of some objects of type T, and a predicate that returns true or false, if an object satisfies some condition, the function creates sequence Y with a copy of only these objects in X for which the predicate is true in all the processes running and then evenly distributes the number of elements with a possible difference of at max p-1 elements.