Back to Cutlass

CUTLASS: platform.h Source File

docs/platform_8h_source.html

4.4.258.0 KB
Original Source

| | CUTLASS

CUDA Templates for Linear Algebra Subroutines and Solvers |

platform.h

Go to the documentation of this file.

1 /***************************************************************************************************

2 * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.

3 *

4 * Redistribution and use in source and binary forms, with or without modification, are permitted

5 * provided that the following conditions are met:

6 * * Redistributions of source code must retain the above copyright notice, this list of

7 * conditions and the following disclaimer.

8 * * Redistributions in binary form must reproduce the above copyright notice, this list of

9 * conditions and the following disclaimer in the documentation and/or other materials

10 * provided with the distribution.

11 * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used

12 * to endorse or promote products derived from this software without specific prior written

13 * permission.

14 *

15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR

16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND

17 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

19 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;

20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

21 * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

23 *

24 **************************************************************************************************/

25

26 #pragma once

27

94 //-----------------------------------------------------------------------------

95 // Dependencies

96 //-----------------------------------------------------------------------------

97

98 #include <stdint.h>

99

100 #if !defined(__CUDACC_RTC__)

101 //-----------------------------------------------------------------------------

102 // Include STL files that platform provides functionality for

103 //-----------------------------------------------------------------------------

104

105 #include <algorithm>// Minimum/maximum operations

106 #include <cstddef>// nullptr_t

107 #include <functional>// Arithmetic operations

108 #include <utility>// For methods on std::pair

109 #if (!defined(_MSC_VER) && (__cplusplus >= 201103L)) || (defined(_MSC_VER) && (_MS_VER >= 1500))

110 #include <type_traits>// For integral constants, conditional metaprogramming, and type traits

111 #endif

112

113 #include "cutlass/cutlass.h"

114

115 #endif

116

117 //-----------------------------------------------------------------------------

118 // OS

119 //-----------------------------------------------------------------------------

120 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)

121 #define CUTLASS_OS_WINDOWS

122 #endif

123

124 /******************************************************************************

125 * Macros

126 ******************************************************************************/

127 //-----------------------------------------------------------------------------

128 // Keywords

129 //-----------------------------------------------------------------------------

130

132 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1900))

133 #ifndef noexcept

134 #define noexcept

135 #endif

136 #ifndef constexpr

137 #define constexpr

138 #endif

139 #endif

140

142 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1310))

143 #ifndef nullptr

144 #define nullptr 0

145 #endif

146 #endif

147

149 #if (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1600))

150 #ifndef static_assert

151 #define __platform_cat_(a, b) a##b

152 #define __platform_cat(a, b) __platform_cat_(a, b)

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

154 #endif

155 #endif

156

157 //-----------------------------------------------------------------------------

158 // Functions

159 //-----------------------------------------------------------------------------

160

162 #ifndef __NV_STD_MAX

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

164 #endif

165

167 #ifndef __NV_STD_MIN

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

169 #endif

170

171 /******************************************************************************

172 * Re-implementations

173 ******************************************************************************/

