Download CUDA C PROGRAMMING GUIDE
Transcript
B.13.2 Description....................................................................................... 108 B.13.3 Return Value..................................................................................... 109 B.13.4 Notes.............................................................................................. 109 B.13.5 Examples......................................................................................... 110 B.13.5.1 Broadcast of a single value across a warp............................................ 110 B.13.5.2 Inclusive plus-scan across sub-partitions of 8 threads............................... 110 B.13.5.3 Reduction across a warp................................................................. 110 B.14 Profiler Counter Function........................................................................... 111 B.15 Assertion............................................................................................... 111 B.16 Formatted Output.................................................................................... 112 B.16.1 Format Specifiers............................................................................... 113 B.16.2 Limitations....................................................................................... 113 B.16.3 Associated Host-Side API...................................................................... 114 B.16.4 Examples......................................................................................... 114 B.17 Dynamic Global Memory Allocation and Operations............................................ 115 B.17.1 Heap Memory Allocation.......................................................................116 B.17.2 Interoperability with Host Memory API......................................................116 B.17.3 Examples......................................................................................... 117 B.17.3.1 Per Thread Allocation.....................................................................117 B.17.3.2 Per Thread Block Allocation............................................................. 117 B.17.3.3 Allocation Persisting Between Kernel Launches.......................................118 B.18 Execution Configuration.............................................................................119 B.19 Launch Bounds........................................................................................ 120 B.20 #pragma unroll....................................................................................... 122 B.21 SIMD Video Instructions............................................................................. 122 Appendix C. Mathematical Functions..................................................................... 124 C.1 Standard Functions.................................................................................... 124 C.2 Intrinsic Functions..................................................................................... 131 Appendix D. C/C++ Language Support.................................................................... 135 D.1 Code Samples.......................................................................................... 135 D.1.1 Data Aggregation Class.......................................................................... 135 D.1.2 Derived Class......................................................................................136 D.1.3 Class Template....................................................................................136 D.1.4 Function Template............................................................................... 136 D.1.5 Functor Class......................................................................................137 D.2 Restrictions............................................................................................. 137 D.2.1 Preprocessor Symbols............................................................................ 137 D.2.2 Qualifiers.......................................................................................... 138 D.2.2.1 Device Memory Qualifiers................................................................. 138 D.2.2.2 Volatile Qualifier............................................................................ 139 D.2.3 Pointers............................................................................................ 139 D.2.4 Operators.......................................................................................... 140 D.2.4.1 Assignment Operator....................................................................... 140 www.nvidia.com CUDA C Programming Guide PG-02829-001_v5.0 | vii