bake.h 1.45 KB
Newer Older
Philip Carns's avatar
Philip Carns committed
1 2 3 4 5 6
/*
 * (C) 2016 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */

7 8
#ifndef __BAKE_H
#define __BAKE_H
9

Shane Snyder's avatar
Shane Snyder committed
10
#include <uuid/uuid.h>
11
#include <stdint.h>
12 13 14 15 16

#ifdef __cplusplus
extern "C" {
#endif

17 18
typedef struct {
    uuid_t id;
19
} bake_target_id_t;
Philip Carns's avatar
Philip Carns committed
20
/**
21
 * Persistent, opaque identifier for a region within a BAKE target.
Philip Carns's avatar
Philip Carns committed
22
 */
23
#define BAKE_REGION_ID_DATA_SIZE 16
Philip Carns's avatar
Philip Carns committed
24
typedef struct {
Philip Carns's avatar
Philip Carns committed
25
    uint32_t type;
26 27
    char data[BAKE_REGION_ID_DATA_SIZE];
} bake_region_id_t;
Philip Carns's avatar
Philip Carns committed
28

Matthieu Dorier's avatar
Matthieu Dorier committed
29 30 31 32 33 34 35 36 37
#define BAKE_SUCCESS                0    /* Success */
#define BAKE_ERR_ALLOCATION         (-1) /* Error allocating something */
#define BAKE_ERR_INVALID_ARG        (-2) /* An argument is invalid */
#define BAKE_ERR_MERCURY            (-3) /* An error happened calling a Mercury function */
#define BAKE_ERR_ARGOBOTS           (-4) /* An error happened calling an Argobots function */
#define BAKE_ERR_PMEM               (-5) /* An error happened calling a pmem function */
#define BAKE_ERR_UNKNOWN_TARGET     (-6) /* Target refered to by id is not known to provider */
#define BAKE_ERR_UNKNOWN_PROVIDER   (-7) /* Provider id could not be matched with a provider */
#define BAKE_ERR_UNKNOWN_REGION     (-8) /* Region id could not be found */
38
#define BAKE_ERR_OUT_OF_BOUNDS      (-9) /* Attempting an out of bound access */
39
#define BAKE_ERR_REMI              (-10) /* Error related to REMI */
40
#define BAKE_ERR_OP_UNSUPPORTED    (-11) /* Operation not supported */
Matthieu Dorier's avatar
Matthieu Dorier committed
41

42 43
#ifdef __cplusplus
}
44
#endif
45

46
#endif /* __BAKE_H */