Skip to main content

spir_kernel_compute

Function spir_kernel_compute 

Source
#[unsafe(no_mangle)]
pub extern "C" fn spir_kernel_compute( kernel: *const spir_kernel, x: f64, y: f64, out: *mut f64, ) -> StatusCode
Expand description

Compute kernel value K(x, y)

§Arguments

  • kernel - Kernel object
  • x - First argument (typically in [-1, 1])
  • y - Second argument (typically in [-1, 1])
  • out - Pointer to store the result

§Returns

  • SPIR_COMPUTATION_SUCCESS on success
  • SPIR_INVALID_ARGUMENT if kernel or out is null
  • SPIR_INTERNAL_ERROR if internal panic occurs