コード例 #1
0
    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
コード例 #2
0
ファイル: utils.py プロジェクト: vn-os/plotoptix
"""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`
コード例 #3
0
ファイル: test_010_lib_loader.py プロジェクト: wzpy/plotoptix
 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.")