pg_cuda_detail¶
Functions¶
| Name | Description |
|---|---|
| ensure_device | Returns device pointer for a forgeCol, uploading to GPU if needed. |
Function Details¶
ensure_device¶
template <typename T> inline T* ensure_device(const forgeCol<T>& v, forgeCol<T>& tmp)
Returns device pointer for a forgeCol, uploading to GPU if needed.
If the forgeCol is already on GPU, returns its device pointer directly.
If not, copies it into tmp (which must outlive the returned pointer)
and returns tmp's device pointer.