mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-27 08:46:00 +08:00
Summary: Update all FB license strings to the new format. Reviewed By: patricklabatut Differential Revision: D33403538 fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
34 lines
724 B
C++
34 lines
724 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#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
|