174 namespace cutlass {

175 namespace platform {

176

177 //-----------------------------------------------------------------------------

178 // Minimum/maximum operations <algorithm>

179 //-----------------------------------------------------------------------------

180

182 template <typename T>

183 CUTLASS_HOST_DEVICE constexpr const T& min(const T& a, const T& b) {

184return (b < a) ? b : a;

185 }

186

188 template <typename T>

189 CUTLASS_HOST_DEVICE constexpr const T& max(const T& a, const T& b) {

190return (a < b) ? b : a;

191 }

192

193 #if !defined(__CUDACC_RTC__)

194 //-----------------------------------------------------------------------------

195 // Methods on std::pair

196 //-----------------------------------------------------------------------------

197

198 using std::pair;

199

200 template <class T1, class T2>

201 CUTLASS_HOST_DEVICE constexpr bool operator==(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

202return (lhs.first == rhs.first) && (lhs.second == rhs.second);

203 }

204

205 template <class T1, class T2>

206 CUTLASS_HOST_DEVICE constexpr bool operator!=(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

207return (lhs.first != rhs.first) && (lhs.second != rhs.second);

208 }

209

210 template <class T1, class T2>

211 CUTLASS_HOST_DEVICE constexpr bool operator<(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

212return (lhs.first < rhs.first) ? true : (rhs.first < lhs.first) ? false

213 : (lhs.second < rhs.second);

214 }

215

216 template <class T1, class T2>

217 CUTLASS_HOST_DEVICE constexpr bool operator<=(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

218return !(rhs < lhs);

219 }

220

221 template <class T1, class T2>

222 CUTLASS_HOST_DEVICE constexpr bool operator>(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

223return (rhs < lhs);

224 }

225

226 template <class T1, class T2>

227 CUTLASS_HOST_DEVICE constexpr bool operator>=(const pair<T1, T2>& lhs, const pair<T1, T2>& rhs) {

228return !(lhs < rhs);

229 }

230

231 template <class T1, class T2>

232 CUTLASS_HOST_DEVICE std::pair<T1, T2> make_pair(T1 t, T2 u) {

233 std::pair<T1, T2> retval;

234 retval.first = t;

235 retval.second = u;

236return retval;

237 }

238 #endif

239

240 } // namespace platform

241

242 /******************************************************************************

243 * Implementations of C++ 11/14/17/... STL features

244 ******************************************************************************/

245

246 namespace platform {

247

248 //-----------------------------------------------------------------------------

249 // Integral constant helper types <type_traits>

250 //-----------------------------------------------------------------------------

251

252 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500))

253

255 template <typename value_t, value_t V>

256 struct integral_constant;

257

259 template <typename value_t, value_t V>

260 struct integral_constant {

261static const value_t value = V;

262

263typedef value_t value_type;

264typedef integral_constant<value_t, V> type;

265

266CUTLASS_HOST_DEVICE operator value_type() const { return value; }

267

268CUTLASS_HOST_DEVICE const value_type operator()() const { return value; }

269 };

270

271 #else

272

273 using std::integral_constant;

274 using std::pair;

275

276 #endif

277

279 typedef integral_constant<bool, true> true_type;

280

282 typedef integral_constant<bool, false> false_type;

283

284 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus <= 201402L)) || (defined(_MSC_VER) && (_MSC_VER < 1900))

285

287 template <bool V>

288 struct bool_constant : platform::integral_constant<bool, V> {};

289

290 #else

291

292 using std::bool_constant;

293

294 #endif

295

296 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1700))

297

299 struct nullptr_t {};

300

301 #else

302

303 using std::nullptr_t;

304

305 #endif

306

307 //-----------------------------------------------------------------------------

308 // Conditional metaprogramming <type_traits>

309 //-----------------------------------------------------------------------------

310

311 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1600))

312

314 template <bool C, typename T = void>

315 struct enable_if {

316typedef T type;

317 };

318

320 template <typename T>

321 struct enable_if<false, T> {};

322

324 template <bool B, class T, class F>

325 struct conditional {

326typedef T type;

327 };

328

330 template <class T, class F>

331 struct conditional<false, T, F> {

332typedef F type;

333 };

334

335 #else

336

337 using std::enable_if;

338 using std::conditional;

339

340 #endif

341

342 //-----------------------------------------------------------------------------

343 // Const/volatility specifiers <type_traits>

344 //-----------------------------------------------------------------------------

345

346 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500))

347

349 template <typename T>

350 struct remove_const {

351typedef T type;

352 };

353

355 template <typename T>

356 struct remove_const<const T> {

357typedef T type;

358 };

359

361 template <typename T>

362 struct remove_volatile {

363typedef T type;

364 };

365

367 template <typename T>

368 struct remove_volatile<volatile T> {

369typedef T type;

370 };

371

373 template <typename T>

374 struct remove_cv {

375typedef typename remove_volatile<typename remove_const<T>::type>::type type;

376 };

377

378 #else

379

380 using std::remove_const;

381 using std::remove_volatile;

382 using std::remove_cv;

