* garrow_cuda_host_buffer_new: * @gpu_number: A GPU device number for the target context. * @size: The number of bytes to be allocated on CPU host. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: A newly created #GArrowCUDAHostBuffer on success, * %NULL on error. The allocated memory is accessible from GPU * device for the @context. * * Since: 0.8.0 */
| 499 | * Since: 0.8.0 |
| 500 | */ |
| 501 | GArrowCUDAHostBuffer * |
| 502 | garrow_cuda_host_buffer_new(gint gpu_number, gint64 size, GError **error) |
| 503 | { |
| 504 | auto arrow_manager = arrow::cuda::CudaDeviceManager::Instance(); |
| 505 | auto arrow_buffer = (*arrow_manager)->AllocateHost(gpu_number, size); |
| 506 | if (garrow::check(error, arrow_buffer, "[cuda][host-buffer][new]")) { |
| 507 | return garrow_cuda_host_buffer_new_raw(&(*arrow_buffer)); |
| 508 | } else { |
| 509 | return NULL; |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | typedef struct GArrowCUDAIPCMemoryHandlePrivate_ |
| 514 | { |
nothing calls this directly
no test coverage detected