Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
fuzz_helpers.h
Go to the documentation of this file.
1#ifndef HALIDE_FUZZ_HELPERS_H_
2#define HALIDE_FUZZ_HELPERS_H_
3
4#include "fuzzer/FuzzedDataProvider.h"
5#include <vector>
6
7namespace Halide {
8
9template<typename T>
10inline T pick_value_in_vector(FuzzedDataProvider &fdp, std::vector<T> &vec) {
11 return vec[fdp.ConsumeIntegralInRange<size_t>(0, vec.size() - 1)];
12}
13} // namespace Halide
14
15#endif // HALIDE_FUZZ_HELPERS_H_
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
T pick_value_in_vector(FuzzedDataProvider &fdp, std::vector< T > &vec)