pub struct CheckpointMetadata {
pub kernel_id: String,
pub kernel_type: String,
pub current_step: u64,
pub grid_size: (u32, u32, u32),
pub tile_size: (u32, u32, u32),
pub hlc_timestamp: HlcTimestamp,
pub custom: HashMap<String, String>,
}Expand description
Kernel-specific metadata stored in checkpoint.
Fields§
§kernel_id: StringUnique kernel identifier.
kernel_type: StringKernel type (e.g., “fdtd_3d”, “wave_sim”).
current_step: u64Current simulation step.
grid_size: (u32, u32, u32)Grid dimensions.
tile_size: (u32, u32, u32)Tile/block dimensions.
hlc_timestamp: HlcTimestampHLC timestamp at checkpoint time.
custom: HashMap<String, String>Custom key-value metadata.
Implementations§
Source§impl CheckpointMetadata
impl CheckpointMetadata
Sourcepub fn new(kernel_id: impl Into<String>, kernel_type: impl Into<String>) -> Self
pub fn new(kernel_id: impl Into<String>, kernel_type: impl Into<String>) -> Self
Create new metadata for a kernel.
Sourcepub fn with_grid_size(self, width: u32, height: u32, depth: u32) -> Self
pub fn with_grid_size(self, width: u32, height: u32, depth: u32) -> Self
Set grid size.
Sourcepub fn with_tile_size(self, x: u32, y: u32, z: u32) -> Self
pub fn with_tile_size(self, x: u32, y: u32, z: u32) -> Self
Set tile size.
Sourcepub fn with_hlc(self, hlc: HlcTimestamp) -> Self
pub fn with_hlc(self, hlc: HlcTimestamp) -> Self
Set HLC timestamp.
Sourcepub fn with_custom(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_custom( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add custom metadata.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Deserialize metadata from bytes.
Trait Implementations§
Source§impl Clone for CheckpointMetadata
impl Clone for CheckpointMetadata
Source§fn clone(&self) -> CheckpointMetadata
fn clone(&self) -> CheckpointMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheckpointMetadata
impl Debug for CheckpointMetadata
Source§impl Default for CheckpointMetadata
impl Default for CheckpointMetadata
Source§fn default() -> CheckpointMetadata
fn default() -> CheckpointMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CheckpointMetadata
impl RefUnwindSafe for CheckpointMetadata
impl Send for CheckpointMetadata
impl Sync for CheckpointMetadata
impl Unpin for CheckpointMetadata
impl UnwindSafe for CheckpointMetadata
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.