www.cemf.ir
wordVectorHost.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 #ifndef __wordVectorHost_hpp__
21 #define __wordVectorHost_hpp__
22 
23 #include "VectorSingle.hpp"
24 #include "Vector.hpp"
25 
26 namespace pFlow
27 {
28 
29 
30 template<>
32 {
33 public:
34 
35  //- typedefs for accessing data
36 
38 
40 
41  using iterator = word*;
42 
43  using const_iterator = const word*;
44 
45  using reference = word&;
46 
47  using const_reference = const word&;
48 
49  using value_type = word;
50 
51  using pointer = word*;
52 
53  using const_pointer = const word*;
54 
55  //- typedefs related to memory management
56 
58 
59  using device_type = typename viewType::device_type;
60 
61  using memory_space = typename viewType::memory_space;
62 
63  using execution_space = typename viewType::execution_space;
64 
65 private:
66 
67  // - Data members
68 
70 
72 
73  // - protected members and methods
74 
76  static constexpr
77  bool isHostAccessible_ = true;
78 
80  static constexpr
81  bool isDeviceAccessible_ = false;
82 
83  static constexpr
84  bool isTriviallyCopyable_ = false;
85 
86 
87 public:
88 
90  TypeInfoTemplateNV111("VectorSingle", word , memoerySpaceName());
91 
93 
95  VectorSingle() = default;
96 
98  explicit VectorSingle(const word& name)
99  :
100  container_(name)
101  {}
102 
105  :
106  container_(name, n)
107  {}
108 
110  VectorSingle(const word& name, uint32 n, const word& val)
111  :
112  container_(name, n, val)
113  {}
114 
116  VectorSingle(const word& name, uint32 cap, uint32 n, const RESERVE& r )
117  :
118  container_(name, cap, n, r)
119  {}
120 
122  VectorSingle(const word& name, const std::vector<word> & src)
123  :
124  container_(name, src)
125  {}
126 
128  VectorSingle(const word& name, const std::vector<word> & src, uint32 cap)
129  :
130  container_(name, src, cap)
131  {}
132 
134  VectorSingle(const VectorSingle& src)=default;
135 
137  VectorSingle(const word& name, const VectorSingle& src)
138  :
139  container_(name, src.container_)
140  {}
141 
142 
144  VectorSingle& operator = (const VectorSingle& rhs)=default;
145 
147  VectorSingle(VectorSingle&&) = default;
148 
150  VectorSingle& operator= (VectorSingle&&) = default;
151 
155  ~VectorSingle() = default;
156 
160  {
161  return makeUnique<VectorSingle>(*this);
162  }
163 
164 
166 
170  {
171  return *this;
172  }
173 
176  const VectorType& VectorField()const
177  {
178  return *this;
179  }
180 
184  {
185  // return un-managed view
186  unManagedView_ = viewType(container_.data(), container_.capacity());
187  return unManagedView_;
188  }
189 
192  const auto& deviceViewAll() const
193  {
194  // return un-managed view
195  unManagedView_ = viewType(const_cast<word*>(container_.data()), container_.capacity());
196  return unManagedView_;
197  }
198 
201  auto deviceView()const
202  {
203  return viewType(const_cast<word*>(container_.data()), container_.size());
204  }
205 
208  auto hostViewAll()const
209  {
210  return viewType(const_cast<word*>(container_.data()), container_.capacity());
211  }
212 
213 
216  auto hostView()const
217  {
218  return viewType(const_cast<word*>(container_.data()), container_.size());
219  }
220 
223  word name()const
224  {
225  return container_.name();
226  }
227 
228 
231  uint32 size()const
232  {
233  return container_.size();
234  }
235 
236 
237  // Capcity of the vector
240  {
241  return container_.capacity();
242  }
243 
246  bool empty()const
247  {
248  return container_.size()==0uL;
249  }
250 
251 
255  void reserve(uint32 cap)
256  {
257  container_.reserve(cap);
258  }
259 
261  /*INLINE_FUNCTION_H
262  void reallocate(uint32 cap);
263 
266  INLINE_FUNCTION_H
267  void reallocate(uint32 cap, uint32 newSize);*/
268 
272  {
273  container_.resize(n);
274  }
275 
278  void resize(uint32 n, const word& val)
279  {
280  container_.resize(n, val);
281  }
282 
285  void clear()
286  {
287  container_.clear();
288  }
289 
292  void fill(const word& val)
293  {
294  container_.fill(val);
295  }
296 
298  void fill(rangeU32 r, const word& val)
299  {
300  container_.fill(r.start(), r.end(), val);
301  }
302 
305  void assign(size_t n, const word& val)
306  {
307  container_.assign(n, val);
308  }
309 
313  void assign(const std::vector<word>& src, uint32 cap)
314  {
315  container_.reserve(cap);
316  this->assign(src);
317  }
318 
319 
324  void assign(const std::vector<word>& src)
325  {
326  container_.assign(src.begin(), src.end());
327  }
328 
334  {
336  fatalExit;
337  }
338 
340  void assign(const VectorType& src, bool srcCapacity = true)
341  {
343  fatalExit;
344  }
345 
346  template<typename MSpace>
348  void assignFromDevice(const VectorSingle<word, MSpace>& src, bool srcCapacity = true)
349  {
351  fatalExit;
352  }
353 
354  /*INLINE_FUNCTION_H
355  void append(const ViewType1D<T,MemorySpace>& appVec);
356 
357  INLINE_FUNCTION_H
358  void append(const std::vector<T>& appVec);
359 
360  INLINE_FUNCTION_H
361  void append(const VectorType& appVec);*/
362 
364  auto getSpan()
365  {
366  return span<word>(container_.data(), container_.size());
367  }
368 
370  auto getSpan()const
371  {
372  return span<word>(const_cast<word*>(container_.data()), container_.size());
373  }
374 
375 
376  bool insertSetElement(const uint32IndexContainer& indices, const word& val);
377 
378 
379 
380  bool insertSetElement(const uint32IndexContainer& indices, const std::vector<word>& vals);
381 
382 
383 
384  bool insertSetElement(
385  const uint32IndexContainer& indices,
387  );
388 
389 
391  bool reorderItems(const uint32IndexContainer& indices)
392  {
394  return false;
395  }
396 
399 
400  void push_back(const word& val)
401  {
402  container_.push_back(val);
403  }
404 
407  return container_.data();
408  }
409 
412  return container_.data();
413  }
414 
416  auto
417  begin(){
418  return container_.begin();
419  }
420 
422  const auto
423  begin()const {
424  return container_.begin();
425  }
426 
427  auto end(){
428  return container_.end();
429  }
430 
432  const auto end()const{
433  return container_.end();
434  }
435 
437  word& operator[](size_t i){
438  return container_[i];
439  }
440 
441  const word& operator[](size_t i)const{
442  return container_[i];
443  }
444 
446 
448  FUNCTION_H
449  bool read(iIstream& is)
450  {
451  return container_.read(is);
452  }
453 
455  FUNCTION_H
456  bool read(iIstream& is, const IOPattern& iop)
457  {
458  return container_.read(is, iop);
459  }
460 
462  FUNCTION_H
463  bool write(iOstream& os, const IOPattern& iop)const
464  {
465  return container_.write(os, iop);
466  }
467 
468  FUNCTION_H
469  bool write(iOstream& os)const
470  {
471  return container_.write(os);
472  }
473 
474  template<typename HostMask>
475  FUNCTION_H
476  bool write(iOstream& os, const IOPattern& iop, const HostMask& mask)const
477  {
479  return false;
480  }
481 
482 
484  static
485  constexpr const char* memoerySpaceName()
486  {
487  return memory_space::name();
488  }
489 
490 }; // class wordVectorHost
491 
493 {
494  if( !ivec.read(is) )
495  {
496  ioErrorInFile (is.name(), is.lineNumber());
497  fatalExit;
498  }
499  return is;
500 }
501 
503 {
504 
505  if( !ovec.write(os) )
506  {
507  ioErrorInFile(os.name(), os.lineNumber());
508  fatalExit;
509  }
510 
511  return os;
512 }
513 
514 
515 } // - pFlow
516 
517 
518 
519 #endif
520 
521 
522 /*
523 INLINE_FUNCTION_H
524  bool append(const deviceViewType1D<T>& dVec, size_t numElems)
525  {
526 
527  if(numElems == 0 )return true;
528  auto oldSize = size_;
529  auto newSize = size_ + numElems;
530 
531  if(this->empty() || newSize > capacity() )
532  {
533  resize(newSize);
534  }
535  else
536  {
537  size_ = size_+numElems;
538  }
539 
540  auto dSubView = Kokkos::subview(view_, Kokkos::make_pair(oldSize, newSize));
541  copy(dSubView, dVec);
542 
543  return true;
544  }
545 
546  INLINE_FUNCTION_H
547  bool append(const VectorSingle& Vec)
548  {
549  return append(Vec.deviceView(), Vec.size());
550  }*/
pFlow::Vector::read
bool read(iIstream &is)
Definition: Vector.hpp:324
pFlow::span
Definition: span.hpp:31
notImplementedFunction
#define notImplementedFunction
Report that a function is yet not implemented.
Definition: error.hpp:84
pFlow::VectorSingle< word, HostSpace >::data
INLINE_FUNCTION_H pointer data()
Definition: wordVectorHost.hpp:406
pFlow::VectorSingle< word, HostSpace >::fill
INLINE_FUNCTION_H void fill(rangeU32 r, const word &val)
Definition: wordVectorHost.hpp:298
pFlow::VectorSingle< word, HostSpace >::VectorField
INLINE_FUNCTION_H VectorType & VectorField()
Return *this.
Definition: wordVectorHost.hpp:169
pFlow::VectorSingle< word, HostSpace >::const_pointer
const word * const_pointer
Definition: wordVectorHost.hpp:53
pFlow::VectorSingle< word, HostSpace >
Definition: wordVectorHost.hpp:31
pFlow::VectorSingle< word, HostSpace >::empty
INLINE_FUNCTION_H bool empty() const
If vector is empty.
Definition: wordVectorHost.hpp:246
pFlow::VectorSingle< word, HostSpace >::execution_space
typename viewType::execution_space execution_space
Definition: wordVectorHost.hpp:63
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::VectorSingle< word, HostSpace >::VectorField
const INLINE_FUNCTION_H VectorType & VectorField() const
Return *this.
Definition: wordVectorHost.hpp:176
pFlow::VectorSingle< word, HostSpace >::read
FUNCTION_H bool read(iIstream &is, const IOPattern &iop)
Read vector from stream.
Definition: wordVectorHost.hpp:456
pFlow::VectorSingle::VectorSingle
VectorSingle()
Empty vector.
Definition: VectorSingle.cpp:95
pFlow::VectorSingle< word, HostSpace >::begin
auto begin()
Return begin iterator. It works when devices is host accessible.
Definition: wordVectorHost.hpp:417
pFlow::VectorSingle< word, HostSpace >::getSpan
INLINE_FUNCTION_H auto getSpan() const
Definition: wordVectorHost.hpp:370
pFlow::Range::end
INLINE_FUNCTION_HD T & end()
End.
Definition: Range.hpp:101
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, const std::vector< word > &src, uint32 cap)
Construct with a name and form std::vector (host memory) and with a desired capacity.
Definition: wordVectorHost.hpp:128
pFlow::VectorSingle< word, HostSpace >::assign
INLINE_FUNCTION_H void assign(const VectorType &src, bool srcCapacity=true)
Definition: wordVectorHost.hpp:340
pFlow::Vector::reserve
void reserve(size_t cap)
Reserve capacity for vector Preserve the content.
Definition: Vector.hpp:284
pFlow::VectorSingle< word, HostSpace >::end
const auto end() const
Return end iterator. it works when host is accessible.
Definition: wordVectorHost.hpp:432
pFlow::VectorSingle< word, HostSpace >::capacity
INLINE_FUNCTION_H uint32 capacity() const
Definition: wordVectorHost.hpp:239
pFlow::VectorSingle< word, HostSpace >::reserve
INLINE_FUNCTION_H void reserve(uint32 cap)
Reserve capacity for vector Preserve the content.
Definition: wordVectorHost.hpp:255
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, const std::vector< word > &src)
Construct with a name and form std::vector (host memory)
Definition: wordVectorHost.hpp:122
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::Range::start
INLINE_FUNCTION_HD T & start()
Start.
Definition: Range.hpp:94
pFlow::VectorSingle< word, HostSpace >::resize
INLINE_FUNCTION_H void resize(uint32 n)
Reallocate memory to new cap and set size to 0.
Definition: wordVectorHost.hpp:271
pFlow::VectorSingle< word, HostSpace >::write
FUNCTION_H bool write(iOstream &os) const
Definition: wordVectorHost.hpp:469
pFlow::VectorSingle< word, HostSpace >::size
INLINE_FUNCTION_H uint32 size() const
Size of the vector.
Definition: wordVectorHost.hpp:231
pFlow::Vector::size
auto size() const
Size of the vector.
Definition: Vector.hpp:265
pFlow::VectorSingle< word, HostSpace >::assign
INLINE_FUNCTION_H void assign(const std::vector< word > &src, uint32 cap)
Assign source vector with specified capacity.
Definition: wordVectorHost.hpp:313
pFlow::VectorSingle< word, HostSpace >::begin
const auto begin() const
Return begin iterator. it works when host is accessible.
Definition: wordVectorHost.hpp:423
pFlow::VectorSingle< word, HostSpace >::assignFromDevice
INLINE_FUNCTION_H void assignFromDevice(const VectorSingle< word, MSpace > &src, bool srcCapacity=true)
Definition: wordVectorHost.hpp:348
pFlow::VectorSingle< word, HostSpace >::push_back
void push_back(const word &val)
push a new element at the end (host call only) resize if necessary and works on host accessible vecto...
Definition: wordVectorHost.hpp:400
pFlow::HostSpace
Kokkos::HostSpace HostSpace
Host memory space.
Definition: KokkosTypes.hpp:41
pFlow::VectorSingle< word, HostSpace >::data
INLINE_FUNCTION_H const_pointer data() const
Definition: wordVectorHost.hpp:411
pFlow
Definition: demGeometry.hpp:27
pFlow::VectorSingle< word, HostSpace >::viewType
ViewType1D< word, HostSpace > viewType
Definition: wordVectorHost.hpp:57
pFlow::VectorSingle< word, HostSpace >::deviceViewAll
INLINE_FUNCTION_H auto & deviceViewAll()
Device view range [0,capcity)
Definition: wordVectorHost.hpp:183
pFlow::VectorSingle< word, HostSpace >::device_type
typename viewType::device_type device_type
Definition: wordVectorHost.hpp:59
FUNCTION_H
#define FUNCTION_H
Definition: pFlowMacros.hpp:62
pFlow::VectorSingle::name
INLINE_FUNCTION_H word name() const
Name of the vector.
Definition: VectorSingle.cpp:290
pFlow::VectorSingle< word, HostSpace >::operator[]
const word & operator[](size_t i) const
Definition: wordVectorHost.hpp:441
RESERVE
Definition: Vector.hpp:40
pFlow::VectorSingle< word, HostSpace >::iterator
word * iterator
Definition: wordVectorHost.hpp:41
pFlow::VectorSingle< word, HostSpace >::memory_space
typename viewType::memory_space memory_space
Definition: wordVectorHost.hpp:61
pFlow::VectorSingle< word, HostSpace >::value_type
word value_type
Definition: wordVectorHost.hpp:49
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::VectorSingle::~VectorSingle
~VectorSingle()
Descructor This may not destroy the underlying memory, sice view is shared_ptr and maybe referenced b...
Definition: VectorSingle.cpp:216
pFlow::VectorSingle< word, HostSpace >::clone
INLINE_FUNCTION_H uniquePtr< VectorSingle > clone() const
Clone as a uniquePtr (perform deep copy)
Definition: wordVectorHost.hpp:159
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name)
Empty vector with a name (capacity = 2)
Definition: wordVectorHost.hpp:98
pFlow::Vector::capacity
auto capacity() const
Capacity of the vector.
Definition: Vector.hpp:271
VectorSingle.hpp
pFlow::VectorSingle< word, HostSpace >::resize
INLINE_FUNCTION_H void resize(uint32 n, const word &val)
Resize the vector and assign the value to it.
Definition: wordVectorHost.hpp:278
pFlow::VectorSingle::TypeInfoTemplateNV111
TypeInfoTemplateNV111("VectorSingle", T, memoerySpaceName())
Type info.
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, const VectorSingle &src)
Copy construct with a new name (perform deep copy)
Definition: wordVectorHost.hpp:137
pFlow::operator>>
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
Definition: AdamsBashforth3.hpp:41
pFlow::IOPattern
Definition: IOPattern.hpp:32
pFlow::VectorSingle< word, HostSpace >::reorderItems
INLINE_FUNCTION_H bool reorderItems(const uint32IndexContainer &indices)
Definition: wordVectorHost.hpp:391
INLINE_FUNCTION_H
#define INLINE_FUNCTION_H
Definition: pFlowMacros.hpp:57
pFlow::VectorSingle< word, HostSpace >::deviceViewAll
const INLINE_FUNCTION_H auto & deviceViewAll() const
Device view range [0,capcity)
Definition: wordVectorHost.hpp:192
pFlow::operator<<
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
Definition: AdamsBashforth3.hpp:57
pFlow::VectorSingle< word, HostSpace >::name
INLINE_FUNCTION_H word name() const
Name of the vector.
Definition: wordVectorHost.hpp:223
pFlow::VectorSingle
Definition: VectorSingle.hpp:44
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, uint32 n, const word &val)
Vector with name, size and value.
Definition: wordVectorHost.hpp:110
pFlow::VectorSingle< word, HostSpace >::getSpan
INLINE_FUNCTION_H auto getSpan()
Definition: wordVectorHost.hpp:364
pFlow::Range< uint32 >
pFlow::IOstream::name
virtual const word & name() const
Return the name of the stream.
Definition: IOstream.cpp:31
pFlow::VectorSingle::isDeviceAccessible_
static constexpr bool isDeviceAccessible_
Is the memory of this vector accessiple from Divce.
Definition: VectorSingle.hpp:96
pFlow::ViewType1D
Kokkos::View< T *, properties... > ViewType1D
1D veiw as a vector
Definition: KokkosTypes.hpp:93
pFlow::VectorSingle< word, HostSpace >::pointer
word * pointer
Definition: wordVectorHost.hpp:51
n
uint32 n
Definition: NBSLoop.hpp:24
pFlow::Vector::write
bool write(iOstream &os) const
Definition: Vector.hpp:328
pFlow::VectorSingle< word, HostSpace >::operator[]
word & operator[](size_t i)
Return reference to element i. it works when host is accessible.
Definition: wordVectorHost.hpp:437
pFlow::VectorSingle< word, HostSpace >::reference
word & reference
Definition: wordVectorHost.hpp:45
pFlow::VectorSingle< word, HostSpace >::assign
INLINE_FUNCTION_H void assign(size_t n, const word &val)
Change size of the vector and assign val to vector and.
Definition: wordVectorHost.hpp:305
pFlow::VectorSingle::memoerySpaceName
static constexpr const char * memoerySpaceName()
Name of the memory space.
Definition: VectorSingle.hpp:469
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::VectorSingle::assign
INLINE_FUNCTION_H void assign(size_t n, const T &val)
Change size of the vector and assign val to vector and.
Definition: VectorSingle.cpp:386
pFlow::VectorSingle< word, HostSpace >::deviceView
INLINE_FUNCTION_H auto deviceView() const
Device view range [0, size)
Definition: wordVectorHost.hpp:201
pFlow::VectorSingle< word, HostSpace >::end
auto end()
Definition: wordVectorHost.hpp:427
pFlow::Vector::name
const word & name() const
Name of the vector.
Definition: Vector.hpp:259
pFlow::VectorSingle< word, HostSpace >::hostView
INLINE_FUNCTION_H auto hostView() const
Return a view accessible on Host in range [0,size)
Definition: wordVectorHost.hpp:216
pFlow::VectorSingle< word, HostSpace >::clear
INLINE_FUNCTION_H void clear()
Clear the vector, but keep the allocated memory unchanged.
Definition: wordVectorHost.hpp:285
ioErrorInFile
#define ioErrorInFile(fileName, lineNumber)
Report an error in file operation with supplied fileName and lineNumber.
Definition: error.hpp:87
pFlow::Vector::fill
void fill(const T &val)
Definition: VectorI.hpp:23
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, uint32 cap, uint32 n, const RESERVE &r)
Vector with name, size (n) and reserved capacity.
Definition: wordVectorHost.hpp:116
pFlow::IOstream::lineNumber
int32 lineNumber() const
Const access to the current stream line number.
Definition: IOstream.hpp:223
pFlow::VectorSingle< word, HostSpace >::const_iterator
const word * const_iterator
Definition: wordVectorHost.hpp:43
pFlow::VectorSingle< word, HostSpace >::memoerySpaceName
static constexpr const char * memoerySpaceName()
Name of the memory space.
Definition: wordVectorHost.hpp:485
pFlow::VectorSingle< word, HostSpace >::write
FUNCTION_H bool write(iOstream &os, const IOPattern &iop, const HostMask &mask) const
Definition: wordVectorHost.hpp:476
pFlow::VectorSingle< word, HostSpace >::const_reference
const word & const_reference
Definition: wordVectorHost.hpp:47
pFlow::VectorSingle::isHostAccessible_
static constexpr bool isHostAccessible_
Is the memory of this vector accessible from Host.
Definition: VectorSingle.hpp:92
pFlow::Vector< word >
pFlow::VectorSingle::operator=
VectorSingle & operator=(const VectorSingle &rhs)
Copy assignment (perform deep copy from rhs to *this)
Definition: VectorSingle.cpp:204
pFlow::VectorSingle< word, HostSpace >::container_
Vector< word > container_
Definition: wordVectorHost.hpp:69
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::VectorSingle< word, HostSpace >::assign
INLINE_FUNCTION_H void assign(const std::vector< word > &src)
Assign source vector.
Definition: wordVectorHost.hpp:324
pFlow::VectorSingle::isTriviallyCopyable_
static constexpr bool isTriviallyCopyable_
Definition: VectorSingle.hpp:99
pFlow::VectorSingle< word, HostSpace >::assignFromHost
INLINE_FUNCTION_H void assignFromHost(const VectorTypeHost &src)
Assign source vector from host side.
Definition: wordVectorHost.hpp:333
pFlow::VectorSingle::insertSetElement
INLINE_FUNCTION_H bool insertSetElement(const uint32IndexContainer &indices, const T &val)
Definition: VectorSingle.cpp:583
pFlow::VectorSingle< word, HostSpace >::fill
INLINE_FUNCTION_H void fill(const word &val)
Fill the range [0,size) with val.
Definition: wordVectorHost.hpp:292
Vector.hpp
pFlow::indexContainer
It holds two vectors of indecis on Host and Device.
Definition: indexContainer.hpp:39
pFlow::VectorSingle< word, HostSpace >::unManagedView_
viewType unManagedView_
Definition: wordVectorHost.hpp:71
pFlow::VectorSingle< word, HostSpace >::write
FUNCTION_H bool write(iOstream &os, const IOPattern &iop) const
Write the vector to os.
Definition: wordVectorHost.hpp:463
pFlow::VectorSingle< word, HostSpace >::VectorSingle
VectorSingle(const word &name, uint32 n)
Vector with name and size n.
Definition: wordVectorHost.hpp:104
pFlow::VectorSingle::viewType
ViewType1D< T, MemorySpace > viewType
Definition: VectorSingle.hpp:70
pFlow::VectorSingle< word, HostSpace >::read
FUNCTION_H bool read(iIstream &is)
Read vector from stream.
Definition: wordVectorHost.hpp:449
pFlow::VectorSingle< word, HostSpace >::hostViewAll
INLINE_FUNCTION_H auto hostViewAll() const
Return a view accessible on Host in range [0,capacity)
Definition: wordVectorHost.hpp:208