Loading...
Searching...
No Matches
fuzz_helpers.h
Go to the documentation of this file.
#ifndef HALIDE_FUZZ_HELPERS_H_
#define HALIDE_FUZZ_HELPERS_H_
#include "fuzzer/FuzzedDataProvider.h"
#include <vector>
namespace Halide {
template<typename T>
inline T pick_value_in_vector(FuzzedDataProvider &fdp, std::vector<T> &vec) {
return vec[fdp.ConsumeIntegralInRange<size_t>(0, vec.size() - 1)];
}
} // namespace Halide
#endif // HALIDE_FUZZ_HELPERS_H_
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::pick_value_in_vector
T pick_value_in_vector(FuzzedDataProvider &fdp, std::vector< T > &vec)
Definition fuzz_helpers.h:10