GeneratorContext is a class that is used when using Generators (or Stubs) directly; it is used to allow the outer context (typically, either a Generator or "top-level" code) to specify certain information to the inner context to ensure that inner and outer Generators are compiled in a compatible way.
More...
#include <Generator.h>
GeneratorContext is a class that is used when using Generators (or Stubs) directly; it is used to allow the outer context (typically, either a Generator or "top-level" code) to specify certain information to the inner context to ensure that inner and outer Generators are compiled in a compatible way.
If you are using this at "top level" (e.g. with the JIT), you can construct a GeneratorContext with a Target:
auto my_stub = MyStub(
{ ... },
{ ... }
);
GeneratorContext()=default
Target get_target_from_environment()
Return the target that Halide will use.
Note that all Generators embed a GeneratorContext, so if you are using a Stub from within a Generator, you can just pass 'context()' for the GeneratorContext:
void generate() {
...
auto my_stub = MyStub(
{ ... },
{ ... }
);
...
}
};
GeneratorContext context() const override
Return the Target and autoscheduler info that this Generator was created with.
Definition at line 2998 of file Generator.h.
◆ GeneratorContext() [1/5]
| Halide::GeneratorContext::GeneratorContext |
( |
const Target & | t | ) |
|
|
explicit |
◆ GeneratorContext() [2/5]
◆ GeneratorContext() [3/5]
| Halide::GeneratorContext::GeneratorContext |
( |
| ) |
|
|
default |
◆ GeneratorContext() [4/5]
◆ GeneratorContext() [5/5]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ target()
| const Target & Halide::GeneratorContext::target |
( |
| ) |
const |
|
inline |
◆ autoscheduler_params()
◆ with_target()
◆ create()
template<typename T >
| std::unique_ptr< T > Halide::GeneratorContext::create |
( |
| ) |
const |
|
inline |
◆ apply()
template<typename T , typename... Args>
| std::unique_ptr< T > Halide::GeneratorContext::apply |
( |
const Args &... | args | ) |
const |
|
inline |
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/halide-16.0.0/src/Generator.h