1个不稳定版本

0.0.0-alpha.12024年5月1日

#518 in 图形API

Download history 122/week @ 2024-04-27 48/week @ 2024-05-04 41/week @ 2024-05-11 34/week @ 2024-05-18 35/week @ 2024-05-25 39/week @ 2024-06-01 39/week @ 2024-06-08 38/week @ 2024-06-15 26/week @ 2024-06-22 8/week @ 2024-06-29 16/week @ 2024-07-06 3/week @ 2024-07-13 11/week @ 2024-07-20 31/week @ 2024-07-27

62每月下载量

MIT许可

295KB
7.5K SLoC

ADLX

Actions Status Latest version Documentation MSRV Lines of code MIT Contributor Covenant

Banner

AMD设备库eXtra (ADLX) 的绑定。

用法

将此内容添加到您的Cargo.toml中

[dependencies]
adlx = "0.0.0-alpha.1"

代码示例

use adlx::{gpu::Gpu1, helper::AdlxHelper, interface::Interface};
use anyhow::Result;

fn main() -> Result<()> {
    let helper = AdlxHelper::new()?;
    let system = helper.system();
    let gpu_list = system.gpus()?;

    for gpu in 0..gpu_list.size() {
        let gpu = gpu_list.at(gpu)?;
        let gpu1 = gpu.cast::<Gpu1>()?;
        dbg!(gpu1.name()?);
        dbg!(gpu1.product_name()?);
    }

    Ok(())
}

依赖项

~0.2–5MB