Skip to main content

Module offload

Module offload 

Source

Re-exportsยง

use rustc_ast::ast; ๐Ÿ”’
use rustc_ast::token::Delimiter; ๐Ÿ”’
use rustc_ast::token::IdentKind; ๐Ÿ”’
use rustc_ast::token::Token; ๐Ÿ”’
use rustc_ast::token::TokenKind; ๐Ÿ”’
use rustc_ast::tokenstream::DelimSpan; ๐Ÿ”’
use rustc_ast::tokenstream::Spacing; ๐Ÿ”’
use rustc_ast::tokenstream::TokenStream; ๐Ÿ”’
use rustc_ast::tokenstream::TokenTree; ๐Ÿ”’
use rustc_expand::base::Annotatable; ๐Ÿ”’
use rustc_expand::base::ExtCtxt; ๐Ÿ”’
use rustc_session::config::Offload; ๐Ÿ”’
use rustc_span::DUMMY_SP; ๐Ÿ”’
use rustc_span::Ident; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use thin_vec::thin_vec; ๐Ÿ”’
use crate::diagnostics; ๐Ÿ”’

Functionsยง

compile_for_device ๐Ÿ”’
expand_kernel ๐Ÿ”’
The offload_kernel macro expands the function into two separate definitions: one on the host to handle the call, and one on the device for executing the kernel.
extract_fn ๐Ÿ”’
outer_normal_attr ๐Ÿ”’