"official/vision/dataloaders/video_input_test.py" did not exist on "4242b54920a807db38aa2b0fb97d884433a7ee26"
pass.hpp 811 Bytes
Newer Older
Paul's avatar
Paul committed
1
2
#ifndef MIGRAPHX_GUARD_PASS_HPP
#define MIGRAPHX_GUARD_PASS_HPP
Paul's avatar
Paul committed
3

Paul's avatar
Paul committed
4
#include <cassert>
Paul's avatar
Paul committed
5
6
7
8
9
#include <string>
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>
Paul's avatar
Paul committed
10
#include <migraphx/config.hpp>
Paul's avatar
Paul committed
11

Paul's avatar
Paul committed
12
namespace migraphx {
Paul's avatar
Paul committed
13
inline namespace MIGRAPHX_INLINE_NS {
Paul's avatar
Paul committed
14
15

struct program;
16
using module = program;
Paul's avatar
Paul committed
17

Paul's avatar
Paul committed
18
19
#ifdef DOXYGEN

Paul's avatar
Paul committed
20
21
/// An interface for applying a transformation to the instructions in a
/// `program`
Paul's avatar
Paul committed
22
23
24
25
26
struct pass
{
    /// A unique name used to identify the pass
    std::string name() const;
    /// Run the pass on the program
27
    void apply(module& p) const;
Paul's avatar
Paul committed
28
29
30
31
};

#else

Paul's avatar
Paul committed
32
33
34
<%
interface('pass',
    virtual('name', returns='std::string', const=True),
35
    virtual('apply', returns='void', p='module &', const=True)
Paul's avatar
Paul committed
36
37
38
)
%>

Paul's avatar
Paul committed
39
40
#endif

Paul's avatar
Paul committed
41
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
42
} // namespace migraphx
Paul's avatar
Paul committed
43
44

#endif