Poplar and PopLibs
ArrayRef.hpp
Go to the documentation of this file.
1// Copyright (c) 2018 Graphcore Ltd. All rights reserved.
8#ifndef poplar_ArrayRef_hpp
9#define poplar_ArrayRef_hpp
10
11#include <gccs/ArrayRef.hpp>
12
14namespace poplar {
15
16// A non-owning, immutable view on some contiguous data.
17template <class T> class ArrayRef : public ::gccs::ArrayRef<const T> {
18 using ::gccs::ArrayRef<const T>::ArrayRef;
19};
20
21#if __cplusplus >= 201703L // Deduction guides are available
22template <class T, size_t N> ArrayRef(const T (&)[N]) -> ArrayRef<T>;
23template <class T> ArrayRef(std::initializer_list<T>) -> ArrayRef<T>;
24template <class T> ArrayRef(const T &) -> ArrayRef<typename T::value_type>;
25template <class T> ArrayRef(const T *, size_t) -> ArrayRef<T>;
26#endif
27
28} // end namespace poplar
29
30#endif // poplar_ArrayRef_hpp
Poplar classes and functions.
Definition: ArrayRef.hpp:14