Skip to main content

gpu_vec

Macro gpu_vec 

Source
macro_rules! gpu_vec {
    () => { ... };
    ($elem:expr; $n:expr) => { ... };
    ($($x:expr),* $(,)?) => { ... };
}
Expand description

Creates a GpuVec containing the provided arguments.

Matches standard Rust vec! syntax:

use enki::gpu_vec;

// Explicit elements
let v1 = gpu_vec![1u32, 2, 3, 4];

// Repeating elements
let v2 = gpu_vec![0.0f32; 1024];