Lines Matching refs:start
63 __gen_mbo(uint32_t start, uint32_t end)
65 return (~0ull >> (64 - (end - start + 1))) << start;
69 __gen_uint(uint64_t v, uint32_t start, uint32_t end)
74 const int width = end - start + 1;
81 return v << start;
85 __gen_sint(int64_t v, uint32_t start, uint32_t end)
87 const int width = end - start + 1;
101 return (v & mask) << start;
105 __gen_offset(uint64_t v, uint32_t start, uint32_t end)
109 uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start;
125 __gen_sfixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits)
132 const float max = ((1 << (end - start)) - 1) / factor;
133 const float min = -(1 << (end - start)) / factor;
138 const uint64_t mask = ~0ull >> (64 - (end - start + 1));
140 return (int_val & mask) << start;
144 __gen_ufixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits)
151 const float max = ((1 << (end - start + 1)) - 1) / factor;
158 return uint_val << start;
162 __gen_unpack_uint(const uint8_t *restrict cl, uint32_t start, uint32_t end)
165 const int width = end - start + 1;
168 for (uint32_t byte = start / 8; byte <= end / 8; byte++) {
169 val |= cl[byte] << ((byte - start / 8) * 8);
172 return (val >> (start % 8)) & mask;
176 __gen_unpack_sint(const uint8_t *restrict cl, uint32_t start, uint32_t end)
178 int size = end - start + 1;
179 int64_t val = __gen_unpack_uint(cl, start, end);
186 __gen_unpack_sfixed(const uint8_t *restrict cl, uint32_t start, uint32_t end,
189 int32_t bits = __gen_unpack_sint(cl, start, end);
194 __gen_unpack_ufixed(const uint8_t *restrict cl, uint32_t start, uint32_t end,
197 int32_t bits = __gen_unpack_uint(cl, start, end);
202 __gen_unpack_float(const uint8_t *restrict cl, uint32_t start, uint32_t end)
204 assert(start % 8 == 0);
205 assert(end - start == 31);
207 struct PACKED { float f; } *f = (void *)(cl + (start / 8));
213 __gen_unpack_f187(const uint8_t *restrict cl, uint32_t start, uint32_t end)
215 assert(end - start == 15);
216 uint32_t bits = __gen_unpack_uint(cl, start, end);