use openvino_sys::ov_preprocess_resize_algorithm_e;
#[derive(Copy, Clone, Debug)]
#[repr(u32)]
pub enum ResizeAlgorithm {
Linear,
Cubic,
Nearest,
}
impl From<ov_preprocess_resize_algorithm_e> for ResizeAlgorithm {
fn from(algo: ov_preprocess_resize_algorithm_e) -> Self {
match algo {
ov_preprocess_resize_algorithm_e::RESIZE_LINEAR => Self::Linear,
ov_preprocess_resize_algorithm_e::RESIZE_CUBIC => Self::Cubic,
ov_preprocess_resize_algorithm_e::RESIZE_NEAREST => Self::Nearest,
}
}
}
impl From<ResizeAlgorithm> for ov_preprocess_resize_algorithm_e {
fn from(algo: ResizeAlgorithm) -> ov_preprocess_resize_algorithm_e {
match algo {
ResizeAlgorithm::Linear => ov_preprocess_resize_algorithm_e::RESIZE_LINEAR,
ResizeAlgorithm::Cubic => ov_preprocess_resize_algorithm_e::RESIZE_CUBIC,
ResizeAlgorithm::Nearest => ov_preprocess_resize_algorithm_e::RESIZE_NEAREST,
}
}
}