Cutlass
CUDA Templates for Linear Algebra Subroutines and Solvers
Classes | Namespaces | Macros | Typedefs | Functions
nv_std.h File Reference

C++ features that may be otherwise unimplemented for CUDA device functions. More...

#include <stdint.h>
#include <algorithm>
#include <cstddef>
#include <functional>
#include <utility>
#include <cutlass/cutlass.h>

Go to the source code of this file.

Classes

struct  nv_std::plus< T >
 nv_std::plus More...
 
struct  nv_std::less< T >
 std::less More...
 
struct  nv_std::greater< T >
 std::greater More...
 
struct  nv_std::integral_constant< value_t, V >
 std::integral_constant More...
 
struct  nv_std::integral_constant< value_t, V >
 std::integral_constant More...
 
struct  nv_std::bool_constant< V >
 std::bool_constant More...
 
struct  nv_std::nullptr_t
 std::nullptr_t More...
 
struct  nv_std::enable_if< C, T >
 std::enable_if (true specialization) More...
 
struct  nv_std::enable_if< false, T >
 std::enable_if (false specialization) More...
 
struct  nv_std::conditional< B, T, F >
 std::conditional (true specialization) More...
 
struct  nv_std::conditional< false, T, F >
 std::conditional (false specialization) More...
 
struct  nv_std::remove_const< T >
 std::remove_const (non-const specialization) More...
 
struct  nv_std::remove_const< const T >
 std::remove_const (const specialization) More...
 
struct  nv_std::remove_volatile< T >
 std::remove_volatile (non-volatile specialization) More...
 
struct  nv_std::remove_volatile< volatile T >
 std::remove_volatile (volatile specialization) More...
 
struct  nv_std::remove_cv< T >
 std::remove_cv More...
 
struct  nv_std::is_same< A, B >
 std::is_same (false specialization) More...
 
struct  nv_std::is_same< A, A >
 std::is_same (true specialization) More...
 
struct  nv_std::is_base_of_helper< BaseT, DerivedT >
 Helper for std::is_base_of. More...
 
struct  nv_std::is_base_of_helper< BaseT, DerivedT >::dummy< B, D >
 
struct  nv_std::is_base_of< BaseT, DerivedT >
 std::is_base_of More...
 
struct  nv_std::is_volatile< T >
 std::is_volatile More...
 
struct  nv_std::is_volatile< volatile T >
 
struct  nv_std::is_pointer_helper< T >
 Helper for std::is_pointer (false specialization) More...
 
struct  nv_std::is_pointer_helper< T * >
 Helper for std::is_pointer (true specialization) More...
 
struct  nv_std::is_pointer< T >
 std::is_pointer More...
 
struct  nv_std::is_void< T >
 std::is_void More...
 
struct  nv_std::is_integral< T >
 std::is_integral More...
 
struct  nv_std::is_integral< char >
 
struct  nv_std::is_integral< signed char >
 
struct  nv_std::is_integral< unsigned char >
 
struct  nv_std::is_integral< short >
 
struct  nv_std::is_integral< unsigned short >
 
struct  nv_std::is_integral< int >
 
struct  nv_std::is_integral< unsigned int >
 
struct  nv_std::is_integral< long >
 
struct  nv_std::is_integral< unsigned long >
 
struct  nv_std::is_integral< long long >
 
struct  nv_std::is_integral< unsigned long long >
 
struct  nv_std::is_integral< volatile T >
 
struct  nv_std::is_integral< const T >
 
struct  nv_std::is_integral< const volatile T >
 
struct  nv_std::is_floating_point< T >
 std::is_floating_point More...
 
struct  nv_std::is_arithmetic< T >
 std::is_arithmetic More...
 
struct  nv_std::is_fundamental< T >
 std::is_fundamental More...
 
struct  nv_std::is_trivially_copyable< T >
 
struct  nv_std::alignment_of< value_t >
 std::alignment_of More...
 
struct  nv_std::alignment_of< value_t >::pad
 
struct  nv_std::alignment_of< int4 >
 
struct  nv_std::alignment_of< uint4 >
 
struct  nv_std::alignment_of< float4 >
 
struct  nv_std::alignment_of< long4 >
 
struct  nv_std::alignment_of< ulong4 >
 
struct  nv_std::alignment_of< longlong2 >
 
struct  nv_std::alignment_of< ulonglong2 >
 
struct  nv_std::alignment_of< double2 >
 
struct  nv_std::alignment_of< longlong4 >
 
struct  nv_std::alignment_of< ulonglong4 >
 
struct  nv_std::alignment_of< double4 >
 
