Open3D (C++ API)  0.18.0+252c867
TrilinearDevoxelizeKernel.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 //
8 // Based on PVCNN Library (MIT License):
9 // https://github.com/mit-han-lab/pvcnn
10 //
11 // Copyright (c) 2018 Zhijian Liu, Haotian Tang, Yujun Lin
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a copy
14 // of this software and associated documentation files (the "Software"), to deal
15 // in the Software without restriction, including without limitation the rights
16 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 // copies of the Software, and to permit persons to whom the Software is
18 // furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included in
21 // all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 // SOFTWARE.
30 // ----------------------------------------------------------------------------
31 
32 #pragma once
33 
54  int c,
55  int n,
56  int r,
57  int r2,
58  int r3,
59  bool is_training,
60  const float *coords,
61  const float *feat,
62  int *inds,
63  float *wgts,
64  float *outs);
65 
79  int c,
80  int n,
81  int r3,
82  const int *inds,
83  const float *wgts,
84  const float *grad_y,
85  float *grad_x);
void TrilinearDevoxelizeGrad(int b, int c, int n, int r3, const int *inds, const float *wgts, const float *grad_y, float *grad_x)
void TrilinearDevoxelize(int b, int c, int n, int r, int r2, int r3, bool is_training, const float *coords, const float *feat, int *inds, float *wgts, float *outs)