Revision 8f6473498dc1d3bc00a3f6ddc4017ba2b193c5db authored by Dillon Sharlet on 15 February 2021, 21:10:43 UTC, committed by Dillon Sharlet on 15 February 2021, 21:10:43 UTC
2 parent s e45963d + b4c4c73
Raw File
CodeGen_WebAssembly.h
#ifndef HALIDE_CODEGEN_WEBASSEMBLY_H
#define HALIDE_CODEGEN_WEBASSEMBLY_H

/** \file
 * Defines the code-generator for producing WebAssembly machine code.
 */

#include "CodeGen_Posix.h"

namespace Halide {
namespace Internal {

/** A code generator that emits WebAssembly code from a given Halide stmt. */
class CodeGen_WebAssembly : public CodeGen_Posix {
public:
    CodeGen_WebAssembly(const Target &);

    static void test();

protected:
    using CodeGen_Posix::visit;

    void init_module() override;

    std::string mcpu() const override;
    std::string mattrs() const override;
    bool use_soft_float_abi() const override;
    int native_vector_bits() const override;
    bool use_pic() const override;
};

}  // namespace Internal
}  // namespace Halide

#endif
back to top