use core::fmt;
use super::types::{
GuruPlan, Plan, Plan2D, Plan3D, PlanND, RealPlan, RealPlan2D, RealPlan3D, RealPlanND,
SplitPlan, SplitPlan2D, SplitPlan3D, SplitPlanND,
};
use super::types_r2r::R2rPlan;
use crate::kernel::Float;
impl<T: Float> fmt::Debug for Plan<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Plan")
.field("n", &self.size())
.field("direction", &self.direction())
.field("algorithm", &self.algorithm_name())
.finish()
}
}
impl<T: Float> fmt::Debug for Plan2D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Plan2D")
.field("n0", &self.rows())
.field("n1", &self.cols())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for Plan3D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Plan3D")
.field("n0", &self.dim0())
.field("n1", &self.dim1())
.field("n2", &self.dim2())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for PlanND<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("PlanND")
.field("dims", &self.dims())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for RealPlan<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RealPlan")
.field("n", &self.size())
.field("kind", &self.kind())
.finish()
}
}
impl<T: Float> fmt::Debug for RealPlan2D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RealPlan2D")
.field("n0", &self.rows())
.field("n1", &self.cols())
.field("kind", &self.plan_kind())
.finish()
}
}
impl<T: Float> fmt::Debug for RealPlan3D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RealPlan3D")
.field("n0", &self.dim0())
.field("n1", &self.dim1())
.field("n2", &self.dim2())
.field("kind", &self.plan_kind())
.finish()
}
}
impl<T: Float> fmt::Debug for RealPlanND<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RealPlanND")
.field("dims", &self.dims())
.field("kind", &self.plan_kind())
.finish()
}
}
impl<T: Float> fmt::Debug for GuruPlan<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("GuruPlan")
.field("dims_rank", &self.dims().rank())
.field("batch_count", &self.batch_count())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for SplitPlan<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SplitPlan")
.field("n", &self.size())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for SplitPlan2D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SplitPlan2D")
.field("n0", &self.rows())
.field("n1", &self.cols())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for SplitPlan3D<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SplitPlan3D")
.field("n0", &self.dim0())
.field("n1", &self.dim1())
.field("n2", &self.dim2())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for SplitPlanND<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("SplitPlanND")
.field("dims", &self.dims())
.field("direction", &self.direction())
.finish()
}
}
impl<T: Float> fmt::Debug for R2rPlan<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("R2rPlan")
.field("n", &self.size())
.field("kind", &self.kind())
.finish()
}
}