Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::CudaInterface::Array< Data_t, Memory_t > Class Template Reference

template<class Data_t, class Memory_t>
class RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >

A templated class for managing an array of data using a specified memory type.

The Array class provides a convenient interface for managing an array of data using different memory types (e.g., memory on the host or device). The memory is automatically freed at the end of the lifetime.

Template Parameters
Data_tThe type of data elements to be stored in the array.
Memory_tThe type of memory that provides storage for the array.

Definition at line 169 of file CudaInterface.h.

Public Member Functions

 Array (std::size_t n)
 Constructor to create an Array object with a specified size.
 
Data_t * data ()
 Get a pointer to the start of the array.
 
Data_t const * data () const
 Get a const pointer to the start of the array.
 
std::size_t size () const
 Get the size of the array.
 

#include </home/sftnight/build/workspace/root-makedoc-v632/rootspi/rdoc/src/v6-32-00-patches/roofit/batchcompute/src/CudaInterface.h>

Inheritance diagram for RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >:
[legend]

Constructor & Destructor Documentation

◆ Array()

template<class Data_t , class Memory_t >
RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >::Array ( std::size_t  n)
inline

Constructor to create an Array object with a specified size.

Parameters
nThe size of the array (number of elements).

Definition at line 175 of file CudaInterface.h.

Member Function Documentation

◆ data() [1/2]

template<class Data_t , class Memory_t >
Data_t * RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >::data ( )
inline

Get a pointer to the start of the array.

Returns
A pointer to the start of the array.

This function returns a pointer to the underlying memory. It allows direct manipulation of array elements.

Definition at line 193 of file CudaInterface.h.

◆ data() [2/2]

template<class Data_t , class Memory_t >
Data_t const * RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >::data ( ) const
inline

Get a const pointer to the start of the array.

Returns
A const pointer to the start of the array.

This function returns a const pointer to the underlying memory. It allows read-only access to array elements.

Definition at line 202 of file CudaInterface.h.

◆ size()

template<class Data_t , class Memory_t >
std::size_t RooBatchCompute::CudaInterface::Array< Data_t, Memory_t >::size ( ) const
inline

Get the size of the array.

Returns
The size of the array (number of elements).

This function returns the number of elements in the array.

Definition at line 184 of file CudaInterface.h.

  • roofit/batchcompute/src/CudaInterface.h