-
Notifications
You must be signed in to change notification settings - Fork 5
/
Types.ecl
125 lines (124 loc) · 4.61 KB
/
Types.ecl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*############################################################################
## HPCC SYSTEMS software Copyright (C) 2016 HPCC Systems. All rights reserved.
############################################################################## */
IMPORT ML_Core;
IMPORT ML_Core.Types as MlTypes;
/**
* Types for the Parallel Block Basic Linear Algebra Sub-programs support.
* <p>WARNING: attributes marked with WARNING can not be changed without making
* corresponding changes to the C++ attributes.
*/
EXPORT Types := MODULE
/**
* Type for matrix dimensions. Uses UNSIGNED4 as matrixes
* are not designed to support more than 4 B rows or columns.
*/
EXPORT dimension_t := UNSIGNED4; // WARNING: type used in C++ attributes
/**
* Type for partition id -- only supports up to 64K partitions.
*/
EXPORT partition_t := UNSIGNED2;
/**
* Type for work-item id -- only supports up to 64K work items.
*/
EXPORT work_item_t := MlTypes.t_work_item;
/**
* Type for matrix cell values
*
* WARNING: type used in C++ attribute
*/
EXPORT value_t := REAL8;
/**
* Type for matrix label. Used for Matrix dimensions (see Layout_Dims)
* and for partitions (see Layout_Part).
*/
EXPORT m_label_t := STRING3;
/**
* Enumeration for Triangle type
*
* WARNING: type used in C++ attribute.
*
* @value Upper = 1
* @value Lower = 2
*/
EXPORT Triangle := ENUM(UNSIGNED1, Upper=1, Lower=2);
/**
* Enumeration for Diagonal type
*
* WARNING: type used in C++ attribute.
*
* @value UnitTri = 1. Ignore the values of the diagonal and use all
* ones instead.
* @value NotUnitTri = 2. Use the diagonal values.
*
*/
EXPORT Diagonal := ENUM(UNSIGNED1, UnitTri=1, NotUnitTri=2);
/**
* Enumeration for Side type in trsm.
*
* WARNING: type used in C++ attribute
*
* @value Ax = 1. Solve x for Ax = B.
* @value xA = 2. Solve x for xA = B.
* @see trsm
*/
EXPORT Side := ENUM(UNSIGNED1, Ax=1, xA=2);
/**
* Type for matrix universe number
*
* Allow up to 64k matrices in one universe.
* @internal
*/
EXPORT t_mu_no := UNSIGNED2; //Allow up to 64k matrices in one universe
/**
* Layout for a Matrix Cell.
*
* <p>Main representation of Matrix cell at interface to all PBBlas functions.
* <p>Matrixes are represented as DATASET(Layout_Cell), where each cell describes
* the row and column position of the cell as well as its value.
* Only the non-zero cells need to be contained in the dataset in order
* to describe the matrix since all unspecified cells are considered to
* have a value of zero.
* The cell also contains a work-item number that allows multiple separate
* matrixes to be carried in the same dataset. This supports the "myriad"
* style interface that allows the same operations to be performed on many
* different sets of data at once.
* <p>Note that these matrixes do not have an explicit size. They are sized
* implicitly, based on the maximum row and column presented in the data.
* <p>A matrix can be converted to an explicit dense form (see matrix_t) by
* using the utility module MakeR8Set. That module should only be used for known
* small matrixes (< 1M cells) or for partitions of a larger matrix.
* <p>The 'internal/Converted' module provides utility
* functions to convert to and from a set of partitions used internally (See Layout_parts).
*
* <p>WARNING: Used as C++ attribute. Do not change without corresponding changes
* to MakeR8Set.
*
* @field wi_id Work Item Number -- An identifier from 1 to 64K-1 that
* separates and identifies individual matrixes.
* @field x 1-based row position within the matrix.
* @field y 1-based column position within the matrix.
* @field v Real value for the cell.
* @see matrix_t
* @see MakeR8Set.ecl
* @see internal/Converted.ecl
*
*/
EXPORT Layout_Cell := RECORD
work_item_t wi_id:=1; // 1 based work-item number
dimension_t x; // 1 based index position for row
dimension_t y; // 1 based index position for column
value_t v; // Value for cell
END;
/**
* Layout for Norm results.
*
* @field wi_id Work Item Number -- An identifier from 1 to 64K-1 that
* separates and identifies individual matrixes
* @field v Real value for the norm
*/
EXPORT Layout_Norm := RECORD
work_item_t wi_id; // 1 based work-item number
value_t v; // Norm value for work item
END;
END;