MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / coeff

Method coeff

extensions/include/cuMat/src/UnaryOps.h:393–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 __host__ __device__ CUMAT_STRONG_INLINE Index batches() const { return child_.batches(); }
392
393 __device__ CUMAT_STRONG_INLINE Scalar coeff(Index row, Index col, Index batch, Index index) const
394 {
395 using Functor = typename internal::AsDiagonalFunctor<VectorType>;
396 if (row == col)
397 {
398 if (IsRowVector)
399 return Functor::asDiagonal(child_.derived().coeff(0, col, batch, -1));
400 else
401 return Functor::asDiagonal(child_.derived().coeff(row, 0, batch, -1));
402 } else
403 {
404 return typename Functor::MatrixType(0);
405 }
406 }
407};
408
409

Callers

nothing calls this directly

Calls 1

coeffMethod · 0.45

Tested by

no test coverage detected