Skip to main content

Crate ndrs

Crate ndrs 

Source

Re-exports§

pub use backend::cpu;
pub use backend::cuda;
pub use builtin_kernels::cpu as cpu_kernels;
pub use builtin_kernels::cuda as cuda_kernels;
pub use device::Device;
pub use dtype::BinaryOpFn;
pub use dtype::BinaryOpKind;
pub use dtype::DTYPE_FLOAT32;
pub use dtype::DTYPE_INT32;
pub use dtype::DType;
pub use dtype::TypeInfo;
pub use dtype::allocate_dtype;
pub use dtype::get_add_op;
pub use dtype::get_binary_op;
pub use dtype::register_binary_op;
pub use dtype::register_dtype;
pub use tensor::ArcTensor;
pub use tensor::RcTensor;
pub use tensor::Tensor;
pub use view::ArcTensorView;
pub use view::RcTensorView;
pub use view::SliceInfo;
pub use view::TensorViewOps;
pub use view::broadcast_shapes;

Modules§

backend
builtin_kernels
device
dtype
kernel
macros
stream
tensor
view
view_ops

Macros§

impl_add_for_view
加法操作宏(Add, AddAssign)
impl_broadcast_to
形状操作方法宏(每个宏生成一个方法定义)
impl_concat_split
impl_contiguous
impl_device_transfer
impl_elementwise_kernel_for_view
impl_fill
impl_matmul
impl_matmul_into
矩阵乘法方法宏
impl_slice
impl_strided_copy_to
拷贝与连续化方法宏
impl_transpose
launch
启动 RawKernel 的宏,自动添加参数。 用法: launch!(kernel, stream, cfg, arg1, arg2, ...);
s
切片宏实现
tensor