summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-torch.h
blob: dc4ea51a74a1f6f1357174bbd89a6159734ba45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// slang-emit-torch.h
#ifndef SLANG_EMIT_TORCH_H
#define SLANG_EMIT_TORCH_H

#include "slang-emit-cpp.h"

namespace Slang
{

class TorchCppSourceEmitter : public CPPSourceEmitter
{
public:
    typedef CPPSourceEmitter Super;

    TorchCppSourceEmitter(const Desc& desc)
        : Super(desc)
    {
    }

protected:
    // CPPSourceEmitter overrides
    virtual bool tryEmitInstStmtImpl(IRInst* inst) override;

    virtual bool tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOuterPrec) override;
    virtual SlangResult calcTypeName(IRType* type, CodeGenTarget target, StringBuilder& out)
        override;
    virtual void emitModuleImpl(IRModule* module, DiagnosticSink* sink) override;
};

} // namespace Slang
#endif