def __init__(self, name: str, handle: int, size: int) -> None: """Geometry metadata for all mesh-less mesh based objects in the scene. Basic geometry properties and an interface to underlaying data buffers. """ self._optix = load_optix() self._name = name self._handle = handle self._size = size
"""Utility and convenience functions. """ import functools, operator import numpy as np from ctypes import byref, c_int from typing import Any, Optional, Tuple, Union from matplotlib import cm from plotoptix._load_lib import load_optix from plotoptix.enums import GpuArchitecture, ChannelOrder _optix = load_optix() def get_gpu_architecture() -> Optional[GpuArchitecture]: """Get configured SM architecture. Returns effective configuration of the PTX selection and ``-arch`` option of the shader compilation. Can verify matched SM architecture after constructing objects of :py:mod:`plotoptix.NpOptiX` and derived classes. Returns ------- out : GpuArchitecture or None SM architecture or ``None`` if not recognized. See Also -------- :py:mod:`plotoptix.enums.GpuArchitecture`
def test000_load_optix(self): optix = load_optix() self.assertTrue(optix is not None, msg="RnD.SharpOptiX not loaded.") self.assertTrue(optix.test_library(123), msg="RnD.SharpOptiX test function failed.")