model-net-inspect.h 1.38 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright (C) 2013 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

/* This header provides ways for modelnet users to look at the state of the
 * underlying implementations (e.g., torus) */

#ifndef MODEL_NET_INSPECT_H
#define MODEL_NET_INSPECT_H

Jonathan Jenkins's avatar
Jonathan Jenkins committed
13
14
15
16
#ifdef __cplusplus
extern "C" {
#endif

17
18
19
20
21
/* ALL FUNCTIONS
 * anno is the annotation specified in the configuration (NULL -> no
 * annotation), while ignore_annotations is a flag controlling whether
 * annotations are checked for or not - if not, then */

22
23
/** TORUS FUNCTIONS **/

24
25
26
27
28
29
30
31
/* get the dimensions of a torus configuration torus network. n and dims are
 * return paramters */
void model_net_torus_get_dims(
        char const        * anno,
        int                 ignore_annotations,
        int               * n,
        int const * const * dims);

32
33
34
35
36
37
38
39
40
41
42
/* mapping utilities to and from linearized torus node ids */
void model_net_torus_get_dim_id(
        int         flat_id,
        int         ndims,
        const int * dim_lens,
        int       * out_dim_ids);

int model_net_torus_get_flat_id(
        int         ndims,
        const int * dim_lens,
        const int * dim_ids);
43

Jonathan Jenkins's avatar
Jonathan Jenkins committed
44
45
46
47
#ifdef __cplusplus
}
#endif

48
49
50
51
52
53
54
55
56
57
58
#endif /* end of include guard: MODEL_NET_INSPECT_H */

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 *  indent-tabs-mode: nil
 * End:
 *
 * vim: ft=c ts=8 sts=4 sw=4 expandtab
 */