mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Summary: This diff updates the documentation and tutorials with information about the new pulsar backend. For more information about the pulsar backend, see the release notes and the paper (https://arxiv.org/abs/2004.07484). For information on how to use the backend, see the point cloud rendering notebook and the examples in the folder docs/examples. Reviewed By: nikhilaravi Differential Revision: D24498129 fbshipit-source-id: e312b0169a72b13590df6e4db36bfe6190d742f9
27 lines
576 B
C++
27 lines
576 B
C++
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
#ifdef WITH_CUDA
|
|
#include <cuda_runtime_api.h>
|
|
|
|
namespace pulsar {
|
|
namespace pytorch {
|
|
|
|
void cudaDevToDev(
|
|
void* trg,
|
|
const void* src,
|
|
const int& size,
|
|
const cudaStream_t& stream) {
|
|
cudaMemcpyAsync(trg, src, size, cudaMemcpyDeviceToDevice, stream);
|
|
}
|
|
|
|
void cudaDevToHost(
|
|
void* trg,
|
|
const void* src,
|
|
const int& size,
|
|
const cudaStream_t& stream) {
|
|
cudaMemcpyAsync(trg, src, size, cudaMemcpyDeviceToHost, stream);
|
|
}
|
|
|
|
} // namespace pytorch
|
|
} // namespace pulsar
|
|
#endif
|