Skip to main content

oxilean_codegen/futhark_backend/
futharkkernellaunch_traits.rs

1//! # FutharkKernelLaunch - Trait Implementations
2//!
3//! This module contains trait implementations for `FutharkKernelLaunch`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Display`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::FutharkKernelLaunch;
12use std::fmt;
13
14impl std::fmt::Display for FutharkKernelLaunch {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16        let global: Vec<String> = self.global_size.iter().map(|x| x.to_string()).collect();
17        let local: Vec<String> = self.local_size.iter().map(|x| x.to_string()).collect();
18        write!(
19            f,
20            "launch {}([{}], [{}], shm={})",
21            self.kernel_name,
22            global.join(", "),
23            local.join(", "),
24            self.shared_mem_bytes,
25        )
26    }
27}