1 #ifndef LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H 2 #define LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H 3 4 #include "llvm/ADT/StringRef.h" 5 6 namespace llvm { 7 namespace libc_benchmarks { 8 9 /// Memory function prototype and configuration. 10 using MemcpyFunction = void *(*)(void *__restrict, const void *__restrict, 11 size_t); 12 struct MemcpyConfiguration { 13 MemcpyFunction Function; 14 llvm::StringRef Name; 15 }; 16 17 using MemmoveFunction = void *(*)(void *, const void *, size_t); 18 struct MemmoveConfiguration { 19 MemmoveFunction Function; 20 llvm::StringRef Name; 21 }; 22 23 using MemsetFunction = void *(*)(void *, int, size_t); 24 struct MemsetConfiguration { 25 MemsetFunction Function; 26 llvm::StringRef Name; 27 }; 28 29 using BzeroFunction = void (*)(void *, size_t); 30 struct BzeroConfiguration { 31 BzeroFunction Function; 32 llvm::StringRef Name; 33 }; 34 35 using MemcmpOrBcmpFunction = int (*)(const void *, const void *, size_t); 36 struct MemcmpOrBcmpConfiguration { 37 MemcmpOrBcmpFunction Function; 38 llvm::StringRef Name; 39 }; 40 41 } // namespace libc_benchmarks 42 } // namespace llvm 43 44 #endif /* LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H */ 45