50 #ifndef _ZOLTAN2_ADAPTER_HPP_ 51 #define _ZOLTAN2_ADAPTER_HPP_ 59 #define Z2_THROW_NOT_IMPLEMENTED_IN_ADAPTER \ 61 std::ostringstream emsg; \ 62 emsg << __FILE__ << "," << __LINE__ \ 63 << " error: " << __func__zoltan2__ << " not implemented in adapter " \ 65 throw std::runtime_error(emsg.str()); \ 92 template <
typename User>
120 virtual void getIDsView(
const gno_t *&Ids)
const = 0;
135 int idx = 0)
const = 0;
171 template <
typename Adapter>
InputTraits< User >::scalar_t scalar_t
virtual size_t getLocalNumIDs() const =0
Returns the number of objects on this process.
InputTraits< User >::gno_t gno_t
virtual int getNumWeightsPerID() const =0
Returns the number of weights per object. Number of weights per object should be zero or greater...
Defines the PartitioningSolution class.
virtual ~BaseAdapter()
Destructor.
virtual void getIDsView(const gno_t *&Ids) const =0
Provide a pointer to this process' identifiers.
A PartitioningSolution is a solution to a partitioning problem.
BaseAdapterType
An enum to identify general types of adapters.
identifier data, just a list of IDs
InputTraits< User >::part_t part_t
void getPartsView(const part_t *&inputPart) const
Provide pointer to an array containing the input part assignment for each ID. The input part informat...
#define Z2_THROW_NOT_IMPLEMENTED_IN_ADAPTER
void applyPartitioningSolution(const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const
Apply a PartitioningSolution to an input.
BaseAdapter defines methods required by all Adapters.
Gathering definitions used in software development.
virtual void getWeightsView(const scalar_t *&wgt, int &stride, int idx=0) const =0
Provide pointer to a weight array with stride.
virtual enum BaseAdapterType adapterType() const =0
Returns the type of adapter.