383

384 #endif

385

386 //-----------------------------------------------------------------------------

387 // Type relationships <type_traits>

388 //-----------------------------------------------------------------------------

389

390 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500))

391

393 template <typename A, typename B>

394 struct is_same : false_type {};

395

397 template <typename A>

398 struct is_same<A, A> : true_type {};

399

401 template <typename BaseT, typename DerivedT>

[402](structcutlass_1_1platform_1_1is base of__helper.html) struct [is_base_of_helper](structcutlass_1_1platform_1_1is__base of helper.html) {

[403](structcutlass_1_1platform_1_1is base of__helper.html#ac1cf3f804e7686213fd42c678cc6d669)typedef char (&yes)[1];

[404](structcutlass_1_1platform_1_1is base of__helper.html#ae096aa6c67f60d8d9c5a4b084118a8af)typedef char (&no)[2];

405

406template <typename B, typename D>

[407](structcutlass_1_1platform_1_1is base of__helper_1_1dummy.html)struct [dummy](structcutlass_1_1platform_1_1is__base of helper_1_1dummy.html) {

408CUTLASS_HOST_DEVICE operator B*() const;

409CUTLASS_HOST_DEVICE operator D*();

410 };

411

412template <typename T>

413CUTLASS_HOST_DEVICE static yes check(DerivedT*, T);

414

415CUTLASS_HOST_DEVICE static no check(BaseT*, int);

416

[417](structcutlass_1_1platform_1_1is base of__helper.html#ac7e3ab73057682cc2eb6ed74c33e5eff)static const bool value = sizeof(check([dummy<BaseT, DerivedT>](structcutlass_1_1platform_1_1is__base of helper_1_1dummy.html)(), int())) == sizeof(yes);

418 };

419

421 template <typename BaseT, typename DerivedT>

[422](structcutlass_1_1platform_1_1is base of.html) struct [is_base_of](structcutlass_1_1platform_1_1is base of.html)

423 : integral_constant<bool,

424 (is_base_of_helper<typename remove_cv<BaseT>::type,

425 typename remove_cv<DerivedT>::type>::value) ||

426 (is_same<typename remove_cv<BaseT>::type,

427 typename remove_cv<DerivedT>::type>::value)> {};

428

429 #else

430

431 using std::is_same;

432 using std::is_base_of;

433

434 #endif

435

436 //-----------------------------------------------------------------------------

437 // Type properties <type_traits>

438 //-----------------------------------------------------------------------------

439

440 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500))

441

443 template <typename T>

444 struct is_volatile : false_type {};

445 template <typename T>

446 struct is_volatile<volatile T> : true_type {};

447

449 template <typename T>

[450](structcutlass_1_1platform_1_1is pointer helper.html) struct [is_pointer_helper](structcutlass_1_1platform_1_1is pointer helper.html) : false_type {};

451

453 template <typename T>

[454](structcutlass_1_1platform_1_1is pointer helper_3_01T_01_5_01_4.html) struct [is_pointer_helper](structcutlass_1_1platform_1_1is pointer helper.html)<T*> : true_type {};

455

457 template <typename T>

458 struct is_pointer : [is_pointer_helper](structcutlass_1_1platform_1_1is pointer helper.html)<typename remove_cv<T>::type> {};

459

461 template <typename T>

462 struct is_void : is_same<void, typename remove_cv<T>::type> {};

463

465 template <typename T>

466 struct is_integral : false_type {};

467 template <>

468 struct is_integral<char> : true_type {};

469 template <>

470 struct is_integral<signed char> : true_type {};

471 template <>

472 struct is_integral<unsigned char> : true_type {};

473 template <>

474 struct is_integral<short> : true_type {};

475 template <>

476 struct is_integral<unsigned short> : true_type {};

477 template <>

478 struct is_integral<int> : true_type {};

479 template <>

480 struct is_integral<unsigned int> : true_type {};

481 template <>

482 struct is_integral<long> : true_type {};

483 template <>

484 struct is_integral<unsigned long> : true_type {};

485 template <>

486 struct is_integral<long long> : true_type {};

487 template <>

488 struct is_integral<unsigned long long> : true_type {};

489 template <typename T>

490 struct is_integral<volatile T> : is_integral<T> {};

491 template <typename T>

492 struct is_integral<const T> : is_integral<T> {};

493 template <typename T>

494 struct is_integral<const volatile T> : is_integral<T> {};

495

497 template <typename T>

[498](structcutlass_1_1platform_1_1is floating point.html) struct [is_floating_point](structcutlass_1_1platform_1_1is floating point.html)

499 : integral_constant<bool,

500 (is_same<float, typename remove_cv<T>::type>::value ||

501 is_same<double, typename remove_cv<T>::type>::value)> {};

502

504 template <typename T>

505 struct is_arithmetic

506 : integral_constant<bool, (is_integral<T>::value || is_floating_point<T>::value)> {};

507

509 template <typename T>

510 struct is_fundamental

511 : integral_constant<bool,

512 (is_arithmetic<T>::value || is_void<T>::value ||

513 is_same<nullptr_t, typename remove_cv<T>::type>::value)> {};

514

515 #else

516

517 using std::is_volatile;

518 using std::is_pointer;

519 using std::is_void;

520 using std::is_integral;

521 using std::is_floating_point;

522 using std::is_arithmetic;

523 using std::is_fundamental;

524

525 #endif

526

527 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1800)) || \

