concat_opt.hpp 994 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef MIGRAPH_GUARD_CONCAT_OPT_HPP
#define MIGRAPH_GUARD_CONCAT_OPT_HPP

#include <cassert>
#include <string>
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>

#include <migraph/operation.hpp>
#include <migraph/operators.hpp>

namespace migraph {

struct program;

#ifdef DOXYGEN

/// An interface for applying an optimization for the concat instruction
Scott Thornton's avatar
Scott Thornton committed
21
struct concat_optimization
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    /// A unique name used to identify the concat optimization
    std::string name() const;
    /// A unique name used to identify the allocate operator
    std::string allocate() const;
    /// Return the lowered concat operator
    op::concat get_concat(const operation& op) const;
};

#else

<%
interface('concat_optimization',
    virtual('name', returns='std::string', const=True),
    virtual('allocate', returns='std::string', const=True),
    virtual('get_concat', returns='op::concat', op='const operation&', const=True)
)
%>

#endif

} // namespace migraph

#endif