100 #if !defined(__CUDACC_RTC__) 107 #include <functional> 109 #if (!defined(_MSC_VER) && (__cplusplus >= 201103L)) || (defined(_MSC_VER) && (_MS_VER >= 1500)) 110 #include <type_traits> 124 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1900)) 134 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1310)) 141 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1600)) 142 #ifndef static_assert 143 #define __nv_std_cat_(a, b) a##b 144 #define __nv_std_cat(a, b) __nv_std_cat_(a, b) 145 #define static_assert(__e, __m) typedef int __nv_std_cat(AsSeRt, __LINE__)[(__e) ? 1 : -1] 155 #define __NV_STD_MAX(a, b) (((b) > (a)) ? (b) : (a)) 160 #define __NV_STD_MIN(a, b) (((b) < (a)) ? (b) : (a)) 174 template <
typename T>
180 template <
typename T>
188 template <
typename T>
200 template <
typename T>
202 return (b < a) ? b : a;
206 template <
typename T>
208 return (a < b) ? b : a;
211 #if !defined(__CUDACC_RTC__) 218 template <
class T1,
class T2>
220 return (lhs.first == rhs.first) && (lhs.second == rhs.second);
223 template <
class T1,
class T2>
225 return (lhs.first != rhs.first) && (lhs.second != rhs.second);
228 template <
class T1,
class T2>
230 return (lhs.first < rhs.first) ? true : (rhs.first < lhs.first) ?
false 231 : (lhs.second < rhs.second);
234 template <
class T1,
class T2>
239 template <
class T1,
class T2>
244 template <
class T1,
class T2>
249 template <
class T1,
class T2>
251 std::pair<T1, T2> retval;
270 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500)) 273 template <
typename value_t, value_t V>
277 template <
typename value_t, value_t V>
291 using std::integral_constant;
302 #if (!defined(_MSC_VER) && (__cplusplus < 201402L)) || (defined(_MSC_VER) && (_MSC_VER < 1900)) 310 using std::bool_constant;
314 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1700)) 321 using std::nullptr_t;
329 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1600)) 332 template <
bool C,
typename T =
void>
338 template <
typename T>
342 template <
bool B,
class T,
class F>
348 template <
class T,
class F>
355 using std::enable_if;
356 using std::conditional;
364 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500)) 367 template <
typename T>
373 template <
typename T>
379 template <
typename T>
385 template <
typename T>
391 template <
typename T>
398 using std::remove_const;
399 using std::remove_volatile;
400 using std::remove_cv;
408 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500)) 411 template <
typename A,
typename B>
415 template <
typename A>
419 template <
typename BaseT,
typename DerivedT>
422 typedef char (&
no)[2];
424 template <
typename B,
typename D>
430 template <
typename T>
439 template <
typename BaseT,
typename DerivedT>
442 typename remove_cv<DerivedT>::type>::value) ||
443 (is_same<typename remove_cv<BaseT>::type,
444 typename remove_cv<DerivedT>::type>::value)> {};
449 using std::is_base_of;
457 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500)) 460 template <
typename T>
462 template <
typename T>
466 template <
typename T>
470 template <
typename T>
474 template <
typename T>
478 template <
typename T>
482 template <
typename T>
506 template <
typename T>
508 template <
typename T>
510 template <
typename T>
514 template <
typename T>
517 is_same<double, typename remove_cv<T>::type>::value)> {};
520 template <
typename T>
522 :
integral_constant<bool, (is_integral<T>::value || is_floating_point<T>::value)> {};
525 template <
typename T>
528 is_same<nullptr_t, typename remove_cv<T>::type>::value)> {};
532 using std::is_volatile;
533 using std::is_pointer;
535 using std::is_integral;
536 using std::is_floating_point;
537 using std::is_arithmetic;
538 using std::is_fundamental;
542 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1800)) || \ 543 (defined(__GNUG__) && (__GNUC__ < 5)) 555 template <
typename T>
557 :
integral_constant<bool, (is_fundamental<T>::value || is_pointer<T>::value)> {};
561 using std::is_trivially_copyable;
569 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500)) 572 template <
typename value_t>
584 template <
typename value_t>
585 struct alignment_of : std::alignment_of<value_t> {};
636 template <
typename value_t>
638 template <
typename value_t>
640 template <
typename value_t>
643 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1800)) 645 template <
size_t Align>
701 template <
size_t Len,
size_t Align>
708 using std::aligned_storage;
712 #if !defined(__CUDACC_RTC__) 713 template <
typename T>
720 template <
typename T>
726 template <
class T,
class Deleter = nv_std::default_delete<T> >
763 if (old_ptr !=
nullptr) {
778 operator bool() const
noexcept {
return _ptr !=
nullptr; }
791 template <
typename T,
typename Deleter>
std::unique_ptr
Definition: nv_std.h:727
void reset(pointer p=pointer()) noexcept
Replaces the managed object, deleting the old object.
Definition: nv_std.h:760
static const bool value
Definition: nv_std.h:435
CUTLASS_HOST_DEVICE constexpr bool operator>(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Definition: nv_std.h:240
std::conditional (true specialization)
Definition: nv_std.h:343
T type
Definition: nv_std.h:344
value_t value_type
Definition: nv_std.h:281
Deleter & get_deleter() noexcept
Returns the deleter object.
Definition: nv_std.h:772
pointer release() noexcept
Releases ownership of the managed object, if any.
Definition: nv_std.h:753
T type
Definition: nv_std.h:334
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition: nv_std.h:300
std::is_pointer
Definition: nv_std.h:475
pointer operator->() const noexcept
Returns a pointer to the managed object.
Definition: nv_std.h:784
std::alignment_of
Definition: nv_std.h:573
integral_constant< value_t, V > type
Definition: nv_std.h:282
char byte
Definition: nv_std.h:576
Helper for std::is_pointer (false specialization)
Definition: nv_std.h:467
T & operator[](size_t i) const
Array access to managed object.
Definition: nv_std.h:787
char(& no)[2]
Definition: nv_std.h:422
std::less
Definition: nv_std.h:181
Deleter deleter_type
Definition: nv_std.h:731
value_t val
Definition: nv_std.h:575
#define constexpr
Definition: nv_std.h:129
std::remove_volatile (non-volatile specialization)
Definition: nv_std.h:380
static const value_t value
Definition: nv_std.h:279
CUTLASS_HOST_DEVICE constexpr bool operator==(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Definition: nv_std.h:219
std::remove_cv
Definition: nv_std.h:392
std::is_base_of
Definition: nv_std.h:440
CUTLASS_HOST_DEVICE std::pair< T1, T2 > make_pair(T1 t, T2 u)
Definition: nv_std.h:250
std::integral_constant
Definition: nv_std.h:274
struct __align__(1) aligned_chunk< 1 >
Definition: nv_std.h:648
void operator()(T *ptr) const
Definition: nv_std.h:716
void swap(unique_ptr &other) noexcept
Swaps the managed objects with *this and another unique_ptr.
Definition: nv_std.h:769
std::remove_const (non-const specialization)
Definition: nv_std.h:368
CUTLASS_HOST_DEVICE constexpr const T & max(const T &a, const T &b)
std::max
Definition: nv_std.h:207
char(& yes)[1]
Definition: nv_std.h:421
T type
Definition: nv_std.h:381
CUTLASS_HOST_DEVICE constexpr bool operator!=(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Definition: nv_std.h:224
std::is_volatile
Definition: nv_std.h:461
T element_type
Definition: nv_std.h:730
nv_std::plus
Definition: nv_std.h:175
std::is_same (false specialization)
Definition: nv_std.h:412
Default deleter.
Definition: nv_std.h:715
T * pointer
Definition: nv_std.h:729
Deleter const & get_deleter() const noexcept
Returns the deleter object.
Definition: nv_std.h:775
std::is_integral
Definition: nv_std.h:483
Helper for std::is_base_of.
Definition: nv_std.h:420
std::is_fundamental
Definition: nv_std.h:526
void swap(unique_ptr< T, Deleter > &lhs, unique_ptr< T, Deleter > &rhs) noexcept
Specializes the swap algorithm.
Definition: nv_std.h:792
CUTLASS_HOST_DEVICE const value_type operator()() const
Definition: nv_std.h:286
#define CUTLASS_HOST_DEVICE
Definition: cutlass.h:46
#define noexcept
noexcept, constexpr
Definition: nv_std.h:126
std::enable_if (true specialization)
Definition: nv_std.h:333
unique_ptr()
Definition: nv_std.h:741
std::greater
Definition: nv_std.h:189
std::is_floating_point
Definition: nv_std.h:515
#define nullptr
nullptr
Definition: nv_std.h:136
CUTLASS_HOST_DEVICE constexpr const T & min(const T &a, const T &b)
std::min
Definition: nv_std.h:201
CUTLASS_HOST_DEVICE constexpr bool operator()(const T &lhs, const T &rhs) const
Definition: nv_std.h:190
aligned_chunk< Align > type[Len/sizeof(aligned_chunk< Align >)]
Definition: nv_std.h:703
std::nullptr_t
Definition: nv_std.h:317
CUTLASS_HOST_DEVICE constexpr bool operator()(const T &lhs, const T &rhs) const
Definition: nv_std.h:182
unique_ptr(pointer p)
Definition: nv_std.h:742
std::aligned_storage
Definition: nv_std.h:702
remove_volatile< typename remove_const< T >::type >::type type
Definition: nv_std.h:393
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition: nv_std.h:297
T & operator*() const
Dereferences the unique_ptr.
Definition: nv_std.h:781
std::bool_constant
Definition: nv_std.h:306
std::is_void
Definition: nv_std.h:479
F type
Definition: nv_std.h:350
static CUTLASS_HOST_DEVICE yes check(DerivedT *, T)
T type
Definition: nv_std.h:369
CUTLASS_HOST_DEVICE constexpr T operator()(const T &lhs, const T &rhs) const
Definition: nv_std.h:176
T type
Definition: nv_std.h:375
Basic include for CUTLASS macros.
T type
Definition: nv_std.h:387
void operator()(T *ptr) const
Definition: nv_std.h:722
CUTLASS_HOST_DEVICE constexpr bool operator>=(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Definition: nv_std.h:245
~unique_ptr()
Definition: nv_std.h:744
std::is_arithmetic
Definition: nv_std.h:521