"composable_kernel/include/utility/sequence.hpp" did not exist on "23f633cdc5eafb6f110046794ad1384d723f1157"
make_shared_array.hpp 431 Bytes
Newer Older
1
2
3
4
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_MAKE_SHARED_ARRAY_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_MAKE_SHARED_ARRAY_HPP

#include <memory>
5
#include <migraph/config.hpp>
6

7
8
namespace migraph {
inline namespace MIGRAPH_INLINE_NS {
9

wsttiger's avatar
wsttiger committed
10
11
template <typename T>
std::shared_ptr<T> make_shared_array(size_t size)
12
{
wsttiger's avatar
wsttiger committed
13
    return std::shared_ptr<T>(new T[size], std::default_delete<T[]>());
14
15
}

16
} // namespace MIGRAPH_INLINE_NS
17
18
19
} // namespace migraph

#endif