pub trait GpuName {
// Required method
fn name() -> String;
}
Expand description
The name that is used in the GPU source code to identify the item that is used.
Required Methods§
sourcefn name() -> String
fn name() -> String
A unique name for the item.
To make the uniqueness easier to implement, use the name
macro. It produces a unique
name, based on the module path and the type of the item itself. That identifier might not
be stable across different versions of a crate, but this is OK as kernel sources/binaries
are always bundled with a library and not re-used between versions.
§Example
struct Fp;
impl ec_gpu::GpuName for Fp {
fn name() -> String {
ec_gpu::name!()
}
}
Object Safety§
This trait is not object safe.