528 (defined(__GNUG__) && (__GNUC__ < 5))

529

540 template <typename T>

[541](structcutlass_1_1platform_1_1is trivially copyable.html) struct [is_trivially_copyable](structcutlass_1_1platform_1_1is trivially copyable.html)

542 : integral_constant<bool, (is_fundamental<T>::value || is_pointer<T>::value)> {};

543

544 #else

545

546 using std::is_trivially_copyable;

547

548 #endif

549

550 //-----------------------------------------------------------------------------

551 // Alignment and layout utilities

552 //-----------------------------------------------------------------------------

553

554 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1500))

555

557 template <typename value_t>

558 struct alignment_of {

559struct pad {

560 value_t val;

561char byte;

562 };

563

564enum { value = sizeof(pad) - sizeof(value_t) };

565 };

566

567 #else

568

569 template <typename value_t>

570 struct alignment_of : std::alignment_of<value_t> {};

571

572 #endif

573

574 /* 16B specializations where 32-bit Win32 host compiler disagrees with device compiler */

575 template <>

576 struct alignment_of<int4> {

577enum { value = 16 };

578 };

579 template <>

580 struct alignment_of<uint4> {

581enum { value = 16 };

582 };

583 template <>

584 struct alignment_of<float4> {

585enum { value = 16 };

586 };

587 template <>

588 struct alignment_of<long4> {

589enum { value = 16 };

590 };

591 template <>

592 struct alignment_of<ulong4> {

593enum { value = 16 };

594 };

595 template <>

596 struct alignment_of<longlong2> {

597enum { value = 16 };

598 };

599 template <>

600 struct alignment_of<ulonglong2> {

601enum { value = 16 };

602 };

603 template <>

604 struct alignment_of<double2> {

605enum { value = 16 };

606 };

607 template <>

608 struct alignment_of<longlong4> {

609enum { value = 16 };

610 };

611 template <>

612 struct alignment_of<ulonglong4> {

613enum { value = 16 };

614 };

615 template <>

616 struct alignment_of<double4> {

617enum { value = 16 };

618 };

619

620 // Specializations for volatile/const qualified types

621 template <typename value_t>

[622](structcutlass_1_1platform_1_1alignment of_3_01volatile_01value t_01_4.html) struct alignment_of<volatile value_t> : alignment_of<value_t> {};

623 template <typename value_t>

[624](structcutlass_1_1platform_1_1alignment of_3_01const_01value t_01_4.html) struct alignment_of<const value_t> : alignment_of<value_t> {};

625 template <typename value_t>

[626](structcutlass_1_1platform_1_1alignment of_3_01const_01volatile_01value t_01_4.html) struct alignment_of<const volatile value_t> : alignment_of<value_t> {};

