Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lumurillo committed Apr 22, 2024
1 parent ac8a55b commit fd1168f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
9 changes: 4 additions & 5 deletions cpp/open3d/core/kernel/UnaryEW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,15 @@ void Copy(const Tensor& src, Tensor& dst) {
}
if (src_device.IsCPU() && dst_device.IsCPU()) {
CopyCPU(src, dst);
} else if ((src_device.IsCPU() || src_device.IsCUDA()) &&
(dst_device.IsCPU() || dst_device.IsCUDA())) {
} else if ((src_device.IsCPU() || src_device.IsCUDA()) &&
(dst_device.IsCPU() || dst_device.IsCUDA())) {
#ifdef BUILD_CUDA_MODULE
CopyCUDA(src, dst);
#else
utility::LogError("Not compiled with CUDA, but CUDA device is used.");
#endif
} else if ((src_device.IsCPU() || src_device.IsSYCL()) &&
(dst_device.IsCPU() || dst_device.IsSYCL())) {

} else if ((src_device.IsCPU() || src_device.IsSYCL()) &&
(dst_device.IsCPU() || dst_device.IsSYCL())) {
#ifdef BUILD_SYCL_MODULE
CopySYCL(src, dst);
#else
Expand Down
11 changes: 6 additions & 5 deletions cpp/open3d/core/kernel/UnaryEWSYCL.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// Copyright (c) 2018-2024 www.open3d.org
// Copyright (c) 2018-2023 www.open3d.org
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------

Expand Down Expand Up @@ -36,10 +36,11 @@ void CopySYCL(const Tensor& src, Tensor& dst) {
return;
}

MemoryManager::Memcpy(dst.GetDataPtr(), dst.GetDevice(), src.GetDataPtr(), src.GetDevice(),
MemoryManager::Memcpy(dst.GetDataPtr(), dst.GetDevice(), src.GetDataPtr(),
src.GetDevice(),
src_dtype.ByteSize() * shape.NumElements());
}

} // namespace kernel
} // namespace core
} // namespace open3d
} // namespace kernel
} // namespace core
} // namespace open3d

0 comments on commit fd1168f

Please sign in to comment.