Ginkgo  Generated from pipelines/375350765 branch based on develop. Ginkgo version 1.5.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | Static Public Member Functions | List of all members
gko::CudaExecutor Class Reference

This is the Executor subclass which represents the CUDA device. More...

#include <ginkgo/core/base/executor.hpp>

Collaboration diagram for gko::CudaExecutor:
[legend]

Public Member Functions

std::shared_ptr< Executorget_master () noexcept override
 Returns the master OmpExecutor of this Executor. More...
 
std::shared_ptr< const Executorget_master () const noexcept override
 Returns the master OmpExecutor of this Executor. More...
 
void synchronize () const override
 Synchronize the operations launched on the executor with its master.
 
void run (const Operation &op) const override
 Runs the specified Operation using this Executor. More...
 
int get_device_id () const noexcept
 Get the CUDA device id of the device associated to this executor.
 
int get_num_warps_per_sm () const noexcept
 Get the number of warps per SM of this executor.
 
int get_num_multiprocessor () const noexcept
 Get the number of multiprocessor of this executor.
 
int get_num_warps () const noexcept
 Get the number of warps of this executor.
 
int get_warp_size () const noexcept
 Get the warp size of this executor.
 
int get_major_version () const noexcept
 Get the major verion of compute capability.
 
int get_minor_version () const noexcept
 Get the minor verion of compute capability.
 
cublasContext * get_cublas_handle () const
 Get the cublas handle for this executor. More...
 
cusparseContext * get_cusparse_handle () const
 Get the cusparse handle for this executor. More...
 
std::vector< int > get_closest_pus () const
 Get the closest PUs. More...
 
int get_closest_numa () const
 Get the closest NUMA node. More...
 

Static Public Member Functions

static std::shared_ptr< CudaExecutorcreate (int device_id, std::shared_ptr< Executor > master, bool device_reset=false, allocation_mode alloc_mode=default_cuda_alloc_mode)
 Creates a new CudaExecutor. More...
 
static int get_num_devices ()
 Get the number of devices present on the system.
 

Detailed Description

This is the Executor subclass which represents the CUDA device.

Member Function Documentation

◆ create()

static std::shared_ptr<CudaExecutor> gko::CudaExecutor::create ( int  device_id,
std::shared_ptr< Executor master,
bool  device_reset = false,
allocation_mode  alloc_mode = default_cuda_alloc_mode 
)
static

Creates a new CudaExecutor.

Parameters
device_idthe CUDA device id of this device
masteran executor on the host that is used to invoke the device kernels
device_resetwhether to reset the device after the object exits the scope.
alloc_modethe allocation mode that the executor should operate on. See @allocation_mode for more details

◆ get_closest_numa()

int gko::CudaExecutor::get_closest_numa ( ) const
inline

Get the closest NUMA node.

Returns
the closest NUMA node closest to this device

◆ get_closest_pus()

std::vector<int> gko::CudaExecutor::get_closest_pus ( ) const
inline

Get the closest PUs.

Returns
the array of PUs closest to this device

◆ get_cublas_handle()

cublasContext* gko::CudaExecutor::get_cublas_handle ( ) const
inline

Get the cublas handle for this executor.

Returns
the cublas handle (cublasContext*) for this executor

◆ get_cusparse_handle()

cusparseContext* gko::CudaExecutor::get_cusparse_handle ( ) const
inline

Get the cusparse handle for this executor.

Returns
the cusparse handle (cusparseContext*) for this executor

◆ get_master() [1/2]

std::shared_ptr<const Executor> gko::CudaExecutor::get_master ( ) const
overridevirtualnoexcept

Returns the master OmpExecutor of this Executor.

Returns
the master OmpExecutor of this Executor.

Implements gko::Executor.

◆ get_master() [2/2]

std::shared_ptr<Executor> gko::CudaExecutor::get_master ( )
overridevirtualnoexcept

Returns the master OmpExecutor of this Executor.

Returns
the master OmpExecutor of this Executor.

Implements gko::Executor.

◆ run()

void gko::CudaExecutor::run ( const Operation op) const
overridevirtual

Runs the specified Operation using this Executor.

Parameters
opthe operation to run

Implements gko::Executor.


The documentation for this class was generated from the following file: