OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RenderInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 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 
19 #include "Analyzer/Analyzer.h"
20 #include "Catalog/Catalog.h"
26 
27 namespace QueryRenderer {
28 struct RenderSessionKey;
29 }
30 
32  public:
33  std::unique_ptr<RenderAllocatorMap> render_allocator_map_ptr;
34  const ::QueryRenderer::RenderSessionKey& render_session_key;
35 
36  // Info for all the column targets retrieved in in a query. Used to extract column/table
37  // info when rendering.
38  std::vector<std::shared_ptr<Analyzer::TargetEntry>> targets;
39 
40  // All the "selected from" tables in a query. Includes resolved and un-resolved views.
41  std::unordered_set<shared::FullyQualifiedTableName> table_names;
42 
43  RenderInfo(const ::QueryRenderer::RenderSessionKey& in_render_session_key,
44  const RenderQueryOptions& in_render_query_opts,
45  const heavyai::InSituFlags in_insitu_flags = heavyai::InSituFlags::kInSitu);
46 
48  std::shared_ptr<Catalog_Namespace::SessionInfo const> getSessionInfoPtr() const;
49 
50  void forceNonInSitu();
51  void setNonInSitu();
52 
53  bool useCudaBuffers() const;
54  void disableCudaBuffers();
55 
56  std::shared_ptr<QueryRenderer::QueryDataLayout> getQueryVboLayout() const;
57  void setQueryVboLayout(
58  const std::shared_ptr<QueryRenderer::QueryDataLayout>& vbo_layout);
59  std::shared_ptr<QueryRenderer::QueryDataLayout> getQuerySsboLayout() const;
60  void setQuerySsboLayout(
61  const std::shared_ptr<QueryRenderer::QueryDataLayout>& ssbo_layout);
62 
64 
65  void reset(std::unique_ptr<RenderQueryOptions> in_query_opts,
66  const heavyai::InSituFlags in_insitu_flags);
67 
68  private:
72 
73  std::shared_ptr<QueryRenderer::QueryDataLayout> query_vbo_layout;
74  std::shared_ptr<QueryRenderer::QueryDataLayout> query_ssbo_layout;
76 };
Defines data structures for the semantic analysis phase of query processing.
void disableCudaBuffers()
Definition: RenderInfo.cpp:59
const ::QueryRenderer::RenderSessionKey & render_session_key
Definition: RenderInfo.h:34
RenderInfo(const ::QueryRenderer::RenderSessionKey &in_render_session_key, const RenderQueryOptions &in_render_query_opts, const heavyai::InSituFlags in_insitu_flags=heavyai::InSituFlags::kInSitu)
Definition: RenderInfo.cpp:20
bool useCudaBuffers() const
Definition: RenderInfo.cpp:54
std::shared_ptr< Catalog_Namespace::SessionInfo const > getSessionInfoPtr() const
Definition: RenderInfo.cpp:40
void forceNonInSitu()
Definition: RenderInfo.cpp:46
std::shared_ptr< QueryRenderer::QueryDataLayout > getQuerySsboLayout() const
Definition: RenderInfo.cpp:73
void reset(std::unique_ptr< RenderQueryOptions > in_query_opts, const heavyai::InSituFlags in_insitu_flags)
Definition: RenderInfo.cpp:88
std::vector< std::shared_ptr< Analyzer::TargetEntry > > targets
Definition: RenderInfo.h:38
const Catalog_Namespace::SessionInfo & getSessionInfo() const
Definition: RenderInfo.cpp:29
This file contains the class specification and related data structures for Catalog.
const RenderQueryOptions & getRenderQueryOptions() const
Definition: RenderInfo.cpp:83
std::shared_ptr< QueryRenderer::QueryDataLayout > getQueryVboLayout() const
Definition: RenderInfo.cpp:63
RenderQueryOptions render_query_opts_
Definition: RenderInfo.h:75
std::shared_ptr< QueryRenderer::QueryDataLayout > query_ssbo_layout
Definition: RenderInfo.h:74
bool force_non_in_situ_data
Definition: RenderInfo.h:70
void setNonInSitu()
Definition: RenderInfo.cpp:50
bool cuda_using_buffers_
Definition: RenderInfo.h:71
std::unique_ptr< RenderAllocatorMap > render_allocator_map_ptr
Definition: RenderInfo.h:33
void setQuerySsboLayout(const std::shared_ptr< QueryRenderer::QueryDataLayout > &ssbo_layout)
Definition: RenderInfo.cpp:78
void setQueryVboLayout(const std::shared_ptr< QueryRenderer::QueryDataLayout > &vbo_layout)
Definition: RenderInfo.cpp:68
std::shared_ptr< QueryRenderer::QueryDataLayout > query_vbo_layout
Definition: RenderInfo.h:73
std::unordered_set< shared::FullyQualifiedTableName > table_names
Definition: RenderInfo.h:41