OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TorchTableFunctions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
20 
21 #ifndef __CUDACC__
22 
23 // clang-format off
24 /*
25  UDTF: tf_torch_raster_obj_detect__cpu_template(TableFunctionManager, Cursor<Column<PixelType> x,
26  Column<PixelType> y, ColumnList<ColorType> channels>,
27  PixelType x_input_units_per_pixel, PixelType y_input_units_per_pixel, float max_color_val,
28  int64_t tile_boundary_halo_pixels, TextEncodingNone model_metadata_path, TextEncodingNone metadata_path, float min_confidence_threshold,
29  float iou_threshold, bool use_gpu, int64_t device_num) | filter_table_function_transpose=on ->
30  Column<TextEncodingDict> detected_class | input_id=args<>, Column<int32_t> detected_class_id, Column<double> x,
31  Column<double> y, Column<double> detected_width, Column<double> detected_height,
32  Column<float> detected_confidence, PixelType=[float, double],
33  ColorType=[int16_t, int32_t]
34  */
35 // clang-format on
36 
37 template <typename PixelType, typename ColorType>
38 TEMPLATE_NOINLINE int32_t
40  const Column<PixelType>& input_x,
41  const Column<PixelType>& input_y,
42  const ColumnList<ColorType>& input_channels,
43  const PixelType x_input_units_per_pixel,
44  const PixelType y_input_units_per_pixel,
45  const float max_color_value,
46  const int64_t tile_boundary_halo_pixels,
47  const TextEncodingNone& model_path,
48  const TextEncodingNone& model_metadata_path,
49  const float min_confidence_threshold,
50  const float iou_threshold,
51  const bool use_gpu,
52  const int64_t device_num,
53  Column<TextEncodingDict>& detected_class_label,
54  Column<int32_t>& detected_class_id,
55  Column<double>& detected_centroid_x,
56  Column<double>& detected_centroid_y,
57  Column<double>& detected_width,
58  Column<double>& detected_height,
59  Column<float>& detected_confidence);
60 
61 #endif // __CUDACC__
TEMPLATE_NOINLINE int32_t tf_torch_raster_obj_detect__cpu_template(TableFunctionManager &mgr, const Column< PixelType > &input_x, const Column< PixelType > &input_y, const ColumnList< ColorType > &input_channels, const PixelType x_input_units_per_pixel, const PixelType y_input_units_per_pixel, const float max_color_value, const int64_t tile_boundary_halo_pixels, const TextEncodingNone &model_path, const TextEncodingNone &model_metadata_path, const float min_confidence_threshold, const float iou_threshold, const bool use_gpu, const int64_t device_num, Column< TextEncodingDict > &detected_class_label, Column< int32_t > &detected_class_id, Column< double > &detected_centroid_x, Column< double > &detected_centroid_y, Column< double > &detected_width, Column< double > &detected_height, Column< float > &detected_confidence)
#define TEMPLATE_NOINLINE
Definition: heavydbTypes.h:60