primal-barracuda 0.4.0

barraCuda — BARrier-free Rust Abstracted Cross-platform Unified Dimensional Algebra. Vendor-agnostic GPU compute via WGSL.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: AGPL-3.0-or-later
use super::*;

#[test]
fn test_hmc_trajectory_creation() {
    let Some(device) = crate::device::test_pool::get_test_device_if_f64_gpu_available_sync() else {
        return;
    };
    let config = GpuHmcConfig {
        nt: 2,
        nx: 2,
        ny: 2,
        nz: 2,
        ..Default::default()
    };
    let hmc = GpuHmcTrajectory::new(device, config).unwrap();
    assert_eq!(hmc.volume, 16);
}