concat_opt.hpp 1.08 KB
Newer Older
Paul's avatar
Paul committed
1
2
#ifndef MIGRAPHX_GUARD_CONCAT_OPT_HPP
#define MIGRAPHX_GUARD_CONCAT_OPT_HPP
3
4
5
6
7
8
9
10

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

Paul's avatar
Paul committed
11
#include <migraphx/operation.hpp>
12
#include <migraphx/op/concat.hpp>
Paul's avatar
Paul committed
13
#include <migraphx/config.hpp>
14

Paul's avatar
Paul committed
15
namespace migraphx {
Paul's avatar
Paul committed
16
inline namespace MIGRAPHX_INLINE_NS {
17
18
19
20
21

struct program;

#ifdef DOXYGEN

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

Paul's avatar
Paul committed
45
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
46
} // namespace migraphx
47
48

#endif