should_use_parallel_jacobian

Function should_use_parallel_jacobian 

Source
pub fn should_use_parallel_jacobian(
    n_dim: usize,
    is_sparse: bool,
    numthreads: usize,
) -> bool
Expand description

Determine if parallel Jacobian computation should be used

This function uses heuristics to decide whether it’s worth using parallel computation for the Jacobian based on system size, sparsity, etc.

§Arguments

  • n_dim - Dimension of the system
  • is_sparse - Whether the Jacobian is known to be sparse
  • num_threads - Number of available threads

§Returns

True if parallel computation is likely beneficial