Blame


1 3448adb0 2022-11-02 op /* See LICENSE file for copyright and license details. */
2 3448adb0 2022-11-02 op #ifndef UTIL_H
3 3448adb0 2022-11-02 op #define UTIL_H
4 3448adb0 2022-11-02 op
5 3448adb0 2022-11-02 op #include "../gen/types.h"
6 3448adb0 2022-11-02 op
7 3448adb0 2022-11-02 op #define LEN(x) (sizeof(x) / sizeof(*(x)))
8 3448adb0 2022-11-02 op
9 3448adb0 2022-11-02 op #ifdef __has_attribute
10 3448adb0 2022-11-02 op #if __has_attribute(optnone)
11 3448adb0 2022-11-02 op void libgrapheme(const void *) __attribute__((optnone));
12 3448adb0 2022-11-02 op void libutf8proc(const void *) __attribute__((optnone));
13 3448adb0 2022-11-02 op #endif
14 3448adb0 2022-11-02 op #endif
15 3448adb0 2022-11-02 op
16 3448adb0 2022-11-02 op uint_least32_t *generate_cp_test_buffer(const struct break_test *, size_t,
17 3448adb0 2022-11-02 op size_t *);
18 3448adb0 2022-11-02 op char *generate_utf8_test_buffer(const struct break_test *, size_t, size_t *);
19 3448adb0 2022-11-02 op
20 3448adb0 2022-11-02 op void run_benchmark(void (*func)(const void *), const void *, const char *,
21 3448adb0 2022-11-02 op const char *, const char *, double *, size_t, size_t);
22 3448adb0 2022-11-02 op
23 3448adb0 2022-11-02 op #endif /* UTIL_H */