Program Listing for File rcm_reorder.h
↰ Return to documentation for file (src/sparsebase/reorder/rcm_reorder.h
)
#include <vector>
#include "sparsebase/config.h"
#include "sparsebase/format/csr.h"
#include "sparsebase/reorder/reorderer.h"
#include "sparsebase/utils/parameterizable.h"
#ifndef SPARSEBASE_PROJECT_RCM_REORDER_H
#define SPARSEBASE_PROJECT_RCM_REORDER_H
namespace sparsebase::reorder {
struct RCMReorderParams : utils::Parameters {};
template <typename IDType, typename NNZType, typename ValueType>
class RCMReorder : public Reorderer<IDType> {
typedef typename std::make_signed<IDType>::type SignedID;
public:
typedef RCMReorderParams ParamsType;
RCMReorder();
RCMReorder(ParamsType p);
protected:
static IDType peripheral(NNZType *xadj, IDType *adj, IDType n, IDType start,
SignedID *distance, IDType *Q);
static IDType *GetReorderCSR(std::vector<format::Format *> formats,
utils::Parameters *);
};
} // namespace sparsebase::reorder
#ifdef _HEADER_ONLY
#include "sparsebase/reorder/rcm_reorder.cc"
#endif
#endif // SPARSEBASE_PROJECT_RCM_REORDER_H