root/test/generator/variable_num_threads_generator.cpp

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. build

#include "Halide.h"

namespace {

class VariableNumThreads : public Halide::Generator<VariableNumThreads> {
public:
    Func build() {
        // A job with lots of nested parallelism
        Func f;
        Var x, y;

        f(x, y) = sqrt(sqrt(x*y));
        f.parallel(x).parallel(y);

        return f;
    }
};

Halide::RegisterGenerator<VariableNumThreads> register_my_gen{"variable_num_threads"};

}  // namespace

/* [<][>][^][v][top][bottom][index][help] */