CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Classes | Namespaces | Macros | Typedefs | Functions
platform.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"
Include dependency graph for platform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 cutlass
 
 cutlass::platform
 

Macros

#define noexcept
 noexcept, constexpr More...
 
#define constexpr
 
#define nullptr   0
 nullptr More...
 
#define __platform_cat_(a, b)   a##b
 static_assert More...
 
#define __platform_cat(a, b)   __platform_cat_(a, b)
 
#define static_assert(__e, __m)   typedef int __platform_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 > cutlass::platform::true_type
 The type used as a compile-time boolean with true value. More...
 
typedef integral_constant< bool, false > cutlass::platform::false_type
 The type used as a compile-time boolean with false value. More...
 

Functions

template<typename T >
CUTLASS_HOST_DEVICE constexpr const T & cutlass::platform::min (const T &a, const T &b)
 std::min More...
 
template<typename T >
CUTLASS_HOST_DEVICE constexpr const T & cutlass::platform::max (const T &a, const T &b)
 std::max More...
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator== (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator!= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator< (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator<= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator> (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE constexpr bool cutlass::platform::operator>= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
 
template<class T1 , class T2 >
CUTLASS_HOST_DEVICE std::pair< T1, T2 > cutlass::platform::make_pair (T1 t, T2 u)
 
template<>
struct cutlass::platform::__align__ (1) aligned_chunk< 1 >
 
template<>
struct cutlass::platform::__align__ (2) aligned_chunk< 2 >
 
template<>
struct cutlass::platform::__align__ (4) aligned_chunk< 4 >
 
template<>
struct cutlass::platform::__align__ (8) aligned_chunk< 8 >
 
template<>
struct cutlass::platform::__align__ (16) aligned_chunk< 16 >
 
template<>
struct cutlass::platform::__align__ (32) aligned_chunk< 32 >
 
template<>
struct cutlass::platform::__align__ (64) aligned_chunk< 64 >
 
template<>
struct cutlass::platform::__align__ (128) aligned_chunk< 128 >
 
template<>
struct cutlass::platform::__align__ (256) aligned_chunk< 256 >
 
template<>
struct cutlass::platform::__align__ (512) aligned_chunk< 512 >
 
template<>
struct cutlass::platform::__align__ (1024) aligned_chunk< 1024 >
 
template<>
struct cutlass::platform::__align__ (2048) aligned_chunk< 2048 >
 
template<>
struct cutlass::platform::__align__ (4096) aligned_chunk< 4096 >
 
template<typename T , typename Deleter >
void cutlass::platform::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 platform namespace to alias their C++ counterparts (or trivially find-and-replace their occurrences in code text).

Macro Definition Documentation

#define __NV_STD_MAX (   a,
 
)    (((b) > (a)) ? (b) : (a))
#define __NV_STD_MIN (   a,
 
)    (((b) < (a)) ? (b) : (a))
#define __platform_cat (   a,
 
)    __platform_cat_(a, b)
#define __platform_cat_ (   a,
 
)    a##b
#define constexpr
#define noexcept
#define nullptr   0
#define static_assert (   __e,
  __m 
)    typedef int __platform_cat(AsSeRt, __LINE__)[(__e) ? 1 : -1]