complete first draft of package
[epclust.git] / old_C_code / stage1 / src / Util / types.h
1 #ifndef PPAM_TYPES_H
2 #define PPAM_TYPES_H
3
4 #include <stdint.h>
5
6 // types of work given to a slave
7 #define WORKTAG 1
8 #define DIETAG 2
9
10 // 256 characters for file name should be enough
11 #define NCHAR_FNAME 256
12
13 typedef unsigned char Byte;
14
15 // Type to describe a job to be done in a node
16 //TODO: merge with packed version to avoid extra copy by MPI
17 typedef struct Work_t {
18 // "structural" parameters:
19 char* inputFileName;
20 uint32_t nbSeries;
21 uint32_t* ranks;
22 // clustering parameters [to be completed]:
23 uint32_t nbClusters;
24 uint32_t clustOnMedoids; //a boolean, but 1 byte storage would be inefficient
25 uint32_t p_for_dissims;
26 } Work_t;
27
28 // Type returned by a worker (clusters labels and medoids)
29 //TODO: merge with packed version to avoid extra copy by MPI
30 typedef struct Result_t {
31 // parameters describing sizes
32 uint32_t nbClusters;
33 // informative parameters:
34 uint32_t* medoids_ID;
35 uint32_t* medoids_ranks;
36 } Result_t;
37
38 // data structure to store a customer ID + [time-]serie
39 typedef struct PowerCurve {
40 uint32_t ID;
41 float* values;
42 } PowerCurve;
43
44 #endif