gpu/
lib.rs

1#![cfg_attr(not(verus_keep_ghost), feature(negative_impls))]
2#![cfg_attr(not(verus_keep_ghost), feature(register_tool))]
3#![register_tool(gpu_codegen)]
4#![allow(internal_features)]
5#![cfg_attr(not(verus_keep_ghost), feature(rustc_attrs))]
6#![no_std]
7#![feature(asm_experimental_arch)]
8#![feature(core_intrinsics)]
9
10extern crate alloc;
11
12#[cfg(feature = "codegen_tests")]
13extern crate gpu_macros;
14
15#[cfg(feature = "codegen_tests")]
16extern crate num_traits;
17
18pub mod arch;
19pub mod cg;
20pub mod chunk;
21mod chunk_impl;
22pub mod chunk_scope;
23mod device_intrinsic;
24mod dim;
25pub(crate) mod global;
26mod host_dev;
27pub mod iter;
28mod ldst;
29pub mod prelude;
30mod print;
31mod shared;
32pub mod sync;
33pub mod vector;
34
35pub use prelude::*;
36
37/// Add an extra assertion before indexing operation.
38/// This is used to ensure that some indexing operation is safe,
39/// allowing us to optimize the assertion using select.
40/// If not followed by an indexing operation, it will be ignored.
41#[inline(never)]
42#[rustc_diagnostic_item = "gpu::build_sfi"]
43#[gpu_codegen::device]
44pub(crate) fn assert_ptr<T>(_cond: bool, _ptr: T) -> T {
45    unimplemented!()
46}
47
48/// Add a string attribute to the MLIR module.
49#[rustc_diagnostic_item = "gpu::add_mlir_string_attr"]
50#[gpu_codegen::device]
51#[inline(never)]
52pub const fn add_mlir_string_attr(_: &'static str) -> usize {
53    unimplemented!()
54}