https://github.com/halide/Halide
Raw File
Tip revision: 19cccca3731c34e54c709bfc112b52f73fd39349 authored by Volodymyr Kysenko on 14 June 2022, 16:20:42 UTC
Add a check for strided 4 load
Tip revision: 19cccca
PythonExtensionGen.h
#ifndef HALIDE_PYTHON_EXTENSION_GEN_H_
#define HALIDE_PYTHON_EXTENSION_GEN_H_

#include <iostream>
#include <string>
#include <vector>

namespace Halide {

class Module;

namespace Internal {

struct LoweredArgument;
struct LoweredFunc;

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