|
39 | 39 | function enumerated() { |
40 | 40 | // NOTE: the following should match the C `dtypes.h` enumeration!!!! |
41 | 41 | return { |
42 | | - // 'BOOL': 0, // uncomment once supported |
| 42 | + // 'bool': 0, // uncomment once supported |
43 | 43 |
|
44 | | - 'INT8': 0, |
45 | | - 'UINT8': 1, |
46 | | - 'INT16': 2, |
47 | | - 'UINT16': 3, |
48 | | - 'INT32': 4, |
49 | | - 'UINT32': 5, |
50 | | - 'INT64': 6, |
51 | | - 'UINT64': 7, |
52 | | - // 'INT128': 9, // uncomment once supported |
53 | | - // 'UINT128': 10, // uncomment once supported |
54 | | - // 'INT256': 11, // uncomment once supported |
55 | | - // 'UINT256': 12, // uncomment once supported |
| 44 | + 'int8': 0, |
| 45 | + 'uint8': 1, |
| 46 | + 'int16': 2, |
| 47 | + 'uint16': 3, |
| 48 | + 'int32': 4, |
| 49 | + 'uint32': 5, |
| 50 | + 'int64': 6, |
| 51 | + 'uint64': 7, |
| 52 | + // 'int128': 9, // uncomment once supported |
| 53 | + // 'uint128': 10, // uncomment once supported |
| 54 | + // 'int256': 11, // uncomment once supported |
| 55 | + // 'uint256': 12, // uncomment once supported |
56 | 56 |
|
57 | | - // 'FLOAT16': 13, // uncomment once supported |
58 | | - 'FLOAT32': 8, |
59 | | - 'FLOAT64': 9, |
60 | | - // 'FLOAT128': 16, // uncomment once supported |
| 57 | + // 'float16': 13, // uncomment once supported |
| 58 | + 'float32': 8, |
| 59 | + 'float64': 9, |
| 60 | + // 'float128': 16, // uncomment once supported |
61 | 61 |
|
62 | 62 | // Define a signaling value which is guaranteed not to be a valid type enumeration value: |
63 | | - 'NOTYPE': 11, |
| 63 | + 'notype': 11, |
64 | 64 |
|
65 | 65 | // The following is a special dtype, which is, in more recent Node.js versions, effectively equivalent to `uint8` when calling into C; however, in older Node.js versions, the `Buffer` object was not based on the `Uint8Array` typed array. Here, we treat "binary" as an alias for `uint8`. |
66 | | - 'BINARY': 1, |
| 66 | + 'binary': 1, |
67 | 67 |
|
68 | 68 | // The following is a special dtype which is only applicable in JavaScript, not in C. Here, we treat "uint8c" as an alias for `uint8`. |
69 | | - 'UINT8C': 1, |
| 69 | + 'uint8c': 1, |
70 | 70 |
|
71 | 71 | // The following corresponds to a "generic" JavaScript `Array` instance. This has no equivalent native C type. |
72 | | - 'GENERIC': 11, |
| 72 | + 'generic': 11, |
73 | 73 |
|
74 | 74 | // Indicate the start of user defined type numbers (leaving room for type growth above): |
75 | | - 'USERDEFINED_TYPE': 256 |
| 75 | + 'userdefined_type': 256 |
76 | 76 | }; |
77 | 77 | } |
78 | 78 |
|
|
0 commit comments