remove __restrict__ in cpp

Summary: Remove use of nonstandard C++. Noticed on windows in issue https://github.com/facebookresearch/pytorch3d/issues/843. (We use `__restrict__` in CUDA, where it is fine, even on windows)

Reviewed By: nikhilaravi

Differential Revision: D31006516

fbshipit-source-id: 929ba9b3216cb70fad3ffa3274c910618d83973f
This commit is contained in:
Jeremy Reizenstein 2021-09-22 15:52:32 -07:00 committed by Facebook GitHub Bot
parent 526df446c6
commit dbfb3a910a

View File

@ -32,8 +32,7 @@ void SamplePdfCpu_worker(
auto bins_a = bins.accessor<float, 2>(); auto bins_a = bins.accessor<float, 2>();
auto weights_a = weights.accessor<float, 2>(); auto weights_a = weights.accessor<float, 2>();
float* __restrict__ output_p = float* output_p = outputs.data_ptr<float>() + start_batch * n_samples;
outputs.data_ptr<float>() + start_batch * n_samples;
#ifdef USE_BINARY_SEARCH #ifdef USE_BINARY_SEARCH
std::vector<float> partial_sums(n_bins); std::vector<float> partial_sums(n_bins);