Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Buffers.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * Jonas Rembser, CERN 11/2021
5 *
6 * Copyright (c) 2021, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef RooFit_Detail_Buffers_h
14#define RooFit_Detail_Buffers_h
15
17
18namespace ROOT {
19namespace Experimental {
20namespace Detail {
21
22class AbsBuffer {
23public:
24 virtual ~AbsBuffer() = default;
25
26 virtual double const *cpuReadPtr() const = 0;
27 virtual double const *gpuReadPtr() const = 0;
28
29 virtual double *cpuWritePtr() = 0;
30 virtual double *gpuWritePtr() = 0;
31};
32
33struct BufferQueuesMaps;
34
36
37public:
40
42 AbsBuffer *makeCpuBuffer(std::size_t size);
43 AbsBuffer *makeGpuBuffer(std::size_t size);
44 AbsBuffer *makePinnedBuffer(std::size_t size, cudaStream_t *stream = nullptr);
45
46private:
48};
49
50} // end namespace Detail
51} // end namespace Experimental
52} // end namespace ROOT
53
54#endif
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
virtual double const * gpuReadPtr() const =0
virtual double const * cpuReadPtr() const =0
AbsBuffer * makeCpuBuffer(std::size_t size)
Definition Buffers.cxx:241
AbsBuffer * makePinnedBuffer(std::size_t size, cudaStream_t *stream=nullptr)
Definition Buffers.cxx:249
AbsBuffer * makeGpuBuffer(std::size_t size)
Definition Buffers.cxx:245
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.