vecmem 1.14.0
Loading...
Searching...
No Matches
vector.ipp
1/* VecMem project, part of the ACTS project (R&D line)
2 *
3 * (c) 2021 CERN for the benefit of the ACTS project
4 *
5 * Mozilla Public License Version 2.0
6 */
7#pragma once
8
9namespace vecmem {
10
11template <typename TYPE, typename ALLOC>
12VECMEM_HOST data::vector_view<TYPE> get_data(std::vector<TYPE, ALLOC>& vec) {
13
14 return {
16 vec.data()};
17}
18
19template <typename TYPE, typename ALLOC>
21 const std::vector<TYPE, ALLOC>& vec) {
22
24 vec.size()),
25 vec.data()};
26}
27
28} // namespace vecmem
Class holding data about a 1 dimensional vector/array.
Definition vector_view.hpp:38
unsigned int size_type
We cannot use boolean types.
Definition vector_view.hpp:47
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
std::vector< T, vecmem::polymorphic_allocator< T > > vector
Alias type for vectors with our polymorphic allocator.
Definition vector.hpp:35
VECMEM_HOST data::vector_view< T > get_data(array< T, N > &a)
Helper function creating a vecmem::data::vector_view object.
Definition array.ipp:217