@@ -45,84 +45,98 @@ extern "C" {
45
45
46
46
/// Synchronizes all threads in the block.
47
47
#[ inline]
48
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
48
49
pub unsafe fn _syncthreads ( ) -> ( ) {
49
50
syncthreads ( )
50
51
}
51
52
52
53
/// x-th thread-block dimension.
53
54
#[ inline]
55
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
54
56
pub unsafe fn _block_dim_x ( ) -> i32 {
55
57
block_dim_x ( )
56
58
}
57
59
58
60
/// y-th thread-block dimension.
59
61
#[ inline]
62
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
60
63
pub unsafe fn _block_dim_y ( ) -> i32 {
61
64
block_dim_y ( )
62
65
}
63
66
64
67
/// z-th thread-block dimension.
65
68
#[ inline]
69
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
66
70
pub unsafe fn _block_dim_z ( ) -> i32 {
67
71
block_dim_z ( )
68
72
}
69
73
70
74
/// x-th thread-block index.
71
75
#[ inline]
76
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
72
77
pub unsafe fn _block_idx_x ( ) -> i32 {
73
78
block_idx_x ( )
74
79
}
75
80
76
81
/// y-th thread-block index.
77
82
#[ inline]
83
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
78
84
pub unsafe fn _block_idx_y ( ) -> i32 {
79
85
block_idx_y ( )
80
86
}
81
87
82
88
/// z-th thread-block index.
83
89
#[ inline]
90
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
84
91
pub unsafe fn _block_idx_z ( ) -> i32 {
85
92
block_idx_z ( )
86
93
}
87
94
88
95
/// x-th block-grid dimension.
89
96
#[ inline]
97
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
90
98
pub unsafe fn _grid_dim_x ( ) -> i32 {
91
99
grid_dim_x ( )
92
100
}
93
101
94
102
/// y-th block-grid dimension.
95
103
#[ inline]
104
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
96
105
pub unsafe fn _grid_dim_y ( ) -> i32 {
97
106
grid_dim_y ( )
98
107
}
99
108
100
109
/// z-th block-grid dimension.
101
110
#[ inline]
111
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
102
112
pub unsafe fn _grid_dim_z ( ) -> i32 {
103
113
grid_dim_z ( )
104
114
}
105
115
106
116
/// x-th thread index.
107
117
#[ inline]
118
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
108
119
pub unsafe fn _thread_idx_x ( ) -> i32 {
109
120
thread_idx_x ( )
110
121
}
111
122
112
123
/// y-th thread index.
113
124
#[ inline]
125
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
114
126
pub unsafe fn _thread_idx_y ( ) -> i32 {
115
127
thread_idx_y ( )
116
128
}
117
129
118
130
/// z-th thread index.
119
131
#[ inline]
132
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
120
133
pub unsafe fn _thread_idx_z ( ) -> i32 {
121
134
thread_idx_z ( )
122
135
}
123
136
124
137
/// Generates the trap instruction `TRAP`
125
138
#[ inline]
139
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
126
140
pub unsafe fn trap ( ) -> ! {
127
141
crate :: intrinsics:: abort ( )
128
142
}
@@ -149,6 +163,7 @@ extern "C" {
149
163
/// Sources:
150
164
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#formatted-output),
151
165
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
166
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
152
167
pub fn vprintf ( format : * const u8 , valist : * const c_void ) -> i32 ;
153
168
154
169
/// Allocate memory dynamically from a fixed-size heap in global memory.
@@ -168,6 +183,7 @@ extern "C" {
168
183
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations),
169
184
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
170
185
// FIXME(denzp): assign `malloc` and `nothrow` attributes.
186
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
171
187
pub fn malloc ( size : usize ) -> * mut c_void ;
172
188
173
189
/// Free previously dynamically allocated memory.
@@ -184,6 +200,7 @@ extern "C" {
184
200
/// [Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations),
185
201
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
186
202
// FIXME(denzp): assign `nothrow` attribute.
203
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
187
204
pub fn free ( ptr : * mut c_void ) ;
188
205
189
206
// Internal declaration of the syscall. Exported variant has
@@ -208,6 +225,7 @@ extern "C" {
208
225
/// Source:
209
226
/// [PTX Interoperability](https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls).
210
227
#[ inline]
228
+ #[ unstable( feature = "stdarch_nvptx" , issue = "111199" ) ]
211
229
pub unsafe fn __assert_fail ( message : * const u8 , file : * const u8 , line : u32 , function : * const u8 ) {
212
230
__assertfail ( message, file, line, function, 1 )
213
231
}
0 commit comments