Skip to main content

softplus

Function softplus 

Source
pub fn softplus<T: GpuFloat>(
    handle: &BlasHandle,
    n: u32,
    input: &DeviceBuffer<T>,
    output: &mut DeviceBuffer<T>,
) -> BlasResult<()>
Expand description

Applies softplus element-wise: output[i] = ln(1 + exp(input[i])).

§Arguments

  • handle – BLAS handle.
  • n – number of elements.
  • input – input device buffer.
  • output – output device buffer.

§Errors

Returns BlasError on buffer validation or kernel launch failure.