Skip to content

Commit

Permalink
move distributed typedefs to a centralized place
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Oct 27, 2021
1 parent 76d3e18 commit ade66d4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 18 additions & 0 deletions include/ginkgo/core/base/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,24 @@ GKO_ATTRIBUTES constexpr bool operator!=(precision_reduction x,
template _macro(size_type)


namespace distributed {


/**
* Index type for global indices in a distributed system
*/
using global_index_type = int64;


/**
* Index type for enumerating processors
*
* Conforms to the MPI C interface of e.g. MPI rank or size
*/
using comm_index_type = int;


} // namespace distributed
} // namespace gko


Expand Down
5 changes: 1 addition & 4 deletions include/ginkgo/core/distributed/partition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <ginkgo/core/base/array.hpp>
#include <ginkgo/core/base/polymorphic_object.hpp>
#include <ginkgo/core/base/types.hpp>


namespace gko {
namespace distributed {


using global_index_type = int64;
using comm_index_type = int;


/**
* Represents a partition of a range of indices [0, size) into a disjoint set of
* parts. The partition is stored as a set of consecutive ranges [begin, end)
Expand Down

0 comments on commit ade66d4

Please sign in to comment.