sass-assembler 0.1.1

SASS (NVIDIA GPU) assembler for Gaia project
Documentation
//! SASS program structure for NVIDIA GPUs.

use crate::instructions::SassInstruction;
use serde::{Deserialize, Serialize};

/// SASS program (Cubin wrapper)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SassProgram {
    /// Program name
    pub name: String,
    /// Kernels in the program
    pub kernels: Vec<SassKernel>,
}

impl SassProgram {
    /// Create a new SASS program.
    ///
    /// # Arguments
    /// * `name` - Program name
    pub fn new(name: String) -> Self {
        Self { name, kernels: Vec::new() }
    }
}

/// SASS kernel definition
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SassKernel {
    /// Kernel name
    pub name: String,
    /// Instructions in the kernel
    pub instructions: Vec<SassInstruction>,
}