Skip to main content

spir_funcs_batch_eval

Function spir_funcs_batch_eval 

Source
#[unsafe(no_mangle)]
pub extern "C" fn spir_funcs_batch_eval( funcs: *const spir_funcs, order: c_int, num_points: c_int, xs: *const f64, out: *mut f64, ) -> StatusCode
Expand description

Batch evaluate functions at multiple points (continuous functions only)

§Arguments

  • funcs - Pointer to the funcs object
  • order - Memory layout: 0 for row-major, 1 for column-major
  • num_points - Number of evaluation points
  • xs - Array of points to evaluate at
  • out - Pre-allocated array to store results

§Returns

Status code (SPIR_COMPUTATION_SUCCESS on success, SPIR_NOT_SUPPORTED if not continuous)

§Safety

  • xs must have size >= num_points
  • out must have size >= num_points * spir_funcs_get_size(funcs)
  • Layout: row-major = out[point][func], column-major = out[func][point]