pub fn open(dims: TVec<DimFact>) -> ShapeFact {
        if let Some((ix, &d)) = dims
            .iter()
            .enumerate()
            .find(|(_ix, d)| d.concretize().map(|d| d.is_stream()).unwrap_or(false))
        {
            let stream = Some(StreamInfo { axis: ix, len: d.concretize().unwrap() });
            ShapeFact {
                open: true,
                dims: dims
                    .iter()
                    .map(|d| match d {
                        GenericFact::Only(d) if d.is_stream() => GenericFact::Only(-1),
                        GenericFact::Only(d) => GenericFact::Only(d.to_integer().unwrap()),
                        GenericFact::Any => GenericFact::Any,
                    })
                    .collect(),
                stream,
            }
        } else {
            ShapeFact {
                open: true,
                dims: dims
                    .iter()
                    .map(|d| match d {
                        GenericFact::Only(d) => GenericFact::Only(d.to_integer().unwrap()),
                        GenericFact::Any => GenericFact::Any,
                    })
                    .collect(),
                stream: None,
            }
        }
    }
/// Constructs an open shape fact.
Constructs an open shape fact.
Constructs an open shape fact .
pub fn open(dims: TVec<DimFact>) -> ShapeFact {
        if let Some((ix, &d)) = dims
            .iter()
            .enumerate()
            .find(|(_ix, d)| d.concretize().map(|d| d.is_stream()).unwrap_or(false))
        {
            let stream = Some(StreamInfo { axis: ix, len: d.concretize().unwrap() });
            ShapeFact {
                open: true,
                dims: dims
                    .iter()
                    .map(|d| match d {
                        GenericFact::Only(d) if d.is_stream() => GenericFact::Only(-1),
                        GenericFact::Only(d) => GenericFact::Only(d.to_integer().unwrap()),
                        GenericFact::Any => GenericFact::Any,
                    })
                    .collect(),
                stream,
            }
        } else {
            ShapeFact {
                open: true,
                dims: dims
                    .iter()
                    .map(|d| match d {
                        GenericFact::Only(d) => GenericFact::Only(d.to_integer().unwrap()),
                        GenericFact::Any => GenericFact::Any,
                    })
                    .collect(),
                stream: None,
            }
        }
    }
pub fn open ( dims : TVec < DimFact > ) -> ShapeFact { if let Some ( ( ix , & d ) ) = dims . iter ( ) . enumerate ( ) . find ( | ( _ix , d ) | d . concretize ( ) . map ( | d | d . is_stream ( ) ) . unwrap_or ( false ) ) { let stream = Some ( StreamInfo { axis : ix , len : d . concretize ( ) . unwrap ( ) } ) ; ShapeFact { open : true , dims : dims . iter ( ) . map ( | d | match d { GenericFact :: Only ( d ) if d . is_stream ( ) => GenericFact :: Only ( - 1 ) , GenericFact :: Only ( d ) => GenericFact :: Only ( d . to_integer ( ) . unwrap ( ) ) , GenericFact :: Any => GenericFact :: Any , } ) . collect ( ) , stream , } } else { ShapeFact { open : true , dims : dims . iter ( ) . map ( | d | match d { GenericFact :: Only ( d ) => GenericFact :: Only ( d . to_integer ( ) . unwrap ( ) ) , GenericFact :: Any => GenericFact :: Any , } ) . collect ( ) , stream : None , } } }
Constructs an open shape fact.
Constructs an open shape fact .
dims
TVec<DimFact>
dims
TVec<DimFact>