Skip to content

Commit a7ade4a

Browse files
committed
Use the type provided by gpuarray/types.h
1 parent 0b91bdf commit a7ade4a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/gpuarray/util.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,16 @@ GPUARRAY_PUBLIC void gpuarray_elemwise_collapse(unsigned int n,
9999
size_t *dim, ssize_t **strs);
100100

101101

102-
typedef uint16_t ga_half_t;
103-
104102
/* code strongly inspired from
105103
https://github.com/numpy/numpy/blob/master/numpy/core/src/npymath/halffloat.c#L246 */
106104

107-
static inline ga_half_t ga_float2half(float f) {
105+
static inline half_t ga_float2half(float f) {
108106
union {
109107
float f;
110108
uint32_t bits;
111109
} bf;
112110
union {
113-
ga_half_t h;
111+
half_t h;
114112
uint16_t bits;
115113
} bh;
116114

0 commit comments

Comments
 (0)