Document gpu-only (#489)

This commit is contained in:
XAMPPRocky 2021-03-11 14:23:52 +01:00 committed by GitHub
parent 7348f3389d
commit cb8477df15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,8 @@ pub fn spirv(_attr: TokenStream, item: TokenStream) -> TokenStream {
tokens.into_iter().collect()
}
/// Marks a function as runnable only on the GPU, and will panic on
/// CPU platforms.
#[proc_macro_attribute]
pub fn gpu_only(_attr: TokenStream, item: TokenStream) -> TokenStream {
let syn::ItemFn {