concat_opt.hpp 1000 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#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

wsttiger's avatar
wsttiger committed
20
/// An interface for target-dependent optimization for the concat instruction
Scott Thornton's avatar
Scott Thornton committed
21
struct concat_optimization
22
{
wsttiger's avatar
wsttiger committed
23
    /// The name of the target-dependent concat operator
24
    std::string name() const;
wsttiger's avatar
wsttiger committed
25
    /// A name of the target-dependent allocate operator
26
    std::string allocate() const;
wsttiger's avatar
wsttiger committed
27
    /// Return the target-independent concat operator
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    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