OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RenderHandler.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019 OmnSci, 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 /*
18  * File: RenderHandler.cpp
19  * Author: Chris Root
20  *
21  * Created on Dec 18, 2019, 10:00 AM
22  */
23 
25 
26 #include "Logger/Logger.h"
27 
29 
31  const size_t render_mem_bytes,
32  const size_t max_concurrent_render_sessions,
33  const bool compositor_use_last_gpu,
34  const bool enable_auto_clear_render_mem,
35  const int render_oom_retry_threshold,
36  const bool renderer_use_vulkan_driver,
37  const bool renderer_prefer_igpu,
38  const uint32_t renderer_vulkan_timeout_ms,
39  const SystemParameters system_parameters)
40  : impl_(nullptr) {
41  throw std::runtime_error(
42  "Rendering is only supported in the Enterprise and Community Editions");
43 }
44 
46 
47 void RenderHandler::disconnect(const TSessionId& session) {
48  CHECK(impl_);
49 }
50 
52  TRenderResult& _return,
53  const std::shared_ptr<Catalog_Namespace::SessionInfo> session_info,
54  const int64_t widget_id,
55  std::string&& vega_json,
56  const int32_t compression_level,
57  const std::string& nonce) {
58  CHECK(impl_);
59 }
60 
61 void RenderHandler::start_render_query(TPendingRenderQuery& _return,
62  const TSessionId& session,
63  const int64_t widget_id,
64  const int16_t node_idx,
65  std::string&& vega_json) {
66  CHECK(impl_);
67 }
68 
69 void RenderHandler::execute_next_render_step(TRenderStepResult& _return,
70  const TPendingRenderQuery& pending_render,
71  const TRenderAggDataMap& merged_data) {
72  CHECK(impl_);
73 }
74 
76  TPixelTableRowResult& _return,
77  const std::shared_ptr<Catalog_Namespace::SessionInfo> session_info,
78  const int64_t widget_id,
79  const TPixel& pixel,
80  const std::map<std::string, std::vector<std::string>>& table_col_names,
81  const bool column_format,
82  const int32_t pixelRadius,
83  const std::string& nonce) {
84  CHECK(impl_);
85 }
86 
88  CHECK(impl_);
89 }
90 
92  CHECK(impl_);
93 }
94 
96  CHECK(impl_);
97  return std::string();
98 }
99 
101  const std::string& other_renderer_status_json) const {
102  CHECK(impl_);
103  return false;
104 }
105 
107  CHECK(impl_);
108 }
void clear_cpu_memory()
void execute_next_render_step(TRenderStepResult &_return, const TPendingRenderQuery &pending_render, const TRenderAggDataMap &merged_data)
void disconnect(const TSessionId &session)
void start_render_query(TPendingRenderQuery &_return, const TSessionId &session, const int64_t widget_id, const int16_t node_idx, std::string &&vega_json)
void get_result_row_for_pixel(TPixelTableRowResult &_return, const std::shared_ptr< Catalog_Namespace::SessionInfo > session_info, const int64_t widget_id, const TPixel &pixel, const std::map< std::string, std::vector< std::string >> &table_col_names, const bool column_format, const int32_t pixelRadius, const std::string &nonce)
std::unique_ptr< Impl > impl_
Definition: RenderHandler.h:99
void clear_gpu_memory()
RenderHandler(DBHandler *db_handler, const size_t render_mem_bytes, const size_t max_conncurrent_render_sessions, const bool compositor_use_last_gpu, const bool enable_auto_clear_render_mem, const int render_oom_retry_threshold, const bool renderer_use_vulkan_driver, const bool renderer_prefer_igpu, const uint32_t renderer_vulkan_timeout_ms, const SystemParameters system_parameters)
#define CHECK(condition)
Definition: Logger.h:211
std::string get_renderer_status_json() const
bool validate_renderer_status_json(const std::string &other_renderer_status_json) const
void render_vega(TRenderResult &_return, const std::shared_ptr< Catalog_Namespace::SessionInfo > session_info, const int64_t widget_id, std::string &&vega_json, const int32_t compression_level, const std::string &nonce)