Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cpp/src/arrow/gpu/cuda_context.cc
Original file line numberDiff line numberDiff line change
Expand Up@@ -169,7 +169,7 @@ class CudaContext::Impl {
"cuIpcGetMemHandle",
cuIpcGetMemHandle(&cu_handle, reinterpret_cast<CUdeviceptr>(data)));
}
return std::make_shared<CudaIpcMemHandle>(size, &cu_handle);
return std::shared_ptr<CudaIpcMemHandle>(new CudaIpcMemHandle(size, &cu_handle));
}

Status OpenIpcBuffer(const CudaIpcMemHandle& ipc_handle, uint8_t** out) {
Expand DownExpand Up@@ -247,14 +247,14 @@ std::shared_ptr<MemoryManager> CudaDevice::default_memory_manager() {

Result<std::shared_ptr<CudaContext>> CudaDevice::GetContext() {
// XXX should we cache a default context in CudaDevice instance?
auto context = std::make_shared<CudaContext>();
auto context = std::shared_ptr<CudaContext>(new CudaContext());
auto self = checked_pointer_cast<CudaDevice>(shared_from_this());
RETURN_NOT_OK(context->impl_->Init(self));
return context;
}

Result<std::shared_ptr<CudaContext>> CudaDevice::GetSharedContext(void* handle) {
auto context = std::make_shared<CudaContext>();
auto context = std::shared_ptr<CudaContext>(new CudaContext());
auto self = checked_pointer_cast<CudaDevice>(shared_from_this());
RETURN_NOT_OK(context->impl_->InitShared(self, reinterpret_cast<CUcontext>(handle)));
return context;
Expand DownExpand Up@@ -286,7 +286,7 @@ Result<std::shared_ptr<CudaDevice>> AsCudaDevice(const std::shared_ptr<Device>&

std::shared_ptr<CudaMemoryManager> CudaMemoryManager::Make(
const std::shared_ptr<Device>& device) {
return std::make_shared<CudaMemoryManager>(device);
return std::shared_ptr<CudaMemoryManager>(new CudaMemoryManager(device));
}

std::shared_ptr<CudaDevice> CudaMemoryManager::cuda_device() const {
Expand DownExpand Up@@ -476,7 +476,7 @@ class CudaDeviceManager::Impl {
Result<std::shared_ptr<CudaDevice>> MakeDevice(int device_number) {
DeviceProperties props;
RETURN_NOT_OK(props.Init(device_number));
return std::make_shared<CudaDevice>({std::move(props)});
return std::shared_ptr<CudaDevice>(new CudaDevice({std::move(props)}));
}

private:
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/gpu/cuda_memory.cc
Original file line numberDiff line numberDiff line change
Expand Up@@ -73,7 +73,7 @@ CudaIpcMemHandle::~CudaIpcMemHandle() {}

Result<std::shared_ptr<CudaIpcMemHandle>> CudaIpcMemHandle::FromBuffer(
const void* opaque_handle) {
return std::make_shared<CudaIpcMemHandle>(opaque_handle);
return std::shared_ptr<CudaIpcMemHandle>(new CudaIpcMemHandle(opaque_handle));
}

Result<std::shared_ptr<Buffer>> CudaIpcMemHandle::Serialize(MemoryPool* pool) const {
Expand Down