<commit_before>#include "ghost/sparsemat.h"
#include "ghost/util.h"
#include "ghost/locality.h"
#include <iostream>
#ifdef GHOST_HAVE_SPMP
#include "SpMP/CSR.hpp"
#include "SpMP/reordering/BFSBipartite.hpp"
#include "ghost/machine.h"
#include "ghost/constants.h"

// uncomment if RCM with mirrored triangular matrix should be used for non-symmetric matres
// else, bipartite graph BFS is used
//#define NONSYM_RCM_MIRROR

#ifdef NONSYM_RCM_MIRROR
typedef struct
{
    int row;
    int col;
} coo_ent;

static int cmp_coo_ent(const void* a, const void* b) 
{
    return  ((coo_ent *)a)->row - ((coo_ent *)b)->row;
}
#endif

#endif

extern "C" ghost_error ghost_sparsemat_perm_spmp(ghost_context *ctx, ghost_sparsemat *mat)
{
#if !defined(GHOST_HAVE_SPMP)
    UNUSED(mat);
    UNUSED(src);
    WARNING_LOG("SpMP not available. Will not create matrix permutation!");
    return GHOST_SUCCESS;
#else<commit_msg>minor fix to make it compile without SpMP<commit_after>#include "ghost/sparsemat.h"
#include "ghost/util.h"
#include "ghost/locality.h"
#include <iostream>
#ifdef GHOST_HAVE_SPMP
#include "SpMP/CSR.hpp"
#include "SpMP/reordering/BFSBipartite.hpp"
#include "ghost/machine.h"
#include "ghost/constants.h"

// uncomment if RCM with mirrored triangular matrix should be used for non-symmetric matres
// else, bipartite graph BFS is used
//#define NONSYM_RCM_MIRROR

#ifdef NONSYM_RCM_MIRROR
typedef struct
{
    int row;
    int col;
} coo_ent;

static int cmp_coo_ent(const void* a, const void* b) 
{
    return  ((coo_ent *)a)->row - ((coo_ent *)b)->row;
}
#endif

#endif

extern "C" ghost_error ghost_sparsemat_perm_spmp(ghost_context *ctx, ghost_sparsemat *mat)
{
#if !defined(GHOST_HAVE_SPMP)
    UNUSED(ctx);
    UNUSED(mat);
    WARNING_LOG("SpMP not available. Will not create matrix permutation!");
    return GHOST_SUCCESS;
#else
{'fraction_non_alphanumeric': 0.11943539630836048, 'fraction_numerical': 0.0, 'mean_word_length': 4.869426751592357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '746540', 'n_tokens_mistral': 740, 'n_tokens_neox': 704, 'n_words': 176}