OmniSciDB
a5dc49c757
|
#include <Codegen.h>
Public Member Functions | |
Codegen (const Analyzer::GeoOperator *geo_operator) | |
auto | isNullable () const |
auto | getTypeInfo () const |
std::string | getName () const |
virtual std::unique_ptr < CodeGenerator::NullCheckCodegen > | getNullCheckCodegen (llvm::Value *null_lv, CgenState *cgen_state, Executor *executor) |
virtual size_t | size () const =0 |
virtual SQLTypeInfo | getNullType () const =0 |
virtual const Analyzer::Expr * | getOperand (const size_t index) |
virtual std::tuple < std::vector< llvm::Value * > , llvm::Value * > | codegenLoads (const std::vector< llvm::Value * > &arg_lvs, const std::vector< llvm::Value * > &pos_lvs, CgenState *cgen_state)=0 |
virtual std::vector < llvm::Value * > | codegen (const std::vector< llvm::Value * > &args, CodeGenerator::NullCheckCodegen *nullcheck_codegen, CgenState *cgen_state, const CompilationOptions &co)=0 |
virtual | ~Codegen () |
Static Public Member Functions | |
static std::unique_ptr< Codegen > | init (const Analyzer::GeoOperator *geo_operator) |
static char const * | pointIsNullFunctionName (SQLTypeInfo const &) |
Protected Attributes | |
const Analyzer::GeoOperator * | operator_ |
bool | is_nullable_ {true} |
|
inline |
|
inlinevirtual |
|
pure virtual |
Implemented in spatial_type::Distance, spatial_type::PointN, spatial_type::NumGeometries, spatial_type::PointConstructor, spatial_type::Centroid, spatial_type::NPoints, spatial_type::PointAccessors, spatial_type::AreaPerimeter, spatial_type::NRings, spatial_type::Transform, and spatial_type::StartEndPoint.
|
pure virtual |
Implemented in spatial_type::PointN, spatial_type::NumGeometries, spatial_type::PointConstructor, spatial_type::NRings, spatial_type::NPoints, spatial_type::Transform, spatial_type::PointAccessors, spatial_type::AreaPerimeter, spatial_type::StartEndPoint, spatial_type::Centroid, and spatial_type::Distance.
|
inline |
Definition at line 36 of file Codegen.h.
References Analyzer::GeoOperator::getName(), and operator_.
Referenced by spatial_type::Transform::codegen(), spatial_type::PointN::getNullCheckCodegen(), spatial_type::PointConstructor::getNullCheckCodegen(), getNullCheckCodegen(), spatial_type::NumGeometries::getOperand(), and spatial_type::NumGeometries::getOperandTypeInfo().
|
virtual |
Reimplemented in spatial_type::PointConstructor, and spatial_type::PointN.
Definition at line 51 of file Codegen.cpp.
References CHECK, getName(), getNullType(), and isNullable().
|
pure virtual |
Implemented in spatial_type::PointConstructor, spatial_type::PointN, spatial_type::Transform, spatial_type::AreaPerimeter, spatial_type::Centroid, spatial_type::Distance, spatial_type::StartEndPoint, spatial_type::PointAccessors, spatial_type::NPoints, spatial_type::NRings, and spatial_type::NumGeometries.
Referenced by getNullCheckCodegen().
|
virtual |
Reimplemented in spatial_type::NumGeometries, spatial_type::NPoints, and spatial_type::NRings.
Definition at line 64 of file Codegen.cpp.
References CHECK_LT, Analyzer::GeoOperator::getOperand(), operator_, and Analyzer::GeoOperator::size().
Referenced by spatial_type::Transform::codegen(), spatial_type::PointAccessors::codegen(), spatial_type::Centroid::codegenLoads(), spatial_type::Distance::codegenLoads(), spatial_type::AreaPerimeter::codegenLoads(), spatial_type::StartEndPoint::codegenLoads(), spatial_type::PointAccessors::codegenLoads(), spatial_type::Transform::codegenLoads(), and spatial_type::PointN::codegenLoads().
|
inline |
Definition at line 34 of file Codegen.h.
References Analyzer::Expr::get_type_info(), and operator_.
Referenced by spatial_type::NRings::codegen(), spatial_type::NumGeometries::codegen(), spatial_type::NPoints::codegenLoads(), spatial_type::NRings::codegenLoads(), and spatial_type::NumGeometries::codegenLoads().
|
static |
Definition at line 22 of file Codegen.cpp.
References Analyzer::GeoOperator::getName(), and UNREACHABLE.
Referenced by CodeGenerator::codegenGeoOperator().
|
inline |
Definition at line 32 of file Codegen.h.
References is_nullable_.
Referenced by spatial_type::NRings::codegen(), spatial_type::NumGeometries::codegen(), spatial_type::NPoints::codegenLoads(), spatial_type::NRings::codegenLoads(), spatial_type::NumGeometries::codegenLoads(), spatial_type::PointN::getNullCheckCodegen(), spatial_type::PointConstructor::getNullCheckCodegen(), and getNullCheckCodegen().
|
static |
Definition at line 69 of file Codegen.cpp.
References CHECK_EQ, SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), kENCODING_GEOINT, and kPOINT.
Referenced by CodeGenerator::codegenIsNull(), spatial_type::PointAccessors::codegenLoads(), and spatial_type::Transform::codegenLoads().
|
pure virtual |
Implemented in spatial_type::PointConstructor, spatial_type::PointN, spatial_type::Transform, spatial_type::AreaPerimeter, spatial_type::Centroid, spatial_type::Distance, spatial_type::StartEndPoint, spatial_type::PointAccessors, spatial_type::NPoints, spatial_type::NRings, and spatial_type::NumGeometries.
|
protected |
Definition at line 70 of file Codegen.h.
Referenced by spatial_type::AreaPerimeter::AreaPerimeter(), spatial_type::Centroid::Centroid(), spatial_type::Transform::codegen(), spatial_type::Centroid::codegenLoads(), spatial_type::Distance::codegenLoads(), spatial_type::AreaPerimeter::codegenLoads(), spatial_type::PointAccessors::codegenLoads(), spatial_type::Transform::codegenLoads(), spatial_type::PointConstructor::codegenLoads(), spatial_type::Distance::Distance(), spatial_type::NRings::getOperand(), spatial_type::NPoints::getOperand(), spatial_type::NumGeometries::getOperand(), isNullable(), spatial_type::PointConstructor::PointConstructor(), spatial_type::PointN::PointN(), spatial_type::StartEndPoint::StartEndPoint(), and spatial_type::Transform::Transform().
|
protected |
Definition at line 69 of file Codegen.h.
Referenced by spatial_type::AreaPerimeter::AreaPerimeter(), spatial_type::Centroid::Centroid(), spatial_type::PointAccessors::codegen(), spatial_type::PointConstructor::codegen(), spatial_type::PointAccessors::codegenLoads(), spatial_type::NPoints::codegenLoads(), spatial_type::PointConstructor::codegenLoads(), spatial_type::Distance::Distance(), getName(), spatial_type::PointConstructor::getNullCheckCodegen(), spatial_type::NRings::getOperand(), spatial_type::NPoints::getOperand(), spatial_type::NumGeometries::getOperand(), getOperand(), spatial_type::NumGeometries::getOperandTypeInfo(), getTypeInfo(), spatial_type::PointAccessors::PointAccessors(), spatial_type::PointConstructor::PointConstructor(), spatial_type::PointN::PointN(), spatial_type::StartEndPoint::StartEndPoint(), and spatial_type::Transform::Transform().