struct  nv_std::alignment_of< volatile value_t >
 
struct  nv_std::alignment_of< const value_t >
 
struct  nv_std::alignment_of< const volatile value_t >
 
struct  nv_std::aligned_chunk< Align >
 
struct  nv_std::aligned_storage< Len, Align >
 std::aligned_storage More...
 
struct  nv_std::default_delete< T >
 Default deleter. More...
 
struct  nv_std::default_delete< T[]>
 Partial specialization for deleting array types. More...
 
class  nv_std::unique_ptr< T, Deleter >
 std::unique_ptr More...
 

Namespaces

 nv_std
 

Macros

#define noexcept
 noexcept, constexpr More...
 
#define constexpr
 
#define nullptr   0
 nullptr More...
 
#define __nv_std_cat_(a, b)   a##b
 static_assert More...
 
#define __nv_std_cat(a, b)   __nv_std_cat_(a, b)
 
#define static_assert(__e, __m)   typedef int __nv_std_cat(AsSeRt, __LINE__)[(__e) ? 1 : -1]
 
#define __NV_STD_MAX(a, b)   (((b) > (a)) ? (b) : (a))
 Select maximum(a, b) More...
 
#define __NV_STD_MIN(a, b)   (((b) < (a)) ? (b) : (a))
 Select minimum(a, b) More...
 

Typedefs

typedef integral_constant< bool, true > nv_std::true_type
 The type used as a compile-time boolean with true value. More...
 
typedef integral_constant< bool, false > nv_std::false_type
 The type used as a compile-time boolean with false value. More...
 

Functions

template<typename T >
CUTLASS_HOST_DEVICE constexpr const T & nv_std::min (const T &a, const T &b)
 std::min More...
 
template<typename T >
CUTLASS_HOST_DEVICE constexpr const T & nv_std::max (const T &a, const T &b)
 std::max More...
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator== (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator!= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator< (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator<= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator> (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool nv_std::operator>= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE std::pair< T1, T2 > nv_std::make_pair (T1 t, T2 u)
 
template<>
struct nv_std::__align__ (1) aligned_chunk< 1 >
 
template<>
struct nv_std::__align__ (2) aligned_chunk< 2 >
 
template<>
struct nv_std::__align__ (4) aligned_chunk< 4 >
 
template<>
struct nv_std::__align__ (8) aligned_chunk< 8 >
 
template<>
struct nv_std::__align__ (16) aligned_chunk< 16 >
 
template<>
struct nv_std::__align__ (32) aligned_chunk< 32 >
 
template<>
struct nv_std::__align__ (64) aligned_chunk< 64 >
 
template<>
struct nv_std::__align__ (128) aligned_chunk< 128 >
 
template<>
struct nv_std::__align__ (256) aligned_chunk< 256 >
 
template<>
struct nv_std::__align__ (512) aligned_chunk< 512 >
 
template<>
struct nv_std::__align__ (1024) aligned_chunk< 1024 >
 
template<>
struct nv_std::__align__ (2048) aligned_chunk< 2048 >
 
template<>
struct nv_std::__align__ (4096) aligned_chunk< 4096 >
 
template<typename T , typename Deleter >
void nv_std::swap (unique_ptr< T, Deleter > &lhs, unique_ptr< T, Deleter > &rhs) noexcept
 Specializes the swap algorithm. More...
 

Detailed Description

This file has three components:

(1) Macros:

(2) Re-implementations of STL functions and types:

(3) Stop-gap implementations of unsupported STL functions and types:

(4) Functions and types that are STL-like (but aren't in the STL):

The idea is that, as we drop support for older compilers, we can simply #define the __NV_STD_XYZ macros and nv_std namespace to alias their C++ counterparts (or trivially find-and-replace their occurrences in code text).

Macro Definition Documentation

◆ __nv_std_cat

#define __nv_std_cat (   a,
 
)    __nv_std_cat_(a, b)

◆ __nv_std_cat_

#define __nv_std_cat_ (   a,
 
)    a##b

◆ __NV_STD_MAX

#define __NV_STD_MAX (   a,
 
)    (((b) > (a)) ? (b) : (a))

◆ __NV_STD_MIN

#define __NV_STD_MIN (   a,
 
)    (((b) < (a)) ? (b) : (a))

◆ constexpr

#define constexpr

◆ noexcept

#define noexcept

◆ nullptr

#define nullptr   0

◆ static_assert

#define static_assert (   __e,
  __m 
)    typedef int __nv_std_cat(AsSeRt, __LINE__)[(__e) ? 1 : -1]