Skip to main content

SolverScalar

Trait SolverScalar 

Source
pub trait SolverScalar: SolverSupported {
Show 16 methods // Required methods unsafe fn geqrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn geqrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, tau: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn getrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn getrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, work: *mut Self, ipiv: *mut i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn getrs( handle: cusolverDnHandle_t, trans: cublasOperation_t, n: i32, nrhs: i32, a: *const Self, lda: i32, ipiv: *const i32, b: *mut Self, ldb: i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn potrf_buffer_size( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn potrf( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn gesvd_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn gesvd( handle: cusolverDnHandle_t, jobu: i8, jobvt: i8, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, vt: *mut Self, ldvt: i32, work: *mut Self, lwork: i32, rwork: *mut Self, info: *mut i32, ) -> cusolverStatus_t; unsafe fn syevd_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn syevd( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn sygvd_buffer_size( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, b: *const Self, ldb: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t; unsafe fn sygvd( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, b: *mut Self, ldb: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t; unsafe fn potrf_batched( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a_array: *mut *mut Self, lda: i32, info_array: *mut i32, batch_size: i32, ) -> cusolverStatus_t; unsafe fn gesvdj_batched_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *const Self, lda: i32, s: *const Self, u: *const Self, ldu: i32, v: *const Self, ldv: i32, lwork: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t; unsafe fn gesvdj_batched( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, v: *mut Self, ldv: i32, work: *mut Self, lwork: i32, info: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t;
}
Expand description

Per-dtype dispatcher to the cuSOLVER S/D/C/Z entry points.

Methods take raw pointers because the actor side has already extracted them via device_ptr_mut; threading lifetimes through &mut CudaSlice<T> would force every wrapper to be generic over keep-alive guards. The actor is responsible for keeping the slices alive for the duration of the call.

§Safety

Each unsafe method is safe to call when:

  • the handle is a live DnHandle::cu() value bound to the same stream the slices were allocated/written through,
  • all device pointers reference the buffer sizes implied by the (m, n, lda) triple per the cuSOLVER reference,
  • lwork matches what the corresponding *_buffer_size returned,
  • info points to at least one writable i32.

Required Methods§

Source

unsafe fn geqrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

QR geqrf: workspace query.

Source

unsafe fn geqrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, tau: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn getrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

LU getrf: workspace query.

Source

unsafe fn getrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, work: *mut Self, ipiv: *mut i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn getrs( handle: cusolverDnHandle_t, trans: cublasOperation_t, n: i32, nrhs: i32, a: *const Self, lda: i32, ipiv: *const i32, b: *mut Self, ldb: i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn potrf_buffer_size( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Cholesky potrf.

Source

unsafe fn potrf( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn gesvd_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, lwork: *mut i32, ) -> cusolverStatus_t

SVD gesvd. (gesvd workspace query takes only m/n.)

Source

unsafe fn gesvd( handle: cusolverDnHandle_t, jobu: i8, jobvt: i8, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, vt: *mut Self, ldvt: i32, work: *mut Self, lwork: i32, rwork: *mut Self, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn syevd_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Symmetric eigendecomposition syevd.

Source

unsafe fn syevd( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn sygvd_buffer_size( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, b: *const Self, ldb: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Generalized symmetric eigendecomposition sygvd (real) / hegvd (complex). Phase 1 routes both messages through the same trait method since the f32/f64 surface is purely real.

Source

unsafe fn sygvd( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, b: *mut Self, ldb: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source

unsafe fn potrf_batched( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a_array: *mut *mut Self, lda: i32, info_array: *mut i32, batch_size: i32, ) -> cusolverStatus_t

Batched Cholesky potrfBatched. cuSOLVER takes an array-of-pointers to n × n matrices; the actor stages them into a contiguous device buffer of pointers.

Source

unsafe fn gesvdj_batched_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *const Self, lda: i32, s: *const Self, u: *const Self, ldu: i32, v: *const Self, ldv: i32, lwork: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Batched Jacobi SVD gesvdjBatched workspace query + launch.

Source

unsafe fn gesvdj_batched( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, v: *mut Self, ldv: i32, work: *mut Self, lwork: i32, info: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SolverScalar for f32

Source§

unsafe fn geqrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn geqrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, tau: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, work: *mut Self, ipiv: *mut i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrs( handle: cusolverDnHandle_t, trans: cublasOperation_t, n: i32, nrhs: i32, a: *const Self, lda: i32, ipiv: *const i32, b: *mut Self, ldb: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf_buffer_size( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvd_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvd( handle: cusolverDnHandle_t, jobu: i8, jobvt: i8, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, vt: *mut Self, ldvt: i32, work: *mut Self, lwork: i32, rwork: *mut Self, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn syevd_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn syevd( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn sygvd_buffer_size( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, b: *const Self, ldb: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn sygvd( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, b: *mut Self, ldb: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf_batched( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a_array: *mut *mut Self, lda: i32, info_array: *mut i32, batch_size: i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvdj_batched_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *const Self, lda: i32, s: *const Self, u: *const Self, ldu: i32, v: *const Self, ldv: i32, lwork: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvdj_batched( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, v: *mut Self, ldv: i32, work: *mut Self, lwork: i32, info: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Source§

impl SolverScalar for f64

Source§

unsafe fn geqrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn geqrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, tau: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrf_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrf( handle: cusolverDnHandle_t, m: i32, n: i32, a: *mut Self, lda: i32, work: *mut Self, ipiv: *mut i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn getrs( handle: cusolverDnHandle_t, trans: cublasOperation_t, n: i32, nrhs: i32, a: *const Self, lda: i32, ipiv: *const i32, b: *mut Self, ldb: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf_buffer_size( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvd_buffer_size( handle: cusolverDnHandle_t, m: i32, n: i32, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvd( handle: cusolverDnHandle_t, jobu: i8, jobvt: i8, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, vt: *mut Self, ldvt: i32, work: *mut Self, lwork: i32, rwork: *mut Self, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn syevd_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn syevd( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn sygvd_buffer_size( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *const Self, lda: i32, b: *const Self, ldb: i32, w: *const Self, lwork: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn sygvd( handle: cusolverDnHandle_t, itype: cusolverEigType_t, jobz: cusolverEigMode_t, uplo: cublasFillMode_t, n: i32, a: *mut Self, lda: i32, b: *mut Self, ldb: i32, w: *mut Self, work: *mut Self, lwork: i32, info: *mut i32, ) -> cusolverStatus_t

Source§

unsafe fn potrf_batched( handle: cusolverDnHandle_t, uplo: cublasFillMode_t, n: i32, a_array: *mut *mut Self, lda: i32, info_array: *mut i32, batch_size: i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvdj_batched_buffer_size( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *const Self, lda: i32, s: *const Self, u: *const Self, ldu: i32, v: *const Self, ldv: i32, lwork: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Source§

unsafe fn gesvdj_batched( handle: cusolverDnHandle_t, jobz: cusolverEigMode_t, m: i32, n: i32, a: *mut Self, lda: i32, s: *mut Self, u: *mut Self, ldu: i32, v: *mut Self, ldv: i32, work: *mut Self, lwork: i32, info: *mut i32, params: gesvdjInfo_t, batch_size: i32, ) -> cusolverStatus_t

Implementors§