cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::rtc::compilation_options_base_t< Kind > Struct Template Reference

Compilation options common to all kinds of JIT-compilable programs. More...

#include <compilation_options.hpp>

Collaboration diagram for cuda::rtc::compilation_options_base_t< Kind >:

Public Types

template<typename T >
using optional = cuda::optional< T >
 

Public Member Functions

compilation_options_base_tadd_target (device::compute_capability_t compute_capability)
 Have the compilation also target a specific compute capability. More...
 
compilation_options_base_tset_target (device::compute_capability_t compute_capability)
 Have the compilation target one one specific compute capability. More...
 
compilation_options_base_tset_target (device_t device)
 

Public Attributes

::std::unordered_set< cuda::device::compute_capability_ttargets_
 Target devices in terms of CUDA compute capability. More...
 

Detailed Description

template<source_kind_t Kind>
struct cuda::rtc::compilation_options_base_t< Kind >

Compilation options common to all kinds of JIT-compilable programs.

Member Function Documentation

◆ add_target()

template<source_kind_t Kind>
compilation_options_base_t& cuda::rtc::compilation_options_base_t< Kind >::add_target ( device::compute_capability_t  compute_capability)
inline

Have the compilation also target a specific compute capability.

Note
previously-specified compute capabilities will be targeted in addition to the one specified.

◆ set_target()

template<source_kind_t Kind>
compilation_options_base_t& cuda::rtc::compilation_options_base_t< Kind >::set_target ( device::compute_capability_t  compute_capability)
inline

Have the compilation target one one specific compute capability.

Note
any previous target settings are dropped, i.e. no other compute capability will be targeted.

Member Data Documentation

◆ targets_

template<source_kind_t Kind>
::std::unordered_set<cuda::device::compute_capability_t> cuda::rtc::compilation_options_base_t< Kind >::targets_

Target devices in terms of CUDA compute capability.

Note
Given a compute capability X.Y, the compilation API call will be passed "sm_XY", not "compute_XY". The distinction between the two is not currently supported.
Not all compute capabilities are supported! As of CUDA 11.0, the minimum supported compute capability is 3.5 .
As of CUDA 11.0, the default is compute_52.
Todo:
Use something less fancy than ::std::unordered_set, e.g. a vector-backed ordered set or a dynamic bit-vector for membership.

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