627

628 #if defined(__CUDACC_RTC__) || (!defined(_MSC_VER) && (__cplusplus < 201103L)) || (defined(_MSC_VER) && (_MSC_VER < 1800))

629

630 template <size_t Align>

631 struct aligned_chunk;

632 template <>

633 struct __align__(1) aligned_chunk<1> {

634 uint8_t buff;

635 };

636 template <>

637 struct __align__(2) aligned_chunk<2> {

638 uint16_t buff;

639 };

640 template <>

641 struct __align__(4) aligned_chunk<4> {

642 uint32_t buff;

643 };

644 template <>

645 struct __align__(8) aligned_chunk<8> {

646 uint32_t buff[2];

647 };

648 template <>

649 struct __align__(16) aligned_chunk<16> {

650 uint32_t buff[4];

651 };

652 template <>

653 struct __align__(32) aligned_chunk<32> {

654 uint32_t buff[8];

655 };

656 template <>

657 struct __align__(64) aligned_chunk<64> {

658 uint32_t buff[16];

659 };

660 template <>

661 struct __align__(128) aligned_chunk<128> {

662 uint32_t buff[32];

663 };

664 template <>

665 struct __align__(256) aligned_chunk<256> {

666 uint32_t buff[64];

667 };

668 template <>

669 struct __align__(512) aligned_chunk<512> {

670 uint32_t buff[128];

671 };

672 template <>

673 struct __align__(1024) aligned_chunk<1024> {

674 uint32_t buff[256];

675 };

676 template <>

677 struct __align__(2048) aligned_chunk<2048> {

678 uint32_t buff[512];

679 };

680 template <>

681 struct __align__(4096) aligned_chunk<4096> {

682 uint32_t buff[1024];

683 };

684

686 template <size_t Len, size_t Align>

687 struct aligned_storage {

688typedef aligned_chunk<Align> type[Len / sizeof(aligned_chunk<Align>)];

689 };

690

691 #else

692

693 using std::aligned_storage;

694

695 #endif

696

697 #if !defined(__CUDACC_RTC__)

698 template <typename T>

700 struct default_delete {

701void operator()(T* ptr) const { delete ptr; }

702 };

703

705 template <typename T>

706 struct default_delete<T[]> {

707void operator()(T* ptr) const { delete[] ptr; }

708 };

709

711 template <class T, class Deleter = default_delete<T> >

712 class unique_ptr {

713public:

714typedef T* pointer;

715typedef T element_type;

716typedef Deleter deleter_type;

717

718private:

720 pointer _ptr;

721

723 deleter_type _deleter;

724

725public:

726unique_ptr() : _ptr(nullptr) {}

727unique_ptr(pointer p) : _ptr(p) {}

728

729~unique_ptr() {

730if (_ptr) {

731 _deleter(_ptr);

732 }

733 }

735 pointer get() const noexcept { return _ptr; }

736

738 pointer release() noexcept {

739 pointer p(_ptr);

740 _ptr = nullptr;

741return p;

742 }

743

745void reset(pointer p = pointer()) noexcept {

746 pointer old_ptr = _ptr;

747 _ptr = p;

748if (old_ptr != nullptr) {

749 get_deleter()(old_ptr);

750 }

751 }

752

754void swap(unique_ptr& other) noexcept { std::swap(_ptr, other._ptr); }

755

757 Deleter& get_deleter() noexcept { return _deleter; }

758

760 Deleter const& get_deleter() const noexcept { return _deleter; }

761

763operator bool() const noexcept { return _ptr != nullptr; }

764

766 T& operator*() const { return *_ptr; }

767

769 pointer operator->() const noexcept { return _ptr; }

770

772 T& operator[](size_t i) const { return _ptr[i]; }

773 };

774

776 template <typename T, typename Deleter>

777 void swap(unique_ptr<T, Deleter>& lhs, unique_ptr<T, Deleter>& rhs) noexcept {

778 lhs.swap(rhs);

779 }

