Build features and extension interfaces#

Build settings select code and dependencies. Runtime capability queries describe the library actually loaded. Neither alone establishes that an operation admits a particular input. The authoritative build inventory is the validated production build profile, with feature definitions in Cargo.toml and packaging dispatch in setup.py.

Which setting controls the build?#

Cargo feature

Definition or dependency

Python build switch

default

Enables extensions-all

—

extensions-all

Enables extension-sentinel2

—

extension-sentinel2

Sentinel-2 extension

CUGEO_RASTER_BUILD_EXTENSIONS selects extensions

cuda

CUDA toolkit, libcudart.so, libcuda.so.1

CUGEO_RASTER_BUILD_CUDA

orthorect

Orthorectification feature

CUGEO_RASTER_BUILD_ORTHORECT

nvimagecodec

cuda, libnvimgcodec.so.0

CUGEO_RASTER_BUILD_NVIMAGECODEC

nvjpeg2k

cuda, libnvjpeg2k.so.0

CUGEO_RASTER_BUILD_NVJPEG2K

nvtiff

cuda, libnvtiff.so.0

CUGEO_RASTER_BUILD_NVTIFF

nvcomp

cuda, libnvcomp.so.6

CUGEO_RASTER_BUILD_NVCOMP

gds

cuda, libcufile.so

CUGEO_RASTER_BUILD_GDS

npp

cuda, libnppc.so, libnppig.so

CUGEO_RASTER_BUILD_NPP

rmm

cuda, librmm.so, librapids_logger.so

CUGEO_RASTER_BUILD_RMM

The base native build requires libcugeo_proj.so. Cargo dispatches native and CUDA compilation through build_support. The Python switches select features when building the package. CUGEO_RASTER_PREBUILT_LIBRARY selects an existing absolute library instead, and setup checks its reported features against those requested.

Build layer

Settings and defaults

Native compiler

CC, CXX, CUGEO_RASTER_REAL_LD. C11 and C++20 public facade environments. The native C++ compilation profile uses C++17.

CUDA compiler

CUDA_HOME, CUDA_PATH, CUDACXX, CUGEO_RASTER_CUDA_ARCHS. Default architectures are 75 and 89, with PTX for the lowest configured architecture.

Dependency discovery

CUGEO_PROJ_LIBRARY, CUGEO_PROJ_ROOT, NVIMGCODEC_ROOT, NVJPEG2K_ROOT, NVTIFF_ROOT, NVCOMP_ROOT, RMM_ROOT.

Native interface

Raster ABI 8. ELF version CUGEO_RASTER_8.0.

The base package contains libcugeo_raster.so and the 22 headers listed in the production profile. The runtime profile locates libcugeo_proj.so under cugeo/proj. CUDA and cuFile libraries are external. Feature packaging includes the nvImageCodec, nvJPEG2000, nvTIFF and RMM libraries named in the profile. NPP libraries are external. Check the profile for the complete runtime and package lists rather than inferring wheel contents from a Cargo feature.

Which cuGeo-Proj library was selected?#

Precedence

Setting

Selection

1

CUGEO_PROJ_LIBRARY

Explicit shared library. It wins when both settings are supplied.

2

CUGEO_PROJ_ROOT

Searches target/release/libcugeo_proj.so, then target/debug/libcugeo_proj.so.

3

Default root

Uses ../cugeo-proj with the same search order.

For a CUDA Raster build, inspect the selected artifact. The build checks that it is a shared object with SONAME libcugeo_proj.so, exports cugeo_proj_abi_version and cugeo_proj_built_with_cuda, and declares dependencies on libcuda.so.1 and a versioned libcudart.so. An artifact failing that metadata check is rejected. These checks and discovery are defined in cugeo_proj.rs. Raster’s ABI 8 is a separate interface version.

Where is the extension available?#

Family

Build and dependency

Public interface

Packaging, loaded capability and input profile

Sentinel-2

extension-sentinel2. CUDA source is compiled for CUDA builds.

surface_reflectance.hpp and physical.hpp

The Python extension package is listed in the production profile. Query the loaded library’s extensions capability. The headers do not establish whole-scene qualification.

Prepared nvTIFF and nvImageCodec

Respective codec feature and CUDA

io.hpp

Feature packaging and loaded capability are separate from admission. The checked UInt16 pitched-BIP decode-to-affine profiles are in Input formats and execution routes.

Prepared JPEG 2000

Backend-specific feature and dependency

jpeg2000.hpp

Inspect the loaded capability and the generated prepared profile in Input formats and execution routes.

You can inspect the current environment.

from cugeo.raster.diagnostics import capabilities

print(capabilities())

The returned values belong to the loaded artifact. For Sentinel-2 preparation owners and buffers, see Native interfaces and device memory. For versioned native capability declarations, use raster.h.

Installed headers#

Task

Installed header under cugeo/raster/

C ABI and C++ umbrella

raster.h, raster.hpp

Errors, views and memory

error.hpp, buffers.hpp, memory.hpp

Dataset, metadata and I/O

dataset.hpp, metadata.hpp, read.hpp, io.hpp, jpeg2000.hpp

Grids and compute

warp.hpp, reproject.hpp, geolocation.hpp, rpc.hpp, ortho.hpp, composite.hpp

CUDA integration

cuda.hpp, cuda_driver.hpp

Sentinel-2

extensions/sentinel2/physical.hpp, extensions/sentinel2/surface_reflectance.hpp

Support required by public includes

detail/core.hpp, detail/terrain_ray.cuh

The installed-header inventory and runtime components are checked against the build configuration by check-build-contract.py.