1 #ifndef HALIDE_CODEGEN_RISCV_H
2 #define HALIDE_CODEGEN_RISCV_H
3 
4 /** \file
5  * Defines the code-generator for producing RISCV machine code.
6  */
7 
8 #include "CodeGen_Posix.h"
9 
10 namespace Halide {
11 namespace Internal {
12 
13 /** A code generator that emits mips code from a given Halide stmt. */
14 class CodeGen_RISCV : public CodeGen_Posix {
15 public:
16     /** Create a mips code generator. Processor features can be
17      * enabled using the appropriate flags in the target struct. */
18     CodeGen_RISCV(Target);
19 
20 protected:
21     using CodeGen_Posix::visit;
22 
23     std::string mcpu() const override;
24     std::string mattrs() const override;
25     bool use_soft_float_abi() const override;
26     int native_vector_bits() const override;
27 };
28 
29 }  // namespace Internal
30 }  // namespace Halide
31 
32 #endif
33