Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
VectorAccessor.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7
8
9#pragma once
10
11#include <vector>
12#include <span>
13
14#include <alien/data/IVector.h>
15
16namespace Alien
17{
18 class Timestamp ;
19
20 class SYCLParallelEngine ;
21
23
24 namespace SYCL
25 {
26
27 template <typename ValueT>
28 class VectorAccessorT
29 {
30 public:
31 typedef ValueT ValueType;
32
33 class Impl ;
34
35 class View ;
36
37 class ConstView ;
38
39 class HostView ;
40
41 public:
42 VectorAccessorT(IVector& vector, bool update = true);
43
44 virtual ~VectorAccessorT() { end(); }
45
46 void end();
47
48 View view(SYCLControlGroupHandler& cgh) ;
49
50 ConstView constView(SYCLControlGroupHandler& cgh) const ;
51
52 HostView hostView() const ;
53
54
55
56
57 protected:
58 Timestamp* m_time_stamp;
59 Integer m_local_offset;
60 Impl* m_impl = nullptr;
61 bool m_finalized;
62 };
63
64 }
65}
IVector.h.
Interface for all vectors.
Definition IVector.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17