Loading [MathJax]/jax/output/HTML-CSS/config.js
Open3D (C++ API)  0.14.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SparseConvCUDAKernels.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018-2021 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 #include <vector>
29 
30 namespace open3d {
31 namespace ml {
32 namespace impl {
33 
85 template <class TReal, class TIndex, class TKernelIndex>
86 void FillColumn(const cudaStream_t& stream,
87  TReal* columns,
88  int in_channels,
89  TIndex begin_idx,
90  TIndex end_idx,
91  TIndex num_out,
92  TIndex num_inp,
93  const TReal* const __restrict__ inp_features,
94  const TReal* const __restrict__ inp_importance,
95  size_t neighbors_index_size,
96  const TIndex* const __restrict__ neighbors_index,
97  const TKernelIndex* const __restrict__ neighbors_kernel_index,
98  const TReal* const __restrict__ neighbors_importance,
99  const int64_t* const __restrict__ neighbors_row_splits,
100  const int num_kernel_elements,
101  bool normalize);
102 
105 template <class TReal, class TIndex, class TKernelIndex>
107  const cudaStream_t& stream,
108  TReal* columns,
109  int in_channels,
110  TIndex begin_idx,
111  TIndex end_idx,
112  TIndex num_out,
113  TIndex num_inp,
114  const TReal* const __restrict__ inp_features,
115  const TReal* const __restrict__ inp_neighbors_importance_sum,
116  const int64_t* const __restrict__ inp_neighbors_prefix_sum,
117  size_t neighbors_index_size,
118  const TIndex* const __restrict__ neighbors_index,
119  const TKernelIndex* const __restrict__ neighbors_kernel_index,
120  const TReal* const __restrict__ neighbors_importance,
121  const int64_t* const __restrict__ neighbors_row_splits,
122  const int num_kernel_elements,
123  bool normalize);
124 
125 } // namespace impl
126 } // namespace ml
127 } // namespace open3d
void FillColumn(const cudaStream_t &stream, TFeat *columns, int in_channels, TIndex begin_idx, TIndex end_idx, TIndex num_out, const TReal *const __restrict__ out_positions, TIndex num_inp, const TReal *const __restrict__ inp_positions, const TFeat *const __restrict__ inp_features, const TFeat *const __restrict__ inp_importance, size_t neighbors_index_size, const TIndex *const __restrict__ neighbors_index, const TFeat *const __restrict__ neighbors_importance, const int64_t *const __restrict__ neighbors_row_splits, const TReal *const __restrict__ extents, const TReal *const __restrict__ offsets, const std::vector< int > &filter_dims, InterpolationMode interpolation, CoordinateMapping coordinate_mapping, bool align_corners, bool individual_extent, bool isotropic_extent, bool normalize)
void FillColumnTranspose(const cudaStream_t &stream, TFeat *columns, int in_channels, TIndex begin_idx, TIndex end_idx, TIndex num_out, const TReal *const __restrict__ out_positions, TIndex num_inp, const TReal *const __restrict__ inp_positions, const TFeat *const __restrict__ inp_features, const TFeat *const __restrict__ inp_neighbors_importance_sum, const int64_t *const __restrict__ inp_neighbors_prefix_sum, size_t neighbors_index_size, const TIndex *const __restrict__ neighbors_index, const TFeat *const __restrict__ neighbors_importance, const int64_t *const __restrict__ neighbors_row_splits, const TReal *const __restrict__ extents, const TReal *const __restrict__ offsets, const std::vector< int > &filter_dims, InterpolationMode interpolation, CoordinateMapping coordinate_mapping, bool align_corners, bool individual_extent, bool isotropic_extent, bool normalize)
Definition: PinholeCameraIntrinsic.cpp:35