https://github.com/halide/Halide
Raw File
Tip revision: 04ec9c041fa3eb9f55d9783439eb5c3b36f540bd authored by Steven Johnson on 14 November 2019, 20:17:17 UTC
Merge branch 'master' into pdb_mul_div_mod_multi_thread
Tip revision: 04ec9c0
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(Target);

    static void test();

protected:
    using CodeGen_Posix::visit;

    void visit(const Cast *) 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