concat_opt.hpp 1.07 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

#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
    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
43
} // namespace MIGRAPHX_INLINE_NS
Paul's avatar
Paul committed
44
} // namespace migraphx
45
46

#endif