<commit_before>#ifndef GHOST_ERROR_H
#define GHOST_ERROR_H

typedef enum {
    GHOST_SUCCESS,
    GHOST_ERR_INVALID_ARG,
    GHOST_ERR_MPI,
    GHOST_ERR_CUDA,
    GHOST_ERR_HWLOC,
    GHOST_ERR_UNKNOWN,
    GHOST_ERR_INTERNAL,
    GHOST_ERR_NOT_IMPLEMENTED,
    GHOST_ERR_IO
} ghost_error_t;

char * ghost_errorString(ghost_error_t e);

/**
 * @brief This macro should be used for calling a GHOST function inside
 * a function which itself returns a ghost_error_t.
 * It calls the function and in case of an error LOGS the error message
 * and returns the according ghost_error_t which was return by the called function.<commit_msg>cplusplus guard<commit_after>#ifndef GHOST_ERROR_H
#define GHOST_ERROR_H

typedef enum {
    GHOST_SUCCESS,
    GHOST_ERR_INVALID_ARG,
    GHOST_ERR_MPI,
    GHOST_ERR_CUDA,
    GHOST_ERR_HWLOC,
    GHOST_ERR_UNKNOWN,
    GHOST_ERR_INTERNAL,
    GHOST_ERR_NOT_IMPLEMENTED,
    GHOST_ERR_IO
} ghost_error_t;


#ifdef __cplusplus
extern "C" {
#endif

    char * ghost_errorString(ghost_error_t e);

#ifdef __cplusplus
}
#endif
/**
 * @brief This macro should be used for calling a GHOST function inside
 * a function which itself returns a ghost_error_t.
 * It calls the function and in case of an error LOGS the error message
 * and returns the according ghost_error_t which was return by the called function.
{'fraction_non_alphanumeric': 0.05070842654735272, 'fraction_numerical': 0.0, 'mean_word_length': 4.325396825396825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1837488', 'n_tokens_mistral': 463, 'n_tokens_neox': 459, 'n_words': 136}