file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
lit/extern/otk-pyoptix/optix/pybind11/tests/test_call_policies.py
Python
import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import call_policies as m @pytest.mark.xfail("env.PYPY", reason="sometimes comes out 1 off on PyPy", strict=False) def test_keep_alive_argument(capture): n_inst = ConstructorStats.detail_reg_inst() with cap...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_callbacks.cpp
C++
/* tests/test_callbacks.cpp -- callbacks Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/functional.h> #include "constructor_stats.h" #include "pybind11...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_callbacks.py
Python
import time from threading import Thread import pytest import env # noqa: F401 from pybind11_tests import callbacks as m from pybind11_tests import detailed_error_messages_enabled def test_callbacks(): from functools import partial def func1(): return "func1" def func2(a, b, c, d): re...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_chrono.cpp
C++
/* tests/test_chrono.cpp -- test conversions to/from std::chrono types Copyright (c) 2016 Trent Houliston <trent@houliston.me> and Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_chrono.py
Python
import datetime import pytest import env # noqa: F401 from pybind11_tests import chrono as m def test_chrono_system_clock(): # Get the time from both c++ and datetime date0 = datetime.datetime.today() date1 = m.test_chrono1() date2 = datetime.datetime.today() # The returned value should be a d...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_class.cpp
C++
/* tests/test_class.cpp -- test py::class_ definitions and basic functionality Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #if defined(__INTEL_COMPILER) && __cplusplus ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_class.py
Python
import pytest import env from pybind11_tests import ConstructorStats, UserType from pybind11_tests import class_ as m def test_obj_class_name(): expected_name = "UserType" if env.PYPY else "pybind11_tests.UserType" assert m.obj_class_name(UserType(1)) == expected_name assert m.obj_class_name(UserType) ==...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_cmake_build/embed.cpp
C++
#include <pybind11/embed.h> namespace py = pybind11; PYBIND11_EMBEDDED_MODULE(test_cmake_build, m) { m.def("add", [](int i, int j) { return i + j; }); } int main(int argc, char *argv[]) { if (argc != 2) { throw std::runtime_error("Expected test.py file as the first argument"); } auto *test_py_...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_cmake_build/main.cpp
C++
#include <pybind11/pybind11.h> namespace py = pybind11; PYBIND11_MODULE(test_cmake_build, m) { m.def("add", [](int i, int j) { return i + j; }); }
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_cmake_build/test.py
Python
import sys import test_cmake_build assert isinstance(__file__, str) # Test this is properly set assert test_cmake_build.add(1, 2) == 3 print(f"{sys.argv[1]} imports, runs, and adds: 1 + 2 = 3")
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_const_name.cpp
C++
// Copyright (c) 2021 The Pybind Development Team. // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "pybind11_tests.h" // IUT = Implementation Under Test #define CONST_NAME_TESTS(TEST_FUNC, IUT) ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_const_name.py
Python
import pytest from pybind11_tests import const_name as m @pytest.mark.parametrize("func", [m.const_name_tests, m.underscore_tests]) @pytest.mark.parametrize( ("selector", "expected"), enumerate( ( "", "A", "Bd", "Cef", "%", "%", ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_constants_and_functions.cpp
C++
/* tests/test_constants_and_functions.cpp -- global constants and functions, enumerations, raw byte strings Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "py...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_constants_and_functions.py
Python
import pytest m = pytest.importorskip("pybind11_tests.constants_and_functions") def test_constants(): assert m.some_constant == 14 def test_function_overloading(): assert m.test_function() == "test_function()" assert m.test_function(7) == "test_function(7)" assert m.test_function(m.MyEnum.EFirstEnt...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_copy_move.cpp
C++
/* tests/test_copy_move_policies.cpp -- 'copy' and 'move' return value policies and related tests Copyright (c) 2016 Ben North <ben@redfrontdoor.org> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENS...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_copy_move.py
Python
import pytest from pybind11_tests import copy_move_policies as m def test_lacking_copy_ctor(): with pytest.raises(RuntimeError) as excinfo: m.lacking_copy_ctor.get_one() assert "is non-copyable!" in str(excinfo.value) def test_lacking_move_ctor(): with pytest.raises(RuntimeError) as excinfo: ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_custom_type_casters.cpp
C++
/* tests/test_custom_type_casters.cpp -- tests type_caster<T> Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "constructor_stats.h" #include "pybind11_tests.h" //...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_custom_type_casters.py
Python
import pytest from pybind11_tests import custom_type_casters as m def test_noconvert_args(msg): a = m.ArgInspector() assert ( msg(a.f("hi")) == """ loading ArgInspector1 argument WITH conversion allowed. Argument value = hi """ ) assert ( msg(a.g("this is a", "thi...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_custom_type_setup.cpp
C++
/* tests/test_custom_type_setup.cpp -- Tests `pybind11::custom_type_setup` Copyright (c) Google LLC All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/pybind11.h> #include "pybind11_tests.h" namespace py = pyb...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_custom_type_setup.py
Python
import gc import weakref import pytest import env # noqa: F401 from pybind11_tests import custom_type_setup as m @pytest.fixture() def gc_tester(): """Tests that an object is garbage collected. Assumes that any unreferenced objects are fully collected after calling `gc.collect()`. That is true on CPy...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_docstring_options.cpp
C++
/* tests/test_docstring_options.cpp -- generation of docstrings and signatures Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" TEST_SUBMODULE(d...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_docstring_options.py
Python
from pybind11_tests import docstring_options as m def test_docstring_options(): # options.disable_function_signatures() assert not m.test_function1.__doc__ assert m.test_function2.__doc__ == "A custom docstring" # docstring specified on just the first overload definition: assert m.test_overloade...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eigen_matrix.cpp
C++
/* tests/eigen.cpp -- automatic conversion of Eigen types Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/eigen/matrix.h> #include <pybind11/stl.h> #inc...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eigen_matrix.py
Python
import pytest from pybind11_tests import ConstructorStats np = pytest.importorskip("numpy") m = pytest.importorskip("pybind11_tests.eigen_matrix") ref = np.array( [ [0.0, 3, 0, 0, 0, 11], [22, 0, 0, 0, 17, 11], [7, 5, 0, 1, 0, 11], [0, 0, 0, 0, 0, 11], [0, 0, 14, 0, 8, 11...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eigen_tensor.cpp
C++
/* tests/eigen_tensor.cpp -- automatic conversion of Eigen Tensor All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #define PYBIND11_TEST_EIGEN_TENSOR_NAMESPACE eigen_tensor #ifdef EIGEN_AVOID_STL_ARRAY # undef EIGEN_AVOID_STL_ARR...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eigen_tensor.py
Python
import sys import pytest np = pytest.importorskip("numpy") eigen_tensor = pytest.importorskip("pybind11_tests.eigen_tensor") submodules = [eigen_tensor.c_style, eigen_tensor.f_style] try: import eigen_tensor_avoid_stl_array as avoid submodules += [avoid.c_style, avoid.f_style] except ImportError as e: # ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_embed/catch.cpp
C++
// The Catch implementation is compiled here. This is a standalone // translation unit to avoid recompiling it for every test change. #include <pybind11/embed.h> // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to // catch 2.0.1; this should be fixed in the next catch releas...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_embed/external_module.cpp
C++
#include <pybind11/pybind11.h> namespace py = pybind11; /* Simple test module/test class to check that the referenced internals data of external pybind11 * modules aren't preserved over a finalize/initialize. */ PYBIND11_MODULE(external_module, m) { class A { public: explicit A(int value) : v{value...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_embed/test_interpreter.cpp
C++
#include <pybind11/embed.h> // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to // catch 2.0.1; this should be fixed in the next catch release after 2.0.1). PYBIND11_WARNING_DISABLE_MSVC(4996) #include <catch.hpp> #include <cstdlib> #include <fstream> #include <functional> #...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_embed/test_interpreter.py
Python
import sys from widget_module import Widget class DerivedWidget(Widget): def __init__(self, message): super().__init__(message) def the_answer(self): return 42 def argv0(self): return sys.argv[0]
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_embed/test_trampoline.py
Python
import trampoline_module def func(): class Test(trampoline_module.test_override_cache_helper): def func(self): return 42 return Test() def func2(): class Test(trampoline_module.test_override_cache_helper): pass return Test()
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_enum.cpp
C++
/* tests/test_enums.cpp -- enumerations Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" TEST_SUBMODULE(enums, m) { // test_unscoped_enum ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_enum.py
Python
# ruff: noqa: SIM201 SIM300 SIM202 import pytest from pybind11_tests import enums as m def test_unscoped_enum(): assert str(m.UnscopedEnum.EOne) == "UnscopedEnum.EOne" assert str(m.UnscopedEnum.ETwo) == "UnscopedEnum.ETwo" assert str(m.EOne) == "UnscopedEnum.EOne" assert repr(m.UnscopedEnum.EOne) ==...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eval.cpp
C++
/* tests/test_eval.cpp -- Usage of eval() and eval_file() Copyright (c) 2016 Klemens D. Morgenstern All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/eval.h> #include "pybind11_tests.h" #include <utility> TE...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eval.py
Python
import os import pytest import env # noqa: F401 from pybind11_tests import eval_ as m def test_evals(capture): with capture: assert m.test_eval_statements() assert capture == "Hello World!" assert m.test_eval() assert m.test_eval_single_statement() assert m.test_eval_failure() @pyte...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_eval_call.py
Python
# This file is called from 'test_eval.py' if "call_test2" in locals(): call_test2(y) # noqa: F821 undefined name
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_exceptions.cpp
C++
/* tests/test_custom-exceptions.cpp -- exception translation Copyright (c) 2016 Pim Schellart <P.Schellart@princeton.edu> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "test_exceptions.h" #include "local_bindings.h" ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_exceptions.h
C/C++ Header
#pragma once #include "pybind11_tests.h" #include <stdexcept> // shared exceptions for cross_module_tests class PYBIND11_EXPORT_EXCEPTION shared_exception : public pybind11::builtin_exception { public: using builtin_exception::builtin_exception; explicit shared_exception() : shared_exception("") {} void ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_exceptions.py
Python
import sys import pytest import env import pybind11_cross_module_tests as cm import pybind11_tests # noqa: F401 from pybind11_tests import exceptions as m def test_std_exception(msg): with pytest.raises(RuntimeError) as excinfo: m.throw_std_exception() assert msg(excinfo.value) == "This exception w...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_factory_constructors.cpp
C++
/* tests/test_factory_constructors.cpp -- tests construction from a factory function via py::init_factory() Copyright (c) 2017 Jason Rhinelander <jason@imaginary.ca> All rights reserved. Use of this source code is governed by a BSD-style license that can be f...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_factory_constructors.py
Python
import re import pytest from pybind11_tests import ConstructorStats from pybind11_tests import factory_constructors as m from pybind11_tests.factory_constructors import tag def test_init_factory_basic(): """Tests py::init_factory() wrapper around various ways of returning the object""" cstats = [ C...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_gil_scoped.cpp
C++
/* tests/test_gil_scoped.cpp -- acquire and release gil Copyright (c) 2017 Borja Zarco (Google LLC) <bzarco@google.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/functional.h> #include "pybind11_tests....
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_gil_scoped.py
Python
import multiprocessing import sys import threading import time import pytest import env from pybind11_tests import gil_scoped as m class ExtendedVirtClass(m.VirtClass): def virtual_func(self): pass def pure_virtual_func(self): pass def test_callback_py_obj(): m.test_callback_py_obj(la...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_iostream.cpp
C++
/* tests/test_iostream.cpp -- Usage of scoped_output_redirect Copyright (c) 2017 Henry F. Schreiner All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/iostream.h> #include "pybind11_tests.h" #include <atomic> ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_iostream.py
Python
from contextlib import redirect_stderr, redirect_stdout from io import StringIO from pybind11_tests import iostream as m def test_captured(capsys): msg = "I've been redirected to Python, I hope!" m.captured_output(msg) stdout, stderr = capsys.readouterr() assert stdout == msg assert not stderr ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_kwargs_and_defaults.cpp
C++
/* tests/test_kwargs_and_defaults.cpp -- keyword arguments and default values Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "construct...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_kwargs_and_defaults.py
Python
import pytest from pybind11_tests import kwargs_and_defaults as m def test_function_signatures(doc): assert doc(m.kw_func0) == "kw_func0(arg0: int, arg1: int) -> str" assert doc(m.kw_func1) == "kw_func1(x: int, y: int) -> str" assert doc(m.kw_func2) == "kw_func2(x: int = 100, y: int = 200) -> str" as...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_local_bindings.cpp
C++
/* tests/test_local_bindings.cpp -- tests the py::module_local class feature which makes a class binding local to the module in which it is defined. Copyright (c) 2017 Jason Rhinelander <jason@imaginary.ca> All rights reserved. Use of this source code is governed by a ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_local_bindings.py
Python
import pytest import env # noqa: F401 from pybind11_tests import local_bindings as m def test_load_external(): """Load a `py::module_local` type that's only registered in an external module""" import pybind11_cross_module_tests as cm assert m.load_external1(cm.ExternalType1(11)) == 11 assert m.load...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_methods_and_attributes.cpp
C++
/* tests/test_methods_and_attributes.cpp -- constructors, deconstructors, attribute access, __str__, argument and return value conventions Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_methods_and_attributes.py
Python
import sys import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import methods_and_attributes as m NO_GETTER_MSG = ( "unreadable attribute" if sys.version_info < (3, 11) else "object has no getter" ) NO_SETTER_MSG = ( "can't set attribute" if sys.version_info...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_modules.cpp
C++
/* tests/test_modules.cpp -- nested modules, importing modules, and internal references Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_modules.py
Python
import builtins import pytest import env from pybind11_tests import ConstructorStats from pybind11_tests import modules as m from pybind11_tests.modules import subsubmodule as ms def test_nested_modules(): import pybind11_tests assert pybind11_tests.__name__ == "pybind11_tests" assert pybind11_tests.mo...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_multiple_inheritance.cpp
C++
/* tests/test_multiple_inheritance.cpp -- multiple inheritance, implicit MI casts Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "constructor_stats.h" #includ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_multiple_inheritance.py
Python
import pytest import env # noqa: F401 from pybind11_tests import ConstructorStats from pybind11_tests import multiple_inheritance as m def test_multiple_inheritance_cpp(): mt = m.MIType(3, 4) assert mt.foo() == 3 assert mt.bar() == 4 @pytest.mark.xfail("env.PYPY") def test_multiple_inheritance_mix1()...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_array.cpp
C++
/* tests/test_numpy_array.cpp -- test core array functionality Copyright (c) 2016 Ivan Smirnov <i.s.smirnov@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #include <pybind11/stl.h> #incl...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_array.py
Python
import pytest import env # noqa: F401 from pybind11_tests import numpy_array as m np = pytest.importorskip("numpy") def test_dtypes(): # See issue #1328. # - Platform-dependent sizes. for size_check in m.get_platform_dtype_size_checks(): print(size_check) assert size_check.size_cpp == s...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_dtypes.cpp
C++
/* tests/test_numpy_dtypes.cpp -- Structured and compound NumPy dtypes Copyright (c) 2016 Ivan Smirnov All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #include "pybind11_tests.h" #ifdef __GNUC__ # defin...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_dtypes.py
Python
import re import pytest import env # noqa: F401 from pybind11_tests import numpy_dtypes as m np = pytest.importorskip("numpy") @pytest.fixture(scope="module") def simple_dtype(): ld = np.dtype("longdouble") return np.dtype( { "names": ["bool_", "uint_", "float_", "ldbl_"], ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_vectorize.cpp
C++
/* tests/test_numpy_vectorize.cpp -- auto-vectorize functions over NumPy array arguments Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #i...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_numpy_vectorize.py
Python
import pytest from pybind11_tests import numpy_vectorize as m np = pytest.importorskip("numpy") def test_vectorize(capture): assert np.isclose(m.vectorized_func3(np.array(3 + 7j)), [6 + 14j]) for f in [m.vectorized_func, m.vectorized_func2]: with capture: assert np.isclose(f(1, 2, 3), 6...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_opaque_types.cpp
C++
/* tests/test_opaque_types.cpp -- opaque types, passing void pointers Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "pybind11_tests.h"...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_opaque_types.py
Python
import pytest from pybind11_tests import ConstructorStats, UserType from pybind11_tests import opaque_types as m def test_string_list(): lst = m.StringList() lst.push_back("Element 1") lst.push_back("Element 2") assert m.print_opaque_list(lst) == "Opaque list: [Element 1, Element 2]" assert lst.b...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_operator_overloading.cpp
C++
/* tests/test_operator_overloading.cpp -- operator overloading Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/operators.h> #include <pybind11/stl.h> #i...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_operator_overloading.py
Python
import pytest from pybind11_tests import ConstructorStats from pybind11_tests import operators as m def test_operator_overloading(): v1 = m.Vector2(1, 2) v2 = m.Vector(3, -1) v3 = m.Vector2(1, 2) # Same value as v1, but different instance. assert v1 is not v3 assert str(v1) == "[1.000000, 2.000...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_pickling.cpp
C++
/* tests/test_pickling.cpp -- pickle support Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> Copyright (c) 2021 The Pybind Development Team. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h"...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_pickling.py
Python
import pickle import re import pytest import env from pybind11_tests import pickling as m def test_pickle_simple_callable(): assert m.simple_callable() == 20220426 if env.PYPY: serialized = pickle.dumps(m.simple_callable) deserialized = pickle.loads(serialized) assert deserialized() ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_pytypes.cpp
C++
/* tests/test_pytypes.cpp -- Python type casters Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" #include <utility> namespace external { names...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_pytypes.py
Python
import contextlib import sys import types import pytest import env from pybind11_tests import detailed_error_messages_enabled from pybind11_tests import pytypes as m def test_obj_class_name(): assert m.obj_class_name(None) == "NoneType" assert m.obj_class_name(list) == "list" assert m.obj_class_name([])...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_sequences_and_iterators.cpp
C++
/* tests/test_sequences_and_iterators.cpp -- supporting Pythons' sequence protocol, iterators, etc. Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/o...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_sequences_and_iterators.py
Python
import pytest from pytest import approx # noqa: PT013 from pybind11_tests import ConstructorStats from pybind11_tests import sequences_and_iterators as m def test_slice_constructors(): assert m.make_forward_slice_size_t() == slice(0, -1, 1) assert m.make_reversed_slice_object() == slice(None, None, -1) @p...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_smart_ptr.cpp
C++
/* tests/test_smart_ptr.cpp -- binding classes with custom reference counting, implicit conversions between types Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #inclu...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_smart_ptr.py
Python
import pytest m = pytest.importorskip("pybind11_tests.smart_ptr") from pybind11_tests import ConstructorStats # noqa: E402 def test_smart_ptr(capture): # Object1 for i, o in enumerate( [m.make_object_1(), m.make_object_2(), m.MyObject1(3)], start=1 ): assert o.getRefCount() == 1 ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_stl.cpp
C++
/* tests/test_stl.cpp -- STL type casters Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #include "constructor_stats.h" #include "pybind11_tests...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_stl.py
Python
import pytest from pybind11_tests import ConstructorStats, UserType from pybind11_tests import stl as m def test_vector(doc): """std::vector <-> list""" lst = m.cast_vector() assert lst == [1] lst.append(2) assert m.load_vector(lst) assert m.load_vector(tuple(lst)) assert m.cast_bool_vec...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_stl_binders.cpp
C++
/* tests/test_stl_binders.cpp -- Usage of stl_binders functions Copyright (c) 2016 Sergey Lyskov All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/numpy.h> #include <pybind11/stl_bind.h> #include "pybind11_tes...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_stl_binders.py
Python
import pytest from pybind11_tests import stl_binders as m def test_vector_int(): v_int = m.VectorInt([0, 0]) assert len(v_int) == 2 assert bool(v_int) is True # test construction from a generator v_int1 = m.VectorInt(x for x in range(5)) assert v_int1 == m.VectorInt([0, 1, 2, 3, 4]) v_i...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_tagbased_polymorphic.cpp
C++
/* tests/test_tagbased_polymorphic.cpp -- test of polymorphic_type_hook Copyright (c) 2018 Hudson River Trading LLC <opensource@hudson-trading.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/stl.h> #inc...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_tagbased_polymorphic.py
Python
from pybind11_tests import tagbased_polymorphic as m def test_downcast(): zoo = m.create_zoo() assert [type(animal) for animal in zoo] == [ m.Labrador, m.Dog, m.Chihuahua, m.Cat, m.Panther, ] assert [animal.name for animal in zoo] == [ "Fido", "G...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_thread.cpp
C++
/* tests/test_thread.cpp -- call pybind11 bound methods in threads Copyright (c) 2021 Laramie Leavitt (Google LLC) <lar@google.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/cast.h> #include <pybind11/p...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_thread.py
Python
import threading from pybind11_tests import thread as m class Thread(threading.Thread): def __init__(self, fn): super().__init__() self.fn = fn self.e = None def run(self): try: for i in range(10): self.fn(i, i) except Exception as e: ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_type_caster_pyobject_ptr.cpp
C++
#include <pybind11/functional.h> #include <pybind11/stl.h> #include <pybind11/type_caster_pyobject_ptr.h> #include "pybind11_tests.h" #include <cstddef> #include <vector> namespace { std::vector<PyObject *> make_vector_pyobject_ptr(const py::object &ValueHolder) { std::vector<PyObject *> vec_obj; for (int i...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_type_caster_pyobject_ptr.py
Python
import pytest from pybind11_tests import type_caster_pyobject_ptr as m # For use as a temporary user-defined object, to maximize sensitivity of the tests below. class ValueHolder: def __init__(self, value): self.value = value def test_cast_from_pyobject_ptr(): assert m.cast_from_pyobject_ptr() == 6...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_union.cpp
C++
/* tests/test_class.cpp -- test py::class_ definitions and basic functionality Copyright (c) 2019 Roland Dreier <roland.dreier@gmail.com> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "pybind11_tests.h" TEST_SUBMODU...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_union.py
Python
from pybind11_tests import union_ as m def test_union(): instance = m.TestUnion() instance.as_uint = 10 assert instance.as_int == 10
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_unnamed_namespace_a.cpp
C++
#include "pybind11_tests.h" namespace { struct any_struct {}; } // namespace TEST_SUBMODULE(unnamed_namespace_a, m) { if (py::detail::get_type_info(typeid(any_struct)) == nullptr) { py::class_<any_struct>(m, "unnamed_namespace_a_any_struct"); } else { m.attr("unnamed_namespace_a_any_struct") =...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_unnamed_namespace_a.py
Python
import pytest from pybind11_tests import unnamed_namespace_a as m from pybind11_tests import unnamed_namespace_b as mb XFAIL_CONDITION = ( "(m.PYBIND11_INTERNALS_VERSION <= 4 and (m.defined___clang__ or not m.defined___GLIBCXX__))" " or " "(m.PYBIND11_INTERNALS_VERSION >= 5 and not m.defined_WIN32_or__WIN...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_unnamed_namespace_b.cpp
C++
#include "pybind11_tests.h" namespace { struct any_struct {}; } // namespace TEST_SUBMODULE(unnamed_namespace_b, m) { if (py::detail::get_type_info(typeid(any_struct)) == nullptr) { py::class_<any_struct>(m, "unnamed_namespace_b_any_struct"); } else { m.attr("unnamed_namespace_b_any_struct") =...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_unnamed_namespace_b.py
Python
from pybind11_tests import unnamed_namespace_b as m def test_have_attr_any_struct(): assert hasattr(m, "unnamed_namespace_b_any_struct")
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_vector_unique_ptr_member.cpp
C++
#include "pybind11_tests.h" #include <cstddef> #include <memory> #include <vector> namespace pybind11_tests { namespace vector_unique_ptr_member { struct DataType {}; // Reduced from a use case in the wild. struct VectorOwner { static std::unique_ptr<VectorOwner> Create(std::size_t num_elems) { return s...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_vector_unique_ptr_member.py
Python
import pytest from pybind11_tests import vector_unique_ptr_member as m @pytest.mark.parametrize("num_elems", range(3)) def test_create(num_elems): vo = m.VectorOwner.Create(num_elems) assert vo.data_size() == num_elems def test_cast(): vo = m.VectorOwner.Create(0) assert m.py_cast_VectorOwner_ptr(v...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_virtual_functions.cpp
C++
/* tests/test_virtual_functions.cpp -- overriding virtual functions from Python Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include <pybind11/functional.h> #include "...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tests/test_virtual_functions.py
Python
import pytest import env # noqa: F401 m = pytest.importorskip("pybind11_tests.virtual_functions") from pybind11_tests import ConstructorStats # noqa: E402 def test_override(capture, msg): class ExtendedExampleVirt(m.ExampleVirt): def __init__(self, state): super().__init__(state + 1) ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/FindCatch.cmake
CMake
# - Find the Catch test framework or download it (single header) # # This is a quick module for internal use. It assumes that Catch is # REQUIRED and that a minimum version is provided (not EXACT). If # a suitable version isn't found locally, the single header file # will be downloaded and placed in the build dir: PROJ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/FindEigen3.cmake
CMake
# - Try to find Eigen3 lib # # This module supports requiring a minimum version, e.g. you can do # find_package(Eigen3 3.1.2) # to require version 3.1.2 or newer of Eigen3. # # Once done this will define # # EIGEN3_FOUND - system has eigen lib with correct version # EIGEN3_INCLUDE_DIR - the eigen include directory ...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/FindPythonLibsNew.cmake
CMake
# - Find python libraries # This module finds the libraries corresponding to the Python interpreter # FindPythonInterp provides. # This code sets the following variables: # # PYTHONLIBS_FOUND - have the Python libs been found # PYTHON_PREFIX - path to the Python installation # PYTHON_LIBRARIES...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/JoinPaths.cmake
CMake
# This module provides function for joining paths # known from most languages # # SPDX-License-Identifier: (MIT OR CC0-1.0) # Copyright 2020 Jan Tojnar # https://github.com/jtojnar/cmake-snips # # Modelled after Python’s os.path.join # https://docs.python.org/3.7/library/os.path.html#os.path.join # Windows not supporte...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/check-style.sh
Shell
#!/bin/bash # # Script to check include/test code for common pybind11 code style errors. # # This script currently checks for # # 1. missing space between keyword and parenthesis, e.g.: for(, if(, while( # 2. Missing space between right parenthesis and brace, e.g. 'for (...){' # 3. opening brace on its own line. It sho...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/codespell_ignore_lines_from_errors.py
Python
"""Simple script for rebuilding .codespell-ignore-lines Usage: cat < /dev/null > .codespell-ignore-lines pre-commit run --all-files codespell >& /tmp/codespell_errors.txt python3 tools/codespell_ignore_lines_from_errors.py /tmp/codespell_errors.txt > .codespell-ignore-lines git diff to review changes, then commit, p...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS
lit/extern/otk-pyoptix/optix/pybind11/tools/libsize.py
Python
import os import sys # Internal build script for generating debugging test .so size. # Usage: # python libsize.py file.so save.txt -- displays the size of file.so and, if save.txt exists, compares it to the # size in it, then overwrites save.txt with the new size for futur...
yxlao/lit
24
(NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator
Python
yxlao
Yixing Lao
HKU-CS