780 #endif

781

782 } // namespace platform

783 } // namespace cutlass

cutlass::platform::unique_ptr::operator[]

T & operator[](size_t i) const

Array access to managed object.

Definition: platform.h:772

cutlass::platform::max

CUTLASS_HOST_DEVICE constexpr const T & max(const T &a, const T &b)

std::max

Definition: platform.h:189

cutlass

Definition: aligned_buffer.h:35

constexpr

#define constexpr

Definition: platform.h:137

cutlass::platform::nullptr_t

std::nullptr_t

Definition: platform.h:299

cutlass::platform::swap

void swap(unique_ptr< T, Deleter > &lhs, unique_ptr< T, Deleter > &rhs) noexcept

Specializes the swap algorithm.

Definition: platform.h:777

[cutlass::platform::is_pointer_helper](structcutlass_1_1platform_1_1is pointer helper.html)

Helper for std::is_pointer (false specialization)

Definition: platform.h:450

cutlass::platform::unique_ptr::deleter_type

Deleter deleter_type

Definition: platform.h:716

cutlass::platform::remove_const::type

T type

Definition: platform.h:351

cutlass::platform::alignment_of::pad::val

value_t val

Definition: platform.h:560

cutlass::platform::conditional::type

T type

Definition: platform.h:326

cutlass::platform::unique_ptr::pointer

T * pointer

Definition: platform.h:714

cutlass::platform::is_same

std::is_same (false specialization)

Definition: platform.h:394

cutlass::platform::is_pointer

std::is_pointer

Definition: platform.h:458

cutlass::platform::integral_constant::value_type

value_t value_type

Definition: platform.h:263

cutlass::platform::make_pair

CUTLASS_HOST_DEVICE std::pair< T1, T2 > make_pair(T1 t, T2 u)

Definition: platform.h:232

cutlass::platform::unique_ptr::unique_ptr

unique_ptr()

Definition: platform.h:726

cutlass::platform::default_delete< T[]>::operator()

void operator()(T *ptr) const

Definition: platform.h:707

cutlass::platform::operator==

CUTLASS_HOST_DEVICE constexpr bool operator==(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)

Definition: platform.h:201

cutlass::platform::is_void

std::is_void

Definition: platform.h:462

cutlass::platform::operator>=

CUTLASS_HOST_DEVICE constexpr bool operator>=(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)

Definition: platform.h:227

cutlass::platform::unique_ptr::operator->

pointer operator->() const noexcept

Returns a pointer to the managed object.

Definition: platform.h:769

cutlass::platform::operator>

CUTLASS_HOST_DEVICE constexpr bool operator>(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)

Definition: platform.h:222

cutlass::platform::default_delete

Default deleter.

Definition: platform.h:700

cutlass::platform::operator!=

CUTLASS_HOST_DEVICE constexpr bool operator!=(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)

Definition: platform.h:206

cutlass::platform::unique_ptr

std::unique_ptr

Definition: platform.h:712

cutlass::platform::alignment_of::pad

Definition: platform.h:559

[cutlass::platform::is_floating_point](structcutlass_1_1platform_1_1is floating point.html)

std::is_floating_point

Definition: platform.h:498

cutlass::platform::conditional< false, T, F >::type

F type

Definition: platform.h:332

cutlass::platform::false_type

integral_constant< bool, false > false_type

The type used as a compile-time boolean with false value.

Definition: platform.h:282

cutlass::platform::unique_ptr::get_deleter

Deleter const & get_deleter() const noexcept

Returns the deleter object.

Definition: platform.h:760

cutlass::platform::remove_cv

std::remove_cv

Definition: platform.h:374

cutlass::platform::unique_ptr::~unique_ptr

~unique_ptr()

Definition: platform.h:729

cutlass::platform::__align__

struct __align__(1) aligned_chunk< 1 >

Definition: platform.h:633

cutlass::platform::remove_const< const T >::type

T type

Definition: platform.h:357

cutlass::platform::remove_volatile::type

T type

Definition: platform.h:363

cutlass::platform::is_integral

