Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Fatras
Plugins
ActSVG
Autodiff
Cuda
include
Acts
Plugins
Cuda
Seeding
Seeding2
Utilities
Arrays.hpp
CpuMatrix.hpp
CpuScalar.hpp
CpuVector.hpp
Info.hpp
MemoryManager.hpp
StreamWrapper.hpp
Cuda.hpp
src
DD4hep
EDM4hep
ExaTrkX
FpeMonitoring
Geant4
Identification
Json
Legacy
Mlpack
Onnx
Podio
Sycl
TGeo
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Arrays.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Arrays.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2020 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
// CUDA plugin include(s).
12
#include "
Acts/Plugins/Cuda/Utilities/StreamWrapper.hpp
"
13
14
// System include(s).
15
#include <cstddef>
16
#include <memory>
17
18
namespace
Acts {
19
namespace
Cuda {
20
23
namespace
Details {
24
26
class
DeviceArrayDeleter
{
27
public
:
29
void
operator()
(
void
* ptr);
30
31
};
// class DeviceArrayDeleter
32
34
class
HostArrayDeleter
{
35
public
:
37
void
operator()
(
void
* ptr);
38
39
};
// class HostArrayDeleter
40
41
}
// namespace Details
42
44
template
<
typename
T>
45
using
device_array
= std::unique_ptr<T, Details::DeviceArrayDeleter>;
46
48
template
<
typename
T>
49
device_array<T>
make_device_array
(std::size_t
size
);
50
52
template
<
typename
T>
53
using
host_array
= std::unique_ptr<T, Details::HostArrayDeleter>;
54
56
template
<
typename
T>
57
host_array<T>
make_host_array
(std::size_t
size
);
58
60
template
<
typename
T>
61
void
copyToDevice
(
device_array<T>
& dev,
const
host_array<T>
& host,
62
std::size_t
arraySize
);
63
65
template
<
typename
T>
66
void
copyToDevice
(
device_array<T>
& dev,
const
host_array<T>
& host,
67
std::size_t
arraySize
,
const
StreamWrapper
& stream);
68
70
template
<
typename
T>
71
void
copyToHost
(
host_array<T>
& host,
const
device_array<T>
& dev,
72
std::size_t
arraySize
);
73
75
template
<
typename
T>
76
void
copyToHost
(
host_array<T>
& host,
const
device_array<T>
& dev,
77
std::size_t
arraySize
,
const
StreamWrapper
& stream);
78
79
}
// namespace Cuda
80
}
// namespace Acts
acts
blob
sPHENIX
Plugins
Cuda
include
Acts
Plugins
Cuda
Utilities
Arrays.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:41
using
1.8.2 with
sPHENIX GitHub integration