OmniSciDB  91042dcc5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExampleTableFunctions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2021 OmniSci, 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_mandelbrot__cpu_(TableFunctionManager, int32_t, int32_t, double, double, double, double, int32_t) -> Column<double> x, Column<double> y, Column<int32_t> num_iterations
26 */
27 // clang-format on
28 
31  const int32_t x_pixels,
32  const int32_t y_pixels,
33  const double x_min,
34  const double x_max,
35  const double y_min,
36  const double y_max,
37  const int32_t max_iterations,
38  Column<double>& output_x,
39  Column<double>& output_y,
40  Column<int32_t>& output_num_iterations);
41 
42 // clang-format off
43 /*
44  UDTF: tf_mandelbrot_float__cpu_(TableFunctionManager, int32_t, int32_t, float, float, float, float, int32_t) -> Column<float> x, Column<float> y, Column<int32_t> num_iterations
45 */
46 // clang-format on
47 
50  const int32_t x_pixels,
51  const int32_t y_pixels,
52  const float x_min,
53  const float x_max,
54  const float y_min,
55  const float y_max,
56  const int32_t max_iterations,
57  Column<float>& output_x,
58  Column<float>& output_y,
59  Column<int32_t>& output_num_iterations);
60 
61 #else // #ifndef __CUDACC__
62 
63 // clang-format off
64 /*
65  UDTF: tf_mandelbrot_cuda__gpu_(int32_t x_pixels, int32_t y_pixels, double, double, double, double, int32_t) ->
66  Column<double> x, Column<double> y, Column<int32_t> num_iterations |
67  output_row_size="x_pixels * y_pixels"
68 */
69 // clang-format on
70 
72 int32_t tf_mandelbrot_cuda__gpu_(const int32_t x_pixels,
73  const int32_t y_pixels,
74  const double x_min,
75  const double x_max,
76  const double y_min,
77  const double y_max,
78  const int32_t max_iterations,
79  Column<double>& output_x,
80  Column<double>& output_y,
81  Column<int32_t>& output_num_iterations);
82 
83 // clang-format off
84 /*
85  UDTF: tf_mandelbrot_cuda_float__gpu_(int32_t x_pixels, int32_t y_pixels, float, float, float, float, int32_t) ->
86  Column<float> x, Column<float> y, Column<int32_t> num_iterations |
87  output_row_size="x_pixels * y_pixels"
88 */
89 // clang-format on
90 
92 int32_t tf_mandelbrot_cuda_float__gpu_(const int32_t x_pixels,
93  const int32_t y_pixels,
94  const float x_min,
95  const float x_max,
96  const float y_min,
97  const float y_max,
98  const int32_t max_iterations,
99  Column<float>& output_x,
100  Column<float>& output_y,
101  Column<int32_t>& output_num_iterations);
102 
103 #endif // __CUDACC__
#define EXTENSION_NOINLINE
Definition: OmniSciTypes.h:34
EXTENSION_NOINLINE int32_t tf_mandelbrot__cpu_(TableFunctionManager &mgr, const int32_t x_pixels, const int32_t y_pixels, const double x_min, const double x_max, const double y_min, const double y_max, const int32_t max_iterations, Column< double > &output_x, Column< double > &output_y, Column< int32_t > &output_num_iterations)
EXTENSION_NOINLINE int32_t tf_mandelbrot_float__cpu_(TableFunctionManager &mgr, const int32_t x_pixels, const int32_t y_pixels, const float x_min, const float x_max, const float y_min, const float y_max, const int32_t max_iterations, Column< float > &output_x, Column< float > &output_y, Column< int32_t > &output_num_iterations)