airs_types/variable/
mod.rs1use std::ops::Add;
2
3use dashmap::DashMap;
4
5use crate::{Device, Tensor};
6
7mod names;
8
9pub const VARIABLE_NAME_SEPARATOR: &'static str = ".";
10
11#[derive(Debug)]
15pub struct Variables {
16 }
19
20#[derive(Debug)]
23pub struct VariableStore {
24 variables: DashMap<String, Tensor>,
25 device: Device,
26}
27
28#[derive(Clone)]
30pub struct VariableName<'s> {
31 path: Vec<String>,
32 index: u8,
33 store: &'s VariableStore,
34}
35
36impl VariableStore {
37 pub fn new(device: Device) -> Self {
38 Self { variables: DashMap::new(), device }
39 }
40}