src/ucx/ucx.h

changeset 270
3d80d425543b
parent 259
2f5dea574a75
child 283
c3b6ff227481
equal deleted inserted replaced
269:591473851c95 270:3d80d425543b
129 * destination, the length of one element, the element count and a pointer to 129 * destination, the length of one element, the element count and a pointer to
130 * the source. 130 * the source.
131 */ 131 */
132 typedef size_t(*read_func)(void*, size_t, size_t, void*); 132 typedef size_t(*read_func)(void*, size_t, size_t, void*);
133 133
134
135
136 #if defined(__GNUC__) || defined(__clang__)
137 #define UCX_MUL_BUILTIN
138 #define ucx_szmul(a, b, result) __builtin_umull_overflow(a, b, result)
139 #else
140 int ucx_szmul(size_t a, size_t b, size_t *result);
141 #endif
142
134 #ifdef __cplusplus 143 #ifdef __cplusplus
135 } 144 }
136 #endif 145 #endif
137 146
138 #endif /* UCX_H */ 147 #endif /* UCX_H */

mercurial