gpuGather#

Fully qualified name: isaacsim::physics::newton::tensors::gpuGather

template<typename LaunchFn>
bool isaacsim::physics::newton::tensors::gpuGather(
LaunchFn &&launch,
const TensorDesc *dstTensor,
int n,
size_t elemFloats,
float *stagingBuffer,
)#

Launches a CUDA gather kernel and stages the result to dstTensor.

Parameters:
  • launch – Callable(float* gpuDst, int count) → bool, launches the CUDA kernel.

  • dstTensor – Caller’s output tensor (may be CPU or GPU).

  • n – Number of elements to gather.

  • elemFloats – Number of float components per element (for byte size computation).

  • stagingBuffer – Pre-allocated device buffer, used when dstTensor is on CPU.