Grok 12.0.1
Classes | Namespaces | Macros | Typedefs | Functions
nanobenchmark.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "hwy/highway_export.h"
#include "hwy/timer.h"

Go to the source code of this file.

Classes

struct  hwy::Params
 
struct  hwy::Result
 

Namespaces

namespace  hwy
 

Macros

#define NANOBENCHMARK_ENABLE_CHECKS   0
 
#define NANOBENCHMARK_CHECK_ALWAYS(condition)
 
#define NANOBENCHMARK_CHECK(condition)
 

Typedefs

using hwy::FuncInput = size_t
 
using hwy::FuncOutput = uint64_t
 
using hwy::Func = FuncOutput (*)(const void*, FuncInput)
 

Functions

HWY_DLLEXPORT int hwy::Unpredictable1 ()
 
HWY_DLLEXPORT size_t hwy::Measure (Func func, const uint8_t *arg, const FuncInput *inputs, size_t num_inputs, Result *results, const Params &p=Params())
 
template<class Closure >
static FuncOutput hwy::CallClosure (const Closure *f, const FuncInput input)
 
template<class Closure >
static size_t hwy::MeasureClosure (const Closure &closure, const FuncInput *inputs, const size_t num_inputs, Result *results, const Params &p=Params())
 

Macro Definition Documentation

◆ NANOBENCHMARK_CHECK

#define NANOBENCHMARK_CHECK ( condition)

◆ NANOBENCHMARK_CHECK_ALWAYS

#define NANOBENCHMARK_CHECK_ALWAYS ( condition)
Value:
while (!(condition)) { \
fprintf(stderr, "Nanobenchmark check failed at line %d\n", __LINE__); \
abort(); \
}

◆ NANOBENCHMARK_ENABLE_CHECKS

#define NANOBENCHMARK_ENABLE_CHECKS   0