-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Hello, I am trying the example:
#[macro_use]
extern crate em;
use em::*;
#[gpu_use]
fn main() {
let mut x = vec![0.0; 1000];
gpu_do!(load(x)); // move data to the GPU
gpu_do!(launch()); // off-load to run on the GPU
for i in 0..1000 {
x[i] = x[i] * 10.0;
}
gpu_do!(read(x)); // move data back from the GPU
println!("{:?}", x);
}Here's the error.
...
Compiling emu_macro v0.1.0
error[E0277]: the trait bound `syn::Expr: std::convert::From<quote::__rt::TokenStream>` is not satisfied
--> /Users/mrrobb/.cargo/registry/src/github.amrom.workers.dev-1ecc6299db9ec823/emu_macro-0.1.0/src/passing.rs:337:50
|
337 | let gpu_ident = quote! {gpu}.into();
| ^^^^ the trait `std::convert::From<quote::__rt::TokenStream>` is not implemented for `syn::Expr`
|
= help: the following implementations were found:
<syn::Expr as std::convert::From<syn::ExprArray>>
<syn::Expr as std::convert::From<syn::ExprAssign>>
<syn::Expr as std::convert::From<syn::ExprAssignOp>>
<syn::Expr as std::convert::From<syn::ExprAsync>>
and 35 others
= note: required because of the requirements on the impl of `std::convert::Into<syn::Expr>` for `quote::__rt::TokenStream`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `emu_macro`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Am I doing something wrong? Thank you.
Micael106
Metadata
Metadata
Assignees
Labels
No labels