mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
Summary: Update all FB license strings to the new format. Reviewed By: patricklabatut Differential Revision: D33403538 fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
36 lines
936 B
C
36 lines
936 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.
|
|
*/
|
|
|
|
#ifndef PULSAR_NATIVE_COMMANDS_ROUTING_H_
|
|
#define PULSAR_NATIVE_COMMANDS_ROUTING_H_
|
|
|
|
#include "../global.h"
|
|
|
|
// Commands available everywhere.
|
|
#define MALLOC_HOST(VAR, TYPE, SIZE) \
|
|
VAR = static_cast<TYPE*>(malloc(sizeof(TYPE) * (SIZE)))
|
|
#define FREE_HOST(PTR) free(PTR)
|
|
|
|
/* Include command definitions depending on CPU or GPU use. */
|
|
|
|
#ifdef __CUDACC__
|
|
// TODO: find out which compiler we're using here and use the suppression.
|
|
// #pragma push
|
|
// #pragma diag_suppress = 68
|
|
#include <ATen/cuda/CUDAContext.h>
|
|
// #pragma pop
|
|
#include "../cuda/commands.h"
|
|
#else
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Weverything"
|
|
#pragma clang diagnostic pop
|
|
#include "../host/commands.h"
|
|
#endif
|
|
|
|
#endif
|