Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rust-GPU/rust-cuda
/ index_1d
Function
index_1d
crates/cuda_std/src/thread.rs:230–232 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
228
229
#[inline(always)]
230
pub fn index_1d() -> u32 {
231
thread_idx_x() as u32 + block_idx_x() as u32 * block_dim_x() as u32
232
}
233
234
#[inline(always)]
235
pub fn index_2d() -> Vec2<u32> {
Callers
1
add
Function · 0.85
Calls
3
thread_idx_x
Function · 0.85
block_idx_x
Function · 0.85
block_dim_x
Function · 0.85
Tested by
no test coverage detected