https://github.com/halide/Halide
Raw File
Tip revision: e3606cc5d92ccb41ed39480bf00bddf4a9e710c2 authored by Andrew Adams on 13 August 2020, 17:37:30 UTC
Fix GPU barrier deadlocks
Tip revision: e3606cc
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