1 #ifndef LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H
2 #define LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H
4 #include "llvm/ADT/StringRef.h"
7 namespace libc_benchmarks
{
9 /// Memory function prototype and configuration.
10 using MemcpyFunction
= void *(*)(void *__restrict
, const void *__restrict
,
12 struct MemcpyConfiguration
{
13 MemcpyFunction Function
;
17 using MemmoveFunction
= void *(*)(void *, const void *, size_t);
18 struct MemmoveConfiguration
{
19 MemmoveFunction Function
;
23 using MemsetFunction
= void *(*)(void *, int, size_t);
24 struct MemsetConfiguration
{
25 MemsetFunction Function
;
29 using BzeroFunction
= void (*)(void *, size_t);
30 struct BzeroConfiguration
{
31 BzeroFunction Function
;
35 using MemcmpOrBcmpFunction
= int (*)(const void *, const void *, size_t);
36 struct MemcmpOrBcmpConfiguration
{
37 MemcmpOrBcmpFunction Function
;
41 } // namespace libc_benchmarks
44 #endif /* LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H */