use objc2::Encoding;
use objc2::{Encode, RefEncode};
use objc2_foundation::NSUInteger;
#[repr(u64)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
pub enum TensorNamedDataLayout {
NCHW = 0,
NHWC = 1,
OIHW = 2,
HWIO = 3,
CHW = 4,
HWC = 5,
HW = 6,
NCDHW = 7,
NDHWC = 8,
OIDHW = 9,
DHWIO = 10,
}
impl From<TensorNamedDataLayout> for NSUInteger {
fn from(layout: TensorNamedDataLayout) -> Self {
layout as NSUInteger
}
}
unsafe impl Encode for TensorNamedDataLayout {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for TensorNamedDataLayout {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}