https://github.com/halide/Halide
Raw File
Tip revision: 85c1b91c47ce15aab0d9502d955e48615f3bcee0 authored by Alex Reinking on 19 February 2021, 04:27:28 UTC
Set version number to 11.0.1
Tip revision: 85c1b91
PythonExtensionGen.h
#ifndef HALIDE_PYTHON_EXTENSION_GEN_H_
#define HALIDE_PYTHON_EXTENSION_GEN_H_

#include "Module.h"
#include "Target.h"
#include <string>

namespace Halide {
namespace Internal {

class PythonExtensionGen {
public:
    PythonExtensionGen(std::ostream &dest);

    void compile(const Module &module);

private:
    std::ostream &dest;
    std::vector<std::string> buffer_refs;

    void compile(const LoweredFunc &f);
    void convert_buffer(const std::string &name, const LoweredArgument *arg);
    void release_buffers(const std::string &prefix);
};

}  // namespace Internal
}  // namespace Halide

#endif  // HALIDE_PYTHON_EXTENSION_GEN_H_
back to top