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 MemsetFunction = void *(*)(void *, int, size_t); 18 struct MemsetConfiguration { 19 MemsetFunction Function; 20 llvm::StringRef Name; 21 }; 22 23 using BzeroFunction = void (*)(void *, size_t); 24 struct BzeroConfiguration { 25 BzeroFunction Function; 26 llvm::StringRef Name; 27 }; 28 29 using MemcmpOrBcmpFunction = int (*)(const void *, const void *, size_t); 30 struct MemcmpOrBcmpConfiguration { 31 MemcmpOrBcmpFunction Function; 32 llvm::StringRef Name; 33 }; 34 35 } // namespace libc_benchmarks 36 } // namespace llvm 37 38 #endif /* LLVM_LIBC_BENCHMARKS_LIBC_FUNCTION_PROTOTYPES_H */ 39