std::is_integral

Definition: platform.h:466

[cutlass::platform::is_trivially_copyable](structcutlass_1_1platform_1_1is trivially copyable.html)

Definition: platform.h:541

[cutlass::platform::is_base_of_helper::dummy](structcutlass_1_1platform_1_1is base of__helper_1_1dummy.html)

Definition: platform.h:407

cutlass::platform::integral_constant::type

integral_constant< value_t, V > type

Definition: platform.h:264

cutlass::platform::is_arithmetic

std::is_arithmetic

Definition: platform.h:505

cutlass::platform::alignment_of::pad::byte

char byte

Definition: platform.h:561

cutlass::platform::integral_constant

std::integral_constant

Definition: platform.h:256

[cutlass::platform::is_base_of](structcutlass_1_1platform_1_1is base of.html)

std::is_base_of

Definition: platform.h:422

cutlass::platform::enable_if::type

T type

Definition: platform.h:316

nullptr

#define nullptr

nullptr

Definition: platform.h:144

cutlass::platform::is_volatile

std::is_volatile

Definition: platform.h:444

cutlass::platform::is_fundamental

std::is_fundamental

Definition: platform.h:510

cutlass::platform::unique_ptr::operator*

T & operator*() const

Dereferences the unique_ptr.

Definition: platform.h:766

cutlass::platform::enable_if

std::enable_if (true specialization)

Definition: platform.h:315

cutlass::platform::true_type

integral_constant< bool, true > true_type

The type used as a compile-time boolean with true value.

Definition: platform.h:279

CUTLASS_HOST_DEVICE

#define CUTLASS_HOST_DEVICE

Definition: cutlass.h:89

cutlass::platform::unique_ptr::element_type

T element_type

Definition: platform.h:715

cutlass::platform::unique_ptr::get_deleter

Deleter & get_deleter() noexcept

Returns the deleter object.

Definition: platform.h:757

cutlass::platform::alignment_of

std::alignment_of

Definition: platform.h:558

cutlass::platform::min

CUTLASS_HOST_DEVICE constexpr const T & min(const T &a, const T &b)

std::min

Definition: platform.h:183

cutlass::platform::remove_cv::type

remove_volatile< typename remove_const< T >::type >::type type

Definition: platform.h:375

cutlass::platform::conditional

std::conditional (true specialization)

Definition: platform.h:325

noexcept

#define noexcept

noexcept, constexpr

Definition: platform.h:134

cutlass::platform::unique_ptr::reset

void reset(pointer p=pointer()) noexcept

Replaces the managed object, deleting the old object.

Definition: platform.h:745

cutlass::platform::integral_constant::operator()

CUTLASS_HOST_DEVICE const value_type operator()() const

Definition: platform.h:268

[cutlass::platform::is_base_of_helper](structcutlass_1_1platform_1_1is base of__helper.html)

Helper for std::is_base_of.

Definition: platform.h:402

cutlass::platform::remove_const

std::remove_const (non-const specialization)

Definition: platform.h:350

cutlass::platform::aligned_chunk

Definition: platform.h:631

cutlass::platform::remove_volatile< volatile T >::type

T type

Definition: platform.h:369

cutlass::platform::unique_ptr::swap

void swap(unique_ptr &other) noexcept

Swaps the managed objects with *this and another unique_ptr.

Definition: platform.h:754

cutlass::platform::default_delete::operator()

void operator()(T *ptr) const

Definition: platform.h:701

cutlass::platform::aligned_storage

std::aligned_storage

Definition: platform.h:687

cutlass::platform::remove_volatile

std::remove_volatile (non-volatile specialization)

Definition: platform.h:362

cutlass::platform::unique_ptr::unique_ptr

unique_ptr(pointer p)

Definition: platform.h:727

cutlass::platform::unique_ptr::release

pointer release() noexcept

Releases ownership of the managed object, if any.

Definition: platform.h:738

cutlass.h

Basic include for CUTLASS.

cutlass::platform::bool_constant

std::bool_constant

Definition: platform.h:288


Generated by 1.8.11