buffer.h
Go to the documentation of this file.
1 #ifndef TTG_BUFFER_H
2 #define TTG_BUFFER_H
3 
4 #include <memory>
5 
6 #include "ttg/fwd.h"
7 #include "ttg/util/meta.h"
8 
9 namespace ttg {
10 
11 template<typename T, typename Allocator = std::allocator<std::decay_t<T>>>
12 using Buffer = TTG_IMPL_NS::Buffer<T, Allocator>;
13 
14 namespace meta {
15 
16  /* Specialize some traits */
17 
18  template<typename T, typename A>
19  struct is_buffer<ttg::Buffer<T, A>> : std::true_type
20  { };
21 
22  template<typename T, typename A>
23  struct is_buffer<const ttg::Buffer<T, A>> : std::true_type
24  { };
25 
26  /* buffers are const if their value types are const */
27  template<typename T, typename A>
28  struct is_const<ttg::Buffer<T, A>> : std::is_const<T>
29  { };
30 
31 } // namespace meta
32 
33 } // namespace ttg
34 
35 #endif // TTG_buffer_H
std::integral_constant< bool,(Flags &const_) !=0 > is_const
top-level TTG namespace contains runtime-neutral functionality
Definition: keymap.h:8