numr 0.17.0

Numerical computing and tensor library for Rust, in the role of NumPy: n-dimensional arrays, linear algebra, FFT, statistics and autograd on CPU, CUDA and WebGPU
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! CUDA error-free addition through configured tensor primitives.

use crate::error::Result;
use crate::ops::TwoSumOps;
use crate::ops::impl_generic::two_sum::two_sum_impl;
use crate::runtime::cuda::{CudaClient, CudaRuntime};
use crate::tensor::Tensor;

impl TwoSumOps<CudaRuntime> for CudaClient {
    fn two_sum(
        &self,
        a: &Tensor<CudaRuntime>,
        b: &Tensor<CudaRuntime>,
    ) -> Result<(Tensor<CudaRuntime>, Tensor<CudaRuntime>)> {
        two_sum_impl(self, a, b)
    }
}