Skip to content

Commit dbfb3a9

Browse files
bottlerfacebook-github-bot
authored andcommitted
remove __restrict__ in cpp
Summary: Remove use of nonstandard C++. Noticed on windows in issue facebookresearch#843. (We use `__restrict__` in CUDA, where it is fine, even on windows) Reviewed By: nikhilaravi Differential Revision: D31006516 fbshipit-source-id: 929ba9b3216cb70fad3ffa3274c910618d83973f
1 parent 526df44 commit dbfb3a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytorch3d/csrc/sample_pdf/sample_pdf_cpu.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ void SamplePdfCpu_worker(
3232

3333
auto bins_a = bins.accessor<float, 2>();
3434
auto weights_a = weights.accessor<float, 2>();
35-
float* __restrict__ output_p =
36-
outputs.data_ptr<float>() + start_batch * n_samples;
35+
float* output_p = outputs.data_ptr<float>() + start_batch * n_samples;
3736

3837
#ifdef USE_BINARY_SEARCH
3938
std::vector<float> partial_sums(n_bins);

0 commit comments

Comments
 (0)