diff --git a/.gitattributes b/.gitattributes
index 8fa5e9834741a384d25c61a2f0b43a16e539b593..8a1c9eb87617f00b028967fda13879caa2797029 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -214,3 +214,38 @@ code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packag
code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/multidict/_multidict.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/fft/_pocketfft_umath.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/linalg/_umath_linalg.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libgfortran-040039e1-0352e75f.so.5.0.0 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libquadmath-96973f99-934c22de.so.0.0.0 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libscipy_openblas64_-56d6093b.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublas.so.12 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublasLt.so.12 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.alt.so.12.8 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/lib/libcudart.so.12 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cudnn/lib/libcudnn.so.9 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_graph.so.9 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cusolver/lib/libcusolverMg.so.11 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cusparselt/lib/libcusparseLt.so.0 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/nccl/lib/libnccl.so.2 filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/offsets.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/parsing.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/period.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/strptime.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/timedeltas.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/timestamps.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/timezones.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/tzconversion.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/tslibs/vectorized.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/window/aggregations.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
+code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/pandas/_libs/window/indexers.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/INSTALLER b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/INSTALLER
new file mode 100644
index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/INSTALLER
@@ -0,0 +1 @@
+pip
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/LICENSE.txt b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/LICENSE.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f0879448151a25d80a2cbd83e4d9ee8ef598a783
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/LICENSE.txt
@@ -0,0 +1,971 @@
+Copyright (c) 2005-2024, NumPy Developers.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of the NumPy Developers nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----
+
+The NumPy repository and source distributions bundle several libraries that are
+compatibly licensed. We list these here.
+
+Name: lapack-lite
+Files: numpy/linalg/lapack_lite/*
+License: BSD-3-Clause
+ For details, see numpy/linalg/lapack_lite/LICENSE.txt
+
+Name: dragon4
+Files: numpy/_core/src/multiarray/dragon4.c
+License: MIT
+ For license text, see numpy/_core/src/multiarray/dragon4.c
+
+Name: libdivide
+Files: numpy/_core/include/numpy/libdivide/*
+License: Zlib
+ For license text, see numpy/_core/include/numpy/libdivide/LICENSE.txt
+
+
+Note that the following files are vendored in the repository and sdist but not
+installed in built numpy packages:
+
+Name: Meson
+Files: vendored-meson/meson/*
+License: Apache 2.0
+ For license text, see vendored-meson/meson/COPYING
+
+Name: spin
+Files: .spin/cmds.py
+License: BSD-3
+ For license text, see .spin/LICENSE
+
+Name: tempita
+Files: numpy/_build_utils/tempita/*
+License: MIT
+ For details, see numpy/_build_utils/tempita/LICENCE.txt
+
+----
+
+This binary distribution of NumPy also bundles the following software:
+
+
+Name: OpenBLAS
+Files: numpy.libs/libscipy_openblas*.so
+Description: bundled as a dynamically linked library
+Availability: https://github.com/OpenMathLib/OpenBLAS/
+License: BSD-3-Clause
+ Copyright (c) 2011-2014, The OpenBLAS Project
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the name of the OpenBLAS project nor the names of
+ its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Name: LAPACK
+Files: numpy.libs/libscipy_openblas*.so
+Description: bundled in OpenBLAS
+Availability: https://github.com/OpenMathLib/OpenBLAS/
+License: BSD-3-Clause-Attribution
+ Copyright (c) 1992-2013 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+ Copyright (c) 2000-2013 The University of California Berkeley. All
+ rights reserved.
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
+ reserved.
+
+ $COPYRIGHT$
+
+ Additional copyrights may follow
+
+ $HEADER$
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer listed
+ in this license in the documentation and/or other materials
+ provided with the distribution.
+
+ - Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ The copyright holders provide no reassurances that the source code
+ provided does not infringe any patent, copyright, or any other
+ intellectual property rights of third parties. The copyright holders
+ disclaim any liability to any recipient for claims brought against
+ recipient by any third party for infringement of that parties
+ intellectual property rights.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Name: GCC runtime library
+Files: numpy.libs/libgfortran*.so
+Description: dynamically linked to files compiled with gcc
+Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
+License: GPL-3.0-with-GCC-exception
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+ Libgfortran is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgfortran is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ .
+
+----
+
+Full text of license texts referred to above follows (that they are
+listed below does not necessarily imply the conditions apply to the
+present binary release):
+
+----
+
+GCC RUNTIME LIBRARY EXCEPTION
+
+Version 3.1, 31 March 2009
+
+Copyright (C) 2009 Free Software Foundation, Inc.
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+This GCC Runtime Library Exception ("Exception") is an additional
+permission under section 7 of the GNU General Public License, version
+3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
+bears a notice placed by the copyright holder of the file stating that
+the file is governed by GPLv3 along with this Exception.
+
+When you use GCC to compile a program, GCC may combine portions of
+certain GCC header files and runtime libraries with the compiled
+program. The purpose of this Exception is to allow compilation of
+non-GPL (including proprietary) programs to use, in this way, the
+header files and runtime libraries covered by this Exception.
+
+0. Definitions.
+
+A file is an "Independent Module" if it either requires the Runtime
+Library for execution after a Compilation Process, or makes use of an
+interface provided by the Runtime Library, but is not otherwise based
+on the Runtime Library.
+
+"GCC" means a version of the GNU Compiler Collection, with or without
+modifications, governed by version 3 (or a specified later version) of
+the GNU General Public License (GPL) with the option of using any
+subsequent versions published by the FSF.
+
+"GPL-compatible Software" is software whose conditions of propagation,
+modification and use would permit combination with GCC in accord with
+the license of GCC.
+
+"Target Code" refers to output from any compiler for a real or virtual
+target processor architecture, in executable form or suitable for
+input to an assembler, loader, linker and/or execution
+phase. Notwithstanding that, Target Code does not include data in any
+format that is used as a compiler intermediate representation, or used
+for producing a compiler intermediate representation.
+
+The "Compilation Process" transforms code entirely represented in
+non-intermediate languages designed for human-written code, and/or in
+Java Virtual Machine byte code, into Target Code. Thus, for example,
+use of source code generators and preprocessors need not be considered
+part of the Compilation Process, since the Compilation Process can be
+understood as starting with the output of the generators or
+preprocessors.
+
+A Compilation Process is "Eligible" if it is done using GCC, alone or
+with other GPL-compatible software, or if it is done without using any
+work based on GCC. For example, using non-GPL-compatible Software to
+optimize any GCC intermediate representations would not qualify as an
+Eligible Compilation Process.
+
+1. Grant of Additional Permission.
+
+You have permission to propagate a work of Target Code formed by
+combining the Runtime Library with Independent Modules, even if such
+propagation would otherwise violate the terms of GPLv3, provided that
+all Target Code was generated by Eligible Compilation Processes. You
+may then convey such a combination under terms of your choice,
+consistent with the licensing of the Independent Modules.
+
+2. No Weakening of GCC Copyleft.
+
+The availability of this Exception does not imply any general
+presumption that third-party software is unaffected by the copyleft
+requirements of the license of GCC.
+
+----
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
+
+Name: libquadmath
+Files: numpy.libs/libquadmath*.so
+Description: dynamically linked to files compiled with gcc
+Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
+License: LGPL-2.1-or-later
+
+ GCC Quad-Precision Math Library
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Written by Francois-Xavier Coudert
+
+ This file is part of the libquadmath library.
+ Libquadmath is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ Libquadmath is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/METADATA b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/METADATA
new file mode 100644
index 0000000000000000000000000000000000000000..1c3041826574afca64c0ed3aca89bd92337def13
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/METADATA
@@ -0,0 +1,1092 @@
+Metadata-Version: 2.1
+Name: numpy
+Version: 2.2.6
+Summary: Fundamental package for array computing in Python
+Author: Travis E. Oliphant et al.
+Maintainer-Email: NumPy Developers
+License: Copyright (c) 2005-2024, NumPy Developers.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of the NumPy Developers nor the names of any
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ----
+
+ The NumPy repository and source distributions bundle several libraries that are
+ compatibly licensed. We list these here.
+
+ Name: lapack-lite
+ Files: numpy/linalg/lapack_lite/*
+ License: BSD-3-Clause
+ For details, see numpy/linalg/lapack_lite/LICENSE.txt
+
+ Name: dragon4
+ Files: numpy/_core/src/multiarray/dragon4.c
+ License: MIT
+ For license text, see numpy/_core/src/multiarray/dragon4.c
+
+ Name: libdivide
+ Files: numpy/_core/include/numpy/libdivide/*
+ License: Zlib
+ For license text, see numpy/_core/include/numpy/libdivide/LICENSE.txt
+
+
+ Note that the following files are vendored in the repository and sdist but not
+ installed in built numpy packages:
+
+ Name: Meson
+ Files: vendored-meson/meson/*
+ License: Apache 2.0
+ For license text, see vendored-meson/meson/COPYING
+
+ Name: spin
+ Files: .spin/cmds.py
+ License: BSD-3
+ For license text, see .spin/LICENSE
+
+ Name: tempita
+ Files: numpy/_build_utils/tempita/*
+ License: MIT
+ For details, see numpy/_build_utils/tempita/LICENCE.txt
+
+ ----
+
+ This binary distribution of NumPy also bundles the following software:
+
+
+ Name: OpenBLAS
+ Files: numpy.libs/libscipy_openblas*.so
+ Description: bundled as a dynamically linked library
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
+ License: BSD-3-Clause
+ Copyright (c) 2011-2014, The OpenBLAS Project
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the name of the OpenBLAS project nor the names of
+ its contributors may be used to endorse or promote products
+ derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Name: LAPACK
+ Files: numpy.libs/libscipy_openblas*.so
+ Description: bundled in OpenBLAS
+ Availability: https://github.com/OpenMathLib/OpenBLAS/
+ License: BSD-3-Clause-Attribution
+ Copyright (c) 1992-2013 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+ Copyright (c) 2000-2013 The University of California Berkeley. All
+ rights reserved.
+ Copyright (c) 2006-2013 The University of Colorado Denver. All rights
+ reserved.
+
+ $COPYRIGHT$
+
+ Additional copyrights may follow
+
+ $HEADER$
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer listed
+ in this license in the documentation and/or other materials
+ provided with the distribution.
+
+ - Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ The copyright holders provide no reassurances that the source code
+ provided does not infringe any patent, copyright, or any other
+ intellectual property rights of third parties. The copyright holders
+ disclaim any liability to any recipient for claims brought against
+ recipient by any third party for infringement of that parties
+ intellectual property rights.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Name: GCC runtime library
+ Files: numpy.libs/libgfortran*.so
+ Description: dynamically linked to files compiled with gcc
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
+ License: GPL-3.0-with-GCC-exception
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
+
+ Libgfortran is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgfortran is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ .
+
+ ----
+
+ Full text of license texts referred to above follows (that they are
+ listed below does not necessarily imply the conditions apply to the
+ present binary release):
+
+ ----
+
+ GCC RUNTIME LIBRARY EXCEPTION
+
+ Version 3.1, 31 March 2009
+
+ Copyright (C) 2009 Free Software Foundation, Inc.
+
+ Everyone is permitted to copy and distribute verbatim copies of this
+ license document, but changing it is not allowed.
+
+ This GCC Runtime Library Exception ("Exception") is an additional
+ permission under section 7 of the GNU General Public License, version
+ 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
+ bears a notice placed by the copyright holder of the file stating that
+ the file is governed by GPLv3 along with this Exception.
+
+ When you use GCC to compile a program, GCC may combine portions of
+ certain GCC header files and runtime libraries with the compiled
+ program. The purpose of this Exception is to allow compilation of
+ non-GPL (including proprietary) programs to use, in this way, the
+ header files and runtime libraries covered by this Exception.
+
+ 0. Definitions.
+
+ A file is an "Independent Module" if it either requires the Runtime
+ Library for execution after a Compilation Process, or makes use of an
+ interface provided by the Runtime Library, but is not otherwise based
+ on the Runtime Library.
+
+ "GCC" means a version of the GNU Compiler Collection, with or without
+ modifications, governed by version 3 (or a specified later version) of
+ the GNU General Public License (GPL) with the option of using any
+ subsequent versions published by the FSF.
+
+ "GPL-compatible Software" is software whose conditions of propagation,
+ modification and use would permit combination with GCC in accord with
+ the license of GCC.
+
+ "Target Code" refers to output from any compiler for a real or virtual
+ target processor architecture, in executable form or suitable for
+ input to an assembler, loader, linker and/or execution
+ phase. Notwithstanding that, Target Code does not include data in any
+ format that is used as a compiler intermediate representation, or used
+ for producing a compiler intermediate representation.
+
+ The "Compilation Process" transforms code entirely represented in
+ non-intermediate languages designed for human-written code, and/or in
+ Java Virtual Machine byte code, into Target Code. Thus, for example,
+ use of source code generators and preprocessors need not be considered
+ part of the Compilation Process, since the Compilation Process can be
+ understood as starting with the output of the generators or
+ preprocessors.
+
+ A Compilation Process is "Eligible" if it is done using GCC, alone or
+ with other GPL-compatible software, or if it is done without using any
+ work based on GCC. For example, using non-GPL-compatible Software to
+ optimize any GCC intermediate representations would not qualify as an
+ Eligible Compilation Process.
+
+ 1. Grant of Additional Permission.
+
+ You have permission to propagate a work of Target Code formed by
+ combining the Runtime Library with Independent Modules, even if such
+ propagation would otherwise violate the terms of GPLv3, provided that
+ all Target Code was generated by Eligible Compilation Processes. You
+ may then convey such a combination under terms of your choice,
+ consistent with the licensing of the Independent Modules.
+
+ 2. No Weakening of GCC Copyleft.
+
+ The availability of this Exception does not imply any general
+ presumption that third-party software is unaffected by the copyleft
+ requirements of the license of GCC.
+
+ ----
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+ software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+ to take away your freedom to share and change the works. By contrast,
+ the GNU General Public License is intended to guarantee your freedom to
+ share and change all versions of a program--to make sure it remains free
+ software for all its users. We, the Free Software Foundation, use the
+ GNU General Public License for most of our software; it applies also to
+ any other work released this way by its authors. You can apply it to
+ your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+ price. Our General Public Licenses are designed to make sure that you
+ have the freedom to distribute copies of free software (and charge for
+ them if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new
+ free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+ these rights or asking you to surrender the rights. Therefore, you have
+ certain responsibilities if you distribute copies of the software, or if
+ you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+ gratis or for a fee, you must pass on to the recipients the same
+ freedoms that you received. You must make sure that they, too, receive
+ or can get the source code. And you must show them these terms so they
+ know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+ (1) assert copyright on the software, and (2) offer you this License
+ giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+ that there is no warranty for this free software. For both users' and
+ authors' sake, the GPL requires that modified versions be marked as
+ changed, so that their problems will not be attributed erroneously to
+ authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+ modified versions of the software inside them, although the manufacturer
+ can do so. This is fundamentally incompatible with the aim of
+ protecting users' freedom to change the software. The systematic
+ pattern of such abuse occurs in the area of products for individuals to
+ use, which is precisely where it is most unacceptable. Therefore, we
+ have designed this version of the GPL to prohibit the practice for those
+ products. If such problems arise substantially in other domains, we
+ stand ready to extend this provision to those domains in future versions
+ of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+ States should not allow patents to restrict development and use of
+ software on general-purpose computers, but in those that do, we wish to
+ avoid the special danger that patents applied to a free program could
+ make it effectively proprietary. To prevent this, the GPL assures that
+ patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+ works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+ License. Each licensee is addressed as "you". "Licensees" and
+ "recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+ in a fashion requiring copyright permission, other than the making of an
+ exact copy. The resulting work is called a "modified version" of the
+ earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+ on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+ permission, would make you directly or secondarily liable for
+ infringement under applicable copyright law, except executing it on a
+ computer or modifying a private copy. Propagation includes copying,
+ distribution (with or without modification), making available to the
+ public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+ parties to make or receive copies. Mere interaction with a user through
+ a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+ to the extent that it includes a convenient and prominently visible
+ feature that (1) displays an appropriate copyright notice, and (2)
+ tells the user that there is no warranty for the work (except to the
+ extent that warranties are provided), that licensees may convey the
+ work under this License, and how to view a copy of this License. If
+ the interface presents a list of user commands or options, such as a
+ menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+ for making modifications to it. "Object code" means any non-source
+ form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+ standard defined by a recognized standards body, or, in the case of
+ interfaces specified for a particular programming language, one that
+ is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+ than the work as a whole, that (a) is included in the normal form of
+ packaging a Major Component, but which is not part of that Major
+ Component, and (b) serves only to enable use of the work with that
+ Major Component, or to implement a Standard Interface for which an
+ implementation is available to the public in source code form. A
+ "Major Component", in this context, means a major essential component
+ (kernel, window system, and so on) of the specific operating system
+ (if any) on which the executable work runs, or a compiler used to
+ produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+ the source code needed to generate, install, and (for an executable
+ work) run the object code and to modify the work, including scripts to
+ control those activities. However, it does not include the work's
+ System Libraries, or general-purpose tools or generally available free
+ programs which are used unmodified in performing those activities but
+ which are not part of the work. For example, Corresponding Source
+ includes interface definition files associated with source files for
+ the work, and the source code for shared libraries and dynamically
+ linked subprograms that the work is specifically designed to require,
+ such as by intimate data communication or control flow between those
+ subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+ can regenerate automatically from other parts of the Corresponding
+ Source.
+
+ The Corresponding Source for a work in source code form is that
+ same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+ copyright on the Program, and are irrevocable provided the stated
+ conditions are met. This License explicitly affirms your unlimited
+ permission to run the unmodified Program. The output from running a
+ covered work is covered by this License only if the output, given its
+ content, constitutes a covered work. This License acknowledges your
+ rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+ convey, without conditions so long as your license otherwise remains
+ in force. You may convey covered works to others for the sole purpose
+ of having them make modifications exclusively for you, or provide you
+ with facilities for running those works, provided that you comply with
+ the terms of this License in conveying all material for which you do
+ not control copyright. Those thus making or running the covered works
+ for you must do so exclusively on your behalf, under your direction
+ and control, on terms that prohibit them from making any copies of
+ your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+ the conditions stated below. Sublicensing is not allowed; section 10
+ makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+ measure under any applicable law fulfilling obligations under article
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
+ similar laws prohibiting or restricting circumvention of such
+ measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+ circumvention of technological measures to the extent such circumvention
+ is effected by exercising rights under this License with respect to
+ the covered work, and you disclaim any intention to limit operation or
+ modification of the work as a means of enforcing, against the work's
+ users, your or third parties' legal rights to forbid circumvention of
+ technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+ receive it, in any medium, provided that you conspicuously and
+ appropriately publish on each copy an appropriate copyright notice;
+ keep intact all notices stating that this License and any
+ non-permissive terms added in accord with section 7 apply to the code;
+ keep intact all notices of the absence of any warranty; and give all
+ recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+ and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+ produce it from the Program, in the form of source code under the
+ terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+ works, which are not by their nature extensions of the covered work,
+ and which are not combined with it such as to form a larger program,
+ in or on a volume of a storage or distribution medium, is called an
+ "aggregate" if the compilation and its resulting copyright are not
+ used to limit the access or legal rights of the compilation's users
+ beyond what the individual works permit. Inclusion of a covered work
+ in an aggregate does not cause this License to apply to the other
+ parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+ of sections 4 and 5, provided that you also convey the
+ machine-readable Corresponding Source under the terms of this License,
+ in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+ from the Corresponding Source as a System Library, need not be
+ included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+ tangible personal property which is normally used for personal, family,
+ or household purposes, or (2) anything designed or sold for incorporation
+ into a dwelling. In determining whether a product is a consumer product,
+ doubtful cases shall be resolved in favor of coverage. For a particular
+ product received by a particular user, "normally used" refers to a
+ typical or common use of that class of product, regardless of the status
+ of the particular user or of the way in which the particular user
+ actually uses, or expects or is expected to use, the product. A product
+ is a consumer product regardless of whether the product has substantial
+ commercial, industrial or non-consumer uses, unless such uses represent
+ the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+ procedures, authorization keys, or other information required to install
+ and execute modified versions of a covered work in that User Product from
+ a modified version of its Corresponding Source. The information must
+ suffice to ensure that the continued functioning of the modified object
+ code is in no case prevented or interfered with solely because
+ modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+ specifically for use in, a User Product, and the conveying occurs as
+ part of a transaction in which the right of possession and use of the
+ User Product is transferred to the recipient in perpetuity or for a
+ fixed term (regardless of how the transaction is characterized), the
+ Corresponding Source conveyed under this section must be accompanied
+ by the Installation Information. But this requirement does not apply
+ if neither you nor any third party retains the ability to install
+ modified object code on the User Product (for example, the work has
+ been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+ requirement to continue to provide support service, warranty, or updates
+ for a work that has been modified or installed by the recipient, or for
+ the User Product in which it has been modified or installed. Access to a
+ network may be denied when the modification itself materially and
+ adversely affects the operation of the network or violates the rules and
+ protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+ in accord with this section must be in a format that is publicly
+ documented (and with an implementation available to the public in
+ source code form), and must require no special password or key for
+ unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+ License by making exceptions from one or more of its conditions.
+ Additional permissions that are applicable to the entire Program shall
+ be treated as though they were included in this License, to the extent
+ that they are valid under applicable law. If additional permissions
+ apply only to part of the Program, that part may be used separately
+ under those permissions, but the entire Program remains governed by
+ this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+ remove any additional permissions from that copy, or from any part of
+ it. (Additional permissions may be written to require their own
+ removal in certain cases when you modify the work.) You may place
+ additional permissions on material, added by you to a covered work,
+ for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+ add to a covered work, you may (if authorized by the copyright holders of
+ that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+ restrictions" within the meaning of section 10. If the Program as you
+ received it, or any part of it, contains a notice stating that it is
+ governed by this License along with a term that is a further
+ restriction, you may remove that term. If a license document contains
+ a further restriction but permits relicensing or conveying under this
+ License, you may add to a covered work material governed by the terms
+ of that license document, provided that the further restriction does
+ not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+ must place, in the relevant source files, a statement of the
+ additional terms that apply to those files, or a notice indicating
+ where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+ form of a separately written license, or stated as exceptions;
+ the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+ provided under this License. Any attempt otherwise to propagate or
+ modify it is void, and will automatically terminate your rights under
+ this License (including any patent licenses granted under the third
+ paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+ license from a particular copyright holder is reinstated (a)
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the copyright
+ holder fails to notify you of the violation by some reasonable means
+ prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+ reinstated permanently if the copyright holder notifies you of the
+ violation by some reasonable means, this is the first time you have
+ received notice of violation of this License (for any work) from that
+ copyright holder, and you cure the violation prior to 30 days after
+ your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+ licenses of parties who have received copies or rights from you under
+ this License. If your rights have been terminated and not permanently
+ reinstated, you do not qualify to receive new licenses for the same
+ material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+ run a copy of the Program. Ancillary propagation of a covered work
+ occurring solely as a consequence of using peer-to-peer transmission
+ to receive a copy likewise does not require acceptance. However,
+ nothing other than this License grants you permission to propagate or
+ modify any covered work. These actions infringe copyright if you do
+ not accept this License. Therefore, by modifying or propagating a
+ covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+ receives a license from the original licensors, to run, modify and
+ propagate that work, subject to this License. You are not responsible
+ for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+ organization, or substantially all assets of one, or subdividing an
+ organization, or merging organizations. If propagation of a covered
+ work results from an entity transaction, each party to that
+ transaction who receives a copy of the work also receives whatever
+ licenses to the work the party's predecessor in interest had or could
+ give under the previous paragraph, plus a right to possession of the
+ Corresponding Source of the work from the predecessor in interest, if
+ the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+ rights granted or affirmed under this License. For example, you may
+ not impose a license fee, royalty, or other charge for exercise of
+ rights granted under this License, and you may not initiate litigation
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
+ any patent claim is infringed by making, using, selling, offering for
+ sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+ License of the Program or a work on which the Program is based. The
+ work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+ owned or controlled by the contributor, whether already acquired or
+ hereafter acquired, that would be infringed by some manner, permitted
+ by this License, of making, using, or selling its contributor version,
+ but do not include claims that would be infringed only as a
+ consequence of further modification of the contributor version. For
+ purposes of this definition, "control" includes the right to grant
+ patent sublicenses in a manner consistent with the requirements of
+ this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+ patent license under the contributor's essential patent claims, to
+ make, use, sell, offer for sale, import and otherwise run, modify and
+ propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+ agreement or commitment, however denominated, not to enforce a patent
+ (such as an express permission to practice a patent or covenant not to
+ sue for patent infringement). To "grant" such a patent license to a
+ party means to make such an agreement or commitment not to enforce a
+ patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+ and the Corresponding Source of the work is not available for anyone
+ to copy, free of charge and under the terms of this License, through a
+ publicly available network server or other readily accessible means,
+ then you must either (1) cause the Corresponding Source to be so
+ available, or (2) arrange to deprive yourself of the benefit of the
+ patent license for this particular work, or (3) arrange, in a manner
+ consistent with the requirements of this License, to extend the patent
+ license to downstream recipients. "Knowingly relying" means you have
+ actual knowledge that, but for the patent license, your conveying the
+ covered work in a country, or your recipient's use of the covered work
+ in a country, would infringe one or more identifiable patents in that
+ country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+ arrangement, you convey, or propagate by procuring conveyance of, a
+ covered work, and grant a patent license to some of the parties
+ receiving the covered work authorizing them to use, propagate, modify
+ or convey a specific copy of the covered work, then the patent license
+ you grant is automatically extended to all recipients of the covered
+ work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+ the scope of its coverage, prohibits the exercise of, or is
+ conditioned on the non-exercise of one or more of the rights that are
+ specifically granted under this License. You may not convey a covered
+ work if you are a party to an arrangement with a third party that is
+ in the business of distributing software, under which you make payment
+ to the third party based on the extent of your activity of conveying
+ the work, and under which the third party grants, to any of the
+ parties who would receive the covered work from you, a discriminatory
+ patent license (a) in connection with copies of the covered work
+ conveyed by you (or copies made from those copies), or (b) primarily
+ for and in connection with specific products or compilations that
+ contain the covered work, unless you entered into that arrangement,
+ or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+ any implied license or other defenses to infringement that may
+ otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot convey a
+ covered work so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you may
+ not convey it at all. For example, if you agree to terms that obligate you
+ to collect a royalty for further conveying from those to whom you convey
+ the Program, the only way you could satisfy both those terms and this
+ License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+ permission to link or combine any covered work with a work licensed
+ under version 3 of the GNU Affero General Public License into a single
+ combined work, and to convey the resulting work. The terms of this
+ License will continue to apply to the part which is the covered work,
+ but the special requirements of the GNU Affero General Public License,
+ section 13, concerning interaction through a network will apply to the
+ combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+ the GNU General Public License from time to time. Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+ Program specifies that a certain numbered version of the GNU General
+ Public License "or any later version" applies to it, you have the
+ option of following the terms and conditions either of that numbered
+ version or of any later version published by the Free Software
+ Foundation. If the Program does not specify a version number of the
+ GNU General Public License, you may choose any version ever published
+ by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+ versions of the GNU General Public License can be used, that proxy's
+ public statement of acceptance of a version permanently authorizes you
+ to choose that version for the Program.
+
+ Later license versions may give you additional or different
+ permissions. However, no additional obligations are imposed on any
+ author or copyright holder as a result of your choosing to follow a
+ later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+ above cannot be given local legal effect according to their terms,
+ reviewing courts shall apply local law that most closely approximates
+ an absolute waiver of all civil liability in connection with the
+ Program, unless a warranty or assumption of liability accompanies a
+ copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ state the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+ notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the appropriate
+ parts of the General Public License. Of course, your program's commands
+ might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
+ For more information on this, and how to apply and follow the GNU GPL, see
+ .
+
+ The GNU General Public License does not permit incorporating your program
+ into proprietary programs. If your program is a subroutine library, you
+ may consider it more useful to permit linking proprietary applications with
+ the library. If this is what you want to do, use the GNU Lesser General
+ Public License instead of this License. But first, please read
+ .
+
+ Name: libquadmath
+ Files: numpy.libs/libquadmath*.so
+ Description: dynamically linked to files compiled with gcc
+ Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
+ License: LGPL-2.1-or-later
+
+ GCC Quad-Precision Math Library
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Written by Francois-Xavier Coudert
+
+ This file is part of the libquadmath library.
+ Libquadmath is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ Libquadmath is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
+
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Science/Research
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Programming Language :: C
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Topic :: Software Development
+Classifier: Topic :: Scientific/Engineering
+Classifier: Typing :: Typed
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX
+Classifier: Operating System :: Unix
+Classifier: Operating System :: MacOS
+Project-URL: homepage, https://numpy.org
+Project-URL: documentation, https://numpy.org/doc/
+Project-URL: source, https://github.com/numpy/numpy
+Project-URL: download, https://pypi.org/project/numpy/#files
+Project-URL: tracker, https://github.com/numpy/numpy/issues
+Project-URL: release notes, https://numpy.org/doc/stable/release
+Requires-Python: >=3.10
+Description-Content-Type: text/markdown
+
+
+
+
+
+
+[](
+https://numfocus.org)
+[](
+https://pypi.org/project/numpy/)
+[](
+https://anaconda.org/conda-forge/numpy)
+[](
+https://stackoverflow.com/questions/tagged/numpy)
+[](
+https://doi.org/10.1038/s41586-020-2649-2)
+[](https://securityscorecards.dev/viewer/?uri=github.com/numpy/numpy)
+
+
+NumPy is the fundamental package for scientific computing with Python.
+
+- **Website:** https://www.numpy.org
+- **Documentation:** https://numpy.org/doc
+- **Mailing list:** https://mail.python.org/mailman/listinfo/numpy-discussion
+- **Source code:** https://github.com/numpy/numpy
+- **Contributing:** https://www.numpy.org/devdocs/dev/index.html
+- **Bug reports:** https://github.com/numpy/numpy/issues
+- **Report a security vulnerability:** https://tidelift.com/docs/security
+
+It provides:
+
+- a powerful N-dimensional array object
+- sophisticated (broadcasting) functions
+- tools for integrating C/C++ and Fortran code
+- useful linear algebra, Fourier transform, and random number capabilities
+
+Testing:
+
+NumPy requires `pytest` and `hypothesis`. Tests can then be run after installation with:
+
+ python -c "import numpy, sys; sys.exit(numpy.test() is False)"
+
+Code of Conduct
+----------------------
+
+NumPy is a community-driven open source project developed by a diverse group of
+[contributors](https://numpy.org/teams/). The NumPy leadership has made a strong
+commitment to creating an open, inclusive, and positive community. Please read the
+[NumPy Code of Conduct](https://numpy.org/code-of-conduct/) for guidance on how to interact
+with others in a way that makes our community thrive.
+
+Call for Contributions
+----------------------
+
+The NumPy project welcomes your expertise and enthusiasm!
+
+Small improvements or fixes are always appreciated. If you are considering larger contributions
+to the source code, please contact us through the [mailing
+list](https://mail.python.org/mailman/listinfo/numpy-discussion) first.
+
+Writing code isn’t the only way to contribute to NumPy. You can also:
+- review pull requests
+- help us stay on top of new and old issues
+- develop tutorials, presentations, and other educational materials
+- maintain and improve [our website](https://github.com/numpy/numpy.org)
+- develop graphic design for our brand assets and promotional materials
+- translate website content
+- help with outreach and onboard new contributors
+- write grant proposals and help with other fundraising efforts
+
+For more information about the ways you can contribute to NumPy, visit [our website](https://numpy.org/contribute/).
+If you’re unsure where to start or how your skills fit in, reach out! You can
+ask on the mailing list or here, on GitHub, by opening a new issue or leaving a
+comment on a relevant issue that is already open.
+
+Our preferred channels of communication are all public, but if you’d like to
+speak to us in private first, contact our community coordinators at
+numpy-team@googlegroups.com or on Slack (write numpy-team@googlegroups.com for
+an invitation).
+
+We also have a biweekly community call, details of which are announced on the
+mailing list. You are very welcome to join.
+
+If you are new to contributing to open source, [this
+guide](https://opensource.guide/how-to-contribute/) helps explain why, what,
+and how to successfully get involved.
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/RECORD b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/RECORD
new file mode 100644
index 0000000000000000000000000000000000000000..10d09b41ee1ff5c627d27bf803db7e049711510d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/RECORD
@@ -0,0 +1,1498 @@
+../../../bin/f2py,sha256=wQ9YaPdEApeAl0y7Fat2QuTG2-Je9WxcTvAa3TKh61c,238
+../../../bin/numpy-config,sha256=TmybERQmELBY8Xsx7zpAkoDrKjkFg1aorBxtrM3WQ50,238
+numpy-2.2.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
+numpy-2.2.6.dist-info/LICENSE.txt,sha256=wAK9Jt59x6pGQlCg3gY9WP5Vl0RS5DieXCHDUKggvwY,47755
+numpy-2.2.6.dist-info/METADATA,sha256=ItZI9ThIQpRkymQ7QNc7Sakg1Hh2_HfDldTcpOg0kEo,62026
+numpy-2.2.6.dist-info/RECORD,,
+numpy-2.2.6.dist-info/WHEEL,sha256=sZM_NeUMz2G4fDenMf11eikcCxcLaQWiYRmjwQBavQs,137
+numpy-2.2.6.dist-info/entry_points.txt,sha256=4mXDNhJDQ9GHqMBeRJ8B3PlixTFmkXGqU3RVuac20q0,172
+numpy.libs/libgfortran-040039e1-0352e75f.so.5.0.0,sha256=xgkASOzMdjUiwS7wFvgdprYnyzoET1XPBHmoOcQcCYA,2833617
+numpy.libs/libquadmath-96973f99-934c22de.so.0.0.0,sha256=btUTf0Enga14Y0OftUNhP2ILQ8MrYykqACkkYWL1u8Y,250985
+numpy.libs/libscipy_openblas64_-56d6093b.so,sha256=C9gV0EtrVJkOPMzHUo-7aWRW0JVp9TPQOQwT8M3E3Uo,25021457
+numpy/__config__.py,sha256=5DGi8IN_RKTEdFVY33VFCH63IZXeByrXl8ZCcJ1F97E,5281
+numpy/__config__.pyi,sha256=ZKpaYX_mDS5X5VwNaH5wNAVi3X1FP0XkI5LcFOImNPk,2377
+numpy/__init__.cython-30.pxd,sha256=cWfkT3NMZ3X0V3kjbEeS6qZIhR_eBNVYdO_8Mp-ebGk,46791
+numpy/__init__.pxd,sha256=pPfD2-RbhOQKZ7IgCkduBgGYZELhvycWeESYSFh_274,43427
+numpy/__init__.py,sha256=auF7BwwPcKjjytiaUQolaULlofN-pf6xIM7BZ-0qYjY,22147
+numpy/__init__.pyi,sha256=ofWyIU0AzmaLAVNQmCmOEDgOVzffZEyXXE3PmjWOeIs,211670
+numpy/__pycache__/__config__.cpython-310.pyc,,
+numpy/__pycache__/__init__.cpython-310.pyc,,
+numpy/__pycache__/_array_api_info.cpython-310.pyc,,
+numpy/__pycache__/_configtool.cpython-310.pyc,,
+numpy/__pycache__/_distributor_init.cpython-310.pyc,,
+numpy/__pycache__/_expired_attrs_2_0.cpython-310.pyc,,
+numpy/__pycache__/_globals.cpython-310.pyc,,
+numpy/__pycache__/_pytesttester.cpython-310.pyc,,
+numpy/__pycache__/conftest.cpython-310.pyc,,
+numpy/__pycache__/ctypeslib.cpython-310.pyc,,
+numpy/__pycache__/dtypes.cpython-310.pyc,,
+numpy/__pycache__/exceptions.cpython-310.pyc,,
+numpy/__pycache__/matlib.cpython-310.pyc,,
+numpy/__pycache__/version.cpython-310.pyc,,
+numpy/_array_api_info.py,sha256=qiHJDVG58rAk1iTlXsFrnhZ7Y-ghPUkyBpJiMvPK2jg,10381
+numpy/_array_api_info.pyi,sha256=P71pudeW0DUFIlo27p5NHC8hoxkYP2ZhrsoS9uEJcvo,4892
+numpy/_configtool.py,sha256=asiPfz_TX2Dp0msoNjG43pZKRYgNYusSIg2ieczK8as,1007
+numpy/_configtool.pyi,sha256=d4f22QGwpb1ZtDk-1Sn72ftvo4incC5E2JAikmjzfJI,24
+numpy/_core/__init__.py,sha256=H95-zST0CH6pnnObjXUXXiPgtub9M35IBGaYE-q4wrU,5612
+numpy/_core/__init__.pyi,sha256=Mj2I4BtqBVNUZVs5o1T58Z7wSaWjfhX0nCl-a0ULjgA,86
+numpy/_core/__pycache__/__init__.cpython-310.pyc,,
+numpy/_core/__pycache__/_add_newdocs.cpython-310.pyc,,
+numpy/_core/__pycache__/_add_newdocs_scalars.cpython-310.pyc,,
+numpy/_core/__pycache__/_asarray.cpython-310.pyc,,
+numpy/_core/__pycache__/_dtype.cpython-310.pyc,,
+numpy/_core/__pycache__/_dtype_ctypes.cpython-310.pyc,,
+numpy/_core/__pycache__/_exceptions.cpython-310.pyc,,
+numpy/_core/__pycache__/_internal.cpython-310.pyc,,
+numpy/_core/__pycache__/_machar.cpython-310.pyc,,
+numpy/_core/__pycache__/_methods.cpython-310.pyc,,
+numpy/_core/__pycache__/_string_helpers.cpython-310.pyc,,
+numpy/_core/__pycache__/_type_aliases.cpython-310.pyc,,
+numpy/_core/__pycache__/_ufunc_config.cpython-310.pyc,,
+numpy/_core/__pycache__/arrayprint.cpython-310.pyc,,
+numpy/_core/__pycache__/cversions.cpython-310.pyc,,
+numpy/_core/__pycache__/defchararray.cpython-310.pyc,,
+numpy/_core/__pycache__/einsumfunc.cpython-310.pyc,,
+numpy/_core/__pycache__/fromnumeric.cpython-310.pyc,,
+numpy/_core/__pycache__/function_base.cpython-310.pyc,,
+numpy/_core/__pycache__/getlimits.cpython-310.pyc,,
+numpy/_core/__pycache__/memmap.cpython-310.pyc,,
+numpy/_core/__pycache__/multiarray.cpython-310.pyc,,
+numpy/_core/__pycache__/numeric.cpython-310.pyc,,
+numpy/_core/__pycache__/numerictypes.cpython-310.pyc,,
+numpy/_core/__pycache__/overrides.cpython-310.pyc,,
+numpy/_core/__pycache__/printoptions.cpython-310.pyc,,
+numpy/_core/__pycache__/records.cpython-310.pyc,,
+numpy/_core/__pycache__/shape_base.cpython-310.pyc,,
+numpy/_core/__pycache__/strings.cpython-310.pyc,,
+numpy/_core/__pycache__/umath.cpython-310.pyc,,
+numpy/_core/_add_newdocs.py,sha256=stKVrZWkWH-g_mp7MwO-N1DkMfKXjLxBsrlurBXmeA4,208755
+numpy/_core/_add_newdocs.pyi,sha256=r__d_-GHkfjzuZ0qyjDztsKgdc1eIyeN-cBoYVgMBuo,168
+numpy/_core/_add_newdocs_scalars.py,sha256=ePmas0mI6OCpq9W8ZszXHyEhktsBUj_hvEt6ozb8Zic,12603
+numpy/_core/_add_newdocs_scalars.pyi,sha256=ZnIk0TgL0szrv6SPCH-4dF469Q_92UvV5_ek47Oj7HM,573
+numpy/_core/_asarray.py,sha256=7oZPqNjuDL0IxIeT7V_UJW19lsKS3eny-jlN4Ha-hoA,3912
+numpy/_core/_asarray.pyi,sha256=xkgqEh4c9lcFktJija8a1w5Tj7-2XfZOV8GjDZsXpzY,1085
+numpy/_core/_dtype.py,sha256=4Pz6KJQJRywlsMhdH8NbIugziDyQi1ekv2ZMw7zomzo,10734
+numpy/_core/_dtype.pyi,sha256=DKUAq45hxO7xO6zVuI6oYkkl1gtodB2z0NJ9JtFNhfc,1951
+numpy/_core/_dtype_ctypes.py,sha256=dcZHQ46qjV0n7l934WIYw7kv-1HoHxelu50oIIX7GWU,3718
+numpy/_core/_dtype_ctypes.pyi,sha256=VwEZFViCPuHlCURv2jpJp9sbHh2hYUpzC_FRZNNGMMw,3682
+numpy/_core/_exceptions.py,sha256=dZWKqfdLRvJvbAEG_fof_8ikEKxjakADMty1kLC_l_M,5379
+numpy/_core/_exceptions.pyi,sha256=xH30RJw6Yi0lyJzcwb32uSS7aMT64Kf1Cr82ZNCu9jQ,2146
+numpy/_core/_internal.py,sha256=B8t6mxvaDouxE-COR010v4_PUHNzOF8mHgFatRPlJWk,29164
+numpy/_core/_internal.pyi,sha256=QKaBqSkdl1mnHLJb376B_5mv-GCZtmn8DXDQufA1D4E,2654
+numpy/_core/_machar.py,sha256=399tphFPGzJy1bpbeXLDjUUZTebWto1lozB1praORfE,11565
+numpy/_core/_machar.pyi,sha256=xH30RJw6Yi0lyJzcwb32uSS7aMT64Kf1Cr82ZNCu9jQ,2146
+numpy/_core/_methods.py,sha256=pjmP1yAbtVesXTytuupGIXojO55y8LBS-8fEQPusNIU,9469
+numpy/_core/_methods.pyi,sha256=-WJkb43KYhpq59UpUxsjTIB30WAIApHjmlBzXFMrc8Y,556
+numpy/_core/_multiarray_tests.cpython-310-x86_64-linux-gnu.so,sha256=jMvfEWtj9yFQwbG0FCIQaaTrUAg39zVEH8LtzmvwBKo,178888
+numpy/_core/_multiarray_umath.cpython-310-x86_64-linux-gnu.so,sha256=xjTq8FNnrwK4Fc89ICD77um0dCavH-Js8xieR5iTLcU,10449209
+numpy/_core/_operand_flag_tests.cpython-310-x86_64-linux-gnu.so,sha256=q6mNJbns3leBgBvrN7tUSqVGhScnareQTn-bLfZeYfk,16984
+numpy/_core/_rational_tests.cpython-310-x86_64-linux-gnu.so,sha256=K53yA2cH8tWPhTHn98pK5aqJYEAUih3qVr-jC9MTA5o,59824
+numpy/_core/_simd.cpython-310-x86_64-linux-gnu.so,sha256=SUlAdaif-Jcb_UajMC0ilqCnKoIraFGUHV32YXhxAm8,3038216
+numpy/_core/_simd.pyi,sha256=2z2sFPgXr3KRzHltbt31HVrhkXM0VwXFp1lUjxaRMAM,669
+numpy/_core/_string_helpers.py,sha256=gu3x0dEnRnh3mnOkviX17r8rCmagVgYHfxILt9Q9irA,2837
+numpy/_core/_string_helpers.pyi,sha256=xLlLKJHutEYzyKnTG2k7clcWvVUTvD319SjnKmDXuac,358
+numpy/_core/_struct_ufunc_tests.cpython-310-x86_64-linux-gnu.so,sha256=gNj0W2VNP4ZCvK24ipNYd4d9PaHqkuzAAgQyBVUfLhU,17120
+numpy/_core/_type_aliases.py,sha256=4AU_cVekBKDIXO1URlOQKsMz8nrDw1tHr_nBdQzvNzo,3489
+numpy/_core/_type_aliases.pyi,sha256=9nNzq_Bxy5ikgnRaFMEcbThUVrb4HYJQvH58gXDWCGE,2400
+numpy/_core/_ufunc_config.py,sha256=LlFpTUnHFeHQlNFiuBHvrqVn-nQ7EvIgUEn3HUclt7k,15030
+numpy/_core/_ufunc_config.pyi,sha256=piQY1VeYD5rKJUOOMYRvLhNPMAdLEik4Yzgx-ioB19A,1172
+numpy/_core/_umath_tests.cpython-310-x86_64-linux-gnu.so,sha256=oPK4BNfdjyyWJTIxXST5WD1eG1dGe-tt0m3ZDfqruO4,46416
+numpy/_core/arrayprint.py,sha256=s5lMLv3Wy_fa3hB1OqUaM4h1Ja9SB_X-3zAkQW1Tu4E,64812
+numpy/_core/arrayprint.pyi,sha256=BmhTDgihJN2U08C0RUzvl36lXp8Cc1CF-uy3MuF3kbI,6934
+numpy/_core/cversions.py,sha256=H_iNIpx9-hY1cQNxqjT2d_5SXZhJbMo_caq4_q6LB7I,347
+numpy/_core/defchararray.py,sha256=hwzNR5D4bYTDU846j0uKoTnRsZk22jmM5KeXZitkvmU,37798
+numpy/_core/defchararray.pyi,sha256=n4P-zXnU8SdMf1cAiKDnJA08L_sVsvoDx7ONFOO-8YM,26962
+numpy/_core/einsumfunc.py,sha256=xsYoawvzK4EA2QIYdtk5KyrFkUCe4kSt5wOtXCm_v1s,52820
+numpy/_core/einsumfunc.pyi,sha256=mx5u6i7mdFuJH4MqLZVU26-ld5y0x5B9ln6lw9RpW-w,4929
+numpy/_core/fromnumeric.py,sha256=gK8m2Y3lSJ5qszgNE-F-ZdN6uab40cW5BBsD4SONHLA,143907
+numpy/_core/fromnumeric.pyi,sha256=VLvvO7t4JLBXEX2EHwSjFOQpDfN_ss9VOLwpgc9NwkQ,41190
+numpy/_core/function_base.py,sha256=hfcYdavNeeDbiYjvTBqDA6OJHxH1fuNDdMtTZUi3RZg,19733
+numpy/_core/function_base.pyi,sha256=_pJUw_NYCDy1EyGL0ABeXAWNOTsj_n7L_8GHPoqPfYs,5690
+numpy/_core/getlimits.py,sha256=Uy3W6eJwu2l7R6ovqdfeOyQybF5jjlPER88pSM3_JPg,26112
+numpy/_core/getlimits.pyi,sha256=q30hQ3wDenmxoZUSoSOqyVrZZVGlsixXCHe6QUthbp8,61
+numpy/_core/include/numpy/__multiarray_api.c,sha256=u7HxPIx7xdxAPTE0gristUOO0-1L-_fl0IeKqR4voxI,12669
+numpy/_core/include/numpy/__multiarray_api.h,sha256=akdAXdNQvHxPFPbdeobhoGzyLUkoVdwzKDjzdbtk5zQ,61383
+numpy/_core/include/numpy/__ufunc_api.c,sha256=Fg7WlH4Ow6jETKRArVL_QF11ABKYz1VpOve56_U3E0w,1755
+numpy/_core/include/numpy/__ufunc_api.h,sha256=tayZuDCeuqm3ggFvWxJuoARz5obz6Saas9L7JcKO_eQ,13166
+numpy/_core/include/numpy/_neighborhood_iterator_imp.h,sha256=s-Hw_l5WRwKtYvsiIghF0bg-mA_CgWnzFFOYVFJ-q4k,1857
+numpy/_core/include/numpy/_numpyconfig.h,sha256=brqqDI4gwfGEFHMIWi0oNA0n_qnBBUWFVJtgfcdpSA0,926
+numpy/_core/include/numpy/_public_dtype_api_table.h,sha256=n6_Kb98SyvsR_X7stiNA6VuGp_c5W1e4fMVcJdO0wis,4574
+numpy/_core/include/numpy/arrayobject.h,sha256=mU5vpcQ95PH1j3bp8KYhJOFHB-GxwRjSUsR7nxlTSRk,204
+numpy/_core/include/numpy/arrayscalars.h,sha256=LlyrZIa_5td11BfqfMCv1hYbiG6__zxxGv1MRj8uIVo,4243
+numpy/_core/include/numpy/dtype_api.h,sha256=Gn37RzObmcTsL6YUYY9aG22Ct8F-r4ZaC53NPFqaIso,19238
+numpy/_core/include/numpy/halffloat.h,sha256=TRZfXgipa-dFppX2uNgkrjrPli-1BfJtadWjAembJ4s,1959
+numpy/_core/include/numpy/ndarrayobject.h,sha256=MnykWmchyS05ler_ZyhFIr_0j6c0IcndEi3X3n0ZWDk,12057
+numpy/_core/include/numpy/ndarraytypes.h,sha256=qnnC60F-oeGzkM65vV8VcMsThLYKcDWkhLQBOfJ3jZk,65053
+numpy/_core/include/numpy/npy_1_7_deprecated_api.h,sha256=90kGcNaBPgT5FJArB_MPgW24_Mpl5RcfUR3Y0rRB5Bw,3746
+numpy/_core/include/numpy/npy_2_compat.h,sha256=wdjB7_-AtW3op67Xbj3EVH6apSF7cRG6h3c5hBz-YMs,8546
+numpy/_core/include/numpy/npy_2_complexcompat.h,sha256=eE9dV_Iq3jEfGGJFH_pQjJnvC6eQ12WgOB7cZMmHByE,857
+numpy/_core/include/numpy/npy_3kcompat.h,sha256=grN6W1n7benj3F2pSAOpl_s6vn1Y50QfAP-DaleD7cA,9648
+numpy/_core/include/numpy/npy_common.h,sha256=wbV1Z6m3w1h4qVcOxfF38s3H13UfFHEuBGRfDhTeUKE,36551
+numpy/_core/include/numpy/npy_cpu.h,sha256=AUJ5CqlguteR3-R0IjPt5rylWtvvccCWtt0GpjZbexU,4703
+numpy/_core/include/numpy/npy_endian.h,sha256=vvK7ZlOt0vgqTVrIyviWzoxQz70S-BvflS4Z_k6X5XE,2834
+numpy/_core/include/numpy/npy_math.h,sha256=aeSFs60QbWPy1gIPyHDPrYExifm5mbDAcjP_mLk_PF0,18858
+numpy/_core/include/numpy/npy_no_deprecated_api.h,sha256=0yZrJcQEJ6MCHJInQk5TP9_qZ4t7EfBuoLOJ34IlJd4,678
+numpy/_core/include/numpy/npy_os.h,sha256=hlQsg_7-RkvS3s8OM8KXy99xxyJbCm-W1AYVcdnO1cw,1256
+numpy/_core/include/numpy/numpyconfig.h,sha256=OvRlre4eb9KBWt6gAE5cQ4K-P2uRmIKU1rAKxWFygmA,7161
+numpy/_core/include/numpy/random/LICENSE.txt,sha256=-8U59H0M-DvGE3gID7hz1cFGMBJsrL_nVANcOSbapew,1018
+numpy/_core/include/numpy/random/bitgen.h,sha256=49AwKOR552r-NkhuSOF1usb_URiMSRMvD22JF5pKIng,488
+numpy/_core/include/numpy/random/distributions.h,sha256=W5tOyETd0m1W0GdaZ5dJP8fKlBtsTpG23V2Zlmrlqpg,9861
+numpy/_core/include/numpy/random/libdivide.h,sha256=ew9MNhPQd1LsCZiWiFmj9IZ7yOnA3HKOXffDeR9X1jw,80138
+numpy/_core/include/numpy/ufuncobject.h,sha256=r2XM6XyILKXLqgmHFVu8jXqvOp_Zv8tLfS8Omn5jbng,11918
+numpy/_core/include/numpy/utils.h,sha256=wMNomSH3Dfj0q78PrjLVtFtN-FPo7UJ4o0ifCUO-6Es,1185
+numpy/_core/lib/libnpymath.a,sha256=Rg3gCXTxpny2Hh-jZFKh6KDYquzjcJklumEnLHhQXQ0,118712
+numpy/_core/lib/npy-pkg-config/mlib.ini,sha256=_LsWV1eStNqwhdiYPa2538GL46dnfVwT4MrI1zbsoFw,147
+numpy/_core/lib/npy-pkg-config/npymath.ini,sha256=0iMzarBfkkZ_EXO95_kz-SHZRcNIEwIeOjE_esVBkRQ,361
+numpy/_core/lib/pkgconfig/numpy.pc,sha256=TixQH5uvO6LvobGP1BrUfGuCdMxvdphpZUy_KczizY4,191
+numpy/_core/memmap.py,sha256=B3k5EZ8QwzjPwWwOtVRVyEofQJSG_pCBcWCFknO-GaU,12664
+numpy/_core/memmap.pyi,sha256=_LKjb_PuhcQwpqc2lFaL379DYzQ9PtuKdlVV3jXOYEM,47
+numpy/_core/multiarray.py,sha256=0P7ZBHKR0mI0tatyqDCHwnfewEEiQ48dwrzVL2PQAk0,58137
+numpy/_core/multiarray.pyi,sha256=MzZt-K2x2BrDebbirvR2so5Tbipw3u189VVsDjkAdyk,33396
+numpy/_core/numeric.py,sha256=vsiEcMig4QHwMf9HP5maqOhFsblqGbh8AtE4cX08D7w,81726
+numpy/_core/numeric.pyi,sha256=Ax8B42cDqwsrlVsYt6NhthEZvQNMGdNzNcpXAy9i1kw,19198
+numpy/_core/numerictypes.py,sha256=W-Eu_Av5zNNBHDZHGLNlmNb2UuMByKRdwWPTsJxA5oQ,16125
+numpy/_core/numerictypes.pyi,sha256=ZlPCN6_8qJ7ZWiDayxfQ9oRnq1Gej2P388BX30SUR7s,3533
+numpy/_core/overrides.py,sha256=czubu5JHSdid31If0WLqOYEM3WiAY03tLmyoa04sWjg,7211
+numpy/_core/overrides.pyi,sha256=4ycXYFRjEycSPOaRtciFKwBTsAjHUoGztX-IkTpXQYw,1743
+numpy/_core/printoptions.py,sha256=FUY--hG0-oobvtHOY64D50Bs_-JFmf-Nza7C9IXORFY,1063
+numpy/_core/printoptions.pyi,sha256=eNiliCnDuZBxla6X9kwZ-7YiCn-UtMbT-U_qTnw8l9w,594
+numpy/_core/records.py,sha256=0Uv2Z2xBvxYQUsAhp5zZ262YFHmSN6R_bazI_EyRE00,36862
+numpy/_core/records.pyi,sha256=nDLqj-5Z8hE8hQ4HiDPuHqGy91srd4Vvpn3_ZbEk2o4,8789
+numpy/_core/shape_base.py,sha256=CK3LrcfWKnChokUm1eHYsL43Q7D5qPq7QxDPuYYMnAU,32883
+numpy/_core/shape_base.pyi,sha256=4UDvO6R4ZtZChKb4HNZUil3P8HOGTM5wOwPMT8tsp6Y,4545
+numpy/_core/strings.py,sha256=wCfZ3b3_WKY3LZ0cPn5IXrTN6wXtCSfa8Jrvpznz85c,45672
+numpy/_core/strings.pyi,sha256=NRCCxdkiEvQO9I__b-rNef4pxiqrCgtIFvyPvs7rLng,12770
+numpy/_core/tests/__pycache__/_locales.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/_natype.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test__exceptions.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_abc.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_api.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_argparse.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_array_api_info.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_array_coercion.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_array_interface.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_arraymethod.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_arrayobject.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_arrayprint.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_casting_floatingpoint_errors.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_casting_unittests.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_conversion_utils.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_cpu_dispatcher.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_cpu_features.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_custom_dtypes.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_cython.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_datetime.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_defchararray.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_deprecations.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_dlpack.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_dtype.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_einsum.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_errstate.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_extint128.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_function_base.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_getlimits.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_half.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_hashtable.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_indexerrors.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_indexing.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_item_selection.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_limited_api.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_longdouble.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_machar.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_mem_overlap.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_mem_policy.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_memmap.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_multiarray.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_multithreading.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_nditer.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_nep50_promotions.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_numeric.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_numerictypes.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_overrides.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_print.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_protocols.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_records.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalar_ctors.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalar_methods.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalarbuffer.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalarinherit.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalarmath.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_scalarprint.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_shape_base.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_simd.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_simd_module.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_stringdtype.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_strings.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_ufunc.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_umath.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_umath_accuracy.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_umath_complex.cpython-310.pyc,,
+numpy/_core/tests/__pycache__/test_unicode.cpython-310.pyc,,
+numpy/_core/tests/_locales.py,sha256=_J4MFSLUG1hiIfiifglI0nD--lS3CqwIjKKM3is0S6Q,2176
+numpy/_core/tests/_natype.py,sha256=9N-pE9LuQKrqT7ef-P9mtXpWls3YAsZ8JR-3cR7TRjs,6259
+numpy/_core/tests/data/astype_copy.pkl,sha256=lWSzCcvzRB_wpuRGj92spGIw-rNPFcd9hwJaRVvfWdk,716
+numpy/_core/tests/data/generate_umath_validation_data.cpp,sha256=BQakB5o8Mq60zex5ovVO0IatNa7xbF8JvXmtk6373So,5842
+numpy/_core/tests/data/recarray_from_file.fits,sha256=NA0kliz31FlLnYxv3ppzeruONqNYkuEvts5wzXEeIc4,8640
+numpy/_core/tests/data/umath-validation-set-README.txt,sha256=pxWwOaGGahaRd-AlAidDfocLyrAiDp0whf5hC7hYwqM,967
+numpy/_core/tests/data/umath-validation-set-arccos.csv,sha256=yBlz8r6RnnAYhdlobzGGo2FKY-DoSTQaP26y8138a3I,61365
+numpy/_core/tests/data/umath-validation-set-arccosh.csv,sha256=0GXe7XG1Z3jXAcK-OlEot_Df3MetDQSlbm3MJ__iMQk,61365
+numpy/_core/tests/data/umath-validation-set-arcsin.csv,sha256=w_Sv2NDn-mLZSAqb56JT2g4bqBzxYAihedWxHuf82uU,61339
+numpy/_core/tests/data/umath-validation-set-arcsinh.csv,sha256=DZrMYoZZZyM1DDyXNUxSlzx6bOgajnRSLWAzxcPck8k,60289
+numpy/_core/tests/data/umath-validation-set-arctan.csv,sha256=0aosXZ-9DYTop0lj4bfcBNwYVvjZdW13hbMRTRRTmV0,60305
+numpy/_core/tests/data/umath-validation-set-arctanh.csv,sha256=HEK9ePx1OkKrXIKkMUV0IxrmsDqIlgKddiI-LvF2J20,61339
+numpy/_core/tests/data/umath-validation-set-cbrt.csv,sha256=v855MTZih-fZp_GuEDst2qaIsxU4a7vlAbeIJy2xKpc,60846
+numpy/_core/tests/data/umath-validation-set-cos.csv,sha256=0PNnDqKkokZ7ERVDgbes8KNZc-ISJrZUlVZc5LkW18E,59122
+numpy/_core/tests/data/umath-validation-set-cosh.csv,sha256=JKC4nKr3wTzA_XNSiQvVUq9zkYy4djvtu2-j4ZZ_7Oc,60869
+numpy/_core/tests/data/umath-validation-set-exp.csv,sha256=rUAWIbvyeKh9rPfp2n0Zq7AKq_nvHpgbgzLjAllhsek,17491
+numpy/_core/tests/data/umath-validation-set-exp2.csv,sha256=djosT-3fTpiN_f_2WOumgMuuKgC_XhpVO-QsUFwI6uU,58624
+numpy/_core/tests/data/umath-validation-set-expm1.csv,sha256=K7jL6N4KQGX71fj5hvYkzcMXk7MmQes8FwrNfyrPpgU,60299
+numpy/_core/tests/data/umath-validation-set-log.csv,sha256=ynzbVbKxFzxWFwxHnxX7Fpm-va09oI3oK1_lTe19g4w,11692
+numpy/_core/tests/data/umath-validation-set-log10.csv,sha256=NOBD-rOWI_FPG4Vmbzu3JtX9UA838f2AaDFA-waiqGA,68922
+numpy/_core/tests/data/umath-validation-set-log1p.csv,sha256=tdbYWPqWIz8BEbIyklynh_tpQJzo970Edd4ek6DsPb8,60303
+numpy/_core/tests/data/umath-validation-set-log2.csv,sha256=39EUD0vFMbwyoXoOhgCmid6NeEAQU7Ff7QFjPsVObIE,68917
+numpy/_core/tests/data/umath-validation-set-sin.csv,sha256=8PUjnQ_YfmxFb42XJrvpvmkeSpEOlEXSmNvIK4VgfAM,58611
+numpy/_core/tests/data/umath-validation-set-sinh.csv,sha256=XOsBUuPcMjiO_pevMalpmd0iRv2gmnh9u7bV9ZLLg8I,60293
+numpy/_core/tests/data/umath-validation-set-tan.csv,sha256=Hv2WUMIscfvQJ5Y5BipuHk4oE4VY6QKbQp_kNRdCqYQ,60299
+numpy/_core/tests/data/umath-validation-set-tanh.csv,sha256=iolZF_MOyWRgYSa-SsD4df5mnyFK18zrICI740SWoTc,60299
+numpy/_core/tests/examples/cython/__pycache__/setup.cpython-310.pyc,,
+numpy/_core/tests/examples/cython/checks.pyx,sha256=7wt61LhY_j0ZPzKcWDKnnbtDR8PoHmQixpFYNlCwMOM,7900
+numpy/_core/tests/examples/cython/meson.build,sha256=uuXVPKemNVMQ5MiEDqS4BXhwGHa96JHjS50WxZuJS_8,1268
+numpy/_core/tests/examples/cython/setup.py,sha256=6k4eEMjzjXPhGAW440qpMp2S2l5Ltv-e9e-FnVnzl3w,857
+numpy/_core/tests/examples/limited_api/__pycache__/setup.cpython-310.pyc,,
+numpy/_core/tests/examples/limited_api/limited_api1.c,sha256=htSR9ER3S8AJqv4EZMsrxQ-SufTIlXNpuFI6MXQs87w,346
+numpy/_core/tests/examples/limited_api/limited_api2.pyx,sha256=1q4I59pdkCmMhLcYngN_XwQnPoLmDEo1uTGnhrLRjDc,203
+numpy/_core/tests/examples/limited_api/limited_api_latest.c,sha256=ltBLbrl1g9XxD2wvN_-g3NhIizc8mxnh2Z6wCyXo-8E,452
+numpy/_core/tests/examples/limited_api/meson.build,sha256=YM5RwW_waFymlWSHFhCCOHO6KCknooN0jCiqScL0i5M,1627
+numpy/_core/tests/examples/limited_api/setup.py,sha256=p2w7F1ardi_GRXSrnNIR8W1oeH_pgmw_1P2wS0A2I6M,435
+numpy/_core/tests/test__exceptions.py,sha256=PA9MhiaEITLOaIe86lnOwqAa3RFrA5Ra4IrqKXF-nMU,2881
+numpy/_core/tests/test_abc.py,sha256=mIZtCZ8PEIOd6pxLqdUws3wMfXUjsVO3vOE9vK5YPd8,2221
+numpy/_core/tests/test_api.py,sha256=aCh293oLPnbK7gi0PW_ilL9Gcr6-3UpO0MMzS39D8Sc,22930
+numpy/_core/tests/test_argparse.py,sha256=DRLQD5TxhudrQZ79hm5ds3eKsXh_Ub7QsvEYzsdDSX0,2824
+numpy/_core/tests/test_array_api_info.py,sha256=4CpUWnch1EtLojYabVAF7n_-Fks3QTODHERL2FzR1Ps,3062
+numpy/_core/tests/test_array_coercion.py,sha256=p-qWx0wju9JIwIC3wUrVFUJpi5FeOD88OljtzTzndmk,34833
+numpy/_core/tests/test_array_interface.py,sha256=9ND3Y00rgdBSgst5555zrzkvdWzZ4vZgWJOw3djXZAk,7767
+numpy/_core/tests/test_arraymethod.py,sha256=SL2PN10yYMp6C8CnKEykjit8QBtVBIGwbTPDdSDpCLY,3253
+numpy/_core/tests/test_arrayobject.py,sha256=aVv2eGjunCMEDFgmFujxMpk4xb-zo1MQrFcwQLfblx0,2596
+numpy/_core/tests/test_arrayprint.py,sha256=NKFx165-YwIw-sf7et1_M1cQ2V4t6nh8JN5N4GiohYw,49068
+numpy/_core/tests/test_casting_floatingpoint_errors.py,sha256=nnBEgeRIENrOOZvTzRK7SRYYW9dD6E6npDmIuN0ggCc,5074
+numpy/_core/tests/test_casting_unittests.py,sha256=iXHJR9sjpKk37toV9TMDYJAErVgqOxxEM-SEGOvdyF8,34308
+numpy/_core/tests/test_conversion_utils.py,sha256=fpduQ79yLpvZ8fdLs4H0CCsBEh3TlZs3SMr-lUQ6pTg,6605
+numpy/_core/tests/test_cpu_dispatcher.py,sha256=nqlgFk-Ocfgc18g-b4fprYssfcpReiyvgbWPzsNEoFI,1552
+numpy/_core/tests/test_cpu_features.py,sha256=WcKrpR7sPZkF7V-tALki9KfRaEJedE3WpA9AfXNE2Dw,15419
+numpy/_core/tests/test_custom_dtypes.py,sha256=_T9kvGbPJzjLnAtGqoRIeXQNjEuBgJ2DvLN6lrb-fJA,11623
+numpy/_core/tests/test_cython.py,sha256=G3usNUppvqvlbLqTBREn2II9_bhdlxfuZTg8EFd2LpU,8619
+numpy/_core/tests/test_datetime.py,sha256=KD9WAcYjDoa_dujH3lUQukb3IMyyPy2Gkf2oHm6sdOg,121671
+numpy/_core/tests/test_defchararray.py,sha256=tLrnS4oEVDwjbx74fHyi9r43yAE0J7mJZVfdeHvlSJg,30601
+numpy/_core/tests/test_deprecations.py,sha256=q6yJhSODzcbx6LmQzHJqtFKsW4_xfuuy0BC-RK4t6mI,28510
+numpy/_core/tests/test_dlpack.py,sha256=SQCgw4Ya2iYwEjEVJ0p_XvSYNKY2h_eygTmZp8-T4F8,5801
+numpy/_core/tests/test_dtype.py,sha256=lEpYwt2LZ0MWH3jGliiwLkeoqSi0iNI-KSEoAIwH9cg,77402
+numpy/_core/tests/test_einsum.py,sha256=zcFC5OFRGZA9r53gXKmFZUQV0o_T1BkdTXLZ8vG0YLA,52890
+numpy/_core/tests/test_errstate.py,sha256=5YUzK95WyepGyaJ4nkkXLUiHziNBoU0SFBHjMn5U7G0,4634
+numpy/_core/tests/test_extint128.py,sha256=tVrw3jMHQkA0ebk7Pnq33I5Yu9V24KNHotYIG3V8ds0,5644
+numpy/_core/tests/test_function_base.py,sha256=L_toIAG1hbAiOcRxIiLX7yxK4E-hqVMqdUGCBhg9dMQ,17462
+numpy/_core/tests/test_getlimits.py,sha256=xMcjRyx_hAwR-Q3qTcZSFhneZtIXp6u7KOsihUu7-Yg,6977
+numpy/_core/tests/test_half.py,sha256=EFzZNaNNY_H1hd3dSPBZ2wZt3E67D6KpDE3YaOMx_XY,24313
+numpy/_core/tests/test_hashtable.py,sha256=Ws1EeQWCf7vz8G_VsFTIZUVI-hgKXUEAbtQpvoBjBHo,1147
+numpy/_core/tests/test_indexerrors.py,sha256=wvatr7JlqAAYv-hHAAT-9DwUCnRcKiJ9qLcl6aKe9RU,4734
+numpy/_core/tests/test_indexing.py,sha256=xjJGHu7eZT_KX_LAL-8UBTFTxqFwZoJUZetQVrbjJ7g,55297
+numpy/_core/tests/test_item_selection.py,sha256=kI30kiX8mIrZYPn0jw3lGGw1ruZF4PpE9zw-aai9EPA,6458
+numpy/_core/tests/test_limited_api.py,sha256=ndfWEX3X4s6EqWSTDJzdOe0DDQGH7SqnTnYjce0cYh4,3304
+numpy/_core/tests/test_longdouble.py,sha256=H7VeOyaLfSMHClUDSKloOuHiDbZxeoypJnc5AtsM4xw,13890
+numpy/_core/tests/test_machar.py,sha256=eDTrzJgwfaus0Ts86-HR9YkAPOwOSOPImPTHugn1EOc,1069
+numpy/_core/tests/test_mem_overlap.py,sha256=jM7NXE3N_bOjgP9vMqyzzcIXJwbIREXiRK41iciggAA,29138
+numpy/_core/tests/test_mem_policy.py,sha256=JFou_8xT0-cwccZEQfaingaktY-RH3hrUJZa2_b7t2o,16660
+numpy/_core/tests/test_memmap.py,sha256=LQ4NBQe8s_5DMN5yCeY9dpqTeDBOge6TKN6xxMwCbRI,8142
+numpy/_core/tests/test_multiarray.py,sha256=YsNiZInPpHR1o6-sv7pq9sg4GW5J_v9KCnu1TNuDMIo,392270
+numpy/_core/tests/test_multithreading.py,sha256=DnSUipGmHE3YMI9Dgxfplo1HWyf1sjQgCcHIy41dTL4,8606
+numpy/_core/tests/test_nditer.py,sha256=o-YxH56efHb_yN5-kbJ3mDVpp4Vasa_DPE5lhEzcAc0,131186
+numpy/_core/tests/test_nep50_promotions.py,sha256=96WpsYYNdlaszFOCLmxHCg3iOHna4VPPxHZjdRp1lVU,10064
+numpy/_core/tests/test_numeric.py,sha256=_f1nQWujm2PQZF4Y9Gjxt4W7R0MbVNGJh9OEdjkKFCE,158490
+numpy/_core/tests/test_numerictypes.py,sha256=aADiXLPAkgAFF80_tRczhuH6lVyMLcA3k_AbGcDemp4,23292
+numpy/_core/tests/test_overrides.py,sha256=evrJX5mAWquq0lD6qM2Hn4_1_mkSk8cpNzUj6_QcZFE,27936
+numpy/_core/tests/test_print.py,sha256=mzUSbQ2kSa1aDl7NRUexj5UG4IM4zaZ-5EIoEoXhA_Q,6836
+numpy/_core/tests/test_protocols.py,sha256=6pxSZKmde5KHoN3iEMKReAFHrMldAm3ZZQwVh_kQ9Uw,1189
+numpy/_core/tests/test_records.py,sha256=eyDJb-oglohhgW4b4sZwe-_1PABhkM9_7a9qU3n7oAU,20534
+numpy/_core/tests/test_regression.py,sha256=o4FwvndFMYHPqYQgKuEjgIpoizZ3vvQ-3HIuHqiRD6g,95395
+numpy/_core/tests/test_scalar_ctors.py,sha256=3mhZlumKJs5WazhPgATWf5Y4E4POQy-bcUBSEt5pasc,6719
+numpy/_core/tests/test_scalar_methods.py,sha256=u0Bn-6-mSpOc_mP0C7BHpg3RbGWnsb_zZR1Ooubno2Y,9142
+numpy/_core/tests/test_scalarbuffer.py,sha256=EdiF5tVrZXDchoK0P5sbQgluyyYQCIrLCaxvafaCKNk,5582
+numpy/_core/tests/test_scalarinherit.py,sha256=XbCvtSSEU_c3cHi9Nxg7nt7itZdnREEh0sdqDUU4-ek,2588
+numpy/_core/tests/test_scalarmath.py,sha256=AKHil07nk1xDgcEUUvA3wRDR-xZjWwE2k1zvv6knOYI,46631
+numpy/_core/tests/test_scalarprint.py,sha256=UGxofUYFo3tqu-2fgaNgmS8K-uwhwv7X3tu7Pu7yeQQ,20635
+numpy/_core/tests/test_shape_base.py,sha256=u9ozYhzM-V0GINYi04jYeNsjiD7XtssrD29zhFVaOA0,30982
+numpy/_core/tests/test_simd.py,sha256=DJ-N-Q7E29VBY4VYmQWTR4XzRcxQKptCke5CwxCl_aw,48650
+numpy/_core/tests/test_simd_module.py,sha256=g0XWjB1TE4E0y4McOjkZKhR7OB-K01eqy4pJcGfU2zg,3903
+numpy/_core/tests/test_stringdtype.py,sha256=wgIoYRYlP-2Q2Z7PKBOo76fGbzKewxwN98IECfmBHiM,57658
+numpy/_core/tests/test_strings.py,sha256=UCq7ActPLrMNRG7BDHfrOH52MOZ3uy3Tp35T3-hQV00,51787
+numpy/_core/tests/test_ufunc.py,sha256=qiV2wkNG0-Z2_u_aveRLKI9qEOqaLxyWvch6Btz-Urc,132405
+numpy/_core/tests/test_umath.py,sha256=qeEIqnjBl7_mHhBZh6-S_7oBz94nabMyS-xqdQOXl9o,193188
+numpy/_core/tests/test_umath_accuracy.py,sha256=TRSzuQJ2kN2D3BUQ3IX1WhhT6ttIKvnnaMaaqU-A7ug,5472
+numpy/_core/tests/test_umath_complex.py,sha256=pWRHpzBodvDGoKG1gkRAKJ1uPxQ_fV_VqIm77SD0BlA,23290
+numpy/_core/tests/test_unicode.py,sha256=LotRRPbJke99uyy3uY3rAteaJMMiYpSzcOmargPNKIc,12854
+numpy/_core/umath.py,sha256=OsbavmLRxKNNbV8SnPEc3mVNk9EIVjMhZeRs9nCUsTU,2093
+numpy/_core/umath.pyi,sha256=FIqmlQwQIueIrs-_QehV3guNEnJE2LxVs3NPCj38Vdo,2643
+numpy/_distributor_init.py,sha256=IKy2THwmu5UgBjtVbwbD9H-Ap8uaUJoPJ2btQ4Jatdo,407
+numpy/_distributor_init.pyi,sha256=6IvMzAmr0-Z6oqTkZcgXgrkJrQXVMjBih2AZvLdDgOE,27
+numpy/_expired_attrs_2_0.py,sha256=ZTV3IpeE4UcJSn2RTZLxKAixEl557MkKK4R7xubw1Rw,3903
+numpy/_expired_attrs_2_0.pyi,sha256=dDjT_qRjSq9m3_DcfOJlRaTzFtHacBVRdkYgA0Weeho,1269
+numpy/_globals.py,sha256=XVuUPpFLueqKUTNwqiOjWWahnM-vGxGy4tYA3ph-EAE,3090
+numpy/_globals.pyi,sha256=IrHHIXmibXzgK0VUlECQLw4IEkveXSHo_ZWnTkfnLe4,280
+numpy/_pyinstaller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/_pyinstaller/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/_pyinstaller/__pycache__/__init__.cpython-310.pyc,,
+numpy/_pyinstaller/__pycache__/hook-numpy.cpython-310.pyc,,
+numpy/_pyinstaller/hook-numpy.py,sha256=Ood-XcWlQQkk90SY0yDg7RKsUFVGwas9TqI-Gbc58_s,1393
+numpy/_pyinstaller/hook-numpy.pyi,sha256=tAvtMPovoi-sur0D1NAo3_evSmYKLTh0bgRSC7QrCIk,349
+numpy/_pyinstaller/tests/__init__.py,sha256=IJtzzjPSw419P-c2T4OT48p-Zu4JohoF9svWqhDshgk,329
+numpy/_pyinstaller/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/_pyinstaller/tests/__pycache__/pyinstaller-smoke.cpython-310.pyc,,
+numpy/_pyinstaller/tests/__pycache__/test_pyinstaller.cpython-310.pyc,,
+numpy/_pyinstaller/tests/pyinstaller-smoke.py,sha256=6iL-eHMQaG3rxnS5EgcvrCqElm9aKL07Cjr1FZJSXls,1143
+numpy/_pyinstaller/tests/test_pyinstaller.py,sha256=8K-7QxmfoXCG0NwR0bhIgCNrDjGlrTzWnrR1sR8btgU,1135
+numpy/_pytesttester.py,sha256=itUxMEXdYQT_mCYqde-7CqjxOA59wiLFyJeIyoVtGgI,6325
+numpy/_pytesttester.pyi,sha256=fRkDNxl5obspW99ujQV3NDXrROXxDiLVFyj8Aew_zyk,497
+numpy/_typing/__init__.py,sha256=0y70ouUj2_lKGcA6vGbm_NWVR48xKoyu_c7rom_AEp4,5047
+numpy/_typing/__pycache__/__init__.cpython-310.pyc,,
+numpy/_typing/__pycache__/_add_docstring.cpython-310.pyc,,
+numpy/_typing/__pycache__/_array_like.cpython-310.pyc,,
+numpy/_typing/__pycache__/_char_codes.cpython-310.pyc,,
+numpy/_typing/__pycache__/_dtype_like.cpython-310.pyc,,
+numpy/_typing/__pycache__/_extended_precision.cpython-310.pyc,,
+numpy/_typing/__pycache__/_nbit.cpython-310.pyc,,
+numpy/_typing/__pycache__/_nbit_base.cpython-310.pyc,,
+numpy/_typing/__pycache__/_nested_sequence.cpython-310.pyc,,
+numpy/_typing/__pycache__/_scalars.cpython-310.pyc,,
+numpy/_typing/__pycache__/_shape.cpython-310.pyc,,
+numpy/_typing/__pycache__/_ufunc.cpython-310.pyc,,
+numpy/_typing/_add_docstring.py,sha256=GHU_gjWt_A6x7RIcztvfayVCs78Kgi8IeNKJZyfWkWg,3995
+numpy/_typing/_array_like.py,sha256=QD4uxTyvuMERM5AhE6PxzdL5yHUMb2UOi7HdQFFNXoI,5565
+numpy/_typing/_callable.pyi,sha256=bogxuArAdYY-IGWzw0-ayhdb5-P8YhHXK-J0TX_j38g,11811
+numpy/_typing/_char_codes.py,sha256=RJSvAIAy8TAEQbFfoDNouUdLcYngmBmV4X7At62SUbU,8786
+numpy/_typing/_dtype_like.py,sha256=3q7Me_RXr75ba4p1vPy-nw5NRLWsnCnHsfzVGnZMNig,5964
+numpy/_typing/_extended_precision.py,sha256=dGios-1k-QBGew7YFzONZTzVWxz-aYAaqlccl2_h5Bo,777
+numpy/_typing/_nbit.py,sha256=LiAPuMPddJ9CjSStw8zvXQ1m_FbNIzl_iMygO851M0g,632
+numpy/_typing/_nbit_base.py,sha256=HHn2zYWN-3wLsyigd97cs9uyI3NvRYUcQ69OLOdC-ks,2880
+numpy/_typing/_nested_sequence.py,sha256=7idN0EyEI6Nt0VH9xnWVj4syqeu_LK8IESZwczVcK1g,2608
+numpy/_typing/_scalars.py,sha256=9v-1xahC9TZg28FTfBG15vWCcnDB1bfWz7ejT0eDrVw,1031
+numpy/_typing/_shape.py,sha256=fY1qi6UDFjPW1b4GaxhcJ9tRAQu6SXLZINd_Vy60XSY,231
+numpy/_typing/_ufunc.py,sha256=U6OCdDLHzXSt1fbSldHFP0viWHh4u3Y1CDBvzBUY8-M,153
+numpy/_typing/_ufunc.pyi,sha256=h4Gs_FASSm7e_lrJWmsJazZOvZMr_N0XSzrVXeA8jAo,26709
+numpy/_utils/__init__.py,sha256=fDuc2LsC4olo0utoWjAs3LXux-gPYHFKhThlEIi4eOQ,3291
+numpy/_utils/__init__.pyi,sha256=E4kbvhiLuJeW77FvO87VVMcYEazVQy7eTle-7HUU1jc,738
+numpy/_utils/__pycache__/__init__.cpython-310.pyc,,
+numpy/_utils/__pycache__/_convertions.cpython-310.pyc,,
+numpy/_utils/__pycache__/_inspect.cpython-310.pyc,,
+numpy/_utils/__pycache__/_pep440.cpython-310.pyc,,
+numpy/_utils/_convertions.py,sha256=0xMxdeLOziDmHsRM_8luEh4S-kQdMoMg6GxNDDas69k,329
+numpy/_utils/_convertions.pyi,sha256=4l-0UmPCyVA70UJ8WAd2A45HrKFSzgC0sFDBSnKcYiQ,118
+numpy/_utils/_inspect.py,sha256=LcbHUJ2KPDpPeNixyIeKOUWvORaLG5J-H0uI3iHIsOA,7435
+numpy/_utils/_inspect.pyi,sha256=hqpbcKWZzVkTaMf6loQup3ZMXifIit-A0vSIhD92D88,2255
+numpy/_utils/_pep440.py,sha256=Vr7B3QsijR5p6h8YAz2LjNGUyzHUJ5gZ4v26NpZAKDc,14069
+numpy/_utils/_pep440.pyi,sha256=xzYJoZ6DnjvgaKr8OsBwim77fAJ0xeQJI9XAt75gvfI,3870
+numpy/char/__init__.py,sha256=WGpEng-lsHKxUlmuANY8hKCl3ZC622HYSAFnpf7sgUE,93
+numpy/char/__init__.pyi,sha256=s5kfrSM9fwhtbUmzC-KlCoA4AyKpR0GzeS45ZoyQkbA,1539
+numpy/char/__pycache__/__init__.cpython-310.pyc,,
+numpy/compat/__init__.py,sha256=b3rw1J_V3MwU-LZf8uISRKvfXzFaBjFHACbgyLo785Y,727
+numpy/compat/__pycache__/__init__.cpython-310.pyc,,
+numpy/compat/__pycache__/py3k.cpython-310.pyc,,
+numpy/compat/py3k.py,sha256=2jk3PPVI2LB1v4mndi0Ydb-ymcgXzJ5G2hIdvoWavAI,3803
+numpy/compat/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/compat/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/conftest.py,sha256=G-BY__VpzWy3NY7KjDvHW01CyGkWx-znx2WlhiUShy8,8717
+numpy/core/__init__.py,sha256=FWRkekGqZ1NF4YYNfm46mOAO9u3v4ZYts_lc8ygQfqY,1275
+numpy/core/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/core/__pycache__/__init__.cpython-310.pyc,,
+numpy/core/__pycache__/_dtype.cpython-310.pyc,,
+numpy/core/__pycache__/_dtype_ctypes.cpython-310.pyc,,
+numpy/core/__pycache__/_internal.cpython-310.pyc,,
+numpy/core/__pycache__/_multiarray_umath.cpython-310.pyc,,
+numpy/core/__pycache__/_utils.cpython-310.pyc,,
+numpy/core/__pycache__/arrayprint.cpython-310.pyc,,
+numpy/core/__pycache__/defchararray.cpython-310.pyc,,
+numpy/core/__pycache__/einsumfunc.cpython-310.pyc,,
+numpy/core/__pycache__/fromnumeric.cpython-310.pyc,,
+numpy/core/__pycache__/function_base.cpython-310.pyc,,
+numpy/core/__pycache__/getlimits.cpython-310.pyc,,
+numpy/core/__pycache__/multiarray.cpython-310.pyc,,
+numpy/core/__pycache__/numeric.cpython-310.pyc,,
+numpy/core/__pycache__/numerictypes.cpython-310.pyc,,
+numpy/core/__pycache__/overrides.cpython-310.pyc,,
+numpy/core/__pycache__/records.cpython-310.pyc,,
+numpy/core/__pycache__/shape_base.cpython-310.pyc,,
+numpy/core/__pycache__/umath.cpython-310.pyc,,
+numpy/core/_dtype.py,sha256=3SnNsjxlKobD8Dn8B9egjIQuQLdbWz9OtVAZ4_wlDw8,322
+numpy/core/_dtype.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/core/_dtype_ctypes.py,sha256=lLzxauA8PVnopTuGh9USt1nVw2qCI8Z7bL66er3JoHU,350
+numpy/core/_dtype_ctypes.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/core/_internal.py,sha256=f3eVtRx2tKrJxxavZNe_f1Ln-_1shhSlfeRZEDTlxhU,947
+numpy/core/_multiarray_umath.py,sha256=Yb0HORec_wcEV3RNNU4RZnlATYTUQtjAHMYmL4pvNLs,2096
+numpy/core/_utils.py,sha256=5fk18JN43Rg6YHvan6QjdrOeOuLtRlLVmP6MadBEJVA,923
+numpy/core/arrayprint.py,sha256=a1DkStlBSsVViSJw523Mm-lboVaAtCloBNCrigyOpbI,338
+numpy/core/defchararray.py,sha256=G9S6jkdXegRkXl58hSpPnmndjdym4801Yzq2lzzmApM,346
+numpy/core/einsumfunc.py,sha256=px-rSPkwAMbRNmp5uILgVC2QSr73InKFfvW7LSfNGGw,338
+numpy/core/fromnumeric.py,sha256=aNquLnfZX1XZRAz5MJza5ZT7IlgJo0TMHlR62YT2biM,342
+numpy/core/function_base.py,sha256=Sa9Ec2Y21kPmjn4Xsh7Y1V1c7bUdxYjzixIwHZJ4sCo,350
+numpy/core/getlimits.py,sha256=aYJVaVqiSGKuPfSIa7r0MMZMQkJP2NRNJ7Zd2dszygU,334
+numpy/core/multiarray.py,sha256=SwVF8KNm29qyaq7vx8rrljNNxfn0e6G5y1H830n1Rac,792
+numpy/core/numeric.py,sha256=LSuzJ9OsQ0IEpW2rKlAwuvNypZeDZ0AJDoJOt93XB-k,359
+numpy/core/numerictypes.py,sha256=RvhfWFh9KR0SPDNcrAYnW-PO9TKAND75ONXhL5Djs8Q,346
+numpy/core/overrides.py,sha256=sWaAgbH_piO0mWDeVqqoqkFqqpPHM87FqOZFJ3AO8lU,334
+numpy/core/overrides.pyi,sha256=-3xfjHfa4UaCuhTVwwRN4EOM5uz9vZR0gMeTVvEdbYI,525
+numpy/core/records.py,sha256=j9BftQLLljVdcENT41eGflG7DA7miXQ7q3Yf53-zYcY,326
+numpy/core/shape_base.py,sha256=MhuxPRwwg5hIdHcJ-LABdQ0oYEYGVxeD-aomaFs9-f4,338
+numpy/core/umath.py,sha256=f6KbsWYh5oTj3_FWHip_dr51BdczTAtMqgpn9_eHcz4,318
+numpy/ctypeslib.py,sha256=AhgVVThYHjfMEccnSDfH2B3puHU6ZjPwxPcIuFSnzRA,18836
+numpy/ctypeslib.pyi,sha256=I21gEirYRu9BQTndIJ_hwOfHbKxs13GL6A6ndpvWT8Y,8088
+numpy/distutils/__init__.py,sha256=BU1C21439HRo7yH1SsN9me6WCDPpOwRQ37ZpNwDMqCw,2074
+numpy/distutils/__init__.pyi,sha256=D8LRE6BNOmuBGO-oakJGnjT9UJTk9zSR5rxMfZzlX64,119
+numpy/distutils/__pycache__/__init__.cpython-310.pyc,,
+numpy/distutils/__pycache__/_shell_utils.cpython-310.pyc,,
+numpy/distutils/__pycache__/armccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/ccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/ccompiler_opt.cpython-310.pyc,,
+numpy/distutils/__pycache__/conv_template.cpython-310.pyc,,
+numpy/distutils/__pycache__/conv_template.cpython-310.pyc,sha256=PiBXMljlRFoF3SNzw4aG2asII_YzQ0kUusNTexSBz8U,8270
+numpy/distutils/__pycache__/core.cpython-310.pyc,,
+numpy/distutils/__pycache__/cpuinfo.cpython-310.pyc,,
+numpy/distutils/__pycache__/exec_command.cpython-310.pyc,,
+numpy/distutils/__pycache__/extension.cpython-310.pyc,,
+numpy/distutils/__pycache__/from_template.cpython-310.pyc,,
+numpy/distutils/__pycache__/fujitsuccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/intelccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/lib2def.cpython-310.pyc,,
+numpy/distutils/__pycache__/line_endings.cpython-310.pyc,,
+numpy/distutils/__pycache__/log.cpython-310.pyc,,
+numpy/distutils/__pycache__/mingw32ccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/misc_util.cpython-310.pyc,,
+numpy/distutils/__pycache__/msvc9compiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/msvccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/npy_pkg_config.cpython-310.pyc,,
+numpy/distutils/__pycache__/numpy_distribution.cpython-310.pyc,,
+numpy/distutils/__pycache__/pathccompiler.cpython-310.pyc,,
+numpy/distutils/__pycache__/system_info.cpython-310.pyc,,
+numpy/distutils/__pycache__/unixccompiler.cpython-310.pyc,,
+numpy/distutils/_shell_utils.py,sha256=3G7QGZXCxJQ6-2l1BTu3G_dRrWe6nT4QLlGYeh5oNZk,2538
+numpy/distutils/armccompiler.py,sha256=8qUaYh8QHOJlz7MNvkuJNyYdCOCivuW0pbmf_2OPZu0,962
+numpy/distutils/ccompiler.py,sha256=VV55UeGMGahNVPIIJO6YlgXmL6MqUrDOPR7Bk6HDseQ,28690
+numpy/distutils/ccompiler_opt.py,sha256=-q1HcO9nN3-m3mdYeSyU1QEv2HgD-YDpFZLEBWzOHTA,100396
+numpy/distutils/checks/cpu_asimd.c,sha256=nXUsTLrSlhRL-UzDM8zMqn1uqJnR7TRlJi3Ixqw539w,818
+numpy/distutils/checks/cpu_asimddp.c,sha256=E4b9zT1IdSfGR2ACZJiQoR-BqaeDtzFqRNW8lBOXAaY,432
+numpy/distutils/checks/cpu_asimdfhm.c,sha256=6tXINVEpmA-lYRSbL6CrBu2ejNFmd9WONFGgg-JFXZE,529
+numpy/distutils/checks/cpu_asimdhp.c,sha256=SfwrEEA_091tmyI4vN3BNLs7ypUnrF_VbTg6gPl-ocs,379
+numpy/distutils/checks/cpu_avx.c,sha256=LuZW8o93VZZi7cYEP30dvKWTm7Mw1TLmCt5UaXDxCJg,779
+numpy/distutils/checks/cpu_avx2.c,sha256=jlDlea393op0JOiMJgmmPyKmyAXztLcObPOp9F9FaS0,749
+numpy/distutils/checks/cpu_avx512_clx.c,sha256=P-YHjj2XE4SithBkPwDgShOxGWnVSNUXg72h8O3kpbs,842
+numpy/distutils/checks/cpu_avx512_cnl.c,sha256=f_c2Z0xwAKTJeK3RYMIp1dgXYV8QyeOxUgKkMht4qko,948
+numpy/distutils/checks/cpu_avx512_icl.c,sha256=isI35-gm7Hqn2Qink5hP1XHWlh52a5vwKhEdW_CRviE,1004
+numpy/distutils/checks/cpu_avx512_knl.c,sha256=PVTkczTpHlXbTc7IQKlCFU9Cq4VGG-_JhVnT0_n-t1A,959
+numpy/distutils/checks/cpu_avx512_knm.c,sha256=eszPGr3XC9Js7mQUB0gFxlrNjQwfucQFz_UwFyNLjes,1132
+numpy/distutils/checks/cpu_avx512_skx.c,sha256=59VD8ebEJJHLlbY-4dakZV34bmq_lr9mBKz8BAcsdYc,1010
+numpy/distutils/checks/cpu_avx512_spr.c,sha256=i8DpADB8ZhIucKc8lt9JfYbQANRvR67u59oQf5winvg,904
+numpy/distutils/checks/cpu_avx512cd.c,sha256=Qfh5FJUv9ZWd_P5zxkvYYIkvqsPptgaDuKkeX_F8vyA,759
+numpy/distutils/checks/cpu_avx512f.c,sha256=d97NRcbJhqpvURnw7zyG0TOuEijKXvU0g4qOTWHbwxY,755
+numpy/distutils/checks/cpu_f16c.c,sha256=nzZzpUc8AfTtw-INR3KOxcjx9pyzVUM8OhsrdH2dO_w,868
+numpy/distutils/checks/cpu_fma3.c,sha256=YN6IDwuZALJHVVmpQ2tj-14HI_PcxH_giV8-XjzlmkU,817
+numpy/distutils/checks/cpu_fma4.c,sha256=qKdgTNNFg-n8vSB1Txco60HBLCcOi1aH23gZOX7yKqs,301
+numpy/distutils/checks/cpu_neon.c,sha256=Y0SjuVLzh3upcbY47igHjmKgjHbXxbvzncwB7acfjxw,600
+numpy/distutils/checks/cpu_neon_fp16.c,sha256=E7YOGyYP41u1sqiCHpCGGqjmo7Cs6yUkmJ46K7LZloc,251
+numpy/distutils/checks/cpu_neon_vfpv4.c,sha256=qFY1C_fQYz7M_a_8j0KTdn7vaE3NNVmWY2JGArDGM3w,609
+numpy/distutils/checks/cpu_popcnt.c,sha256=vRcXHVw2j1F9I_07eIZ_xzDX3fd3mqgiQXL1w3pULJk,1049
+numpy/distutils/checks/cpu_rvv.c,sha256=ADmogrRu7XOOsCfB6PMpF0ES4yv8tXsbYduvZjEMTPA,300
+numpy/distutils/checks/cpu_sse.c,sha256=6MHITtC76UpSR9uh0SiURpnkpPkLzT5tbrcXT4xBFxo,686
+numpy/distutils/checks/cpu_sse2.c,sha256=yUZzdjDtBS-vYlhfP-pEzj3m0UPmgZs-hA99TZAEACU,697
+numpy/distutils/checks/cpu_sse3.c,sha256=j5XRHumUuccgN9XPZyjWUUqkq8Nu8XCSWmvUhmJTJ08,689
+numpy/distutils/checks/cpu_sse41.c,sha256=y_k81P-1b-Hx8OeRVDE9V1O9JakS0zPvlFKJ3VbSmEw,675
+numpy/distutils/checks/cpu_sse42.c,sha256=3PXucdI2mII-txO7zFN99TlVveT_QUAETTGvRk-_hYw,692
+numpy/distutils/checks/cpu_ssse3.c,sha256=X6VWxIXMRpdSCBsHPXvot3yTZ4d5yK9Bi1ScQP3WC-Q,705
+numpy/distutils/checks/cpu_sve.c,sha256=Ixj6TJHCdn7h_xE3MWviXrxlvo0OZkKDTT6sFIwNZPY,287
+numpy/distutils/checks/cpu_vsx.c,sha256=FVmR4iliKjcihzMCwloR1F2JYwSZK9P4f_hvIRLHSDQ,478
+numpy/distutils/checks/cpu_vsx2.c,sha256=yESs25Rt5ztb5-stuYbu3TbiyJKmllMpMLu01GOAHqE,263
+numpy/distutils/checks/cpu_vsx3.c,sha256=omC50tbEZNigsKMFPtE3zGRlIS2VuDTm3vZ9TBZWo4U,250
+numpy/distutils/checks/cpu_vsx4.c,sha256=ngezA1KuINqJkLAcMrZJR7bM0IeA25U6I-a5aISGXJo,305
+numpy/distutils/checks/cpu_vx.c,sha256=OpLU6jIfwvGJR4JPVVZLlUfvo7oAZ0YvsjafM2qtPlk,461
+numpy/distutils/checks/cpu_vxe.c,sha256=rYW_nKwXnlB0b8xCrJEr4TmvrEvS-NToxwyqqOHV8Bk,788
+numpy/distutils/checks/cpu_vxe2.c,sha256=Hv4wO23kwC2G6lqqercq4NE4K0nrvBxR7RIzr5HTXCc,624
+numpy/distutils/checks/cpu_xop.c,sha256=7uabsGeqvmVJQvuSEjs8-Sm8kpmvl6uZ9YHMF5h2opQ,234
+numpy/distutils/checks/extra_avx512bw_mask.c,sha256=pVPOhcu80yJVnIhOcHHXOlZ2proJ1MUf0XgccqhPoNk,636
+numpy/distutils/checks/extra_avx512dq_mask.c,sha256=nMfIvepISGFDexPrMYl5LWtdmt6Uy9TKPzF4BVayw2I,504
+numpy/distutils/checks/extra_avx512f_reduce.c,sha256=_NfbtfSAkm_A67umjR1oEb9yRnBL5EnTA76fvQIuNVk,1595
+numpy/distutils/checks/extra_vsx3_half_double.c,sha256=shHvIQZfR0o-sNefOt49BOh4WCmA0BpJvj4b7F9UdvQ,354
+numpy/distutils/checks/extra_vsx4_mma.c,sha256=GiQGZ9-6wYTgH42bJgSlXhWcTIrkjh5xv4uymj6rglk,499
+numpy/distutils/checks/extra_vsx_asm.c,sha256=BngiMVS9nyr22z6zMrOrHLeCloe_5luXhf5T5mYucgI,945
+numpy/distutils/checks/test_flags.c,sha256=uAIbhfAhyGe4nTdK_mZmoCefj9P0TGHNF9AUv_Cdx5A,16
+numpy/distutils/command/__init__.py,sha256=fW49zUB3syMFsKpf1oRBO0h8tmnTwRP3zUPrsB0R22M,1032
+numpy/distutils/command/__pycache__/__init__.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/autodist.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/bdist_rpm.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build_clib.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build_ext.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build_py.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build_scripts.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/build_src.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/config.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/config_compiler.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/develop.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/egg_info.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/install.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/install_clib.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/install_data.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/install_headers.cpython-310.pyc,,
+numpy/distutils/command/__pycache__/sdist.cpython-310.pyc,,
+numpy/distutils/command/autodist.py,sha256=8KWwr5mnjX20UpY4ITRDx-PreApyh9M7B92IwsEtTsQ,3718
+numpy/distutils/command/bdist_rpm.py,sha256=-tkZupIJr_jLqeX7xbRhE8-COXHRI0GoRpAKchVte54,709
+numpy/distutils/command/build.py,sha256=aj1SUGsDUTxs4Tch2ALLcPnuAVhaPjEPIZIobzMajm0,2613
+numpy/distutils/command/build_clib.py,sha256=TCuZDpRd8ZPZH6SRwIZcWZC3aoGc18Rll6FYcawS6qY,19317
+numpy/distutils/command/build_ext.py,sha256=UcyG8KKyrd5v1s6qDdKEkzwLwmoMlfHA893Lj-OOgl0,32983
+numpy/distutils/command/build_py.py,sha256=XiLZ2d_tmCE8uG5VAU5OK2zlzQayBfeY4l8FFEltbig,1144
+numpy/distutils/command/build_scripts.py,sha256=P2ytmZb3UpwfmbMXkFB2iMQk15tNUCynzMATllmp-Gs,1665
+numpy/distutils/command/build_src.py,sha256=sxsnfc8KBsnsSvI-8sKIKNo2KA2uvrrvW0WYZCqyjyk,31178
+numpy/distutils/command/config.py,sha256=etJCBJusXp-yzPodZnCBW0NJgxPNhv-FRTon6uV761E,20670
+numpy/distutils/command/config_compiler.py,sha256=N6JHVRAwgzkEsHqK8tqziLPlwbfWvdHaEdPv_sklkHc,4371
+numpy/distutils/command/develop.py,sha256=9SbbnFnVbSJVZxTFoV9pwlOcM1D30GnOWm2QonQDvHI,575
+numpy/distutils/command/egg_info.py,sha256=i-Zk4sftK5cMQVQ2jqSxTMpVI-gYyXN16-p5TvmjURc,921
+numpy/distutils/command/install.py,sha256=nkW2fl7OABcE3sUcoNM7iONkF64CBESdVlRjTLg3hVA,3073
+numpy/distutils/command/install_clib.py,sha256=1xv0_lPVu3g16GgICjjlh7T8zQ6PSlevCuq8Bocx5YM,1399
+numpy/distutils/command/install_data.py,sha256=Y59EBG61MWP_5C8XJvSCVfzYpMNVNVcH_Z6c0qgr9KA,848
+numpy/distutils/command/install_headers.py,sha256=LD_b1bRoprrOOErq2V8DvY8ydFa6KALyi5_fnWymCxc,920
+numpy/distutils/command/sdist.py,sha256=8Tsju1RwXNbPyQcjv8GRMFveFQqYlbNdSZh2X1OV-VU,733
+numpy/distutils/conv_template.py,sha256=F-4vkkfAjCb-fN79WYrXX3BMHMoiQO-W2u09q12OPuI,9536
+numpy/distutils/core.py,sha256=QBJNJdIE0a9Rr4lo-3QnmEaWyVV068l6HbVPdJ75iZg,8173
+numpy/distutils/cpuinfo.py,sha256=XuNhsx_-tyrui_AOgn10yfZ9p4YBM68vW2_bGmKj07I,22639
+numpy/distutils/exec_command.py,sha256=pNi8PhDX_BLc6CspovWMkhbeAQ1vQDlsGZNH8uNKptM,10282
+numpy/distutils/extension.py,sha256=g2Dei8GIkhrKpWttKkgQoVD6707pcx93MhhFt85Z89k,3460
+numpy/distutils/fcompiler/__init__.py,sha256=DqfaiKGVagOFuL0v3VZxZZkRnWWvly0_lYHuLjaZTBo,40625
+numpy/distutils/fcompiler/__pycache__/__init__.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/absoft.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/arm.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/compaq.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/environment.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/fujitsu.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/g95.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/gnu.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/hpux.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/ibm.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/intel.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/lahey.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/mips.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/nag.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/none.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/nv.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/pathf95.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/pg.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/sun.cpython-310.pyc,,
+numpy/distutils/fcompiler/__pycache__/vast.cpython-310.pyc,,
+numpy/distutils/fcompiler/absoft.py,sha256=yPUHBNZHOr_gxnte16I_X85o1iL9FI4RLHjG9JOuyYU,5516
+numpy/distutils/fcompiler/arm.py,sha256=MCri346qo1bYwjlm32xHRyRl-bAINTlfVIubN6HDz68,2090
+numpy/distutils/fcompiler/compaq.py,sha256=sjU2GKHJGuChtRb_MhnouMqvkIOQflmowFE6ErCWZhE,3903
+numpy/distutils/fcompiler/environment.py,sha256=DOD2FtKDk6O9k6U0h9UKWQ-65wU8z1tSPn3gUlRwCso,3080
+numpy/distutils/fcompiler/fujitsu.py,sha256=yK3wdHoF5qq25UcnIM6FzTXsJGJxdfKa_f__t04Ne7M,1333
+numpy/distutils/fcompiler/g95.py,sha256=FH4uww6re50OUT_BfdoWSLCDUqk8LvmQ2_j5RhF5nLQ,1330
+numpy/distutils/fcompiler/gnu.py,sha256=ag8v_pp-fYpDPKJsVmNaFwN621b1MFQAxew0T1KdE_Y,20502
+numpy/distutils/fcompiler/hpux.py,sha256=gloUjWGo7MgJmukorDq7ZxDnnUKXx-C6AQfryQshVM4,1353
+numpy/distutils/fcompiler/ibm.py,sha256=Ts2PXg2ocrXtX9eguvcHeQ4JB2ktpd5isXtRTpU9F5Y,3534
+numpy/distutils/fcompiler/intel.py,sha256=XYF0GLVhJWjS8noEx4TJ704Eqt-JGBolRZEOkwgNItE,6570
+numpy/distutils/fcompiler/lahey.py,sha256=U63KMfN8zDAd_jnvMkS2N-dvP4UiSRB9Ces290qLNXw,1327
+numpy/distutils/fcompiler/mips.py,sha256=LAwT0DY5yqlYh20hNMYR1-OKu8A9GNw-TbUfI8pvglM,1714
+numpy/distutils/fcompiler/nag.py,sha256=9pQCMUlwjRVHGKwZxvwd4bW5p-9v7VXcflELEImHg1g,2777
+numpy/distutils/fcompiler/none.py,sha256=6RX2X-mV1HuhJZnVfQmDmLVhIUWseIT4P5wf3rdLq9Y,758
+numpy/distutils/fcompiler/nv.py,sha256=NfU4vbXVBiV5FUG69NQciO61T-dFPB6N0Zd0zD8d4eY,1541
+numpy/distutils/fcompiler/pathf95.py,sha256=MiHVar6-beUEYVEpqXORIX4f8G29I47D36kreltdfoQ,1061
+numpy/distutils/fcompiler/pg.py,sha256=NOB1stzrjvQMZS7bIPTgWTcAFe3cjNveA5-SztUZqD0,3568
+numpy/distutils/fcompiler/sun.py,sha256=mfS3RTj9uYT6K9Ikp8RjmsEPIWAtUTzMhX9sGjEyF6I,1577
+numpy/distutils/fcompiler/vast.py,sha256=Xuxa4sNraUPcQmt45SogAfN0kDHFb6C73uNZNmX3RBE,1667
+numpy/distutils/from_template.py,sha256=hpoFQortsLZdMSr_fJILzXzrIwFlZoFjsDSo6jNtvWs,7913
+numpy/distutils/fujitsuccompiler.py,sha256=JDuUUE-GyPahkNnDZLWNHyAmJ2lJPCnLuIUFfHkjMzA,834
+numpy/distutils/intelccompiler.py,sha256=oBZ6MKmPP-RS-UrDvsxy7PAYgxE3pRykcZfrCpoDoas,4022
+numpy/distutils/lib2def.py,sha256=-3rDf9FXsDik3-Qpp-A6N_cYZKTlmVjVi4Jzyo-pSlY,3630
+numpy/distutils/line_endings.py,sha256=a8ZZECrPRffsbs0UygeR47_fOUlZppnx-QPssrIXtB0,2032
+numpy/distutils/log.py,sha256=m8caNBwPhIG7YTnD9iq9jjc6_yJOeU9FHuau2CSulds,2879
+numpy/distutils/mingw/gfortran_vs2003_hack.c,sha256=cbsN3Lk9Hkwzr9c-yOP2xEBg1_ml1X7nwAMDWxGjzc8,77
+numpy/distutils/mingw32ccompiler.py,sha256=RZR2jEjsrVq3iLVKSkQnWIdIA4cokiUUwl0JO2TdPYk,22151
+numpy/distutils/misc_util.py,sha256=pu-AikNhpbmHmGvq5uhcHAdRegvc0jrY5O8JI1M_xj8,89239
+numpy/distutils/msvc9compiler.py,sha256=FCtP7g34AVuMIaqQlH8AV1ZBdIUXbk5G7eBeeTSr1zE,2192
+numpy/distutils/msvccompiler.py,sha256=ILookUifVJF9tAtPJoVCqZ673m5od6MVKuAHuA3Rcfk,2647
+numpy/distutils/npy_pkg_config.py,sha256=LWpcvPQ4ZuGmKO0lrqQHZHAhBe87gTT1Rf6vX0NtZQM,13018
+numpy/distutils/numpy_distribution.py,sha256=10Urolg1aDAG0EHYfcvObzOgqRV0ARh2GhDklEg4vS0,634
+numpy/distutils/pathccompiler.py,sha256=KnJEA5H4cXg7SLrMjwWtidD24VSvOdu72d17votiY9E,713
+numpy/distutils/system_info.py,sha256=kWwNarHCP-D5Qi2q_8WiUSs_ILOo270FpFWOn_JjCtw,113904
+numpy/distutils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/distutils/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_build_ext.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_ccompiler_opt.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_ccompiler_opt_conf.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_exec_command.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_fcompiler.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_fcompiler_gnu.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_fcompiler_intel.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_fcompiler_nagfor.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_from_template.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_log.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_mingw32ccompiler.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_misc_util.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_npy_pkg_config.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_shell_utils.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/test_system_info.cpython-310.pyc,,
+numpy/distutils/tests/__pycache__/utilities.cpython-310.pyc,,
+numpy/distutils/tests/test_build_ext.py,sha256=kaKh51tQSetUr4ozxICwUUjOasSXHrg1MCzJAVDNbWY,2779
+numpy/distutils/tests/test_ccompiler_opt.py,sha256=N3pN-9gxPY1KvvMEjoXr7kLxTGN8aQOr8qo5gmlrm90,28778
+numpy/distutils/tests/test_ccompiler_opt_conf.py,sha256=maXytv39amuojbQIieIGIXMV4Cv-s0fsPMZeFEh9XyY,6347
+numpy/distutils/tests/test_exec_command.py,sha256=BK-hHfIIrkCep-jNmS5_Cwq5oESvsvX3V_0XDAkT1Ok,7395
+numpy/distutils/tests/test_fcompiler.py,sha256=mJXezTXDUbduhCwVGAfABHpEARWhnj8hLW9EOU3rn84,1277
+numpy/distutils/tests/test_fcompiler_gnu.py,sha256=nmfaFCVzbViIOQ2-MjgXt-bN8Uj674hCgiwr5Iol-_U,2136
+numpy/distutils/tests/test_fcompiler_intel.py,sha256=mxkfFD2rNfg8nn1pp_413S0uCdYXydPWBcz9ilgGkA0,1058
+numpy/distutils/tests/test_fcompiler_nagfor.py,sha256=CKEjik7YVfSJGL4abuctkmlkIUhAhv-x2aUcXiTR9b0,1102
+numpy/distutils/tests/test_from_template.py,sha256=SDYoe0XUpAayyEQDq7ZhrvEEz7U9upJDLYzhcdoVifc,1103
+numpy/distutils/tests/test_log.py,sha256=0tSM4q-00CjbMIRb9QOJzI4A7GHUiRGOG1SOOLz8dnM,868
+numpy/distutils/tests/test_mingw32ccompiler.py,sha256=rMC8-IyBOiuZVfAoklV_KnD9qVeB_hFVvb5dStxfk08,1609
+numpy/distutils/tests/test_misc_util.py,sha256=xjNaYJ4Ev5YjokxM8J_T2z2oGTzUSs-wCh9ZqO9RNmg,3364
+numpy/distutils/tests/test_npy_pkg_config.py,sha256=apGrmViPcXoPCEOgDthJgL13C9N0qQMs392QjZDxJd4,2557
+numpy/distutils/tests/test_shell_utils.py,sha256=UKU_t5oIa_kVMv89Ys9KN6Z_Fy5beqPDUsDAWPmcoR8,2114
+numpy/distutils/tests/test_system_info.py,sha256=wMV7bH5oB0luLDR2tunHrLaUxsD_-sIhLnNpj1blQPs,11405
+numpy/distutils/tests/utilities.py,sha256=pyfnVJJ7ZprjC2EETB6iFHYMkQeKsZbq1jVQR3cIrws,2287
+numpy/distutils/unixccompiler.py,sha256=fN4-LH6JJp44SLE7JkdG2kKQlK4LC8zuUpVC-RtmJ-U,5426
+numpy/doc/__pycache__/ufuncs.cpython-310.pyc,,
+numpy/doc/ufuncs.py,sha256=9xt8H34GhrXrFq9cWFUGvJFePa9YuH9Tq1DzAnm2E2E,5414
+numpy/dtypes.py,sha256=zuPwgC0ijF2oDRAOJ6I9JKhaJuhXFAygByLQaoVtT54,1312
+numpy/dtypes.pyi,sha256=BYyUPY0MKF7EzspiOss_FaxqEEzmd0dEpsvGySRfSek,15180
+numpy/exceptions.py,sha256=2EH3OwDVoJtAsRODuGlnLWA1hrjDniolCVkR87-eHIo,7838
+numpy/exceptions.pyi,sha256=rVue0Qxt3GG40b5xKlj0r_JFjbX6s-bPP7YlqdQlvv0,751
+numpy/f2py/__init__.py,sha256=hz6c1M2csKnlKPWbKIDcpSo0cbT5V0UPhQYkELi8zEw,2503
+numpy/f2py/__init__.pyi,sha256=uxcZnHA75gxBi50Z3OTWYSYZaeIuWFQv2Dl0F8_WX-g,1061
+numpy/f2py/__main__.py,sha256=6i2jVH2fPriV1aocTY_dUFvWK18qa-zjpnISA-OpF3w,130
+numpy/f2py/__pycache__/__init__.cpython-310.pyc,,
+numpy/f2py/__pycache__/__main__.cpython-310.pyc,,
+numpy/f2py/__pycache__/__version__.cpython-310.pyc,,
+numpy/f2py/__pycache__/_isocbind.cpython-310.pyc,,
+numpy/f2py/__pycache__/_src_pyf.cpython-310.pyc,,
+numpy/f2py/__pycache__/auxfuncs.cpython-310.pyc,,
+numpy/f2py/__pycache__/capi_maps.cpython-310.pyc,,
+numpy/f2py/__pycache__/cb_rules.cpython-310.pyc,,
+numpy/f2py/__pycache__/cfuncs.cpython-310.pyc,,
+numpy/f2py/__pycache__/common_rules.cpython-310.pyc,,
+numpy/f2py/__pycache__/crackfortran.cpython-310.pyc,,
+numpy/f2py/__pycache__/diagnose.cpython-310.pyc,,
+numpy/f2py/__pycache__/f2py2e.cpython-310.pyc,,
+numpy/f2py/__pycache__/f90mod_rules.cpython-310.pyc,,
+numpy/f2py/__pycache__/func2subr.cpython-310.pyc,,
+numpy/f2py/__pycache__/rules.cpython-310.pyc,,
+numpy/f2py/__pycache__/symbolic.cpython-310.pyc,,
+numpy/f2py/__pycache__/use_rules.cpython-310.pyc,,
+numpy/f2py/__version__.py,sha256=7HHdjR82FCBmftwMRyrlhcEj-8mGQb6oCH-wlUPH4Nw,34
+numpy/f2py/_backends/__init__.py,sha256=7_bA7c_xDpLc4_8vPfH32-Lxn9fcUTgjQ25srdvwvAM,299
+numpy/f2py/_backends/__pycache__/__init__.cpython-310.pyc,,
+numpy/f2py/_backends/__pycache__/_backend.cpython-310.pyc,,
+numpy/f2py/_backends/__pycache__/_distutils.cpython-310.pyc,,
+numpy/f2py/_backends/__pycache__/_meson.cpython-310.pyc,,
+numpy/f2py/_backends/_backend.py,sha256=GKb9-UaFszT045vUgVukPs1n97iyyjqahrWKxLOKNYo,1187
+numpy/f2py/_backends/_distutils.py,sha256=whJ4xqPet1PffVOcR6W_2NF8yR4LLDh3pZLrKkl0Rh4,2384
+numpy/f2py/_backends/_meson.py,sha256=xRGHWhdQJIs1-c3fHeeGHL50XyjU6NjX4-Wp3gjldMY,8089
+numpy/f2py/_backends/meson.build.template,sha256=hQeTapAY0xtni5Li-QaEtWx9DH9WDKah2lcEuSZfLLo,1599
+numpy/f2py/_isocbind.py,sha256=zaBgpfPNRmxVG3doUIlbZIiyB990MsXiwDabrSj9HnQ,2360
+numpy/f2py/_src_pyf.py,sha256=4Qx_-SQSsDh-ggNw3dmHTLASgu1dUY670_Z06WY8clM,7664
+numpy/f2py/auxfuncs.py,sha256=PSpBh067SNG1XUJNHqCLpxiorTieeuVTj5h8tOTfXeE,27020
+numpy/f2py/capi_maps.py,sha256=MTHjWUSTBngVZtyULdBe1QxAGq9IrxNV8OthujKKr0w,30607
+numpy/f2py/cb_rules.py,sha256=fSxXAxjNaPXt54E957v1-Q3oCM06vbST5gFu1D98ic4,25004
+numpy/f2py/cfuncs.py,sha256=Jz-em0GDHjexh8FiVEYccAMV4xB5Bp9kQVUMM1uBNcY,52484
+numpy/f2py/common_rules.py,sha256=gHB76WypbkVmhaD_RWhy8Od4zDTgj8cbDOdUdIp6PIQ,5131
+numpy/f2py/crackfortran.py,sha256=KfTsGcO947ziTwz9UTmrfyXLbqXGIngrMRkso2C0v5E,148095
+numpy/f2py/diagnose.py,sha256=7-Turk573zFa1PIZiFPbC4Pukm1X0nF8PyGxnlc08Fc,5197
+numpy/f2py/f2py2e.py,sha256=inb09kMkkYig8a6Rizj6xvHuWXfrqZzXh1oZgz0dZvM,28838
+numpy/f2py/f90mod_rules.py,sha256=XGtag5pv2Np-hdtjwmSxofKbLO2U_N49sEK_X4Lp3SA,9874
+numpy/f2py/func2subr.py,sha256=6d2R5awuHRT4xzgfUfwS7JHTqhhAieSXcENlssD_2c4,10298
+numpy/f2py/rules.py,sha256=EhOTqFY3M0UX5dQGlthzkFC0b-R5nCVh4ST4tp0smFY,62938
+numpy/f2py/setup.cfg,sha256=Fpn4sjqTl5OT5sp8haqKIRnUcTPZNM6MIvUJBU7BIhg,48
+numpy/f2py/src/fortranobject.c,sha256=CYrF44_CoUbZy3QHhe5sAPVtqsaCT4x9oCtUeD7IVyc,46049
+numpy/f2py/src/fortranobject.h,sha256=7cfRN_tToAQ1Na13VQ2Kzb2ujMHUAgGsbScnfLVOHqs,5823
+numpy/f2py/symbolic.py,sha256=PvP0bK0FLEDQj14u340HJu7ghzS_2WlxhGQpJ0zbMQE,53254
+numpy/f2py/tests/__init__.py,sha256=46XgeBE0seimp3wD4Ox0KutYeLwdsdRSiGECcG1iYu8,328
+numpy/f2py/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_abstract_interface.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_array_from_pyobj.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_assumed_shape.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_block_docstring.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_callback.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_character.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_common.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_crackfortran.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_data.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_docs.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_f2cmap.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_f2py2e.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_isoc.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_kind.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_mixed.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_modules.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_parameter.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_pyf_src.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_quoted_character.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_return_character.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_return_complex.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_return_integer.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_return_logical.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_return_real.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_routines.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_semicolon_split.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_size.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_string.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_symbolic.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/test_value_attrspec.cpython-310.pyc,,
+numpy/f2py/tests/__pycache__/util.cpython-310.pyc,,
+numpy/f2py/tests/src/abstract_interface/foo.f90,sha256=JFU2w98cB_XNwfrqNtI0yDTmpEdxYO_UEl2pgI_rnt8,658
+numpy/f2py/tests/src/abstract_interface/gh18403_mod.f90,sha256=gvQJIzNtvacWE0dhysxn30-iUeI65Hpq7DiE9oRauz8,105
+numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c,sha256=s6XLwujiCr6Xi8yBkvLPBXRmo2WsGVohU7K9ALnKUng,7478
+numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap,sha256=But9r9m4iL7EGq_haMW8IiQ4VivH0TgUozxX4pPvdpE,29
+numpy/f2py/tests/src/assumed_shape/foo_free.f90,sha256=oBwbGSlbr9MkFyhVO2aldjc01dr9GHrMrSiRQek8U64,460
+numpy/f2py/tests/src/assumed_shape/foo_mod.f90,sha256=rfzw3QdI-eaDSl-hslCgGpd5tHftJOVhXvb21Y9Gf6M,499
+numpy/f2py/tests/src/assumed_shape/foo_use.f90,sha256=rmT9k4jP9Ru1PLcGqepw9Jc6P9XNXM0axY7o4hi9lUw,269
+numpy/f2py/tests/src/assumed_shape/precision.f90,sha256=r08JeTVmTTExA-hYZ6HzaxVwBn1GMbPAuuwBhBDtJUk,130
+numpy/f2py/tests/src/block_docstring/foo.f,sha256=y7lPCPu7_Fhs_Tf2hfdpDQo1bhtvNSKRaZAOpM_l3dg,97
+numpy/f2py/tests/src/callback/foo.f,sha256=C1hjfpRCQWiOVVzIHqnsYcnLrqQcixrnHCn8hd9GhVk,1254
+numpy/f2py/tests/src/callback/gh17797.f90,sha256=_Nrl0a2HgUbtymGU0twaJ--7rMa1Uco2A3swbWvHoMo,148
+numpy/f2py/tests/src/callback/gh18335.f90,sha256=NraOyKIXyvv_Y-3xGnmTjtNjW2Znsnlk8AViI8zfovc,506
+numpy/f2py/tests/src/callback/gh25211.f,sha256=a2sxlQhtDVbYn8KOKHUYqwc-aCFt7sDPSnJsXFG35uI,179
+numpy/f2py/tests/src/callback/gh25211.pyf,sha256=FWxo0JWQlw519BpZV8PoYeI_FZ_K6C-3Wk6gLrfBPlw,447
+numpy/f2py/tests/src/callback/gh26681.f90,sha256=-cD69x7omk5wvVsfMHlXiZ-pTcaxs2Bl5G9GHA4UJ2M,566
+numpy/f2py/tests/src/cli/gh_22819.pyf,sha256=5rvOfCv-wSosB354LC9pExJmMoSHnbGZGl_rtA2fogA,142
+numpy/f2py/tests/src/cli/hi77.f,sha256=ttyI6vAP3qLnDqy82V04XmoqrXNM6uhMvvLri2p0dq0,71
+numpy/f2py/tests/src/cli/hiworld.f90,sha256=QWOLPrTxYQu1yrEtyQMbM0fE9M2RmXe7c185KnD5x3o,51
+numpy/f2py/tests/src/common/block.f,sha256=GQ0Pd-VMX3H3a-__f2SuosSdwNXHpBqoGnQDjf8aG9g,224
+numpy/f2py/tests/src/common/gh19161.f90,sha256=BUejyhqpNVfHZHQ-QC7o7ZSo7lQ6YHyX08lSmQqs6YM,193
+numpy/f2py/tests/src/crackfortran/accesstype.f90,sha256=-5Din7YlY1TU7tUHD2p-_DSTxGBpDsWYNeT9WOwGhno,208
+numpy/f2py/tests/src/crackfortran/common_with_division.f,sha256=2LfRa26JEB07_ti-WDmIveq991PxRlL_K6ss28rZDkk,494
+numpy/f2py/tests/src/crackfortran/data_common.f,sha256=ZSUAh3uhn9CCF-cYqK5TNmosBGPfsuHBIEfudgysun4,193
+numpy/f2py/tests/src/crackfortran/data_multiplier.f,sha256=jYrJKZWF_59JF9EMOSALUjn0UupWvp1teuGpcL5s1Sc,197
+numpy/f2py/tests/src/crackfortran/data_stmts.f90,sha256=19YO7OGj0IksyBlmMLZGRBQLjoE3erfkR4tFvhznvvE,693
+numpy/f2py/tests/src/crackfortran/data_with_comments.f,sha256=hoyXw330VHh8duMVmAQZjr1lgLVF4zFCIuEaUIrupv0,175
+numpy/f2py/tests/src/crackfortran/foo_deps.f90,sha256=CaH7mnWTG7FcnJe2vXN_0zDbMadw6NCqK-JJ2HmDjK8,128
+numpy/f2py/tests/src/crackfortran/gh15035.f,sha256=jJly1AzF5L9VxbVQ0vr-sf4LaUo4eQzJguhuemFxnvg,375
+numpy/f2py/tests/src/crackfortran/gh17859.f,sha256=7K5dtOXGuBDAENPNCt-tAGJqTfNKz5OsqVSk16_e7Es,340
+numpy/f2py/tests/src/crackfortran/gh22648.pyf,sha256=qZHPRNQljIeYNwbqPLxREnOrSdVV14f3fnaHqB1M7c0,241
+numpy/f2py/tests/src/crackfortran/gh23533.f,sha256=w3tr_KcY3s7oSWGDmjfMHv5h0RYVGUpyXquNdNFOJQg,126
+numpy/f2py/tests/src/crackfortran/gh23598.f90,sha256=41W6Ire-5wjJTTg6oAo7O1WZfd1Ug9vvNtNgHS5MhEU,101
+numpy/f2py/tests/src/crackfortran/gh23598Warn.f90,sha256=1v-hMCT_K7prhhamoM20nMU9zILam84Hr-imck_dYYk,205
+numpy/f2py/tests/src/crackfortran/gh23879.f90,sha256=LWDJTYR3t9h1IsrKC8dVXZlBfWX7clLeU006X6Ow8oI,332
+numpy/f2py/tests/src/crackfortran/gh27697.f90,sha256=bbnKpDsOuCWluoNodxzCspUQnu169zKTsn4fLTkhwpM,364
+numpy/f2py/tests/src/crackfortran/gh2848.f90,sha256=gPNasx98SIf7Z9ibk_DHiGKCvl7ERtsfoGXiFDT7FbM,282
+numpy/f2py/tests/src/crackfortran/operators.f90,sha256=-Fc-qjW1wBr3Dkvdd5dMTrt0hnjnV-1AYo-NFWcwFSo,1184
+numpy/f2py/tests/src/crackfortran/privatemod.f90,sha256=7bubZGMIn7iD31wDkjF1TlXCUM7naCIK69M9d0e3y-U,174
+numpy/f2py/tests/src/crackfortran/publicmod.f90,sha256=Pnwyf56Qd6W3FUH-ZMgnXEYkb7gn18ptNTdwmGan0Jo,167
+numpy/f2py/tests/src/crackfortran/pubprivmod.f90,sha256=eYpJwBYLKGOxVbKgEqfny1znib-b7uYhxcRXIf7uwXg,165
+numpy/f2py/tests/src/crackfortran/unicode_comment.f90,sha256=aINLh6GlfTwFewxvDoqnMqwuCNb4XAqi5Nj5vXguXYs,98
+numpy/f2py/tests/src/f2cmap/.f2py_f2cmap,sha256=iUOtfHd3OuT1Rz2-yiSgt4uPKGvCt5AzQ1iygJt_yjg,82
+numpy/f2py/tests/src/f2cmap/isoFortranEnvMap.f90,sha256=iJCD8a8MUTmuPuedbcmxW54Nr4alYuLhksBe1sHS4K0,298
+numpy/f2py/tests/src/isocintrin/isoCtests.f90,sha256=jcw-fzrFh0w5U66uJYfeUW4gv94L5MnWQ_NpsV9y0oI,998
+numpy/f2py/tests/src/kind/foo.f90,sha256=zIHpw1KdkWbTzbXb73hPbCg4N2Htj3XL8DIwM7seXpo,347
+numpy/f2py/tests/src/mixed/foo.f,sha256=90zmbSHloY1XQYcPb8B5d9bv9mCZx8Z8AMTtgDwJDz8,85
+numpy/f2py/tests/src/mixed/foo_fixed.f90,sha256=pxKuPzxF3Kn5khyFq9ayCsQiolxB3SaNtcWaK5j6Rv4,179
+numpy/f2py/tests/src/mixed/foo_free.f90,sha256=fIQ71wrBc00JUAVUj_r3QF9SdeNniBiMw6Ly7CGgPWU,139
+numpy/f2py/tests/src/modules/gh25337/data.f90,sha256=9Uz8CHB9i3_mjC3cTOmkTgPAF5tWSwYacG3MUrU-SY0,180
+numpy/f2py/tests/src/modules/gh25337/use_data.f90,sha256=WATiDGAoCKnGgMzm_iMgmfVU0UKOQlk5Fm0iXCmPAkE,179
+numpy/f2py/tests/src/modules/gh26920/two_mods_with_no_public_entities.f90,sha256=c7VU4SbK3yWn-6wksP3tDx_Hxh5u_g8UnlDpjU_-tBg,402
+numpy/f2py/tests/src/modules/gh26920/two_mods_with_one_public_routine.f90,sha256=eEU7RgFPh-TnNXEuJFdtJmTF-wPnpbHLQhG4fEeJnag,403
+numpy/f2py/tests/src/modules/module_data_docstring.f90,sha256=tDZ3fUlazLL8ThJm3VwNGJ75QIlLcW70NnMFv-JA4W0,224
+numpy/f2py/tests/src/modules/use_modules.f90,sha256=UsFfx0B2gu_tS-H-BpLWed_yoMDl1kbydMIOz8fvXWA,398
+numpy/f2py/tests/src/negative_bounds/issue_20853.f90,sha256=fdOPhRi7ipygwYCXcda7p_dlrws5Hd2GlpF9EZ-qnck,157
+numpy/f2py/tests/src/parameter/constant_array.f90,sha256=KRg7Gmq_r3B7t3IEgRkP1FT8ve8AuUFWT0WcTlXoN5U,1468
+numpy/f2py/tests/src/parameter/constant_both.f90,sha256=-bBf2eqHb-uFxgo6Q7iAtVUUQzrGFqzhHDNaxwSICfQ,1939
+numpy/f2py/tests/src/parameter/constant_compound.f90,sha256=re7pfzcuaquiOia53UT7qNNrTYu2euGKOF4IhoLmT6g,469
+numpy/f2py/tests/src/parameter/constant_integer.f90,sha256=nEmMLitKoSAG7gBBEQLWumogN-KS3DBZOAZJWcSDnFw,612
+numpy/f2py/tests/src/parameter/constant_non_compound.f90,sha256=IcxESVLKJUZ1k9uYKoSb8Hfm9-O_4rVnlkiUU2diy8Q,609
+numpy/f2py/tests/src/parameter/constant_real.f90,sha256=quNbDsM1Ts2rN4WtPO67S9Xi_8l2cXabWRO00CPQSSQ,610
+numpy/f2py/tests/src/quoted_character/foo.f,sha256=WjC9D9171fe2f7rkUAZUvik9bkIf9adByfRGzh6V0cM,482
+numpy/f2py/tests/src/regression/AB.inc,sha256=cSNxitwrjTKMiJzhY2AI5FaXJ5y9zDgA27x79jyoI6s,16
+numpy/f2py/tests/src/regression/assignOnlyModule.f90,sha256=c9RvUP1pQ201O_zOXgV0xp_aJF_8llxuA8Uot9z5tr0,608
+numpy/f2py/tests/src/regression/datonly.f90,sha256=9cVvl8zlAuGiqbSHMFzFn6aNWXj2v7sHJdd9A1Oc0qg,392
+numpy/f2py/tests/src/regression/f77comments.f,sha256=bqTsmO8WuSLVFsViIV7Nj7wQbJoZ7IAA3d2tpRDKsnA,626
+numpy/f2py/tests/src/regression/f77fixedform.f95,sha256=hcLZbdozMJ3V9pByVRp3RoeUvZgLMRLFctpZvxK2hTI,139
+numpy/f2py/tests/src/regression/f90continuation.f90,sha256=_W1fj0wXLqT91Q14qpBnM3F7rJKaiSR8upe0mR6_OIE,276
+numpy/f2py/tests/src/regression/incfile.f90,sha256=i7Y1zgMXR9bSxnjeYWSDGeCfsS5jiyn7BLb-wbwjz2U,92
+numpy/f2py/tests/src/regression/inout.f90,sha256=CpHpgMrf0bqA1W3Ozo3vInDz0RP904S7LkpdAH6ODck,277
+numpy/f2py/tests/src/regression/lower_f2py_fortran.f90,sha256=CMQL5RWf9LKnnUDiS-IYa9xc9DGanCYraNq0vGmunOE,100
+numpy/f2py/tests/src/return_character/foo77.f,sha256=WzDNF3d_hUDSSZjtxd3DtE-bSx1ilOMEviGyYHbcFgM,980
+numpy/f2py/tests/src/return_character/foo90.f90,sha256=ULcETDEt7gXHRzmsMhPsGG4o3lGrcx-FEFaJsPGFKyA,1248
+numpy/f2py/tests/src/return_complex/foo77.f,sha256=8ECRJkfX82oFvGWKbIrCvKjf5QQQClx4sSEvsbkB6A8,973
+numpy/f2py/tests/src/return_complex/foo90.f90,sha256=c1BnrtWwL2dkrTr7wvlEqNDg59SeNMo3gyJuGdRwcDw,1238
+numpy/f2py/tests/src/return_integer/foo77.f,sha256=_8k1evlzBwvgZ047ofpdcbwKdF8Bm3eQ7VYl2Y8b5kA,1178
+numpy/f2py/tests/src/return_integer/foo90.f90,sha256=bzxbYtofivGRYH35Ang9ScnbNsVERN8-6ub5-eI-LGQ,1531
+numpy/f2py/tests/src/return_logical/foo77.f,sha256=FxiF_X0HkyXHzJM2rLyTubZJu4JB-ObLnVqfZwAQFl8,1188
+numpy/f2py/tests/src/return_logical/foo90.f90,sha256=9KmCe7yJYpi4ftkKOM3BCDnPOdBPTbUNrKxY3p37O14,1531
+numpy/f2py/tests/src/return_real/foo77.f,sha256=ZTrzb6oDrIDPlrVWP3Bmtkbz3ffHaaSQoXkfTGtCuFE,933
+numpy/f2py/tests/src/return_real/foo90.f90,sha256=gZuH5lj2lG6gqHlH766KQ3J4-Ero-G4WpOOo2MG3ohU,1194
+numpy/f2py/tests/src/routines/funcfortranname.f,sha256=oGPnHo0zL7kjFnuHw41mWUSXauoeRVPXnYXBb2qljio,123
+numpy/f2py/tests/src/routines/funcfortranname.pyf,sha256=coD8AdLyPK4_cGvQJgE2WJW_jH8EAulZCsMeb-Q1gOk,440
+numpy/f2py/tests/src/routines/subrout.f,sha256=RTexoH7RApv_mhu-RcVwyNiU-DXMTUP8LJAMSn2wQjk,90
+numpy/f2py/tests/src/routines/subrout.pyf,sha256=c9qv4XtIh4wA9avdkDJuXNwojK-VBPldrNhxlh446Ic,322
+numpy/f2py/tests/src/size/foo.f90,sha256=IlFAQazwBRr3zyT7v36-tV0-fXtB1d7WFp6S1JVMstg,815
+numpy/f2py/tests/src/string/char.f90,sha256=ihr_BH9lY7eXcQpHHDQhFoKcbu7VMOX5QP2Tlr7xlaM,618
+numpy/f2py/tests/src/string/fixed_string.f90,sha256=5n6IkuASFKgYICXY9foCVoqndfAY0AQZFEK8L8ARBGM,695
+numpy/f2py/tests/src/string/gh24008.f,sha256=UA8Pr-_yplfOFmc6m4v9ryFQ8W9OulaglulefkFWD68,217
+numpy/f2py/tests/src/string/gh24662.f90,sha256=-Tp9Kd1avvM7AIr8ZukFA9RVr-wusziAnE8AvG9QQI4,197
+numpy/f2py/tests/src/string/gh25286.f90,sha256=2EpxvC-0_dA58MBfGQcLyHzpZgKcMf_W9c73C_Mqnok,304
+numpy/f2py/tests/src/string/gh25286.pyf,sha256=GjgWKh1fHNdPGRiX5ek60i1XSeZsfFalydWqjISPVV8,381
+numpy/f2py/tests/src/string/gh25286_bc.pyf,sha256=6Y9zU66NfcGhTXlFOdFjCSMSwKXpq5ZfAe3FwpkAsm4,384
+numpy/f2py/tests/src/string/scalar_string.f90,sha256=ACxV2i6iPDk-a6L_Bs4jryVKYJMEGUTitEIYTjbJes4,176
+numpy/f2py/tests/src/string/string.f,sha256=shr3fLVZaa6SyUJFYIF1OZuhff8v5lCwsVNBU2B-3pk,248
+numpy/f2py/tests/src/value_attrspec/gh21665.f90,sha256=JC0FfVXsnB2lZHb-nGbySnxv_9VHAyD0mKaLDowczFU,190
+numpy/f2py/tests/test_abstract_interface.py,sha256=nGyPJgB0-d9Ttk3XsYb-N9HxfZxTVUz0gkl66u3JNaU,809
+numpy/f2py/tests/test_array_from_pyobj.py,sha256=nXkuHwa0gvVOsyuKI2m1UfVu8HyKiFqBvIK23_zOdxw,23702
+numpy/f2py/tests/test_assumed_shape.py,sha256=FeaqtrWyBf5uyArcmI0D2e_f763aSMpgU3QmdDXe-tA,1466
+numpy/f2py/tests/test_block_docstring.py,sha256=2WGCsNBxtH57BjAYyPAzUZgiBRYWAQpC9zODP02OZec,582
+numpy/f2py/tests/test_callback.py,sha256=8I31S55C4p3WXUFUY78fo8as-VpS6h7kNAPeUZrr7w0,7114
+numpy/f2py/tests/test_character.py,sha256=zUsyZCO1FrhVxF-S_fuET_xjbWoJc3SrFCNY_buT7WU,21905
+numpy/f2py/tests/test_common.py,sha256=VPsy0SLqbKaUGgDqesYXmjYuLpnPK-XyzseqmV5QnhM,641
+numpy/f2py/tests/test_crackfortran.py,sha256=6Y_u1FJYpVkwE9615Bx24eMh67rtJEm1bIEegnpxvCg,16383
+numpy/f2py/tests/test_data.py,sha256=SFYgovu5LBtIbS-zvbqkm9zoahHJx35LDOJoEqYP_kU,2888
+numpy/f2py/tests/test_docs.py,sha256=GiQUqifxttwJRgkmLEoq5wIFjTlYLEAQ1n5Kw4Emsiw,1850
+numpy/f2py/tests/test_f2cmap.py,sha256=-WnN0HlqiG9RPgc1P_KSLZvqgQ4wGYDf0lFcyfWOLfs,385
+numpy/f2py/tests/test_f2py2e.py,sha256=K_883X2rw88Fn5a7bZPI03NFA3YD95NYopX0OHxcZAM,27868
+numpy/f2py/tests/test_isoc.py,sha256=kY7yg7Jtyn_RBlozwe6UpQvtwPbPcpTC0B27s2GRo7s,1428
+numpy/f2py/tests/test_kind.py,sha256=myLQNDPZDdVq7PNjXWUgkY3M-JdzP5MJNZ1PE_ChNEI,1783
+numpy/f2py/tests/test_mixed.py,sha256=iMMRt1q7woHuKSfqiw4LsaU9wIRq2FnvT0lv74fR7V0,860
+numpy/f2py/tests/test_modules.py,sha256=wli_Cq9FroWg9nnOZplGAd9L5OX49h_Z-e8PyVVnk0w,2299
+numpy/f2py/tests/test_parameter.py,sha256=j4sNNiHkj-jbl3FC4v_tnksgpydbHqNvNI2tzlVFGYE,4623
+numpy/f2py/tests/test_pyf_src.py,sha256=eD0bZu_GWfoCq--wWqEKRf-F2h5AwoTyO6GMA9wJPr4,1135
+numpy/f2py/tests/test_quoted_character.py,sha256=T6I2EyopdItKamcokG0ylvhT7krZYhBU6hF3UFIBr2g,476
+numpy/f2py/tests/test_regression.py,sha256=L95aSnN9lOVRkmGPVRaVF4w6hJ3iHgQ8BPM34Uef35I,5849
+numpy/f2py/tests/test_return_character.py,sha256=DP63vrF6bIV-QRBsJ1ZpPsKz-u906Ph8M6_biPEzBJs,1511
+numpy/f2py/tests/test_return_complex.py,sha256=4vtpIYqAZZrbKYi3fnP7l_Zn42YnBbPwl8-eNfZOHHo,2415
+numpy/f2py/tests/test_return_integer.py,sha256=qR8Ismf40Ml2impqjGzjL2i-CRyGTxXVEvzQQMkJfJo,1776
+numpy/f2py/tests/test_return_logical.py,sha256=XCmp8E8I6BOeNYF59HjSFAdv1hM9WaDvl8UDS10_05o,2017
+numpy/f2py/tests/test_return_real.py,sha256=KMIRQP9xjz09-wFX-jeMbkNQPXegnfd-Qhc4W4qKHeA,3247
+numpy/f2py/tests/test_routines.py,sha256=TflyDvptl5dREgZFv6hlauRvsK_FFUo7ZTVsiIYPcio,794
+numpy/f2py/tests/test_semicolon_split.py,sha256=6aGgOdtGpJSgPZlzpow-tcHXSPqrJeKagWnFilheWeM,1626
+numpy/f2py/tests/test_size.py,sha256=CsElZF4N5Tf7fr27TJudu3JD_JKb63SubUXPYjl5Llg,1154
+numpy/f2py/tests/test_string.py,sha256=wfV6jxkOnoJWOM7i5Ee7gc2nXK_Gyb3FqNI4wLfVQhk,2936
+numpy/f2py/tests/test_symbolic.py,sha256=28quk2kTKfWhKe56n4vINJ8G9weKBfc7HysMlE9J3_g,18341
+numpy/f2py/tests/test_value_attrspec.py,sha256=jYtbvVyg8uOZsdcCeLhaXIdR7MOfMh1j04aXbJNbfK8,329
+numpy/f2py/tests/util.py,sha256=WKEixdQq0xJV3Hg60a-6xc1T5GhKDngfPEw-WNfoqjg,12174
+numpy/f2py/use_rules.py,sha256=oMjkw5fP55MhGAqdDcO_dknbQBE9qLljU7y6-HDoerY,3515
+numpy/fft/__init__.py,sha256=cW8oJRorHlG10mhnhAB1OOkg4HpG2NGYHDgonFNI04s,8326
+numpy/fft/__init__.pyi,sha256=KvQQpPxk9LKgqMIB3AGJCsQDu3ownGKjjT7McQKNpXY,514
+numpy/fft/__pycache__/__init__.cpython-310.pyc,,
+numpy/fft/__pycache__/_helper.cpython-310.pyc,,
+numpy/fft/__pycache__/_pocketfft.cpython-310.pyc,,
+numpy/fft/__pycache__/helper.cpython-310.pyc,,
+numpy/fft/_helper.py,sha256=Yvph-5gksd0HebLSXq4UKfVYOwSiqNIa4THpv0aA2HE,6775
+numpy/fft/_helper.pyi,sha256=dek8ibnRL8Y2erBdDt7ydWyAVXLb46SPTctLy_TEKoE,1341
+numpy/fft/_pocketfft.py,sha256=Q6J5inX10oPBtX-lblPlYExuzycovGr-LFMT7QYe9pc,62692
+numpy/fft/_pocketfft.pyi,sha256=Dvhdy8Y2R1HmTu-99z4Pgd4WCnC6eg3OVzUY4yOQpTo,3155
+numpy/fft/_pocketfft_umath.cpython-310-x86_64-linux-gnu.so,sha256=vfJmvXmCJeWh_twk95K0tF1SvZYK3JT9PLdhCLJT1Cs,649272
+numpy/fft/helper.py,sha256=str0NJ1vpLNlC_3vMfulTu9D9_cThxKG2zkaGuZ5NTY,610
+numpy/fft/helper.pyi,sha256=KsF45bVyZ4_eJbBFpkER9L8MCWmg7dJuhLqY_7uFNZs,891
+numpy/fft/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/fft/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/fft/tests/__pycache__/test_helper.cpython-310.pyc,,
+numpy/fft/tests/__pycache__/test_pocketfft.cpython-310.pyc,,
+numpy/fft/tests/test_helper.py,sha256=pVYVLUwNEcE9M8eyHaRi7JOgc6k5p_JVzJ0AKnelgvI,6149
+numpy/fft/tests/test_pocketfft.py,sha256=euC7OA8_h_EQ0aO_UqBNPARx3xb2LgJS-rsWe3XiE-U,24410
+numpy/lib/__init__.py,sha256=IvUoSO27nHWmaTCs4fqJLDIWIcaj-uRIbR9YfkyptAo,3226
+numpy/lib/__init__.pyi,sha256=nevfu40fu_qSozt-vdcUGh_zQijGGWxfdns2x9_LsWI,518
+numpy/lib/__pycache__/__init__.cpython-310.pyc,,
+numpy/lib/__pycache__/_array_utils_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_arraypad_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_arraysetops_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_arrayterator_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_datasource.cpython-310.pyc,,
+numpy/lib/__pycache__/_function_base_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_histograms_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_index_tricks_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_iotools.cpython-310.pyc,,
+numpy/lib/__pycache__/_nanfunctions_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_npyio_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_polynomial_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_scimath_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_shape_base_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_stride_tricks_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_twodim_base_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_type_check_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_ufunclike_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_user_array_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_utils_impl.cpython-310.pyc,,
+numpy/lib/__pycache__/_version.cpython-310.pyc,,
+numpy/lib/__pycache__/array_utils.cpython-310.pyc,,
+numpy/lib/__pycache__/format.cpython-310.pyc,,
+numpy/lib/__pycache__/introspect.cpython-310.pyc,,
+numpy/lib/__pycache__/mixins.cpython-310.pyc,,
+numpy/lib/__pycache__/npyio.cpython-310.pyc,,
+numpy/lib/__pycache__/recfunctions.cpython-310.pyc,,
+numpy/lib/__pycache__/scimath.cpython-310.pyc,,
+numpy/lib/__pycache__/stride_tricks.cpython-310.pyc,,
+numpy/lib/__pycache__/user_array.cpython-310.pyc,,
+numpy/lib/_array_utils_impl.py,sha256=eMGdZi7auu6201h4v4eQZ2miF8KmdMGDApbBFgRE-6Q,1689
+numpy/lib/_array_utils_impl.pyi,sha256=2OjfMvbUUlTrJHvGHIcnlrHxPWl7LcpFo3gmuVz6nWg,793
+numpy/lib/_arraypad_impl.py,sha256=xm8Pkunt7DAKAWvnySEsoWbjMvcmZL-OC7qe-LQaruQ,32326
+numpy/lib/_arraypad_impl.pyi,sha256=G9GSX6q0glWgoPN5FGzO-Ql1UdkKadoyfVy1B0HH9iM,1792
+numpy/lib/_arraysetops_impl.py,sha256=CBDoG2fWzx0OITbZEKlFD5WUo9HQRqmsweoMOtHKQjs,39309
+numpy/lib/_arraysetops_impl.pyi,sha256=4BeISAFRLNdag94QdBWWJTOWr2RPaWcNkkiCBuIdejU,9569
+numpy/lib/_arrayterator_impl.py,sha256=qx6gqxLTNY4Lea6Lh6J-Cud4RyLIqnELhi-kMwK8vKU,7186
+numpy/lib/_arrayterator_impl.pyi,sha256=8ozo2UTKx-9fIDXhVMYDyhlfuMa-uPlWCp25TRk61kE,1827
+numpy/lib/_datasource.py,sha256=FJ7k1HghREU7udh8ZuO5ZZF3nHJfOkj7iWijhoVFqIQ,22729
+numpy/lib/_datasource.pyi,sha256=135RvD3p-3mHdNp_sZV4aN9brwEFvEM49VE1eHlFEfs,996
+numpy/lib/_function_base_impl.py,sha256=eeZaizFpsCLeisLcxrQ-eK4R-8enw6YKPV1jeDPwCzU,196038
+numpy/lib/_function_base_impl.pyi,sha256=Ce0vkW7qM9i4G2Br-X8A6V9XwPZ5cKiIB030zlSUFvQ,22228
+numpy/lib/_histograms_impl.py,sha256=Lw_9LfM_Z7qBef3boamH5LtL7qiT10gpIyWy9Uj6lTo,38762
+numpy/lib/_histograms_impl.pyi,sha256=7B4b29m97PW5GDSgOKi_3Ul-XyWbo6NjMW264FFxjSI,1070
+numpy/lib/_index_tricks_impl.py,sha256=12iGjjak3hiMfwnh5zR2JqA78-or-u9P1gTGCcjJD0E,32179
+numpy/lib/_index_tricks_impl.pyi,sha256=WOKkVvojes2D2Uc8itHkjv6fZF1VqwocnqVu05aiCIs,6325
+numpy/lib/_iotools.py,sha256=mMhxeGBt-T8prjWpNhn_xvZCj6u6OWWmmsvKP6vbM5w,30941
+numpy/lib/_iotools.pyi,sha256=4AQxPlLCoIruq04RAa-xtC8swL1ChuLT9SqhQAfeflQ,3387
+numpy/lib/_nanfunctions_impl.py,sha256=gX6NUKgCQKvuFTSAObhqfrqQIXIsxnKIQOc-heOn7rs,72150
+numpy/lib/_nanfunctions_impl.pyi,sha256=o0ILqctzjyHwNJ3zs4bdd8qJ9qVtyGfL6FChCf4IPGg,833
+numpy/lib/_npyio_impl.py,sha256=UA84bpOF9xfELBsagASjHf1E5GgLWvs_Y_Gmtplkovw,99377
+numpy/lib/_npyio_impl.pyi,sha256=byvWXIh9qHzEQGvHKkclD9_oBGn8y6JkU5aUhSjhZyo,9270
+numpy/lib/_polynomial_impl.py,sha256=6rD5Cy4mSDk2CsuAdJOq2he-PSa-ZiqsdgyyQAF5qx0,44294
+numpy/lib/_polynomial_impl.pyi,sha256=NoMMI6aJmcnLKQyaM3B2hSJTFJtx7mAqEHPsCC_rM7s,7117
+numpy/lib/_scimath_impl.py,sha256=dUxb9XD-AJPboK_LO3LA0KgykFSUEOG5BVGrhwm2Qqo,15691
+numpy/lib/_scimath_impl.pyi,sha256=Xdyj3nbEBEE5p6K_ZIjilsAgvaxoGK8TEoV2vdzpLIE,2955
+numpy/lib/_shape_base_impl.py,sha256=AHbXPp4sH0gEJgSyM0A9zgmM9Mwm6jR_p5pWtUXeqV8,39353
+numpy/lib/_shape_base_impl.pyi,sha256=RysQQNQ6fbI_IyavO9AXPMynIGD7vf6I0_dc5_4wUpI,5288
+numpy/lib/_stride_tricks_impl.py,sha256=y3Uxp3jFzDwmIQ137N2zap7-vW_jONUQmXnbfqrs60A,18025
+numpy/lib/_stride_tricks_impl.pyi,sha256=ZX9Dp4oLmi-FSwY8o4FSisswTgfE5xwlTCjk2QkbIG8,1801
+numpy/lib/_twodim_base_impl.py,sha256=r31aBnzCSBpq_em4HyLiSMeTiRzlHAn7Bd4yXYqyEFY,33864
+numpy/lib/_twodim_base_impl.pyi,sha256=30vYsjEVCOaJ8NDgk4KKpvkW-C4_hV-NbJAd3VswVXI,11269
+numpy/lib/_type_check_impl.py,sha256=Dv9a7QCR1bqBHoXgCjmPrGEewG1v2BBtE_8VfcF4ySU,19220
+numpy/lib/_type_check_impl.pyi,sha256=XuaIBCJI1z50pcH6ScB3oMAyBjAxX_LY4KU0gUZaTAM,5165
+numpy/lib/_ufunclike_impl.py,sha256=0eemf_EYlLmSa4inNr3iuJ1eoTMqLyIR0n6dQymga3Y,6309
+numpy/lib/_ufunclike_impl.pyi,sha256=Tle2e2qLfaYNlECFw6AVgazMnAHYCE9WO96ddZiM1dw,1322
+numpy/lib/_user_array_impl.py,sha256=pqmz3qNx620zngeIFmSg8IiXNdTMVBAglt81hEJNh5Y,7971
+numpy/lib/_user_array_impl.pyi,sha256=Zfknkdua_dgoO9U7rDXHYzuachGOVFeLu1X0760dvR8,9301
+numpy/lib/_utils_impl.py,sha256=4xYQczoX7i_wHjugnl0ba1VExSbV48ndVow08S8G0WQ,23388
+numpy/lib/_utils_impl.pyi,sha256=3UJqa7IVH6QVJbQfKAqblyHxjPfaCAR28KmDxXeIpU0,277
+numpy/lib/_version.py,sha256=nyRagTCuE69-0P9JTIcKK7jbzRGbsgnqVtFIrNzTFsM,4854
+numpy/lib/_version.pyi,sha256=vysY5Vl_nh4si6GkMXEoB6pUDl-jJ5g0LpSDa40F124,641
+numpy/lib/array_utils.py,sha256=zoaLw9TvrAFRkh9n8uMyr8kvug3IvVlUT7LcJzB3Tk0,130
+numpy/lib/array_utils.pyi,sha256=kEO5wShp8zEbNTPu-Kw-EHuZQvq1rXHzgjK797xCV0Q,191
+numpy/lib/format.py,sha256=XMMQzYOvc8LgeNpxX7Qpfurli2bG5o9jAaeY55tP85A,36200
+numpy/lib/format.pyi,sha256=cVuydIbVhG_tM7TrxEVBiERRPLOxKS8hLCTOT7ovtzc,748
+numpy/lib/introspect.py,sha256=SiQ5OwgvE-1RoQOv2r__WObS5QEUBohanyCd7Xe80UU,2715
+numpy/lib/introspect.pyi,sha256=AWVX6b9mzdwsxizOY0LydWKBEpGatHaeeXGc2txYJEM,152
+numpy/lib/mixins.py,sha256=_yb3iwwzUfSbN7HpJSp3FhFkgV3WViTHS5SAHkK8Lmc,7337
+numpy/lib/mixins.pyi,sha256=q_lxMe-PpNlvpEJ--nLkyi0qVD0QuNHriF3XHfxyJok,3131
+numpy/lib/npyio.py,sha256=NCxqWedJbSM5M-wr69TED8x7KXcyBJ0x5u49vj4sPkI,62
+numpy/lib/npyio.pyi,sha256=MTP8KyQ2GTU8BTkpaMHnwDQO9ABrHRiCCEO5BfQGgLo,116
+numpy/lib/recfunctions.py,sha256=5fbg0aMuDbgOpfYmDTByhlNKZWgNkCVDdA8BQ4zZXzA,59654
+numpy/lib/recfunctions.pyi,sha256=Ri9FikspmLm_67f86udizNNMZzaOXz1nulRNcxfYDWc,13283
+numpy/lib/scimath.py,sha256=iO0IiDgpHk1EurdUvJIE2KqDzVOfvSsU3MFIlJskIOE,118
+numpy/lib/scimath.pyi,sha256=UND4g92K5-6_I0YWqu7qbDTHU_sePpa0I58MTMH0yhA,233
+numpy/lib/stride_tricks.py,sha256=VGR5M8Jyw8IC4S6XEB9NN_GULTJJQj_1QrItIi_BJiM,82
+numpy/lib/stride_tricks.pyi,sha256=Fqn9EZXdjIgUTce6UMD7rBBb8289QTMzohhjHwYP3TU,124
+numpy/lib/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/lib/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test__datasource.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test__iotools.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test__version.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_array_utils.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_arraypad.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_arraysetops.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_arrayterator.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_format.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_function_base.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_histograms.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_index_tricks.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_io.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_loadtxt.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_mixins.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_nanfunctions.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_packbits.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_polynomial.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_recfunctions.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_shape_base.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_stride_tricks.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_twodim_base.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_type_check.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_ufunclike.cpython-310.pyc,,
+numpy/lib/tests/__pycache__/test_utils.cpython-310.pyc,,
+numpy/lib/tests/data/py2-np0-objarr.npy,sha256=ZLoI7K3iQpXDkuoDF1Ymyc6Jbw4JngbQKC9grauVRsk,258
+numpy/lib/tests/data/py2-objarr.npy,sha256=F4cyUC-_TB9QSFLAo2c7c44rC6NUYIgrfGx9PqWPSKk,258
+numpy/lib/tests/data/py2-objarr.npz,sha256=xo13HBT0FbFZ2qvZz0LWGDb3SuQASSaXh7rKfVcJjx4,366
+numpy/lib/tests/data/py3-objarr.npy,sha256=7mtikKlHXp4unZhM8eBot8Cknlx1BofJdd73Np2PW8o,325
+numpy/lib/tests/data/py3-objarr.npz,sha256=vVRl9_NZ7_q-hjduUr8YWnzRy8ESNlmvMPlaSSC69fk,453
+numpy/lib/tests/data/python3.npy,sha256=X0ad3hAaLGXig9LtSHAo-BgOvLlFfPYMnZuVIxRmj-0,96
+numpy/lib/tests/data/win64python2.npy,sha256=agOcgHVYFJrV-nrRJDbGnUnF4ZTPYXuSeF-Mtg7GMpc,96
+numpy/lib/tests/test__datasource.py,sha256=65KXfUUvp8wXSqgQisuYlkhg-qHjBV5FXYetL8Ba-rc,10571
+numpy/lib/tests/test__iotools.py,sha256=W2gLNsi2S8-4qixUs6EKkTYnOOp55qLLuM3zpBzZoR4,13744
+numpy/lib/tests/test__version.py,sha256=aO3YgkAohLsLzCNQ7vjIwdpFUMz0cPLbcuuxIkjuN74,1999
+numpy/lib/tests/test_array_utils.py,sha256=vOC6AmlPIQbVxQf2DiRL02May5IK5BK2GUFK0nP83FM,1119
+numpy/lib/tests/test_arraypad.py,sha256=PuDd3s7w_r54B2ILXKQheFMUxklylHPN-vHVq_mGjk8,56064
+numpy/lib/tests/test_arraysetops.py,sha256=Y5sS11K5r4KGcPaZHxOaoBUJDZAjcfdF7qSvxpVydqo,38023
+numpy/lib/tests/test_arrayterator.py,sha256=AYs2SwV5ankgwnvKI9RSO1jZck118nu3SyZ4ngzZNso,1291
+numpy/lib/tests/test_format.py,sha256=pbIhtX3E07MU9GN30frL--KKMW3iYm1eFaTiwPq39MU,40911
+numpy/lib/tests/test_function_base.py,sha256=YgxaRTjpKNzw92xkMxdxY2JwHQoBOryb-06gaRiTn1c,168840
+numpy/lib/tests/test_histograms.py,sha256=pSUHeO9nY5Gf5VXyCCZ9qoRjrXT1Y4c0xRcz5FeAPCY,33694
+numpy/lib/tests/test_index_tricks.py,sha256=ZpKsvd3P3p2hwfj6sHlL_lysJp1IevAoM6AdpeTAx8M,20368
+numpy/lib/tests/test_io.py,sha256=1brG0DanJdQhK680J-zR4YlBc-oDfv_QUYkIOb8oPzQ,110047
+numpy/lib/tests/test_loadtxt.py,sha256=uP0SIRUpBGS4rZR7iXtwDsf1vpCZk_1f29NvYcci738,40522
+numpy/lib/tests/test_mixins.py,sha256=Wivwz3XBWsEozGzrzsyyvL3qAuE14t1BHk2LPm9Z9Zc,7030
+numpy/lib/tests/test_nanfunctions.py,sha256=iN7Lyl0FlDjlE23duS6YS_iEoWRSPP8tydQLdmSMWsI,53344
+numpy/lib/tests/test_packbits.py,sha256=2QaNYKH29cVD-S4YYBIQBd1xQ9bc2OqHdZT6yS7Txjk,17544
+numpy/lib/tests/test_polynomial.py,sha256=1gJhzbXglqeGMjo8OnpP4EASiCVvkYPiNOHKirAlNfg,11428
+numpy/lib/tests/test_recfunctions.py,sha256=KHHrlYhCrVVZh4N4e8UMac8oK4aX438Na1AchTdJsxU,43987
+numpy/lib/tests/test_regression.py,sha256=YdZ_xYXzFh3WFyAKF5lN7oFl5HMm5r38C1Lij3J8NuQ,7694
+numpy/lib/tests/test_shape_base.py,sha256=W1q-tgBENS19wpOKSzEi63OSjatE4qC1viQG22qoacE,27488
+numpy/lib/tests/test_stride_tricks.py,sha256=9g25TXSGLsvfeIrlkQ8l1fx_pZ48b4dxCzXXUbsKC5g,22997
+numpy/lib/tests/test_twodim_base.py,sha256=ll-72RhqCItIPB97nOWhH7H292h4nVIX_w1toKTPMUg,18841
+numpy/lib/tests/test_type_check.py,sha256=9ycqRSw0TzrJfu4gknQYblRPEsWlMI9TWPP_jyI8w-c,14680
+numpy/lib/tests/test_ufunclike.py,sha256=5AFySuvUfggh0tpBuQHJ7iZRrP0r_yZZv5xHxOuCZ1s,3023
+numpy/lib/tests/test_utils.py,sha256=zzgwQGId2P8RUgimSsm7uMCYb61xPenrP_N0kcZU8x4,2374
+numpy/lib/user_array.py,sha256=Ev3yeNNLZVNWk9xZuiCIbODYKwQ6XfYGpI5WAoYvtok,49
+numpy/lib/user_array.pyi,sha256=8C-aTekEYA0bVU7F3turaw1w0j8FfFvDp9xKa9Pfe94,53
+numpy/linalg/__init__.py,sha256=XNtdLo33SVTjQbXeimLFa5ZudzpEEwnfJBNorVbxuyc,2106
+numpy/linalg/__init__.pyi,sha256=o8K7PS_GETdEtnE7uXgJV7wnR8B0hH79AKpsmBHbJhA,1006
+numpy/linalg/__pycache__/__init__.cpython-310.pyc,,
+numpy/linalg/__pycache__/_linalg.cpython-310.pyc,,
+numpy/linalg/__pycache__/linalg.cpython-310.pyc,,
+numpy/linalg/_linalg.py,sha256=QNeVUH1DXQe7X5Ygp-LV9W1tN7sbwbhMXIQbRNPYJX0,114680
+numpy/linalg/_linalg.pyi,sha256=sCY_eH3ygLI05xCQ278LcS5XofiOPB-G_-cYY1Q2FTA,11385
+numpy/linalg/_umath_linalg.cpython-310-x86_64-linux-gnu.so,sha256=xrydXE22zqMz1G2QXhX7zY9UHsWyNwTKPERUfuLuUYc,227657
+numpy/linalg/_umath_linalg.pyi,sha256=awvRP1FGuomyfeaR0wzHvrXURAI8tUF3u2RRZ24hkXw,1409
+numpy/linalg/lapack_lite.cpython-310-x86_64-linux-gnu.so,sha256=SioRlSGZ3x9sAB3kDvue0hC3LG27o0Ynq631aTAIET0,30009
+numpy/linalg/lapack_lite.pyi,sha256=9HbrKm6Xc3jdXwjNcIm26mvm7M_sT8aug5p-e6lyw2c,2677
+numpy/linalg/linalg.py,sha256=JQWcEvjY_bjhaMHXY5vDk69OIoMzX5Rvbn1eGW2FCvE,584
+numpy/linalg/linalg.pyi,sha256=8E5sbKeM5Ors7r143mM7A4ui8kFZM0SF7NfUGW1eN-4,932
+numpy/linalg/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/linalg/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/linalg/tests/__pycache__/test_deprecations.cpython-310.pyc,,
+numpy/linalg/tests/__pycache__/test_linalg.cpython-310.pyc,,
+numpy/linalg/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/linalg/tests/test_deprecations.py,sha256=9p_SRmtxj2zc1doY9Ie3dyy5JzWy-tCQWFoajcAJUmM,640
+numpy/linalg/tests/test_linalg.py,sha256=DhZiFKqO7SVhtNwRqe5jbhcACbqttIiJfruY5rbLj-Q,83315
+numpy/linalg/tests/test_regression.py,sha256=RMl5Jq-fLVDUSMnEmpP2-gigM5dzUfzURywa1tMK8CA,6689
+numpy/ma/API_CHANGES.txt,sha256=F_4jW8X5cYBbzpcwteymkonTmvzgKKY2kGrHF1AtnrI,3405
+numpy/ma/LICENSE,sha256=BfO4g1GYjs-tEKvpLAxQ5YdcZFLVAJoAhMwpFVH_zKY,1593
+numpy/ma/README.rst,sha256=krf2cvVK_zNQf1d3yVYwg0uDHzTiR4vHbr91zwaAyoI,9874
+numpy/ma/__init__.py,sha256=iv-YxXUZe4z7W53QZWY0ndicV43AGsIygArsoN3tQb8,1419
+numpy/ma/__init__.pyi,sha256=H7zEUcvlhWQkYpoOQ9UyrLOuz23vnd_GYO_JiztGG04,6946
+numpy/ma/__pycache__/__init__.cpython-310.pyc,,
+numpy/ma/__pycache__/core.cpython-310.pyc,,
+numpy/ma/__pycache__/extras.cpython-310.pyc,,
+numpy/ma/__pycache__/mrecords.cpython-310.pyc,,
+numpy/ma/__pycache__/testutils.cpython-310.pyc,,
+numpy/ma/__pycache__/timer_comparison.cpython-310.pyc,,
+numpy/ma/core.py,sha256=jN3Z0xIb8a3lBAOAcUhGn8YlK-Ko5qm-1XadzBqAp1k,290518
+numpy/ma/core.pyi,sha256=QGAzV8TDIhaffgX-OPFUhnWYCwzwmZs9OOYyGPLhR9U,18179
+numpy/ma/extras.py,sha256=ZbseZmOKCD1f5w8NZP864TtkOWTw5c5KzzPNqmZFeR4,70630
+numpy/ma/extras.pyi,sha256=J8HZzQWyNC1Uf-PV7QzfaQuJ9vyO_A2RwIfro0S9T7s,3804
+numpy/ma/mrecords.py,sha256=7xEqcIH6iY8AT0ApnCCfrJvr17boJrgl9loqgbRuhso,27114
+numpy/ma/mrecords.pyi,sha256=xHMSbdNKOeXtZP73NUA7aVmGs9F7sTiqAcYJ1o7QNMA,1983
+numpy/ma/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/ma/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_arrayobject.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_core.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_deprecations.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_extras.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_mrecords.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_old_ma.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/ma/tests/__pycache__/test_subclassing.cpython-310.pyc,,
+numpy/ma/tests/test_arrayobject.py,sha256=MSvEcxlsVt4YZ7mVXU8q_hkwM0I7xsxWejEqnUQx6hE,1099
+numpy/ma/tests/test_core.py,sha256=KufMvdrDZ8FIgTQW6UWl4M1WzDY32y1rYHwyJbvn13g,219264
+numpy/ma/tests/test_deprecations.py,sha256=nq_wFVt2EBHcT3AHxattfKXx2JDf1K5D-QBzUU0_15A,2566
+numpy/ma/tests/test_extras.py,sha256=h0Zc0u4dXlQ3E0qADNYlH7iF4XX3K2A6HiY5hseRwSs,78314
+numpy/ma/tests/test_mrecords.py,sha256=-nFjKUNYG_-gJ6RpZbWnx_TJlmkRAagA7AnVaf9YJfI,19855
+numpy/ma/tests/test_old_ma.py,sha256=BW01_4m8wZcHvAkZ8FIjDmFfusnjgFmGVbRyqbWD000,32753
+numpy/ma/tests/test_regression.py,sha256=foMpI0luAvwkkRpAfPDV_810h1URISXDZhmaNhxb50k,3287
+numpy/ma/tests/test_subclassing.py,sha256=p5N5b5LY1J0pwDCbju0Qt28wZ1Dd2OfZ1dR4tphiFFY,17009
+numpy/ma/testutils.py,sha256=sbiHivmwPQX3fPAPUe9OMktEqrwg1rcr8xgKfMM1Ex0,10272
+numpy/ma/timer_comparison.py,sha256=FC9KhuSVUdyDP-YQUDQXKhUmrTzC8zsOIBrarMISrc4,15711
+numpy/matlib.py,sha256=_SLwSvwuHVy4nzc2lFd49OqK1m6aWPX1YyKgzyW3A-E,10657
+numpy/matlib.pyi,sha256=jochXdHIBmB5qMHiMVarjfdFUyu7AcRucxVrf2UoGpA,9628
+numpy/matrixlib/__init__.py,sha256=BHBpQKoQv4EjT0UpWBA-Ck4L5OsMqTI2IuY24p-ucXk,242
+numpy/matrixlib/__init__.pyi,sha256=hoxSBzgGaB2axvVIKt8wMefSseGWKDjFg3nAx-ZjNoU,105
+numpy/matrixlib/__pycache__/__init__.cpython-310.pyc,,
+numpy/matrixlib/__pycache__/defmatrix.cpython-310.pyc,,
+numpy/matrixlib/defmatrix.py,sha256=BGV3oVcQ98-gzqMs3WNC0-x76fmfaGS_2bDnLBHPh90,30800
+numpy/matrixlib/defmatrix.pyi,sha256=ijXIceS3SMbjt_fEn8qCUX_KllbJqDWIo4x6aDKLoqg,478
+numpy/matrixlib/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/matrixlib/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_defmatrix.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_interaction.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_masked_matrix.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_matrix_linalg.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_multiarray.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_numeric.cpython-310.pyc,,
+numpy/matrixlib/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/matrixlib/tests/test_defmatrix.py,sha256=tLHvsnn2xIKLLZULYqhQ1IJOtSdS52BfOOhU8-7jjvA,15035
+numpy/matrixlib/tests/test_interaction.py,sha256=jiLmXS0JtwEx0smkb5hUnY5Slp9I8FwGlYGHKE3iG1w,11895
+numpy/matrixlib/tests/test_masked_matrix.py,sha256=1x3mzFol1GYvVxKXcmRYLi-On3cmK7gEjSVEyvbkh-w,8914
+numpy/matrixlib/tests/test_matrix_linalg.py,sha256=ObbSUXU4R2pWajH__xAdizADrU2kBKDDCxkDV-oVBXc,2059
+numpy/matrixlib/tests/test_multiarray.py,sha256=jB3XCBmAtcqf-Wb9PwBW6uIykPpMPthuXLJ0giTKzZE,554
+numpy/matrixlib/tests/test_numeric.py,sha256=MP70qUwgshTtThKZaZDp7_6U-Z66NIV1geVhasGXejQ,441
+numpy/matrixlib/tests/test_regression.py,sha256=LBkm6_moDjuU9RY4FszgaknOj3IyCp3t-Ej3HJfqpdk,932
+numpy/polynomial/__init__.py,sha256=XNK7ZWsBECCoHnJZ0NqKiF1ErZqvdxszE1NJ6Hc2Vz0,6760
+numpy/polynomial/__init__.pyi,sha256=6NI7z3v8xTwVp3MBMxi_9W0-IZplayxzdx8BWaqymuI,687
+numpy/polynomial/__pycache__/__init__.cpython-310.pyc,,
+numpy/polynomial/__pycache__/_polybase.cpython-310.pyc,,
+numpy/polynomial/__pycache__/chebyshev.cpython-310.pyc,,
+numpy/polynomial/__pycache__/hermite.cpython-310.pyc,,
+numpy/polynomial/__pycache__/hermite_e.cpython-310.pyc,,
+numpy/polynomial/__pycache__/laguerre.cpython-310.pyc,,
+numpy/polynomial/__pycache__/legendre.cpython-310.pyc,,
+numpy/polynomial/__pycache__/polynomial.cpython-310.pyc,,
+numpy/polynomial/__pycache__/polyutils.cpython-310.pyc,,
+numpy/polynomial/_polybase.py,sha256=Nhq-h1fKS_ARFPd6BRqya1gROmqA0KX1_eGON5AyYsw,39451
+numpy/polynomial/_polybase.pyi,sha256=fZLj1aw9-tRf0yQSAXHjETPGgrAeqW9v36nlhDNDeyc,8534
+numpy/polynomial/_polytypes.pyi,sha256=zqNdSGV9EIKoVcZSugAb3sDgFXj99m70Yngkt3jVPW8,22567
+numpy/polynomial/chebyshev.py,sha256=U8Pl0r9l3AV96xISmaDjb-bvbCVT61rm7zWiT5L8_wg,62165
+numpy/polynomial/chebyshev.pyi,sha256=9cJoCeRvzHuunQoCEy2pGOUdCp0KU65q7Tb8pTqLvGU,4725
+numpy/polynomial/hermite.py,sha256=p1bX18L-fUwWFtmu0J4FnahBB9cWLCsUWLkXItQ7zB0,54466
+numpy/polynomial/hermite.pyi,sha256=dm1gYq04GxQu5T4N5LqTYbZblLoXDqZDs6CtmycCU3w,2445
+numpy/polynomial/hermite_e.py,sha256=ce0POlSbqQTqvkcXLIn7v7GqtmEaxc3J1xmaaD8VEfw,52208
+numpy/polynomial/hermite_e.pyi,sha256=klpXixSq5MRTlh6AlN1jRXPDXcnRdgUZPTxQjZpFKhM,2537
+numpy/polynomial/laguerre.py,sha256=dzeRDPs1lvJyVz6XeLu_ynPDF4SEFGjpIhLdmIMkf94,52379
+numpy/polynomial/laguerre.pyi,sha256=QiCFjYZRAuYaty8LelfOvomgal1xFU9-4oKL68l1jyc,2174
+numpy/polynomial/legendre.py,sha256=xoXBoVGToSllDsWHU3nBQJSBQLhJZBhMpA_bemYXDHQ,50994
+numpy/polynomial/legendre.pyi,sha256=SaQ9PZG50KF4g0iQd6B-xYOBz1vTDGtI4wChAINlFZY,2173
+numpy/polynomial/polynomial.py,sha256=lto2jYRcSVM3_PuKm3rbbYkHp4eMbOVX3VSO6rHmBrc,52202
+numpy/polynomial/polynomial.pyi,sha256=Y4yeYfi879s5_Xm3SqdRmhQhbgJJBRRbajhCj1irTSw,2002
+numpy/polynomial/polyutils.py,sha256=gF4_BiLkY8ySFlzawPVxr2Zcnoos3SMRn2dpsB0yP4c,22530
+numpy/polynomial/polyutils.pyi,sha256=XYAYqUmjZVS_49uDszZE3SNI_lxJgx1SkjqqBVDrz44,10426
+numpy/polynomial/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/polynomial/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_chebyshev.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_classes.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_hermite.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_hermite_e.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_laguerre.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_legendre.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_polynomial.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_polyutils.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_printing.cpython-310.pyc,,
+numpy/polynomial/tests/__pycache__/test_symbol.cpython-310.pyc,,
+numpy/polynomial/tests/test_chebyshev.py,sha256=6tMsFP1h7K8Zf72mNOta6Tv52_fVTlXknseuffj080c,20522
+numpy/polynomial/tests/test_classes.py,sha256=Tf6p3qCINxOfh7hsOdVp81-CJPkqNg1HnH2smcWbRBw,18450
+numpy/polynomial/tests/test_hermite.py,sha256=0iUoYpgXiLrqm_dWD45Cs1PFJ8fHADFtlBN4TkLNNQw,18576
+numpy/polynomial/tests/test_hermite_e.py,sha256=_A3ohAWS4HXrQG06S8L47dImdZGTwYosCXnoyw7L45o,18911
+numpy/polynomial/tests/test_laguerre.py,sha256=5ku3xe4Gv5-eAGhyqwKj460mqoHvM5r_qsGu6P8J0es,17510
+numpy/polynomial/tests/test_legendre.py,sha256=4AXrwrxCQoQ5cIMlYJpHJnAiaikLfvlL-T5TY7z9mzo,18672
+numpy/polynomial/tests/test_polynomial.py,sha256=bkIpTFGh3ypMAZCulWYw6ZPFpqrlbbSAoivrIwBQAtw,22013
+numpy/polynomial/tests/test_polyutils.py,sha256=ULZMU2soHOZ4uO0eJoRjxNkT3yGURuX35MXx1Bg5Wyk,3772
+numpy/polynomial/tests/test_printing.py,sha256=99Qi6N880A3iyRZG5_AsZkDAKkFCUKgOZCp9ZhNMrOQ,21302
+numpy/polynomial/tests/test_symbol.py,sha256=Hg-V7jR7qz5FKg_DrlkaiFcCI1UujYFUJfpf2TuoJZM,5372
+numpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/random/LICENSE.md,sha256=EDFmtiuARDr7nrNIjgUuoGvgz_VmuQjxmeVh_eSa8Z8,3511
+numpy/random/__init__.pxd,sha256=9JbnX540aJNSothGs-7e23ozhilG6U8tINOUEp08M_k,431
+numpy/random/__init__.py,sha256=81Thnexg5umN5WZwD5TRyzNc2Yp-d14B6UC7NBgVKh8,7506
+numpy/random/__init__.pyi,sha256=ETVwiw_jFxeouKFkzq0ociR0bJgLz3L3OBixxBv9Jho,2158
+numpy/random/__pycache__/__init__.cpython-310.pyc,,
+numpy/random/__pycache__/_pickle.cpython-310.pyc,,
+numpy/random/_bounded_integers.cpython-310-x86_64-linux-gnu.so,sha256=S0_5jyuw99skCRt5lt1NXGulrlhPNoP8-nKti86SbvE,362560
+numpy/random/_bounded_integers.pxd,sha256=SH_FwJDigFEInhdliSaNH2H2ZIZoX02xYhNQA81g2-g,1678
+numpy/random/_common.cpython-310-x86_64-linux-gnu.so,sha256=IJZToRuhkU9wbpcv0HG-N8MgfhgpGMgfx_q0PNZsXCg,251664
+numpy/random/_common.pxd,sha256=7kGArYkBcemrxJcSttwvtDGbimLszdQnZdNvPMgN5xQ,4982
+numpy/random/_examples/cffi/__pycache__/extending.cpython-310.pyc,,
+numpy/random/_examples/cffi/__pycache__/parse.cpython-310.pyc,,
+numpy/random/_examples/cffi/extending.py,sha256=xSla3zWqxi6Hj48EvnYfD3WHfE189VvC4XsKu4_T_Iw,880
+numpy/random/_examples/cffi/parse.py,sha256=Z69FYSY6QQnZAJdIVlE-I2JAkEutRbdvZDXlm633Ynk,1751
+numpy/random/_examples/cython/extending.pyx,sha256=ePnHDNfMQcTUzAqgFiEqrTFr9BoDmbqgjxzrDLvV8fE,2267
+numpy/random/_examples/cython/extending_distributions.pyx,sha256=YCgFXHb7esnir-QmoAlde4y91FYuRMT94UNg9yb-Y4A,3847
+numpy/random/_examples/cython/meson.build,sha256=GxZZT_Lu3nZsgcqo_7sTR_IdMJaHA1fxyjwrQTcodPs,1694
+numpy/random/_examples/numba/__pycache__/extending.cpython-310.pyc,,
+numpy/random/_examples/numba/__pycache__/extending_distributions.cpython-310.pyc,,
+numpy/random/_examples/numba/extending.py,sha256=Ipyzel_h5iU_DMJ_vnXUgQC38uMDMn7adUpWSeEQLFE,1957
+numpy/random/_examples/numba/extending_distributions.py,sha256=M3Rt9RKupwEq71JjxpQFbUO7WKSOuLfR1skRM2a-hbI,2036
+numpy/random/_generator.cpython-310-x86_64-linux-gnu.so,sha256=txs7dIHoQqIHqisGrHVHch7VY2bFvMt5Q2FlkeYHX7k,996144
+numpy/random/_generator.pyi,sha256=YrqaEq8SfCo-C2EvuMDL9Kg3n1YZPSzF_1EshkuB3Ec,24009
+numpy/random/_mt19937.cpython-310-x86_64-linux-gnu.so,sha256=YkVYXa4gJERrnMb4b49df_uQBU8sUL4O3ksFZjOS9Sc,129912
+numpy/random/_mt19937.pyi,sha256=nX9OPiLcGFXn5cIE9k1TpvmVB0UBi9rlTsvGW5GP-Z0,775
+numpy/random/_pcg64.cpython-310-x86_64-linux-gnu.so,sha256=g5vQOqeeg9OqZ3M0I8pl_Ufkr1NRRcD3OE18iGQtPvg,136480
+numpy/random/_pcg64.pyi,sha256=gljmVLjVlgAMWGzQa6pzlzNW5H8kBvgDseQfIQcjy3k,1142
+numpy/random/_philox.cpython-310-x86_64-linux-gnu.so,sha256=sWbAZy7bRsHJy_cghn2VrqLpoyO8BpFXyfDBWITqWII,116832
+numpy/random/_philox.pyi,sha256=xf8EUX7Wa7-tYSU0LntUxMDVrNVcmjgACbubrb0O5sI,1005
+numpy/random/_pickle.py,sha256=4iS9ofvvuD0KKMtRpZEdBslH79blhK8wtjqxeWN_gcE,2743
+numpy/random/_pickle.pyi,sha256=Qdd9MkruVUeduANTkweO8dLNbeYegtOLVgnF6j0lRQE,1608
+numpy/random/_sfc64.cpython-310-x86_64-linux-gnu.so,sha256=szXEbXBD24KLfxJJV5grxfpRCngMNi6_AtTRgcujQWw,89864
+numpy/random/_sfc64.pyi,sha256=gdDHDFsH-o-OB6zKJJqj8vNYvRm0GMXHApikapFvv50,682
+numpy/random/bit_generator.cpython-310-x86_64-linux-gnu.so,sha256=-gJgI4T2aNVVF2GhTGFok6AawCllCSza9SuG_SWE2cM,242528
+numpy/random/bit_generator.pxd,sha256=lArpIXSgTwVnJMYc4XX0NGxegXq3h_QsUDK6qeZKbNc,1007
+numpy/random/bit_generator.pyi,sha256=sXPTnGMgICncbhgGBPZvwTv2mcS4ENKB4G4PIhCqTaQ,3534
+numpy/random/c_distributions.pxd,sha256=UCtqx0Nf-vHuJVaqPlLFURWnaI1vH-vJRE01BZDTL9o,6335
+numpy/random/lib/libnpyrandom.a,sha256=-1eNSFrUGkCTqr47fgZpBAXE8Qa0kpQAYOlGJJctVWw,72270
+numpy/random/mtrand.cpython-310-x86_64-linux-gnu.so,sha256=DvNDctGI7c15R3enKi64YBDxdzbT1xlbS9a_hI6nkGw,797808
+numpy/random/mtrand.pyi,sha256=NUzAPLtDaft-xJlKUx4u1e3QwnofZbWgt2KEV8_GiAY,22018
+numpy/random/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/random/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_direct.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_extending.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_generator_mt19937.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_generator_mt19937_regressions.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_random.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_randomstate.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_randomstate_regression.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_regression.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_seed_sequence.cpython-310.pyc,,
+numpy/random/tests/__pycache__/test_smoke.cpython-310.pyc,,
+numpy/random/tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/random/tests/data/__pycache__/__init__.cpython-310.pyc,,
+numpy/random/tests/data/generator_pcg64_np121.pkl.gz,sha256=EfQ-X70KkHgBAFX2pIPcCUl4MNP1ZNROaXOU75vdiqM,203
+numpy/random/tests/data/generator_pcg64_np126.pkl.gz,sha256=fN8deNVxX-HELA1eIZ32kdtYvc4hwKya6wv00GJeH0Y,208
+numpy/random/tests/data/mt19937-testset-1.csv,sha256=Xkef402AVB-eZgYQkVtoxERHkxffCA9Jyt_oMbtJGwY,15844
+numpy/random/tests/data/mt19937-testset-2.csv,sha256=nsBEQNnff-aFjHYK4thjvUK4xSXDSfv5aTbcE59pOkE,15825
+numpy/random/tests/data/pcg64-testset-1.csv,sha256=xB00DpknGUTTCxDr9L6aNo9Hs-sfzEMbUSS4t11TTfE,23839
+numpy/random/tests/data/pcg64-testset-2.csv,sha256=NTdzTKvG2U7_WyU_IoQUtMzU3kEvDH39CgnR6VzhTkw,23845
+numpy/random/tests/data/pcg64dxsm-testset-1.csv,sha256=vNSUT-gXS_oEw_awR3O30ziVO4seNPUv1UIZ01SfVnI,23833
+numpy/random/tests/data/pcg64dxsm-testset-2.csv,sha256=uylS8PU2AIKZ185OC04RBr_OePweGRtvn-dE4YN0yYA,23839
+numpy/random/tests/data/philox-testset-1.csv,sha256=SedRaIy5zFadmk71nKrGxCFZ6BwKz8g1A9-OZp3IkkY,23852
+numpy/random/tests/data/philox-testset-2.csv,sha256=dWECt-sbfvaSiK8-Ygp5AqyjoN5i26VEOrXqg01rk3g,23838
+numpy/random/tests/data/sfc64-testset-1.csv,sha256=iHs6iX6KR8bxGwKk-3tedAdMPz6ZW8slDSUECkAqC8Q,23840
+numpy/random/tests/data/sfc64-testset-2.csv,sha256=FIDIDFCaPZfWUSxsJMAe58hPNmMrU27kCd9FhCEYt_k,23833
+numpy/random/tests/data/sfc64_np126.pkl.gz,sha256=MVa1ylFy7DUPgUBK-oIeKSdVl4UYEiN3AZ7G3sdzzaw,290
+numpy/random/tests/test_direct.py,sha256=Ce2wQHcNV33qnkeHbORji-SW55RnHQ2vUdGXK1YVJBk,19956
+numpy/random/tests/test_extending.py,sha256=po8h6ASy9-C0LHPKKpjYyAokOSj_xKh9FeQAavb4GBA,4435
+numpy/random/tests/test_generator_mt19937.py,sha256=Z7D8PciFoaYF_XCtINHzfjovWZHqgWmVOJ2UjvNkWlM,117288
+numpy/random/tests/test_generator_mt19937_regressions.py,sha256=r2wzyXTRfyVk__f2PO9yKPRdwx5ez671OQyAglMfPpc,8094
+numpy/random/tests/test_random.py,sha256=i44DXCHEBtKtOzwSBfADh_kBSjMPgaCJYHdFfs6sfCQ,70150
+numpy/random/tests/test_randomstate.py,sha256=Cp-op2kfopZ8wq-SBQ12Mh5RQ0p8mcBQHYSh0h-DegU,85275
+numpy/random/tests/test_randomstate_regression.py,sha256=xS_HOwtijRdgq-gZn0IDUcm0NxdjjJXYv6ex8WN7FPU,7999
+numpy/random/tests/test_regression.py,sha256=RbAzZYLfyzUKmup5uJR19sK2N17L_d1rLRy-CWjtIaQ,5462
+numpy/random/tests/test_seed_sequence.py,sha256=GNRJ4jyzrtfolOND3gUWamnbvK6-b_p1bBK_RIG0sfU,3311
+numpy/random/tests/test_smoke.py,sha256=CsXvEgv1T3wvCAH6qYu8RCWoQOaI4_gm7aWNhAS4QRg,28174
+numpy/rec/__init__.py,sha256=w2G_npkmqm5vrWgds8V6Gusehmi1bRbiqCxsl9yOjow,83
+numpy/rec/__init__.pyi,sha256=NWclXeZGtb9EvxymXj71lqOCKxcZPZawS-JJkc54_zQ,346
+numpy/rec/__pycache__/__init__.cpython-310.pyc,,
+numpy/strings/__init__.py,sha256=-hT1HYpbswLkRWswieJQwAYn72IAwuaSCA5S1sdSPMk,83
+numpy/strings/__init__.pyi,sha256=lDQvuJEXEx7Iw-8E-srZS6RkJzN19GQ_POsbyhFWMec,1295
+numpy/strings/__pycache__/__init__.cpython-310.pyc,,
+numpy/testing/__init__.py,sha256=InpVKoDAzMKO_l_HNcatziW_u1k9_JZze__t2nybrL0,595
+numpy/testing/__init__.pyi,sha256=1jr2Gj9BmCdtK4bqNGkwUAuqwC4n2JPOy6lqczK7xpA,2045
+numpy/testing/__pycache__/__init__.cpython-310.pyc,,
+numpy/testing/__pycache__/overrides.cpython-310.pyc,,
+numpy/testing/__pycache__/print_coercion_tables.cpython-310.pyc,,
+numpy/testing/_private/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/testing/_private/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/testing/_private/__pycache__/__init__.cpython-310.pyc,,
+numpy/testing/_private/__pycache__/extbuild.cpython-310.pyc,,
+numpy/testing/_private/__pycache__/utils.cpython-310.pyc,,
+numpy/testing/_private/extbuild.py,sha256=fy4Dl-CqMtqBu6MShJNIe9DAuYH8kN_XZlUdOVcb1hQ,8106
+numpy/testing/_private/extbuild.pyi,sha256=aNH6UnAhh4Zny81W45GrAcScB12b6_84y8M0Vdtpm2I,626
+numpy/testing/_private/utils.py,sha256=UrWpMfsgQD54K46uj00dAVx1Pbl8JFCr0_yb7m1uZkQ,95700
+numpy/testing/_private/utils.pyi,sha256=y4UuOhHLN9aThPfajrNL9Q86zqYmk03uB0Wv3MlOamo,12967
+numpy/testing/overrides.py,sha256=IiVwsm3cDwnJdrk0FUFh7JLJYEnR_AfYWQRqWIeOFNQ,2133
+numpy/testing/overrides.pyi,sha256=IQvQLxD-dHcbTQOZEO5bnCtCp8Uv3vj51dl0dZ0htjg,397
+numpy/testing/print_coercion_tables.py,sha256=v9RlpFnOlaw34QGWnDIovDGhG1clwGhha0UnCqni0RE,6223
+numpy/testing/print_coercion_tables.pyi,sha256=02D1q0WeMJ8B6txT_dy2Kn7IWse2RLRJQV0M6ifLD_w,821
+numpy/testing/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/testing/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/testing/tests/__pycache__/test_utils.cpython-310.pyc,,
+numpy/testing/tests/test_utils.py,sha256=eMHfDFj21KcKuv8-aWhwdm3rHhIirtUkZJss-Qffggw,70456
+numpy/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/tests/__pycache__/test__all__.cpython-310.pyc,,
+numpy/tests/__pycache__/test_configtool.cpython-310.pyc,,
+numpy/tests/__pycache__/test_ctypeslib.cpython-310.pyc,,
+numpy/tests/__pycache__/test_lazyloading.cpython-310.pyc,,
+numpy/tests/__pycache__/test_matlib.cpython-310.pyc,,
+numpy/tests/__pycache__/test_numpy_config.cpython-310.pyc,,
+numpy/tests/__pycache__/test_numpy_version.cpython-310.pyc,,
+numpy/tests/__pycache__/test_public_api.cpython-310.pyc,,
+numpy/tests/__pycache__/test_reloading.cpython-310.pyc,,
+numpy/tests/__pycache__/test_scripts.cpython-310.pyc,,
+numpy/tests/__pycache__/test_warnings.cpython-310.pyc,,
+numpy/tests/test__all__.py,sha256=L3mCnYPTpzAgNfedVuq9g7xPWbc0c1Pot94k9jZ9NpI,221
+numpy/tests/test_configtool.py,sha256=lhtwsoUPSOSdgnSdxvrvS4roiid86eWzSrGjdrKkH7g,1555
+numpy/tests/test_ctypeslib.py,sha256=c0x56qlAMnxTCO9MiuV05LCoqju8cidHj1URV5gOwQE,12351
+numpy/tests/test_lazyloading.py,sha256=R3Idpr9XIZ8C83sy8NvWSsh9knKxi42TAON13HpGRq0,1159
+numpy/tests/test_matlib.py,sha256=gwhIXrJJo9DiecaGLCHLJBjhx2nVGl6yHq80AOUQSRM,1852
+numpy/tests/test_numpy_config.py,sha256=x0OH4_gNx-13qw1_GYihFel1S4bWEzbrR_VT-H9x4tQ,1233
+numpy/tests/test_numpy_version.py,sha256=2d0EtPJZYP3XRE6C6rfJW6QsPlFoDxqgO1yPxObaiE0,1754
+numpy/tests/test_public_api.py,sha256=mG_c04GeGEue8ppN5G8djdNyVFe4vKUiBLoiO4h-dhU,27664
+numpy/tests/test_reloading.py,sha256=sGu5XM-_VCNphyJcY5VCoQCmy5MgtL6_hDnsqf2j_ro,2367
+numpy/tests/test_scripts.py,sha256=jluCLfG94VM1cuX-5RcLFBli_yaJZpIvmVuMxRKRJrc,1645
+numpy/tests/test_warnings.py,sha256=HOqWSVu80PY-zacrgMfzPF0XPqEC24BNSw6Lmvw32Vg,2346
+numpy/typing/__init__.py,sha256=ph9_WtDCJ7tKrbbRcz5OZEbXwxRXZfzSd2K1mLab910,5267
+numpy/typing/__pycache__/__init__.cpython-310.pyc,,
+numpy/typing/__pycache__/mypy_plugin.cpython-310.pyc,,
+numpy/typing/mypy_plugin.py,sha256=eghgizS6dx7VuQiNbQg_cCfzNBb7Kyt3AomPNB8uml0,6470
+numpy/typing/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
+numpy/typing/tests/__pycache__/__init__.cpython-310.pyc,,
+numpy/typing/tests/__pycache__/test_isfile.cpython-310.pyc,,
+numpy/typing/tests/__pycache__/test_runtime.cpython-310.pyc,,
+numpy/typing/tests/__pycache__/test_typing.cpython-310.pyc,,
+numpy/typing/tests/data/fail/arithmetic.pyi,sha256=OMnzSP_4S06yDMzOWeMS36r8Ew5EYzc0cFcr5JURf7c,3963
+numpy/typing/tests/data/fail/array_constructors.pyi,sha256=SjiwoGrefYsuScJcBQZlwzfvENADeRMxHYCDCo685Vc,1129
+numpy/typing/tests/data/fail/array_like.pyi,sha256=V9lNwYrNOvOyHf5xtCZerofTXdubpvl1pzZMsEWD2U0,526
+numpy/typing/tests/data/fail/array_pad.pyi,sha256=57oK0Yp53rtKjjIrRFYLcxa-IfIGhtI-bEem7ggJKwI,132
+numpy/typing/tests/data/fail/arrayprint.pyi,sha256=NZlON-sYl2s6-iUFKZZpXF4WnGVHQbTn8yIsQm0Alg4,586
+numpy/typing/tests/data/fail/arrayterator.pyi,sha256=Qb7oMI1GdDQO_jcoJEAsMkXLjzOdcb3sx-b5mW73cAE,470
+numpy/typing/tests/data/fail/bitwise_ops.pyi,sha256=gJ-ZL-e-yMbHMRKUv8r2KqJ08Mkgpg74nUe6lgi2RDU,583
+numpy/typing/tests/data/fail/char.pyi,sha256=Zi3dygeaxHT8-5aFNCAreGU-T89zLg5pcE6c9NBCs6c,2712
+numpy/typing/tests/data/fail/chararray.pyi,sha256=wdBMnihqJoeEMdSKz5Ur60qCDCVmiuHdTl4WmriTanc,2307
+numpy/typing/tests/data/fail/comparisons.pyi,sha256=YrcL2POtM1g8GEWW4AJMl9vAkV-lG_6kEb7FzueeiLU,822
+numpy/typing/tests/data/fail/constants.pyi,sha256=IzmswvmTKbAOkCjgyxu1jChlikIwqeAETHGVH2TtY0k,85
+numpy/typing/tests/data/fail/datasource.pyi,sha256=gACpSdzMDej9WZbNvDQlkWX9DvHD7DjucesbH0EWEaM,405
+numpy/typing/tests/data/fail/dtype.pyi,sha256=OAGABqdXNB8gClJFEGMckoycuZcIasMaAlS2RkiKROI,334
+numpy/typing/tests/data/fail/einsumfunc.pyi,sha256=32Bsrr3ueX2CMaiBZN1xLGGsbjqKZWF2WopvNWRqCT4,487
+numpy/typing/tests/data/fail/flatiter.pyi,sha256=JcggwDkKcMWDBz0Ky8-dkJzjwnKxQ-kyea5br5DDqq0,866
+numpy/typing/tests/data/fail/fromnumeric.pyi,sha256=NuOpn-kPy4g80PlAVVQZfhXwP6wITijvyTs0_uuzAyw,5703
+numpy/typing/tests/data/fail/histograms.pyi,sha256=yAPVt0rYTwtxnigoGT-u7hhKCE9iYxsXc24x2HGBrmA,367
+numpy/typing/tests/data/fail/index_tricks.pyi,sha256=moINir9iQoi6Q1ZuVg5BuSB9hSBtbg_uzv-Qm_lLYZk,509
+numpy/typing/tests/data/fail/lib_function_base.pyi,sha256=0FBv6CYJMDrL0U9cGsiO5a0boUrBCSB4eFHHLVjBzEo,2689
+numpy/typing/tests/data/fail/lib_polynomial.pyi,sha256=Ur7Y4iZX6WmoH5SDm0ePi8C8LPsuPs2Yr7g7P5O613g,899
+numpy/typing/tests/data/fail/lib_utils.pyi,sha256=6oI_kPhJqL0P0q-rsC3WtGso3V-hF7ntbNUmbhUPfXE,96
+numpy/typing/tests/data/fail/lib_version.pyi,sha256=7-ZJDZwDcB-wzpMN8TeYtZAgaqc7xnQ8Dnx2ISiX2Ts,158
+numpy/typing/tests/data/fail/linalg.pyi,sha256=yDd05aK1dI37RPt3pD2eJYo4dZFaT2yB1PEu3K0y9Tg,1322
+numpy/typing/tests/data/fail/memmap.pyi,sha256=HSTCQYNuW1Y6X1Woj361pN4rusSPs4oDCXywqk20yUo,159
+numpy/typing/tests/data/fail/modules.pyi,sha256=K73WuMJxw7zo3oALIcTuNfU4sPlKeGzEUxPlL1f97cM,621
+numpy/typing/tests/data/fail/multiarray.pyi,sha256=1_9X7BW6hukiappz0kn3WCWN6OWXtT6OQqmJmJpdkfQ,1643
+numpy/typing/tests/data/fail/ndarray.pyi,sha256=cgoWlpQqBQ5pkfiYsoz2f6o-DASrVRCraKBCgXLJQSk,404
+numpy/typing/tests/data/fail/ndarray_misc.pyi,sha256=H2bpfqfd04Syto7SLWJOq-gWmCCzRWJpLIiQVPI0qE0,1000
+numpy/typing/tests/data/fail/nditer.pyi,sha256=w7emjnOxnf3NcvLktNLlke6Cuivn2gU3sVmGCfbG6rw,325
+numpy/typing/tests/data/fail/nested_sequence.pyi,sha256=em4GZwLDFE0QSxxg081wVwhh-Dmtkn8f7wThI0DiXVs,427
+numpy/typing/tests/data/fail/npyio.pyi,sha256=Jsl8KB55PwQ2Xz9jXtL3j-G1RIQLCcEuLJmO_o3hZBI,628
+numpy/typing/tests/data/fail/numerictypes.pyi,sha256=jl_pxMAq_VmkaK13-sfhUOUYGAQ4OV2pQ1d7wG-DNZg,120
+numpy/typing/tests/data/fail/random.pyi,sha256=0sFOsJeHwYc1cUNF-MByWONEF_MP8CQWTjdyGFvgl90,2821
+numpy/typing/tests/data/fail/rec.pyi,sha256=Ws3TyesnoQjt7Q0wwtpShRDJmZCs2jjP17buFMomVGA,704
+numpy/typing/tests/data/fail/scalars.pyi,sha256=P_l-XImP_R7YQirkuv5aRmYaLgExJs8Djl0_mDbdKsk,2862
+numpy/typing/tests/data/fail/shape.pyi,sha256=pSxiQ6Stq60xGFKOGZUsisxIO0y4inJ8UpKeio89K04,137
+numpy/typing/tests/data/fail/shape_base.pyi,sha256=Y_f4buHtX2Q2ZA4kaDTyR8LErlPXTzCB_-jBoScGh_Q,152
+numpy/typing/tests/data/fail/stride_tricks.pyi,sha256=IjA0Xrnx0lG3m07d1Hjbhtyo1Te5cXgjgr5fLUo4LYQ,315
+numpy/typing/tests/data/fail/strings.pyi,sha256=AiH368QQsUT6JVWgePOei4TRpKGGT-3z2NvswSoRT_U,2370
+numpy/typing/tests/data/fail/testing.pyi,sha256=xEUrFKLL8_gt3RV7d6NbF9a6zu2uaKcWBIN_pqGS_Ds,1343
+numpy/typing/tests/data/fail/twodim_base.pyi,sha256=eRFtqBbwkVI6G6MZMVpep1UKnFMDYzhrN82fO3ilnH0,898
+numpy/typing/tests/data/fail/type_check.pyi,sha256=CIyI0j0Buxv0QgCvNG2urjaKpoIZ-ZNawC2m6NzGlbo,379
+numpy/typing/tests/data/fail/ufunc_config.pyi,sha256=0t_yJ4eVOhneDSfa3EsoTh6RreyMtkHVOi9oQ35_EW0,734
+numpy/typing/tests/data/fail/ufunclike.pyi,sha256=JsJ3M8QZv9-6GKwRnojJGIfeIkdtJFe-3ix5reLXx-M,627
+numpy/typing/tests/data/fail/ufuncs.pyi,sha256=8N8m_GbRAH0bWjDEzYnH4MREX86iBD46Ug9mm-vc1co,476
+numpy/typing/tests/data/fail/warnings_and_errors.pyi,sha256=KXExnFGz9O7Veut_U7YEIpi6x-BdfeaGtpqWf1Yd274,185
+numpy/typing/tests/data/misc/extended_precision.pyi,sha256=bS8bBeCFqjgtOiy-8_y39wfa7rwhdjLz2Vmo-RXAYD4,884
+numpy/typing/tests/data/mypy.ini,sha256=6yPaDeYIVWc-WNRdSjAYOGlSVCWkmcge2Te8JAmhjpI,285
+numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/array_like.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/dtype.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/lib_user_array.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/literal.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ma.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/mod.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/modules.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/nditer.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/numeric.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/numerictypes.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/random.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/recfunctions.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/scalars.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/shape.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/simple.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/simple_py3.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ufunc_config.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ufunclike.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/ufuncs.cpython-310.pyc,,
+numpy/typing/tests/data/pass/__pycache__/warnings_and_errors.cpython-310.pyc,,
+numpy/typing/tests/data/pass/arithmetic.py,sha256=e71PA71VJitjkF8wrmui2F2zoTt0iOCW2tfbCpNDYlQ,7447
+numpy/typing/tests/data/pass/array_constructors.py,sha256=rfJ8SRB4raElxRjsHBCsZIkZAfqZMie0VE8sSKMgkHg,2447
+numpy/typing/tests/data/pass/array_like.py,sha256=ddPI6pA27qnp1INWs4Yi3wCqoVypSRMxstO771WQS5c,1056
+numpy/typing/tests/data/pass/arrayprint.py,sha256=y_KkuLz1uM7pv53qfq7GQOuud4LoXE3apK1wtARdVyM,766
+numpy/typing/tests/data/pass/arrayterator.py,sha256=FqcpKdUQBQ0FazHFxr9MsLEZG-jnJVGKWZX2owRr4DQ,393
+numpy/typing/tests/data/pass/bitwise_ops.py,sha256=FmEs_sKaU9ox-5f0NU3_TRIv0XxLQVEZ8rou9VNehb4,964
+numpy/typing/tests/data/pass/comparisons.py,sha256=5aGrNl3D7Yd1m9WVkHrjJtqi7SricTxrEMtmIV9x0aE,3298
+numpy/typing/tests/data/pass/dtype.py,sha256=YDuYAb0oKoJc9eOnKJuoPfLbIKOgEdE04_CYxRS4U5I,1070
+numpy/typing/tests/data/pass/einsumfunc.py,sha256=eXj5L5MWPtQHgrHPsJ36qqrmBHqct9UoujjJCvHnF1k,1370
+numpy/typing/tests/data/pass/flatiter.py,sha256=0BnbuLMBC7MQlprNZ0QhNSscfYwPhEhXOhWoyiRACWU,174
+numpy/typing/tests/data/pass/fromnumeric.py,sha256=d_hVLyrVDFPVx33aqLIyAGYYQ8XAJFIzrAsE8QCoof4,3991
+numpy/typing/tests/data/pass/index_tricks.py,sha256=dmonWJMUKsXg23zD_mibEEtd4b5ys-sEfT9Fnnq08x8,1402
+numpy/typing/tests/data/pass/lib_user_array.py,sha256=Za_n84msWtV8dqQZhMhvh7lzu5WZvO8ixTPkEqO2Hms,590
+numpy/typing/tests/data/pass/lib_utils.py,sha256=bj1sEA4gsmezqbYdqKnVtKzY_fb64w7PEoZwNvaaUdA,317
+numpy/typing/tests/data/pass/lib_version.py,sha256=HnuGOx7tQA_bcxFIJ3dRoMAR0fockxg4lGqQ4g7LGIw,299
+numpy/typing/tests/data/pass/literal.py,sha256=WKT1I15Iw37bqkgBlY1h1_Kb_gs1Qme8Wy3wTr0op90,1504
+numpy/typing/tests/data/pass/ma.py,sha256=slJZQFGPI4I13qc-CRfreEGhIUk4TdFk-Pv75yWanNM,171
+numpy/typing/tests/data/pass/mod.py,sha256=owFL1fys3LPTWpAlsjS-IzW4sSu98ncp2BnsIetLSrA,1576
+numpy/typing/tests/data/pass/modules.py,sha256=g9PhyLO6rflYHZtmryx1VWTubphN4TAPUSfoiYriTqE,625
+numpy/typing/tests/data/pass/multiarray.py,sha256=MxHax6l94yqlTVZleAqG77ILEbW6wU5osPcHzxJ85ns,1331
+numpy/typing/tests/data/pass/ndarray_conversion.py,sha256=d7cFNUrofdLXh9T_9RG3Esz1XOihWWQNlz5Lb0yt6dM,1525
+numpy/typing/tests/data/pass/ndarray_misc.py,sha256=om45RP2VtXvEhbprrJzh09S6OGQvlqrLi2B9JFTOKxc,3466
+numpy/typing/tests/data/pass/ndarray_shape_manipulation.py,sha256=37eYwMNqMLwanIW9-63hrokacnSz2K_qtPUlkdpsTjo,640
+numpy/typing/tests/data/pass/nditer.py,sha256=nYO45Lw3ZNbQq75Vht86zzLZ4cWzP3ml0rxDPlYt8_8,63
+numpy/typing/tests/data/pass/numeric.py,sha256=wbmYMkK1LM34jjFek8VFJYyade_L6u7XqjpdqGyoRwU,1625
+numpy/typing/tests/data/pass/numerictypes.py,sha256=6x6eN9-5NsSQUSc6rf3fYieS2poYEY0t_ujbwgF9S5Q,331
+numpy/typing/tests/data/pass/random.py,sha256=UJF6epKYGfGq9QlrR9YuA7EK_mI8AQ2osdA4Uhsh1ms,61824
+numpy/typing/tests/data/pass/recfunctions.py,sha256=_rcCY44c3LnxMFjoLcnOlVc9yXKbRUIY2nIkNoar9h4,5037
+numpy/typing/tests/data/pass/scalars.py,sha256=OAfNg3VYmO-iSxQCSmY_OUyUjCwcRIKwiT-OR52FFP4,3725
+numpy/typing/tests/data/pass/shape.py,sha256=0nyLAArcbN6JQQDqBhLkJ_nYj5z0zpQnaZLWIMPO8PQ,449
+numpy/typing/tests/data/pass/simple.py,sha256=lPj620zkTA8Sg893eu2mGuj-Xq2BGZ_1dcmfsVDkz8g,2751
+numpy/typing/tests/data/pass/simple_py3.py,sha256=HuLrc5aphThQkLjU2_19KgGFaXwKOfSzXe0p2xMm8ZI,96
+numpy/typing/tests/data/pass/ufunc_config.py,sha256=uzXOhCl9N4LPV9hV2Iqg_skgkKMbBPBF0GXPU9EMeuE,1205
+numpy/typing/tests/data/pass/ufunclike.py,sha256=U4Aay11VALvm22bWEX0eDWuN5qxJlg_hH5IpOL62M3I,1125
+numpy/typing/tests/data/pass/ufuncs.py,sha256=1Rem_geEm4qyD3XaRA1NAPKwr3YjRq68zbIlC_Xhi9M,422
+numpy/typing/tests/data/pass/warnings_and_errors.py,sha256=ETLZkDTGpZspvwjVYAZlnA1gH4PJ4bSY5PkWyxTjusU,161
+numpy/typing/tests/data/reveal/arithmetic.pyi,sha256=pI3XrneSswKnOSa0a-9hsr7v9e4jDWO7v-gMQ81KLs4,25295
+numpy/typing/tests/data/reveal/array_api_info.pyi,sha256=1LZSBV-FCdju6HBjBCJOLdcuMVuEdSN8-fkx-rldUZg,3047
+numpy/typing/tests/data/reveal/array_constructors.pyi,sha256=RcwCSgtaDh4hjU7dcqoLb1tzxDp6vaifGosO3niJ33c,12573
+numpy/typing/tests/data/reveal/arraypad.pyi,sha256=m8yoSEuxGmbHDnTIXBN-ZHAI6rMEtre65Yk3Uopdogg,688
+numpy/typing/tests/data/reveal/arrayprint.pyi,sha256=8I-_vItFAU5e4B6Ty9wsa_Y1Nzw3lh_EvmSokbClUW8,817
+numpy/typing/tests/data/reveal/arraysetops.pyi,sha256=SlBlsdITj2PeaR_by03nysRHYPh3G9gkvvcj5cKgFWA,4424
+numpy/typing/tests/data/reveal/arrayterator.pyi,sha256=LKnpHT_L3_qzzeAORwVlWCLtJoo_42GXN2ZHyuWx9T0,1069
+numpy/typing/tests/data/reveal/bitwise_ops.pyi,sha256=sEVMpf-QBsTDAEaiM9obInASKTDRQLVk2Ej8DWN5nLY,5049
+numpy/typing/tests/data/reveal/char.pyi,sha256=wzkpRgHWgv4wQ1_KMnjakWN3B_p283kHn8TmP5nYJTY,10846
+numpy/typing/tests/data/reveal/chararray.pyi,sha256=mbUYgjsaPHUcsQsCXkUo8Fi3H6gB84hQEo4DaM0US_o,6651
+numpy/typing/tests/data/reveal/comparisons.pyi,sha256=iZeK0iGQIiYt1IULgT7S1tR_feHyGkaY8wUaO9KOK3o,7225
+numpy/typing/tests/data/reveal/constants.pyi,sha256=rXWIPvzafsXTbyTNOYfbUlK_j5xiz3XFNIGIrl7aKQI,362
+numpy/typing/tests/data/reveal/ctypeslib.pyi,sha256=DIPa9-dZLtghcevcABNQ3hpWiiPqdbpA2TT7SmrWyJE,4737
+numpy/typing/tests/data/reveal/datasource.pyi,sha256=ROEU-LBTqzDCV_afVI-cb4qdn0UFWvSj9pjHsArBQyE,613
+numpy/typing/tests/data/reveal/dtype.pyi,sha256=YclNqAAyjzNK6YCMvuHJWmVDVu_Kr30l2vPqz4GSrm8,5213
+numpy/typing/tests/data/reveal/einsumfunc.pyi,sha256=BZZQikSpk-ePbbWkW2b1VO1_BXFlaqQt2d0BYKE7WTQ,1956
+numpy/typing/tests/data/reveal/emath.pyi,sha256=CHRd-4151gruyI2sao65epcdtaLdnGzmHfF3MJFIeNc,2335
+numpy/typing/tests/data/reveal/fft.pyi,sha256=lcl6ZRCWilYyynSB12HyTmGa0ZEKDIhKqMRrgOLisiM,1661
+numpy/typing/tests/data/reveal/flatiter.pyi,sha256=M4dnFct3SheA2EkpIrR3ECxP5pAjjnC5C5Aelkb6DAk,1377
+numpy/typing/tests/data/reveal/fromnumeric.pyi,sha256=44SIUac6GFQH-quhitXIU2AaFvFfEPubswM-yvIAw_c,14917
+numpy/typing/tests/data/reveal/getlimits.pyi,sha256=FP6d4LrkydJ7KRJ2tIfBvjKW0FyAio6XxIhKca8EJvs,1582
+numpy/typing/tests/data/reveal/histograms.pyi,sha256=ttfsdZBRqQzIfujkhNHExs20tH8qtCwJv5Yc4EAUwlk,1287
+numpy/typing/tests/data/reveal/index_tricks.pyi,sha256=jdU0xs46CnK8haxTqZ-Z-aONablqKeJrN5cQGxCw7bg,3271
+numpy/typing/tests/data/reveal/lib_function_base.pyi,sha256=EkWPmm41sgaDg7On5EkEKvTXsy74juuuxV36VdrCwtE,9877
+numpy/typing/tests/data/reveal/lib_polynomial.pyi,sha256=Z2mFp-281D_zd5YbtgiliDTKk6akckOiLkOXbLnwPO4,5895
+numpy/typing/tests/data/reveal/lib_utils.pyi,sha256=ysQO1QVJvj9Z5iTLW1z7xMJmNch2qwTGbHL77aVOHKw,448
+numpy/typing/tests/data/reveal/lib_version.pyi,sha256=9KSTL1-sf93KZmAFyc_xXTIufDMapHAfXHtXVR8gO-4,583
+numpy/typing/tests/data/reveal/linalg.pyi,sha256=DvWeTqPSyO_OlSxnkZbJkkEV7igdd-iMvMju2Zd2z2w,6236
+numpy/typing/tests/data/reveal/matrix.pyi,sha256=C1-xZV_MN3wSeRxiPOg3r2_kmOhYrMXCmJC_U4dVcDc,3048
+numpy/typing/tests/data/reveal/memmap.pyi,sha256=UdYaTVuRbMceCVMozcMTzdZ5qRrplzvovHChCvW55jg,754
+numpy/typing/tests/data/reveal/mod.pyi,sha256=vroL10xpg449us1stjWkWFLBF6kPt9vQbsR1IF17-Z4,7611
+numpy/typing/tests/data/reveal/modules.pyi,sha256=zOe7G_ofnwwwPQMdkKjI3mwt-xIy1kN-DjvWLQvm0r8,1870
+numpy/typing/tests/data/reveal/multiarray.pyi,sha256=ZYxzWuPoPn88crNn92hINm07OFBRiSv2A2l26yi0w2I,7865
+numpy/typing/tests/data/reveal/nbit_base_example.pyi,sha256=x6QK76bchnI-u4D6b0AFxcLp2Kvzv-BJCwUwe3NY9N4,587
+numpy/typing/tests/data/reveal/ndarray_assignability.pyi,sha256=vEDA7m6QDxM_sAR2PyY19IUCmspR3Te-bdD50M-RhJM,2698
+numpy/typing/tests/data/reveal/ndarray_conversion.pyi,sha256=N635zekh5wJfvTIFFI5tNc4NQVkyLLna1Wy4auihJMM,3377
+numpy/typing/tests/data/reveal/ndarray_misc.pyi,sha256=kmW4gdoV3TvOiO3jWKqoBnuiWp1tBunnsvs3Aggvf-4,7903
+numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi,sha256=9mPnQJofJ8vh9WQwWqNFxgQ6_f9Mv9rEU3iDXWnfbbQ,1405
+numpy/typing/tests/data/reveal/nditer.pyi,sha256=c9DdxgUOnm886w3f3L2trxHMyOF5s-w8_2DZHRdbhwM,1933
+numpy/typing/tests/data/reveal/nested_sequence.pyi,sha256=-o-5gOFUflvmU_pJRIfuKVP0xi4oxTAUYRPeHRtHiLk,646
+numpy/typing/tests/data/reveal/npyio.pyi,sha256=vrJNIovhI6cCpV0XrdISixluzR83i3z0PKr5jk6PuNo,3523
+numpy/typing/tests/data/reveal/numeric.pyi,sha256=9wq71fIj5gT5xMditz8zM79adfF1bvyfJJCy7DfKok0,6081
+numpy/typing/tests/data/reveal/numerictypes.pyi,sha256=nIJSi3T3S5v9sOyvh0IgllEHjGLE-a1W0sMowo11-_A,1361
+numpy/typing/tests/data/reveal/polynomial_polybase.pyi,sha256=EwzpzZnJnqxbe7W6MR0xJC-kzTRR428pXJDE6MgoNd4,7999
+numpy/typing/tests/data/reveal/polynomial_polyutils.pyi,sha256=T1c-C1-b0k0j61OnlrhTkWUN6Pftdaccw8bwGX7dDN0,10764
+numpy/typing/tests/data/reveal/polynomial_series.pyi,sha256=2h3B9w8TPr7Gypr0-s6ITeOZ3iQ4VDgpaKi5T440U_I,7128
+numpy/typing/tests/data/reveal/random.pyi,sha256=TlY_xhK3U--2Q1KiEkErDOvIxAHaqafHnTKMA_rv6U0,104329
+numpy/typing/tests/data/reveal/rec.pyi,sha256=ZvdqHUobAT4UeiogaAm_nVg27YSJRwUQwMtqJOJawT4,3776
+numpy/typing/tests/data/reveal/scalars.pyi,sha256=e7J0o8MAE_Henqh6Zcwv24NgCKgOlvOQ95MUdptmDzA,6449
+numpy/typing/tests/data/reveal/shape.pyi,sha256=r0y0iSyVabz6hnIRQFdomLV6yvPqiXrGm0pVtTmm1Eg,292
+numpy/typing/tests/data/reveal/shape_base.pyi,sha256=W1wxdfVHMxzuX-c0BcR3UJkDiE2re6ODypZjSX1nNnY,2046
+numpy/typing/tests/data/reveal/stride_tricks.pyi,sha256=J3Kagblme0GxDnJFW_v1M1Ak28Bdep-8P0LA3tl3KuA,1345
+numpy/typing/tests/data/reveal/strings.pyi,sha256=hZepuR_eOIKB2Ja6sw7VQ1LpIDE0cu9Z38YmlVTG-8Q,9415
+numpy/typing/tests/data/reveal/testing.pyi,sha256=-XIbu-GFxdz3AuiEa8Xwlq9n02eRbyJWacIgFwEtEYk,8483
+numpy/typing/tests/data/reveal/twodim_base.pyi,sha256=x5EgqxESpsFtvBsuTY1EmoyHBCr9aTCeg133oBUQuv0,4299
+numpy/typing/tests/data/reveal/type_check.pyi,sha256=H4d9guDEa4Hn_hty1Wy_R7q9UpACIzB2_pgoaHO4kZw,2711
+numpy/typing/tests/data/reveal/ufunc_config.pyi,sha256=tXala6x3dbwUI1S1yYPMo47oXti_1aX84ZHlrbI5WcI,1191
+numpy/typing/tests/data/reveal/ufunclike.pyi,sha256=F223MWONHITGeiJcpik_eLp8s56U2EsfLy73W-luTzM,1233
+numpy/typing/tests/data/reveal/ufuncs.pyi,sha256=Gf3782hgHd0-tW1bVhzJhJBSk9GvL-lki8vDpjblMFk,4819
+numpy/typing/tests/data/reveal/warnings_and_errors.pyi,sha256=quHpFR_zwWzV7WGpYDMzf7RkHbomqRYrc93JUB09tkg,460
+numpy/typing/tests/test_isfile.py,sha256=77lnjlxFqhrIRfGpSrqmvIVwpo9VoOPGiS7rRQSdKT0,865
+numpy/typing/tests/test_runtime.py,sha256=2qu8JEliITnZCBJ_QJpohacj_OQ08o73ixS2w2ooNXI,3275
+numpy/typing/tests/test_typing.py,sha256=wfRq_DQZg99tsuEQElXDtfbSmEOjkzEVizQB0cVp8-I,8308
+numpy/version.py,sha256=p_z6CLw9cwp3p9MewCe_U6lpWBLDU6Um3Qd9wUUbfXo,293
+numpy/version.pyi,sha256=tgN523dUbCHUTYs0QYz0HKchUfFwI9HKgoJY20rkewM,388
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/WHEEL b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/WHEEL
new file mode 100644
index 0000000000000000000000000000000000000000..4e4c38ae320920b8f083b87f408214cdecd350d2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/WHEEL
@@ -0,0 +1,6 @@
+Wheel-Version: 1.0
+Generator: meson
+Root-Is-Purelib: false
+Tag: cp310-cp310-manylinux_2_17_x86_64
+Tag: cp310-cp310-manylinux2014_x86_64
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/entry_points.txt b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/entry_points.txt
new file mode 100644
index 0000000000000000000000000000000000000000..963c00f7069bbcd2075093df390c8bfd73a109ce
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy-2.2.6.dist-info/entry_points.txt
@@ -0,0 +1,10 @@
+[array_api]
+numpy = numpy
+
+[pyinstaller40]
+hook-dirs = numpy:_pyinstaller_hooks_dir
+
+[console_scripts]
+f2py = numpy.f2py.f2py2e:main
+numpy-config = numpy._configtool:main
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libgfortran-040039e1-0352e75f.so.5.0.0 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libgfortran-040039e1-0352e75f.so.5.0.0
new file mode 100644
index 0000000000000000000000000000000000000000..32aeee9a92e063a830909443ffa10a61f8eb4896
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libgfortran-040039e1-0352e75f.so.5.0.0
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6090048eccc763522c12ef016f81da6b627cb3a044f55cf0479a839c41c0980
+size 2833617
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libquadmath-96973f99-934c22de.so.0.0.0 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libquadmath-96973f99-934c22de.so.0.0.0
new file mode 100644
index 0000000000000000000000000000000000000000..4e1eb5101254f9fcebd5d9b3fec1f6413b0f931c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libquadmath-96973f99-934c22de.so.0.0.0
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ed5137f412781ad7863439fb543613f620b43c32b63292a0029246162f5bbc6
+size 250985
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libscipy_openblas64_-56d6093b.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libscipy_openblas64_-56d6093b.so
new file mode 100644
index 0000000000000000000000000000000000000000..3eaad3e231286f0ade7911482ef8764a11f804c0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy.libs/libscipy_openblas64_-56d6093b.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0bd815d04b6b54990e3cccc7528fbb696456d09569f533d0390c13f0cdc4dd4a
+size 25021457
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e8ec8b2488664922c0594dc4ad8313d1612058fb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/__init__.pyi
@@ -0,0 +1,4 @@
+from numpy import matrix
+from .defmatrix import bmat, asmatrix
+
+__all__ = ["matrix", "bmat", "asmatrix"]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.py
new file mode 100644
index 0000000000000000000000000000000000000000..6512a0246db6aa6adc9a0619ca22e75f833b61e2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.py
@@ -0,0 +1,1118 @@
+__all__ = ['matrix', 'bmat', 'asmatrix']
+
+import sys
+import warnings
+import ast
+
+from .._utils import set_module
+import numpy._core.numeric as N
+from numpy._core.numeric import concatenate, isscalar
+# While not in __all__, matrix_power used to be defined here, so we import
+# it for backward compatibility.
+from numpy.linalg import matrix_power
+
+
+def _convert_from_string(data):
+ for char in '[]':
+ data = data.replace(char, '')
+
+ rows = data.split(';')
+ newdata = []
+ for count, row in enumerate(rows):
+ trow = row.split(',')
+ newrow = []
+ for col in trow:
+ temp = col.split()
+ newrow.extend(map(ast.literal_eval, temp))
+ if count == 0:
+ Ncols = len(newrow)
+ elif len(newrow) != Ncols:
+ raise ValueError("Rows not the same size.")
+ newdata.append(newrow)
+ return newdata
+
+
+@set_module('numpy')
+def asmatrix(data, dtype=None):
+ """
+ Interpret the input as a matrix.
+
+ Unlike `matrix`, `asmatrix` does not make a copy if the input is already
+ a matrix or an ndarray. Equivalent to ``matrix(data, copy=False)``.
+
+ Parameters
+ ----------
+ data : array_like
+ Input data.
+ dtype : data-type
+ Data-type of the output matrix.
+
+ Returns
+ -------
+ mat : matrix
+ `data` interpreted as a matrix.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> x = np.array([[1, 2], [3, 4]])
+
+ >>> m = np.asmatrix(x)
+
+ >>> x[0,0] = 5
+
+ >>> m
+ matrix([[5, 2],
+ [3, 4]])
+
+ """
+ return matrix(data, dtype=dtype, copy=False)
+
+
+@set_module('numpy')
+class matrix(N.ndarray):
+ """
+ matrix(data, dtype=None, copy=True)
+
+ Returns a matrix from an array-like object, or from a string of data.
+
+ A matrix is a specialized 2-D array that retains its 2-D nature
+ through operations. It has certain special operators, such as ``*``
+ (matrix multiplication) and ``**`` (matrix power).
+
+ .. note:: It is no longer recommended to use this class, even for linear
+ algebra. Instead use regular arrays. The class may be removed
+ in the future.
+
+ Parameters
+ ----------
+ data : array_like or string
+ If `data` is a string, it is interpreted as a matrix with commas
+ or spaces separating columns, and semicolons separating rows.
+ dtype : data-type
+ Data-type of the output matrix.
+ copy : bool
+ If `data` is already an `ndarray`, then this flag determines
+ whether the data is copied (the default), or whether a view is
+ constructed.
+
+ See Also
+ --------
+ array
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> a = np.matrix('1 2; 3 4')
+ >>> a
+ matrix([[1, 2],
+ [3, 4]])
+
+ >>> np.matrix([[1, 2], [3, 4]])
+ matrix([[1, 2],
+ [3, 4]])
+
+ """
+ __array_priority__ = 10.0
+ def __new__(subtype, data, dtype=None, copy=True):
+ warnings.warn('the matrix subclass is not the recommended way to '
+ 'represent matrices or deal with linear algebra (see '
+ 'https://docs.scipy.org/doc/numpy/user/'
+ 'numpy-for-matlab-users.html). '
+ 'Please adjust your code to use regular ndarray.',
+ PendingDeprecationWarning, stacklevel=2)
+ if isinstance(data, matrix):
+ dtype2 = data.dtype
+ if (dtype is None):
+ dtype = dtype2
+ if (dtype2 == dtype) and (not copy):
+ return data
+ return data.astype(dtype)
+
+ if isinstance(data, N.ndarray):
+ if dtype is None:
+ intype = data.dtype
+ else:
+ intype = N.dtype(dtype)
+ new = data.view(subtype)
+ if intype != data.dtype:
+ return new.astype(intype)
+ if copy:
+ return new.copy()
+ else:
+ return new
+
+ if isinstance(data, str):
+ data = _convert_from_string(data)
+
+ # now convert data to an array
+ copy = None if not copy else True
+ arr = N.array(data, dtype=dtype, copy=copy)
+ ndim = arr.ndim
+ shape = arr.shape
+ if (ndim > 2):
+ raise ValueError("matrix must be 2-dimensional")
+ elif ndim == 0:
+ shape = (1, 1)
+ elif ndim == 1:
+ shape = (1, shape[0])
+
+ order = 'C'
+ if (ndim == 2) and arr.flags.fortran:
+ order = 'F'
+
+ if not (order or arr.flags.contiguous):
+ arr = arr.copy()
+
+ ret = N.ndarray.__new__(subtype, shape, arr.dtype,
+ buffer=arr,
+ order=order)
+ return ret
+
+ def __array_finalize__(self, obj):
+ self._getitem = False
+ if (isinstance(obj, matrix) and obj._getitem):
+ return
+ ndim = self.ndim
+ if (ndim == 2):
+ return
+ if (ndim > 2):
+ newshape = tuple([x for x in self.shape if x > 1])
+ ndim = len(newshape)
+ if ndim == 2:
+ self.shape = newshape
+ return
+ elif (ndim > 2):
+ raise ValueError("shape too large to be a matrix.")
+ else:
+ newshape = self.shape
+ if ndim == 0:
+ self.shape = (1, 1)
+ elif ndim == 1:
+ self.shape = (1, newshape[0])
+ return
+
+ def __getitem__(self, index):
+ self._getitem = True
+
+ try:
+ out = N.ndarray.__getitem__(self, index)
+ finally:
+ self._getitem = False
+
+ if not isinstance(out, N.ndarray):
+ return out
+
+ if out.ndim == 0:
+ return out[()]
+ if out.ndim == 1:
+ sh = out.shape[0]
+ # Determine when we should have a column array
+ try:
+ n = len(index)
+ except Exception:
+ n = 0
+ if n > 1 and isscalar(index[1]):
+ out.shape = (sh, 1)
+ else:
+ out.shape = (1, sh)
+ return out
+
+ def __mul__(self, other):
+ if isinstance(other, (N.ndarray, list, tuple)) :
+ # This promotes 1-D vectors to row vectors
+ return N.dot(self, asmatrix(other))
+ if isscalar(other) or not hasattr(other, '__rmul__') :
+ return N.dot(self, other)
+ return NotImplemented
+
+ def __rmul__(self, other):
+ return N.dot(other, self)
+
+ def __imul__(self, other):
+ self[:] = self * other
+ return self
+
+ def __pow__(self, other):
+ return matrix_power(self, other)
+
+ def __ipow__(self, other):
+ self[:] = self ** other
+ return self
+
+ def __rpow__(self, other):
+ return NotImplemented
+
+ def _align(self, axis):
+ """A convenience function for operations that need to preserve axis
+ orientation.
+ """
+ if axis is None:
+ return self[0, 0]
+ elif axis==0:
+ return self
+ elif axis==1:
+ return self.transpose()
+ else:
+ raise ValueError("unsupported axis")
+
+ def _collapse(self, axis):
+ """A convenience function for operations that want to collapse
+ to a scalar like _align, but are using keepdims=True
+ """
+ if axis is None:
+ return self[0, 0]
+ else:
+ return self
+
+ # Necessary because base-class tolist expects dimension
+ # reduction by x[0]
+ def tolist(self):
+ """
+ Return the matrix as a (possibly nested) list.
+
+ See `ndarray.tolist` for full documentation.
+
+ See Also
+ --------
+ ndarray.tolist
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.tolist()
+ [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]
+
+ """
+ return self.__array__().tolist()
+
+ # To preserve orientation of result...
+ def sum(self, axis=None, dtype=None, out=None):
+ """
+ Returns the sum of the matrix elements, along the given axis.
+
+ Refer to `numpy.sum` for full documentation.
+
+ See Also
+ --------
+ numpy.sum
+
+ Notes
+ -----
+ This is the same as `ndarray.sum`, except that where an `ndarray` would
+ be returned, a `matrix` object is returned instead.
+
+ Examples
+ --------
+ >>> x = np.matrix([[1, 2], [4, 3]])
+ >>> x.sum()
+ 10
+ >>> x.sum(axis=1)
+ matrix([[3],
+ [7]])
+ >>> x.sum(axis=1, dtype='float')
+ matrix([[3.],
+ [7.]])
+ >>> out = np.zeros((2, 1), dtype='float')
+ >>> x.sum(axis=1, dtype='float', out=np.asmatrix(out))
+ matrix([[3.],
+ [7.]])
+
+ """
+ return N.ndarray.sum(self, axis, dtype, out, keepdims=True)._collapse(axis)
+
+
+ # To update docstring from array to matrix...
+ def squeeze(self, axis=None):
+ """
+ Return a possibly reshaped matrix.
+
+ Refer to `numpy.squeeze` for more documentation.
+
+ Parameters
+ ----------
+ axis : None or int or tuple of ints, optional
+ Selects a subset of the axes of length one in the shape.
+ If an axis is selected with shape entry greater than one,
+ an error is raised.
+
+ Returns
+ -------
+ squeezed : matrix
+ The matrix, but as a (1, N) matrix if it had shape (N, 1).
+
+ See Also
+ --------
+ numpy.squeeze : related function
+
+ Notes
+ -----
+ If `m` has a single column then that column is returned
+ as the single row of a matrix. Otherwise `m` is returned.
+ The returned matrix is always either `m` itself or a view into `m`.
+ Supplying an axis keyword argument will not affect the returned matrix
+ but it may cause an error to be raised.
+
+ Examples
+ --------
+ >>> c = np.matrix([[1], [2]])
+ >>> c
+ matrix([[1],
+ [2]])
+ >>> c.squeeze()
+ matrix([[1, 2]])
+ >>> r = c.T
+ >>> r
+ matrix([[1, 2]])
+ >>> r.squeeze()
+ matrix([[1, 2]])
+ >>> m = np.matrix([[1, 2], [3, 4]])
+ >>> m.squeeze()
+ matrix([[1, 2],
+ [3, 4]])
+
+ """
+ return N.ndarray.squeeze(self, axis=axis)
+
+
+ # To update docstring from array to matrix...
+ def flatten(self, order='C'):
+ """
+ Return a flattened copy of the matrix.
+
+ All `N` elements of the matrix are placed into a single row.
+
+ Parameters
+ ----------
+ order : {'C', 'F', 'A', 'K'}, optional
+ 'C' means to flatten in row-major (C-style) order. 'F' means to
+ flatten in column-major (Fortran-style) order. 'A' means to
+ flatten in column-major order if `m` is Fortran *contiguous* in
+ memory, row-major order otherwise. 'K' means to flatten `m` in
+ the order the elements occur in memory. The default is 'C'.
+
+ Returns
+ -------
+ y : matrix
+ A copy of the matrix, flattened to a `(1, N)` matrix where `N`
+ is the number of elements in the original matrix.
+
+ See Also
+ --------
+ ravel : Return a flattened array.
+ flat : A 1-D flat iterator over the matrix.
+
+ Examples
+ --------
+ >>> m = np.matrix([[1,2], [3,4]])
+ >>> m.flatten()
+ matrix([[1, 2, 3, 4]])
+ >>> m.flatten('F')
+ matrix([[1, 3, 2, 4]])
+
+ """
+ return N.ndarray.flatten(self, order=order)
+
+ def mean(self, axis=None, dtype=None, out=None):
+ """
+ Returns the average of the matrix elements along the given axis.
+
+ Refer to `numpy.mean` for full documentation.
+
+ See Also
+ --------
+ numpy.mean
+
+ Notes
+ -----
+ Same as `ndarray.mean` except that, where that returns an `ndarray`,
+ this returns a `matrix` object.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3, 4)))
+ >>> x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.mean()
+ 5.5
+ >>> x.mean(0)
+ matrix([[4., 5., 6., 7.]])
+ >>> x.mean(1)
+ matrix([[ 1.5],
+ [ 5.5],
+ [ 9.5]])
+
+ """
+ return N.ndarray.mean(self, axis, dtype, out, keepdims=True)._collapse(axis)
+
+ def std(self, axis=None, dtype=None, out=None, ddof=0):
+ """
+ Return the standard deviation of the array elements along the given axis.
+
+ Refer to `numpy.std` for full documentation.
+
+ See Also
+ --------
+ numpy.std
+
+ Notes
+ -----
+ This is the same as `ndarray.std`, except that where an `ndarray` would
+ be returned, a `matrix` object is returned instead.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3, 4)))
+ >>> x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.std()
+ 3.4520525295346629 # may vary
+ >>> x.std(0)
+ matrix([[ 3.26598632, 3.26598632, 3.26598632, 3.26598632]]) # may vary
+ >>> x.std(1)
+ matrix([[ 1.11803399],
+ [ 1.11803399],
+ [ 1.11803399]])
+
+ """
+ return N.ndarray.std(self, axis, dtype, out, ddof, keepdims=True)._collapse(axis)
+
+ def var(self, axis=None, dtype=None, out=None, ddof=0):
+ """
+ Returns the variance of the matrix elements, along the given axis.
+
+ Refer to `numpy.var` for full documentation.
+
+ See Also
+ --------
+ numpy.var
+
+ Notes
+ -----
+ This is the same as `ndarray.var`, except that where an `ndarray` would
+ be returned, a `matrix` object is returned instead.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3, 4)))
+ >>> x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.var()
+ 11.916666666666666
+ >>> x.var(0)
+ matrix([[ 10.66666667, 10.66666667, 10.66666667, 10.66666667]]) # may vary
+ >>> x.var(1)
+ matrix([[1.25],
+ [1.25],
+ [1.25]])
+
+ """
+ return N.ndarray.var(self, axis, dtype, out, ddof, keepdims=True)._collapse(axis)
+
+ def prod(self, axis=None, dtype=None, out=None):
+ """
+ Return the product of the array elements over the given axis.
+
+ Refer to `prod` for full documentation.
+
+ See Also
+ --------
+ prod, ndarray.prod
+
+ Notes
+ -----
+ Same as `ndarray.prod`, except, where that returns an `ndarray`, this
+ returns a `matrix` object instead.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.prod()
+ 0
+ >>> x.prod(0)
+ matrix([[ 0, 45, 120, 231]])
+ >>> x.prod(1)
+ matrix([[ 0],
+ [ 840],
+ [7920]])
+
+ """
+ return N.ndarray.prod(self, axis, dtype, out, keepdims=True)._collapse(axis)
+
+ def any(self, axis=None, out=None):
+ """
+ Test whether any array element along a given axis evaluates to True.
+
+ Refer to `numpy.any` for full documentation.
+
+ Parameters
+ ----------
+ axis : int, optional
+ Axis along which logical OR is performed
+ out : ndarray, optional
+ Output to existing array instead of creating new one, must have
+ same shape as expected output
+
+ Returns
+ -------
+ any : bool, ndarray
+ Returns a single bool if `axis` is ``None``; otherwise,
+ returns `ndarray`
+
+ """
+ return N.ndarray.any(self, axis, out, keepdims=True)._collapse(axis)
+
+ def all(self, axis=None, out=None):
+ """
+ Test whether all matrix elements along a given axis evaluate to True.
+
+ Parameters
+ ----------
+ See `numpy.all` for complete descriptions
+
+ See Also
+ --------
+ numpy.all
+
+ Notes
+ -----
+ This is the same as `ndarray.all`, but it returns a `matrix` object.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> y = x[0]; y
+ matrix([[0, 1, 2, 3]])
+ >>> (x == y)
+ matrix([[ True, True, True, True],
+ [False, False, False, False],
+ [False, False, False, False]])
+ >>> (x == y).all()
+ False
+ >>> (x == y).all(0)
+ matrix([[False, False, False, False]])
+ >>> (x == y).all(1)
+ matrix([[ True],
+ [False],
+ [False]])
+
+ """
+ return N.ndarray.all(self, axis, out, keepdims=True)._collapse(axis)
+
+ def max(self, axis=None, out=None):
+ """
+ Return the maximum value along an axis.
+
+ Parameters
+ ----------
+ See `amax` for complete descriptions
+
+ See Also
+ --------
+ amax, ndarray.max
+
+ Notes
+ -----
+ This is the same as `ndarray.max`, but returns a `matrix` object
+ where `ndarray.max` would return an ndarray.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.max()
+ 11
+ >>> x.max(0)
+ matrix([[ 8, 9, 10, 11]])
+ >>> x.max(1)
+ matrix([[ 3],
+ [ 7],
+ [11]])
+
+ """
+ return N.ndarray.max(self, axis, out, keepdims=True)._collapse(axis)
+
+ def argmax(self, axis=None, out=None):
+ """
+ Indexes of the maximum values along an axis.
+
+ Return the indexes of the first occurrences of the maximum values
+ along the specified axis. If axis is None, the index is for the
+ flattened matrix.
+
+ Parameters
+ ----------
+ See `numpy.argmax` for complete descriptions
+
+ See Also
+ --------
+ numpy.argmax
+
+ Notes
+ -----
+ This is the same as `ndarray.argmax`, but returns a `matrix` object
+ where `ndarray.argmax` would return an `ndarray`.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.argmax()
+ 11
+ >>> x.argmax(0)
+ matrix([[2, 2, 2, 2]])
+ >>> x.argmax(1)
+ matrix([[3],
+ [3],
+ [3]])
+
+ """
+ return N.ndarray.argmax(self, axis, out)._align(axis)
+
+ def min(self, axis=None, out=None):
+ """
+ Return the minimum value along an axis.
+
+ Parameters
+ ----------
+ See `amin` for complete descriptions.
+
+ See Also
+ --------
+ amin, ndarray.min
+
+ Notes
+ -----
+ This is the same as `ndarray.min`, but returns a `matrix` object
+ where `ndarray.min` would return an ndarray.
+
+ Examples
+ --------
+ >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, -1, -2, -3],
+ [ -4, -5, -6, -7],
+ [ -8, -9, -10, -11]])
+ >>> x.min()
+ -11
+ >>> x.min(0)
+ matrix([[ -8, -9, -10, -11]])
+ >>> x.min(1)
+ matrix([[ -3],
+ [ -7],
+ [-11]])
+
+ """
+ return N.ndarray.min(self, axis, out, keepdims=True)._collapse(axis)
+
+ def argmin(self, axis=None, out=None):
+ """
+ Indexes of the minimum values along an axis.
+
+ Return the indexes of the first occurrences of the minimum values
+ along the specified axis. If axis is None, the index is for the
+ flattened matrix.
+
+ Parameters
+ ----------
+ See `numpy.argmin` for complete descriptions.
+
+ See Also
+ --------
+ numpy.argmin
+
+ Notes
+ -----
+ This is the same as `ndarray.argmin`, but returns a `matrix` object
+ where `ndarray.argmin` would return an `ndarray`.
+
+ Examples
+ --------
+ >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, -1, -2, -3],
+ [ -4, -5, -6, -7],
+ [ -8, -9, -10, -11]])
+ >>> x.argmin()
+ 11
+ >>> x.argmin(0)
+ matrix([[2, 2, 2, 2]])
+ >>> x.argmin(1)
+ matrix([[3],
+ [3],
+ [3]])
+
+ """
+ return N.ndarray.argmin(self, axis, out)._align(axis)
+
+ def ptp(self, axis=None, out=None):
+ """
+ Peak-to-peak (maximum - minimum) value along the given axis.
+
+ Refer to `numpy.ptp` for full documentation.
+
+ See Also
+ --------
+ numpy.ptp
+
+ Notes
+ -----
+ Same as `ndarray.ptp`, except, where that would return an `ndarray` object,
+ this returns a `matrix` object.
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.ptp()
+ 11
+ >>> x.ptp(0)
+ matrix([[8, 8, 8, 8]])
+ >>> x.ptp(1)
+ matrix([[3],
+ [3],
+ [3]])
+
+ """
+ return N.ptp(self, axis, out)._align(axis)
+
+ @property
+ def I(self):
+ """
+ Returns the (multiplicative) inverse of invertible `self`.
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ ret : matrix object
+ If `self` is non-singular, `ret` is such that ``ret * self`` ==
+ ``self * ret`` == ``np.matrix(np.eye(self[0,:].size))`` all return
+ ``True``.
+
+ Raises
+ ------
+ numpy.linalg.LinAlgError: Singular matrix
+ If `self` is singular.
+
+ See Also
+ --------
+ linalg.inv
+
+ Examples
+ --------
+ >>> m = np.matrix('[1, 2; 3, 4]'); m
+ matrix([[1, 2],
+ [3, 4]])
+ >>> m.getI()
+ matrix([[-2. , 1. ],
+ [ 1.5, -0.5]])
+ >>> m.getI() * m
+ matrix([[ 1., 0.], # may vary
+ [ 0., 1.]])
+
+ """
+ M, N = self.shape
+ if M == N:
+ from numpy.linalg import inv as func
+ else:
+ from numpy.linalg import pinv as func
+ return asmatrix(func(self))
+
+ @property
+ def A(self):
+ """
+ Return `self` as an `ndarray` object.
+
+ Equivalent to ``np.asarray(self)``.
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ ret : ndarray
+ `self` as an `ndarray`
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.getA()
+ array([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+
+ """
+ return self.__array__()
+
+ @property
+ def A1(self):
+ """
+ Return `self` as a flattened `ndarray`.
+
+ Equivalent to ``np.asarray(x).ravel()``
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ ret : ndarray
+ `self`, 1-D, as an `ndarray`
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4))); x
+ matrix([[ 0, 1, 2, 3],
+ [ 4, 5, 6, 7],
+ [ 8, 9, 10, 11]])
+ >>> x.getA1()
+ array([ 0, 1, 2, ..., 9, 10, 11])
+
+
+ """
+ return self.__array__().ravel()
+
+
+ def ravel(self, order='C'):
+ """
+ Return a flattened matrix.
+
+ Refer to `numpy.ravel` for more documentation.
+
+ Parameters
+ ----------
+ order : {'C', 'F', 'A', 'K'}, optional
+ The elements of `m` are read using this index order. 'C' means to
+ index the elements in C-like order, with the last axis index
+ changing fastest, back to the first axis index changing slowest.
+ 'F' means to index the elements in Fortran-like index order, with
+ the first index changing fastest, and the last index changing
+ slowest. Note that the 'C' and 'F' options take no account of the
+ memory layout of the underlying array, and only refer to the order
+ of axis indexing. 'A' means to read the elements in Fortran-like
+ index order if `m` is Fortran *contiguous* in memory, C-like order
+ otherwise. 'K' means to read the elements in the order they occur
+ in memory, except for reversing the data when strides are negative.
+ By default, 'C' index order is used.
+
+ Returns
+ -------
+ ret : matrix
+ Return the matrix flattened to shape `(1, N)` where `N`
+ is the number of elements in the original matrix.
+ A copy is made only if necessary.
+
+ See Also
+ --------
+ matrix.flatten : returns a similar output matrix but always a copy
+ matrix.flat : a flat iterator on the array.
+ numpy.ravel : related function which returns an ndarray
+
+ """
+ return N.ndarray.ravel(self, order=order)
+
+ @property
+ def T(self):
+ """
+ Returns the transpose of the matrix.
+
+ Does *not* conjugate! For the complex conjugate transpose, use ``.H``.
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ ret : matrix object
+ The (non-conjugated) transpose of the matrix.
+
+ See Also
+ --------
+ transpose, getH
+
+ Examples
+ --------
+ >>> m = np.matrix('[1, 2; 3, 4]')
+ >>> m
+ matrix([[1, 2],
+ [3, 4]])
+ >>> m.getT()
+ matrix([[1, 3],
+ [2, 4]])
+
+ """
+ return self.transpose()
+
+ @property
+ def H(self):
+ """
+ Returns the (complex) conjugate transpose of `self`.
+
+ Equivalent to ``np.transpose(self)`` if `self` is real-valued.
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ ret : matrix object
+ complex conjugate transpose of `self`
+
+ Examples
+ --------
+ >>> x = np.matrix(np.arange(12).reshape((3,4)))
+ >>> z = x - 1j*x; z
+ matrix([[ 0. +0.j, 1. -1.j, 2. -2.j, 3. -3.j],
+ [ 4. -4.j, 5. -5.j, 6. -6.j, 7. -7.j],
+ [ 8. -8.j, 9. -9.j, 10.-10.j, 11.-11.j]])
+ >>> z.getH()
+ matrix([[ 0. -0.j, 4. +4.j, 8. +8.j],
+ [ 1. +1.j, 5. +5.j, 9. +9.j],
+ [ 2. +2.j, 6. +6.j, 10.+10.j],
+ [ 3. +3.j, 7. +7.j, 11.+11.j]])
+
+ """
+ if issubclass(self.dtype.type, N.complexfloating):
+ return self.transpose().conjugate()
+ else:
+ return self.transpose()
+
+ # kept for compatibility
+ getT = T.fget
+ getA = A.fget
+ getA1 = A1.fget
+ getH = H.fget
+ getI = I.fget
+
+def _from_string(str, gdict, ldict):
+ rows = str.split(';')
+ rowtup = []
+ for row in rows:
+ trow = row.split(',')
+ newrow = []
+ for x in trow:
+ newrow.extend(x.split())
+ trow = newrow
+ coltup = []
+ for col in trow:
+ col = col.strip()
+ try:
+ thismat = ldict[col]
+ except KeyError:
+ try:
+ thismat = gdict[col]
+ except KeyError as e:
+ raise NameError(f"name {col!r} is not defined") from None
+
+ coltup.append(thismat)
+ rowtup.append(concatenate(coltup, axis=-1))
+ return concatenate(rowtup, axis=0)
+
+
+@set_module('numpy')
+def bmat(obj, ldict=None, gdict=None):
+ """
+ Build a matrix object from a string, nested sequence, or array.
+
+ Parameters
+ ----------
+ obj : str or array_like
+ Input data. If a string, variables in the current scope may be
+ referenced by name.
+ ldict : dict, optional
+ A dictionary that replaces local operands in current frame.
+ Ignored if `obj` is not a string or `gdict` is None.
+ gdict : dict, optional
+ A dictionary that replaces global operands in current frame.
+ Ignored if `obj` is not a string.
+
+ Returns
+ -------
+ out : matrix
+ Returns a matrix object, which is a specialized 2-D array.
+
+ See Also
+ --------
+ block :
+ A generalization of this function for N-d arrays, that returns normal
+ ndarrays.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> A = np.asmatrix('1 1; 1 1')
+ >>> B = np.asmatrix('2 2; 2 2')
+ >>> C = np.asmatrix('3 4; 5 6')
+ >>> D = np.asmatrix('7 8; 9 0')
+
+ All the following expressions construct the same block matrix:
+
+ >>> np.bmat([[A, B], [C, D]])
+ matrix([[1, 1, 2, 2],
+ [1, 1, 2, 2],
+ [3, 4, 7, 8],
+ [5, 6, 9, 0]])
+ >>> np.bmat(np.r_[np.c_[A, B], np.c_[C, D]])
+ matrix([[1, 1, 2, 2],
+ [1, 1, 2, 2],
+ [3, 4, 7, 8],
+ [5, 6, 9, 0]])
+ >>> np.bmat('A,B; C,D')
+ matrix([[1, 1, 2, 2],
+ [1, 1, 2, 2],
+ [3, 4, 7, 8],
+ [5, 6, 9, 0]])
+
+ """
+ if isinstance(obj, str):
+ if gdict is None:
+ # get previous frame
+ frame = sys._getframe().f_back
+ glob_dict = frame.f_globals
+ loc_dict = frame.f_locals
+ else:
+ glob_dict = gdict
+ loc_dict = ldict
+
+ return matrix(_from_string(obj, glob_dict, loc_dict))
+
+ if isinstance(obj, (tuple, list)):
+ # [[A,B],[C,D]]
+ arr_rows = []
+ for row in obj:
+ if isinstance(row, N.ndarray): # not 2-d
+ return matrix(concatenate(obj, axis=-1))
+ else:
+ arr_rows.append(concatenate(row, axis=-1))
+ return matrix(concatenate(arr_rows, axis=0))
+ if isinstance(obj, N.ndarray):
+ return matrix(obj)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a6095cc1155ab6a97be8142c5704dd553aedd602
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/defmatrix.pyi
@@ -0,0 +1,17 @@
+from collections.abc import Mapping, Sequence
+from typing import Any
+
+from numpy import matrix
+from numpy._typing import ArrayLike, DTypeLike, NDArray
+
+__all__ = ["asmatrix", "bmat", "matrix"]
+
+def bmat(
+ obj: str | Sequence[ArrayLike] | NDArray[Any],
+ ldict: None | Mapping[str, Any] = ...,
+ gdict: None | Mapping[str, Any] = ...,
+) -> matrix[tuple[int, int], Any]: ...
+
+def asmatrix(
+ data: ArrayLike, dtype: DTypeLike = ...
+) -> matrix[tuple[int, int], Any]: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_defmatrix.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_defmatrix.py
new file mode 100644
index 0000000000000000000000000000000000000000..81d955e86fa863043b82fa126f09528b02a3cff3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_defmatrix.py
@@ -0,0 +1,453 @@
+import collections.abc
+
+import numpy as np
+from numpy import matrix, asmatrix, bmat
+from numpy.testing import (
+ assert_, assert_equal, assert_almost_equal, assert_array_equal,
+ assert_array_almost_equal, assert_raises
+ )
+from numpy.linalg import matrix_power
+
+class TestCtor:
+ def test_basic(self):
+ A = np.array([[1, 2], [3, 4]])
+ mA = matrix(A)
+ assert_(np.all(mA.A == A))
+
+ B = bmat("A,A;A,A")
+ C = bmat([[A, A], [A, A]])
+ D = np.array([[1, 2, 1, 2],
+ [3, 4, 3, 4],
+ [1, 2, 1, 2],
+ [3, 4, 3, 4]])
+ assert_(np.all(B.A == D))
+ assert_(np.all(C.A == D))
+
+ E = np.array([[5, 6], [7, 8]])
+ AEresult = matrix([[1, 2, 5, 6], [3, 4, 7, 8]])
+ assert_(np.all(bmat([A, E]) == AEresult))
+
+ vec = np.arange(5)
+ mvec = matrix(vec)
+ assert_(mvec.shape == (1, 5))
+
+ def test_exceptions(self):
+ # Check for ValueError when called with invalid string data.
+ assert_raises(ValueError, matrix, "invalid")
+
+ def test_bmat_nondefault_str(self):
+ A = np.array([[1, 2], [3, 4]])
+ B = np.array([[5, 6], [7, 8]])
+ Aresult = np.array([[1, 2, 1, 2],
+ [3, 4, 3, 4],
+ [1, 2, 1, 2],
+ [3, 4, 3, 4]])
+ mixresult = np.array([[1, 2, 5, 6],
+ [3, 4, 7, 8],
+ [5, 6, 1, 2],
+ [7, 8, 3, 4]])
+ assert_(np.all(bmat("A,A;A,A") == Aresult))
+ assert_(np.all(bmat("A,A;A,A", ldict={'A':B}) == Aresult))
+ assert_raises(TypeError, bmat, "A,A;A,A", gdict={'A':B})
+ assert_(
+ np.all(bmat("A,A;A,A", ldict={'A':A}, gdict={'A':B}) == Aresult))
+ b2 = bmat("A,B;C,D", ldict={'A':A,'B':B}, gdict={'C':B,'D':A})
+ assert_(np.all(b2 == mixresult))
+
+
+class TestProperties:
+ def test_sum(self):
+ """Test whether matrix.sum(axis=1) preserves orientation.
+ Fails in NumPy <= 0.9.6.2127.
+ """
+ M = matrix([[1, 2, 0, 0],
+ [3, 4, 0, 0],
+ [1, 2, 1, 2],
+ [3, 4, 3, 4]])
+ sum0 = matrix([8, 12, 4, 6])
+ sum1 = matrix([3, 7, 6, 14]).T
+ sumall = 30
+ assert_array_equal(sum0, M.sum(axis=0))
+ assert_array_equal(sum1, M.sum(axis=1))
+ assert_equal(sumall, M.sum())
+
+ assert_array_equal(sum0, np.sum(M, axis=0))
+ assert_array_equal(sum1, np.sum(M, axis=1))
+ assert_equal(sumall, np.sum(M))
+
+ def test_prod(self):
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(x.prod(), 720)
+ assert_equal(x.prod(0), matrix([[4, 10, 18]]))
+ assert_equal(x.prod(1), matrix([[6], [120]]))
+
+ assert_equal(np.prod(x), 720)
+ assert_equal(np.prod(x, axis=0), matrix([[4, 10, 18]]))
+ assert_equal(np.prod(x, axis=1), matrix([[6], [120]]))
+
+ y = matrix([0, 1, 3])
+ assert_(y.prod() == 0)
+
+ def test_max(self):
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(x.max(), 6)
+ assert_equal(x.max(0), matrix([[4, 5, 6]]))
+ assert_equal(x.max(1), matrix([[3], [6]]))
+
+ assert_equal(np.max(x), 6)
+ assert_equal(np.max(x, axis=0), matrix([[4, 5, 6]]))
+ assert_equal(np.max(x, axis=1), matrix([[3], [6]]))
+
+ def test_min(self):
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(x.min(), 1)
+ assert_equal(x.min(0), matrix([[1, 2, 3]]))
+ assert_equal(x.min(1), matrix([[1], [4]]))
+
+ assert_equal(np.min(x), 1)
+ assert_equal(np.min(x, axis=0), matrix([[1, 2, 3]]))
+ assert_equal(np.min(x, axis=1), matrix([[1], [4]]))
+
+ def test_ptp(self):
+ x = np.arange(4).reshape((2, 2))
+ mx = x.view(np.matrix)
+ assert_(mx.ptp() == 3)
+ assert_(np.all(mx.ptp(0) == np.array([2, 2])))
+ assert_(np.all(mx.ptp(1) == np.array([1, 1])))
+
+ def test_var(self):
+ x = np.arange(9).reshape((3, 3))
+ mx = x.view(np.matrix)
+ assert_equal(x.var(ddof=0), mx.var(ddof=0))
+ assert_equal(x.var(ddof=1), mx.var(ddof=1))
+
+ def test_basic(self):
+ import numpy.linalg as linalg
+
+ A = np.array([[1., 2.],
+ [3., 4.]])
+ mA = matrix(A)
+ assert_(np.allclose(linalg.inv(A), mA.I))
+ assert_(np.all(np.array(np.transpose(A) == mA.T)))
+ assert_(np.all(np.array(np.transpose(A) == mA.H)))
+ assert_(np.all(A == mA.A))
+
+ B = A + 2j*A
+ mB = matrix(B)
+ assert_(np.allclose(linalg.inv(B), mB.I))
+ assert_(np.all(np.array(np.transpose(B) == mB.T)))
+ assert_(np.all(np.array(np.transpose(B).conj() == mB.H)))
+
+ def test_pinv(self):
+ x = matrix(np.arange(6).reshape(2, 3))
+ xpinv = matrix([[-0.77777778, 0.27777778],
+ [-0.11111111, 0.11111111],
+ [ 0.55555556, -0.05555556]])
+ assert_almost_equal(x.I, xpinv)
+
+ def test_comparisons(self):
+ A = np.arange(100).reshape(10, 10)
+ mA = matrix(A)
+ mB = matrix(A) + 0.1
+ assert_(np.all(mB == A+0.1))
+ assert_(np.all(mB == matrix(A+0.1)))
+ assert_(not np.any(mB == matrix(A-0.1)))
+ assert_(np.all(mA < mB))
+ assert_(np.all(mA <= mB))
+ assert_(np.all(mA <= mA))
+ assert_(not np.any(mA < mA))
+
+ assert_(not np.any(mB < mA))
+ assert_(np.all(mB >= mA))
+ assert_(np.all(mB >= mB))
+ assert_(not np.any(mB > mB))
+
+ assert_(np.all(mA == mA))
+ assert_(not np.any(mA == mB))
+ assert_(np.all(mB != mA))
+
+ assert_(not np.all(abs(mA) > 0))
+ assert_(np.all(abs(mB > 0)))
+
+ def test_asmatrix(self):
+ A = np.arange(100).reshape(10, 10)
+ mA = asmatrix(A)
+ A[0, 0] = -10
+ assert_(A[0, 0] == mA[0, 0])
+
+ def test_noaxis(self):
+ A = matrix([[1, 0], [0, 1]])
+ assert_(A.sum() == matrix(2))
+ assert_(A.mean() == matrix(0.5))
+
+ def test_repr(self):
+ A = matrix([[1, 0], [0, 1]])
+ assert_(repr(A) == "matrix([[1, 0],\n [0, 1]])")
+
+ def test_make_bool_matrix_from_str(self):
+ A = matrix('True; True; False')
+ B = matrix([[True], [True], [False]])
+ assert_array_equal(A, B)
+
+class TestCasting:
+ def test_basic(self):
+ A = np.arange(100).reshape(10, 10)
+ mA = matrix(A)
+
+ mB = mA.copy()
+ O = np.ones((10, 10), np.float64) * 0.1
+ mB = mB + O
+ assert_(mB.dtype.type == np.float64)
+ assert_(np.all(mA != mB))
+ assert_(np.all(mB == mA+0.1))
+
+ mC = mA.copy()
+ O = np.ones((10, 10), np.complex128)
+ mC = mC * O
+ assert_(mC.dtype.type == np.complex128)
+ assert_(np.all(mA != mB))
+
+
+class TestAlgebra:
+ def test_basic(self):
+ import numpy.linalg as linalg
+
+ A = np.array([[1., 2.], [3., 4.]])
+ mA = matrix(A)
+
+ B = np.identity(2)
+ for i in range(6):
+ assert_(np.allclose((mA ** i).A, B))
+ B = np.dot(B, A)
+
+ Ainv = linalg.inv(A)
+ B = np.identity(2)
+ for i in range(6):
+ assert_(np.allclose((mA ** -i).A, B))
+ B = np.dot(B, Ainv)
+
+ assert_(np.allclose((mA * mA).A, np.dot(A, A)))
+ assert_(np.allclose((mA + mA).A, (A + A)))
+ assert_(np.allclose((3*mA).A, (3*A)))
+
+ mA2 = matrix(A)
+ mA2 *= 3
+ assert_(np.allclose(mA2.A, 3*A))
+
+ def test_pow(self):
+ """Test raising a matrix to an integer power works as expected."""
+ m = matrix("1. 2.; 3. 4.")
+ m2 = m.copy()
+ m2 **= 2
+ mi = m.copy()
+ mi **= -1
+ m4 = m2.copy()
+ m4 **= 2
+ assert_array_almost_equal(m2, m**2)
+ assert_array_almost_equal(m4, np.dot(m2, m2))
+ assert_array_almost_equal(np.dot(mi, m), np.eye(2))
+
+ def test_scalar_type_pow(self):
+ m = matrix([[1, 2], [3, 4]])
+ for scalar_t in [np.int8, np.uint8]:
+ two = scalar_t(2)
+ assert_array_almost_equal(m ** 2, m ** two)
+
+ def test_notimplemented(self):
+ '''Check that 'not implemented' operations produce a failure.'''
+ A = matrix([[1., 2.],
+ [3., 4.]])
+
+ # __rpow__
+ with assert_raises(TypeError):
+ 1.0**A
+
+ # __mul__ with something not a list, ndarray, tuple, or scalar
+ with assert_raises(TypeError):
+ A*object()
+
+
+class TestMatrixReturn:
+ def test_instance_methods(self):
+ a = matrix([1.0], dtype='f8')
+ methodargs = {
+ 'astype': ('intc',),
+ 'clip': (0.0, 1.0),
+ 'compress': ([1],),
+ 'repeat': (1,),
+ 'reshape': (1,),
+ 'swapaxes': (0, 0),
+ 'dot': np.array([1.0]),
+ }
+ excluded_methods = [
+ 'argmin', 'choose', 'dump', 'dumps', 'fill', 'getfield',
+ 'getA', 'getA1', 'item', 'nonzero', 'put', 'putmask', 'resize',
+ 'searchsorted', 'setflags', 'setfield', 'sort',
+ 'partition', 'argpartition', 'newbyteorder', 'to_device',
+ 'take', 'tofile', 'tolist', 'tostring', 'tobytes', 'all', 'any',
+ 'sum', 'argmax', 'argmin', 'min', 'max', 'mean', 'var', 'ptp',
+ 'prod', 'std', 'ctypes', 'itemset', 'bitwise_count',
+ ]
+ for attrib in dir(a):
+ if attrib.startswith('_') or attrib in excluded_methods:
+ continue
+ f = getattr(a, attrib)
+ if isinstance(f, collections.abc.Callable):
+ # reset contents of a
+ a.astype('f8')
+ a.fill(1.0)
+ if attrib in methodargs:
+ args = methodargs[attrib]
+ else:
+ args = ()
+ b = f(*args)
+ assert_(type(b) is matrix, "%s" % attrib)
+ assert_(type(a.real) is matrix)
+ assert_(type(a.imag) is matrix)
+ c, d = matrix([0.0]).nonzero()
+ assert_(type(c) is np.ndarray)
+ assert_(type(d) is np.ndarray)
+
+
+class TestIndexing:
+ def test_basic(self):
+ x = asmatrix(np.zeros((3, 2), float))
+ y = np.zeros((3, 1), float)
+ y[:, 0] = [0.8, 0.2, 0.3]
+ x[:, 1] = y > 0.5
+ assert_equal(x, [[0, 1], [0, 0], [0, 0]])
+
+
+class TestNewScalarIndexing:
+ a = matrix([[1, 2], [3, 4]])
+
+ def test_dimesions(self):
+ a = self.a
+ x = a[0]
+ assert_equal(x.ndim, 2)
+
+ def test_array_from_matrix_list(self):
+ a = self.a
+ x = np.array([a, a])
+ assert_equal(x.shape, [2, 2, 2])
+
+ def test_array_to_list(self):
+ a = self.a
+ assert_equal(a.tolist(), [[1, 2], [3, 4]])
+
+ def test_fancy_indexing(self):
+ a = self.a
+ x = a[1, [0, 1, 0]]
+ assert_(isinstance(x, matrix))
+ assert_equal(x, matrix([[3, 4, 3]]))
+ x = a[[1, 0]]
+ assert_(isinstance(x, matrix))
+ assert_equal(x, matrix([[3, 4], [1, 2]]))
+ x = a[[[1], [0]], [[1, 0], [0, 1]]]
+ assert_(isinstance(x, matrix))
+ assert_equal(x, matrix([[4, 3], [1, 2]]))
+
+ def test_matrix_element(self):
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(x[0][0], matrix([[1, 2, 3]]))
+ assert_equal(x[0][0].shape, (1, 3))
+ assert_equal(x[0].shape, (1, 3))
+ assert_equal(x[:, 0].shape, (2, 1))
+
+ x = matrix(0)
+ assert_equal(x[0, 0], 0)
+ assert_equal(x[0], 0)
+ assert_equal(x[:, 0].shape, x.shape)
+
+ def test_scalar_indexing(self):
+ x = asmatrix(np.zeros((3, 2), float))
+ assert_equal(x[0, 0], x[0][0])
+
+ def test_row_column_indexing(self):
+ x = asmatrix(np.eye(2))
+ assert_array_equal(x[0,:], [[1, 0]])
+ assert_array_equal(x[1,:], [[0, 1]])
+ assert_array_equal(x[:, 0], [[1], [0]])
+ assert_array_equal(x[:, 1], [[0], [1]])
+
+ def test_boolean_indexing(self):
+ A = np.arange(6)
+ A.shape = (3, 2)
+ x = asmatrix(A)
+ assert_array_equal(x[:, np.array([True, False])], x[:, 0])
+ assert_array_equal(x[np.array([True, False, False]),:], x[0,:])
+
+ def test_list_indexing(self):
+ A = np.arange(6)
+ A.shape = (3, 2)
+ x = asmatrix(A)
+ assert_array_equal(x[:, [1, 0]], x[:, ::-1])
+ assert_array_equal(x[[2, 1, 0],:], x[::-1,:])
+
+
+class TestPower:
+ def test_returntype(self):
+ a = np.array([[0, 1], [0, 0]])
+ assert_(type(matrix_power(a, 2)) is np.ndarray)
+ a = asmatrix(a)
+ assert_(type(matrix_power(a, 2)) is matrix)
+
+ def test_list(self):
+ assert_array_equal(matrix_power([[0, 1], [0, 0]], 2), [[0, 0], [0, 0]])
+
+
+class TestShape:
+
+ a = np.array([[1], [2]])
+ m = matrix([[1], [2]])
+
+ def test_shape(self):
+ assert_equal(self.a.shape, (2, 1))
+ assert_equal(self.m.shape, (2, 1))
+
+ def test_numpy_ravel(self):
+ assert_equal(np.ravel(self.a).shape, (2,))
+ assert_equal(np.ravel(self.m).shape, (2,))
+
+ def test_member_ravel(self):
+ assert_equal(self.a.ravel().shape, (2,))
+ assert_equal(self.m.ravel().shape, (1, 2))
+
+ def test_member_flatten(self):
+ assert_equal(self.a.flatten().shape, (2,))
+ assert_equal(self.m.flatten().shape, (1, 2))
+
+ def test_numpy_ravel_order(self):
+ x = np.array([[1, 2, 3], [4, 5, 6]])
+ assert_equal(np.ravel(x), [1, 2, 3, 4, 5, 6])
+ assert_equal(np.ravel(x, order='F'), [1, 4, 2, 5, 3, 6])
+ assert_equal(np.ravel(x.T), [1, 4, 2, 5, 3, 6])
+ assert_equal(np.ravel(x.T, order='A'), [1, 2, 3, 4, 5, 6])
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(np.ravel(x), [1, 2, 3, 4, 5, 6])
+ assert_equal(np.ravel(x, order='F'), [1, 4, 2, 5, 3, 6])
+ assert_equal(np.ravel(x.T), [1, 4, 2, 5, 3, 6])
+ assert_equal(np.ravel(x.T, order='A'), [1, 2, 3, 4, 5, 6])
+
+ def test_matrix_ravel_order(self):
+ x = matrix([[1, 2, 3], [4, 5, 6]])
+ assert_equal(x.ravel(), [[1, 2, 3, 4, 5, 6]])
+ assert_equal(x.ravel(order='F'), [[1, 4, 2, 5, 3, 6]])
+ assert_equal(x.T.ravel(), [[1, 4, 2, 5, 3, 6]])
+ assert_equal(x.T.ravel(order='A'), [[1, 2, 3, 4, 5, 6]])
+
+ def test_array_memory_sharing(self):
+ assert_(np.may_share_memory(self.a, self.a.ravel()))
+ assert_(not np.may_share_memory(self.a, self.a.flatten()))
+
+ def test_matrix_memory_sharing(self):
+ assert_(np.may_share_memory(self.m, self.m.ravel()))
+ assert_(not np.may_share_memory(self.m, self.m.flatten()))
+
+ def test_expand_dims_matrix(self):
+ # matrices are always 2d - so expand_dims only makes sense when the
+ # type is changed away from matrix.
+ a = np.arange(10).reshape((2, 5)).view(np.matrix)
+ expanded = np.expand_dims(a, axis=1)
+ assert_equal(expanded.ndim, 3)
+ assert_(not isinstance(expanded, np.matrix))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_interaction.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_interaction.py
new file mode 100644
index 0000000000000000000000000000000000000000..0c6bf210e46e4f6a8fd53f4762acf27f1c74e6a1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_interaction.py
@@ -0,0 +1,354 @@
+"""Tests of interaction of matrix with other parts of numpy.
+
+Note that tests with MaskedArray and linalg are done in separate files.
+"""
+import pytest
+
+import textwrap
+import warnings
+
+import numpy as np
+from numpy.testing import (assert_, assert_equal, assert_raises,
+ assert_raises_regex, assert_array_equal,
+ assert_almost_equal, assert_array_almost_equal)
+
+
+def test_fancy_indexing():
+ # The matrix class messes with the shape. While this is always
+ # weird (getitem is not used, it does not have setitem nor knows
+ # about fancy indexing), this tests gh-3110
+ # 2018-04-29: moved here from core.tests.test_index.
+ m = np.matrix([[1, 2], [3, 4]])
+
+ assert_(isinstance(m[[0, 1, 0], :], np.matrix))
+
+ # gh-3110. Note the transpose currently because matrices do *not*
+ # support dimension fixing for fancy indexing correctly.
+ x = np.asmatrix(np.arange(50).reshape(5, 10))
+ assert_equal(x[:2, np.array(-1)], x[:2, -1].T)
+
+
+def test_polynomial_mapdomain():
+ # test that polynomial preserved matrix subtype.
+ # 2018-04-29: moved here from polynomial.tests.polyutils.
+ dom1 = [0, 4]
+ dom2 = [1, 3]
+ x = np.matrix([dom1, dom1])
+ res = np.polynomial.polyutils.mapdomain(x, dom1, dom2)
+ assert_(isinstance(res, np.matrix))
+
+
+def test_sort_matrix_none():
+ # 2018-04-29: moved here from core.tests.test_multiarray
+ a = np.matrix([[2, 1, 0]])
+ actual = np.sort(a, axis=None)
+ expected = np.matrix([[0, 1, 2]])
+ assert_equal(actual, expected)
+ assert_(type(expected) is np.matrix)
+
+
+def test_partition_matrix_none():
+ # gh-4301
+ # 2018-04-29: moved here from core.tests.test_multiarray
+ a = np.matrix([[2, 1, 0]])
+ actual = np.partition(a, 1, axis=None)
+ expected = np.matrix([[0, 1, 2]])
+ assert_equal(actual, expected)
+ assert_(type(expected) is np.matrix)
+
+
+def test_dot_scalar_and_matrix_of_objects():
+ # Ticket #2469
+ # 2018-04-29: moved here from core.tests.test_multiarray
+ arr = np.matrix([1, 2], dtype=object)
+ desired = np.matrix([[3, 6]], dtype=object)
+ assert_equal(np.dot(arr, 3), desired)
+ assert_equal(np.dot(3, arr), desired)
+
+
+def test_inner_scalar_and_matrix():
+ # 2018-04-29: moved here from core.tests.test_multiarray
+ for dt in np.typecodes['AllInteger'] + np.typecodes['AllFloat'] + '?':
+ sca = np.array(3, dtype=dt)[()]
+ arr = np.matrix([[1, 2], [3, 4]], dtype=dt)
+ desired = np.matrix([[3, 6], [9, 12]], dtype=dt)
+ assert_equal(np.inner(arr, sca), desired)
+ assert_equal(np.inner(sca, arr), desired)
+
+
+def test_inner_scalar_and_matrix_of_objects():
+ # Ticket #4482
+ # 2018-04-29: moved here from core.tests.test_multiarray
+ arr = np.matrix([1, 2], dtype=object)
+ desired = np.matrix([[3, 6]], dtype=object)
+ assert_equal(np.inner(arr, 3), desired)
+ assert_equal(np.inner(3, arr), desired)
+
+
+def test_iter_allocate_output_subtype():
+ # Make sure that the subtype with priority wins
+ # 2018-04-29: moved here from core.tests.test_nditer, given the
+ # matrix specific shape test.
+
+ # matrix vs ndarray
+ a = np.matrix([[1, 2], [3, 4]])
+ b = np.arange(4).reshape(2, 2).T
+ i = np.nditer([a, b, None], [],
+ [['readonly'], ['readonly'], ['writeonly', 'allocate']])
+ assert_(type(i.operands[2]) is np.matrix)
+ assert_(type(i.operands[2]) is not np.ndarray)
+ assert_equal(i.operands[2].shape, (2, 2))
+
+ # matrix always wants things to be 2D
+ b = np.arange(4).reshape(1, 2, 2)
+ assert_raises(RuntimeError, np.nditer, [a, b, None], [],
+ [['readonly'], ['readonly'], ['writeonly', 'allocate']])
+ # but if subtypes are disabled, the result can still work
+ i = np.nditer([a, b, None], [],
+ [['readonly'], ['readonly'],
+ ['writeonly', 'allocate', 'no_subtype']])
+ assert_(type(i.operands[2]) is np.ndarray)
+ assert_(type(i.operands[2]) is not np.matrix)
+ assert_equal(i.operands[2].shape, (1, 2, 2))
+
+
+def like_function():
+ # 2018-04-29: moved here from core.tests.test_numeric
+ a = np.matrix([[1, 2], [3, 4]])
+ for like_function in np.zeros_like, np.ones_like, np.empty_like:
+ b = like_function(a)
+ assert_(type(b) is np.matrix)
+
+ c = like_function(a, subok=False)
+ assert_(type(c) is not np.matrix)
+
+
+def test_array_astype():
+ # 2018-04-29: copied here from core.tests.test_api
+ # subok=True passes through a matrix
+ a = np.matrix([[0, 1, 2], [3, 4, 5]], dtype='f4')
+ b = a.astype('f4', subok=True, copy=False)
+ assert_(a is b)
+
+ # subok=True is default, and creates a subtype on a cast
+ b = a.astype('i4', copy=False)
+ assert_equal(a, b)
+ assert_equal(type(b), np.matrix)
+
+ # subok=False never returns a matrix
+ b = a.astype('f4', subok=False, copy=False)
+ assert_equal(a, b)
+ assert_(not (a is b))
+ assert_(type(b) is not np.matrix)
+
+
+def test_stack():
+ # 2018-04-29: copied here from core.tests.test_shape_base
+ # check np.matrix cannot be stacked
+ m = np.matrix([[1, 2], [3, 4]])
+ assert_raises_regex(ValueError, 'shape too large to be a matrix',
+ np.stack, [m, m])
+
+
+def test_object_scalar_multiply():
+ # Tickets #2469 and #4482
+ # 2018-04-29: moved here from core.tests.test_ufunc
+ arr = np.matrix([1, 2], dtype=object)
+ desired = np.matrix([[3, 6]], dtype=object)
+ assert_equal(np.multiply(arr, 3), desired)
+ assert_equal(np.multiply(3, arr), desired)
+
+
+def test_nanfunctions_matrices():
+ # Check that it works and that type and
+ # shape are preserved
+ # 2018-04-29: moved here from core.tests.test_nanfunctions
+ mat = np.matrix(np.eye(3))
+ for f in [np.nanmin, np.nanmax]:
+ res = f(mat, axis=0)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (1, 3))
+ res = f(mat, axis=1)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (3, 1))
+ res = f(mat)
+ assert_(np.isscalar(res))
+ # check that rows of nan are dealt with for subclasses (#4628)
+ mat[1] = np.nan
+ for f in [np.nanmin, np.nanmax]:
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ res = f(mat, axis=0)
+ assert_(isinstance(res, np.matrix))
+ assert_(not np.any(np.isnan(res)))
+ assert_(len(w) == 0)
+
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ res = f(mat, axis=1)
+ assert_(isinstance(res, np.matrix))
+ assert_(np.isnan(res[1, 0]) and not np.isnan(res[0, 0])
+ and not np.isnan(res[2, 0]))
+ assert_(len(w) == 1, 'no warning raised')
+ assert_(issubclass(w[0].category, RuntimeWarning))
+
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ res = f(mat)
+ assert_(np.isscalar(res))
+ assert_(res != np.nan)
+ assert_(len(w) == 0)
+
+
+def test_nanfunctions_matrices_general():
+ # Check that it works and that type and
+ # shape are preserved
+ # 2018-04-29: moved here from core.tests.test_nanfunctions
+ mat = np.matrix(np.eye(3))
+ for f in (np.nanargmin, np.nanargmax, np.nansum, np.nanprod,
+ np.nanmean, np.nanvar, np.nanstd):
+ res = f(mat, axis=0)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (1, 3))
+ res = f(mat, axis=1)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (3, 1))
+ res = f(mat)
+ assert_(np.isscalar(res))
+
+ for f in np.nancumsum, np.nancumprod:
+ res = f(mat, axis=0)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (3, 3))
+ res = f(mat, axis=1)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (3, 3))
+ res = f(mat)
+ assert_(isinstance(res, np.matrix))
+ assert_(res.shape == (1, 3*3))
+
+
+def test_average_matrix():
+ # 2018-04-29: moved here from core.tests.test_function_base.
+ y = np.matrix(np.random.rand(5, 5))
+ assert_array_equal(y.mean(0), np.average(y, 0))
+
+ a = np.matrix([[1, 2], [3, 4]])
+ w = np.matrix([[1, 2], [3, 4]])
+
+ r = np.average(a, axis=0, weights=w)
+ assert_equal(type(r), np.matrix)
+ assert_equal(r, [[2.5, 10.0/3]])
+
+
+def test_dot_matrix():
+ # Test to make sure matrices give the same answer as ndarrays
+ # 2018-04-29: moved here from core.tests.test_function_base.
+ x = np.linspace(0, 5)
+ y = np.linspace(-5, 0)
+ mx = np.matrix(x)
+ my = np.matrix(y)
+ r = np.dot(x, y)
+ mr = np.dot(mx, my.T)
+ assert_almost_equal(mr, r)
+
+
+def test_ediff1d_matrix():
+ # 2018-04-29: moved here from core.tests.test_arraysetops.
+ assert(isinstance(np.ediff1d(np.matrix(1)), np.matrix))
+ assert(isinstance(np.ediff1d(np.matrix(1), to_begin=1), np.matrix))
+
+
+def test_apply_along_axis_matrix():
+ # this test is particularly malicious because matrix
+ # refuses to become 1d
+ # 2018-04-29: moved here from core.tests.test_shape_base.
+ def double(row):
+ return row * 2
+
+ m = np.matrix([[0, 1], [2, 3]])
+ expected = np.matrix([[0, 2], [4, 6]])
+
+ result = np.apply_along_axis(double, 0, m)
+ assert_(isinstance(result, np.matrix))
+ assert_array_equal(result, expected)
+
+ result = np.apply_along_axis(double, 1, m)
+ assert_(isinstance(result, np.matrix))
+ assert_array_equal(result, expected)
+
+
+def test_kron_matrix():
+ # 2018-04-29: moved here from core.tests.test_shape_base.
+ a = np.ones([2, 2])
+ m = np.asmatrix(a)
+ assert_equal(type(np.kron(a, a)), np.ndarray)
+ assert_equal(type(np.kron(m, m)), np.matrix)
+ assert_equal(type(np.kron(a, m)), np.matrix)
+ assert_equal(type(np.kron(m, a)), np.matrix)
+
+
+class TestConcatenatorMatrix:
+ # 2018-04-29: moved here from core.tests.test_index_tricks.
+ def test_matrix(self):
+ a = [1, 2]
+ b = [3, 4]
+
+ ab_r = np.r_['r', a, b]
+ ab_c = np.r_['c', a, b]
+
+ assert_equal(type(ab_r), np.matrix)
+ assert_equal(type(ab_c), np.matrix)
+
+ assert_equal(np.array(ab_r), [[1, 2, 3, 4]])
+ assert_equal(np.array(ab_c), [[1], [2], [3], [4]])
+
+ assert_raises(ValueError, lambda: np.r_['rc', a, b])
+
+ def test_matrix_scalar(self):
+ r = np.r_['r', [1, 2], 3]
+ assert_equal(type(r), np.matrix)
+ assert_equal(np.array(r), [[1, 2, 3]])
+
+ def test_matrix_builder(self):
+ a = np.array([1])
+ b = np.array([2])
+ c = np.array([3])
+ d = np.array([4])
+ actual = np.r_['a, b; c, d']
+ expected = np.bmat([[a, b], [c, d]])
+
+ assert_equal(actual, expected)
+ assert_equal(type(actual), type(expected))
+
+
+def test_array_equal_error_message_matrix():
+ # 2018-04-29: moved here from testing.tests.test_utils.
+ with pytest.raises(AssertionError) as exc_info:
+ assert_equal(np.array([1, 2]), np.matrix([1, 2]))
+ msg = str(exc_info.value)
+ msg_reference = textwrap.dedent("""\
+
+ Arrays are not equal
+
+ (shapes (2,), (1, 2) mismatch)
+ ACTUAL: array([1, 2])
+ DESIRED: matrix([[1, 2]])""")
+ assert_equal(msg, msg_reference)
+
+
+def test_array_almost_equal_matrix():
+ # Matrix slicing keeps things 2-D, while array does not necessarily.
+ # See gh-8452.
+ # 2018-04-29: moved here from testing.tests.test_utils.
+ m1 = np.matrix([[1., 2.]])
+ m2 = np.matrix([[1., np.nan]])
+ m3 = np.matrix([[1., -np.inf]])
+ m4 = np.matrix([[np.nan, np.inf]])
+ m5 = np.matrix([[1., 2.], [np.nan, np.inf]])
+ for assert_func in assert_array_almost_equal, assert_almost_equal:
+ for m in m1, m2, m3, m4, m5:
+ assert_func(m, m)
+ a = np.array(m)
+ assert_func(a, m)
+ assert_func(m, a)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_masked_matrix.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_masked_matrix.py
new file mode 100644
index 0000000000000000000000000000000000000000..5303e6ce723f69b6fa8007857e6f0943e5010f5a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_masked_matrix.py
@@ -0,0 +1,232 @@
+import pickle
+
+import numpy as np
+from numpy.testing import assert_warns
+from numpy.ma.testutils import (assert_, assert_equal, assert_raises,
+ assert_array_equal)
+from numpy.ma.core import (masked_array, masked_values, masked, allequal,
+ MaskType, getmask, MaskedArray, nomask,
+ log, add, hypot, divide)
+from numpy.ma.extras import mr_
+
+
+class MMatrix(MaskedArray, np.matrix,):
+
+ def __new__(cls, data, mask=nomask):
+ mat = np.matrix(data)
+ _data = MaskedArray.__new__(cls, data=mat, mask=mask)
+ return _data
+
+ def __array_finalize__(self, obj):
+ np.matrix.__array_finalize__(self, obj)
+ MaskedArray.__array_finalize__(self, obj)
+ return
+
+ @property
+ def _series(self):
+ _view = self.view(MaskedArray)
+ _view._sharedmask = False
+ return _view
+
+
+class TestMaskedMatrix:
+ def test_matrix_indexing(self):
+ # Tests conversions and indexing
+ x1 = np.matrix([[1, 2, 3], [4, 3, 2]])
+ x2 = masked_array(x1, mask=[[1, 0, 0], [0, 1, 0]])
+ x3 = masked_array(x1, mask=[[0, 1, 0], [1, 0, 0]])
+ x4 = masked_array(x1)
+ # test conversion to strings
+ str(x2) # raises?
+ repr(x2) # raises?
+ # tests of indexing
+ assert_(type(x2[1, 0]) is type(x1[1, 0]))
+ assert_(x1[1, 0] == x2[1, 0])
+ assert_(x2[1, 1] is masked)
+ assert_equal(x1[0, 2], x2[0, 2])
+ assert_equal(x1[0, 1:], x2[0, 1:])
+ assert_equal(x1[:, 2], x2[:, 2])
+ assert_equal(x1[:], x2[:])
+ assert_equal(x1[1:], x3[1:])
+ x1[0, 2] = 9
+ x2[0, 2] = 9
+ assert_equal(x1, x2)
+ x1[0, 1:] = 99
+ x2[0, 1:] = 99
+ assert_equal(x1, x2)
+ x2[0, 1] = masked
+ assert_equal(x1, x2)
+ x2[0, 1:] = masked
+ assert_equal(x1, x2)
+ x2[0, :] = x1[0, :]
+ x2[0, 1] = masked
+ assert_(allequal(getmask(x2), np.array([[0, 1, 0], [0, 1, 0]])))
+ x3[1, :] = masked_array([1, 2, 3], [1, 1, 0])
+ assert_(allequal(getmask(x3)[1], masked_array([1, 1, 0])))
+ assert_(allequal(getmask(x3[1]), masked_array([1, 1, 0])))
+ x4[1, :] = masked_array([1, 2, 3], [1, 1, 0])
+ assert_(allequal(getmask(x4[1]), masked_array([1, 1, 0])))
+ assert_(allequal(x4[1], masked_array([1, 2, 3])))
+ x1 = np.matrix(np.arange(5) * 1.0)
+ x2 = masked_values(x1, 3.0)
+ assert_equal(x1, x2)
+ assert_(allequal(masked_array([0, 0, 0, 1, 0], dtype=MaskType),
+ x2.mask))
+ assert_equal(3.0, x2.fill_value)
+
+ def test_pickling_subbaseclass(self):
+ # Test pickling w/ a subclass of ndarray
+ a = masked_array(np.matrix(list(range(10))), mask=[1, 0, 1, 0, 0] * 2)
+ for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
+ a_pickled = pickle.loads(pickle.dumps(a, protocol=proto))
+ assert_equal(a_pickled._mask, a._mask)
+ assert_equal(a_pickled, a)
+ assert_(isinstance(a_pickled._data, np.matrix))
+
+ def test_count_mean_with_matrix(self):
+ m = masked_array(np.matrix([[1, 2], [3, 4]]), mask=np.zeros((2, 2)))
+
+ assert_equal(m.count(axis=0).shape, (1, 2))
+ assert_equal(m.count(axis=1).shape, (2, 1))
+
+ # Make sure broadcasting inside mean and var work
+ assert_equal(m.mean(axis=0), [[2., 3.]])
+ assert_equal(m.mean(axis=1), [[1.5], [3.5]])
+
+ def test_flat(self):
+ # Test that flat can return items even for matrices [#4585, #4615]
+ # test simple access
+ test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
+ assert_equal(test.flat[1], 2)
+ assert_equal(test.flat[2], masked)
+ assert_(np.all(test.flat[0:2] == test[0, 0:2]))
+ # Test flat on masked_matrices
+ test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
+ test.flat = masked_array([3, 2, 1], mask=[1, 0, 0])
+ control = masked_array(np.matrix([[3, 2, 1]]), mask=[1, 0, 0])
+ assert_equal(test, control)
+ # Test setting
+ test = masked_array(np.matrix([[1, 2, 3]]), mask=[0, 0, 1])
+ testflat = test.flat
+ testflat[:] = testflat[[2, 1, 0]]
+ assert_equal(test, control)
+ testflat[0] = 9
+ # test that matrices keep the correct shape (#4615)
+ a = masked_array(np.matrix(np.eye(2)), mask=0)
+ b = a.flat
+ b01 = b[:2]
+ assert_equal(b01.data, np.array([[1., 0.]]))
+ assert_equal(b01.mask, np.array([[False, False]]))
+
+ def test_allany_onmatrices(self):
+ x = np.array([[0.13, 0.26, 0.90],
+ [0.28, 0.33, 0.63],
+ [0.31, 0.87, 0.70]])
+ X = np.matrix(x)
+ m = np.array([[True, False, False],
+ [False, False, False],
+ [True, True, False]], dtype=np.bool)
+ mX = masked_array(X, mask=m)
+ mXbig = (mX > 0.5)
+ mXsmall = (mX < 0.5)
+
+ assert_(not mXbig.all())
+ assert_(mXbig.any())
+ assert_equal(mXbig.all(0), np.matrix([False, False, True]))
+ assert_equal(mXbig.all(1), np.matrix([False, False, True]).T)
+ assert_equal(mXbig.any(0), np.matrix([False, False, True]))
+ assert_equal(mXbig.any(1), np.matrix([True, True, True]).T)
+
+ assert_(not mXsmall.all())
+ assert_(mXsmall.any())
+ assert_equal(mXsmall.all(0), np.matrix([True, True, False]))
+ assert_equal(mXsmall.all(1), np.matrix([False, False, False]).T)
+ assert_equal(mXsmall.any(0), np.matrix([True, True, False]))
+ assert_equal(mXsmall.any(1), np.matrix([True, True, False]).T)
+
+ def test_compressed(self):
+ a = masked_array(np.matrix([1, 2, 3, 4]), mask=[0, 0, 0, 0])
+ b = a.compressed()
+ assert_equal(b, a)
+ assert_(isinstance(b, np.matrix))
+ a[0, 0] = masked
+ b = a.compressed()
+ assert_equal(b, [[2, 3, 4]])
+
+ def test_ravel(self):
+ a = masked_array(np.matrix([1, 2, 3, 4, 5]), mask=[[0, 1, 0, 0, 0]])
+ aravel = a.ravel()
+ assert_equal(aravel.shape, (1, 5))
+ assert_equal(aravel._mask.shape, a.shape)
+
+ def test_view(self):
+ # Test view w/ flexible dtype
+ iterator = list(zip(np.arange(10), np.random.rand(10)))
+ data = np.array(iterator)
+ a = masked_array(iterator, dtype=[('a', float), ('b', float)])
+ a.mask[0] = (1, 0)
+ test = a.view((float, 2), np.matrix)
+ assert_equal(test, data)
+ assert_(isinstance(test, np.matrix))
+ assert_(not isinstance(test, MaskedArray))
+
+
+class TestSubclassing:
+ # Test suite for masked subclasses of ndarray.
+
+ def setup_method(self):
+ x = np.arange(5, dtype='float')
+ mx = MMatrix(x, mask=[0, 1, 0, 0, 0])
+ self.data = (x, mx)
+
+ def test_maskedarray_subclassing(self):
+ # Tests subclassing MaskedArray
+ (x, mx) = self.data
+ assert_(isinstance(mx._data, np.matrix))
+
+ def test_masked_unary_operations(self):
+ # Tests masked_unary_operation
+ (x, mx) = self.data
+ with np.errstate(divide='ignore'):
+ assert_(isinstance(log(mx), MMatrix))
+ assert_equal(log(x), np.log(x))
+
+ def test_masked_binary_operations(self):
+ # Tests masked_binary_operation
+ (x, mx) = self.data
+ # Result should be a MMatrix
+ assert_(isinstance(add(mx, mx), MMatrix))
+ assert_(isinstance(add(mx, x), MMatrix))
+ # Result should work
+ assert_equal(add(mx, x), mx+x)
+ assert_(isinstance(add(mx, mx)._data, np.matrix))
+ with assert_warns(DeprecationWarning):
+ assert_(isinstance(add.outer(mx, mx), MMatrix))
+ assert_(isinstance(hypot(mx, mx), MMatrix))
+ assert_(isinstance(hypot(mx, x), MMatrix))
+
+ def test_masked_binary_operations2(self):
+ # Tests domained_masked_binary_operation
+ (x, mx) = self.data
+ xmx = masked_array(mx.data.__array__(), mask=mx.mask)
+ assert_(isinstance(divide(mx, mx), MMatrix))
+ assert_(isinstance(divide(mx, x), MMatrix))
+ assert_equal(divide(mx, mx), divide(xmx, xmx))
+
+class TestConcatenator:
+ # Tests for mr_, the equivalent of r_ for masked arrays.
+
+ def test_matrix_builder(self):
+ assert_raises(np.ma.MAError, lambda: mr_['1, 2; 3, 4'])
+
+ def test_matrix(self):
+ # Test consistency with unmasked version. If we ever deprecate
+ # matrix, this test should either still pass, or both actual and
+ # expected should fail to be build.
+ actual = mr_['r', 1, 2, 3]
+ expected = np.ma.array(np.r_['r', 1, 2, 3])
+ assert_array_equal(actual, expected)
+
+ # outer type is masked array, inner type is matrix
+ assert_equal(type(actual), type(expected))
+ assert_equal(type(actual.data), type(expected.data))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_matrix_linalg.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_matrix_linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..106c2e38217a633829329a94df077c097fbcbf7a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_matrix_linalg.py
@@ -0,0 +1,93 @@
+""" Test functions for linalg module using the matrix class."""
+import numpy as np
+
+from numpy.linalg.tests.test_linalg import (
+ LinalgCase, apply_tag, TestQR as _TestQR, LinalgTestCase,
+ _TestNorm2D, _TestNormDoubleBase, _TestNormSingleBase, _TestNormInt64Base,
+ SolveCases, InvCases, EigvalsCases, EigCases, SVDCases, CondCases,
+ PinvCases, DetCases, LstsqCases)
+
+
+CASES = []
+
+# square test cases
+CASES += apply_tag('square', [
+ LinalgCase("0x0_matrix",
+ np.empty((0, 0), dtype=np.double).view(np.matrix),
+ np.empty((0, 1), dtype=np.double).view(np.matrix),
+ tags={'size-0'}),
+ LinalgCase("matrix_b_only",
+ np.array([[1., 2.], [3., 4.]]),
+ np.matrix([2., 1.]).T),
+ LinalgCase("matrix_a_and_b",
+ np.matrix([[1., 2.], [3., 4.]]),
+ np.matrix([2., 1.]).T),
+])
+
+# hermitian test-cases
+CASES += apply_tag('hermitian', [
+ LinalgCase("hmatrix_a_and_b",
+ np.matrix([[1., 2.], [2., 1.]]),
+ None),
+])
+# No need to make generalized or strided cases for matrices.
+
+
+class MatrixTestCase(LinalgTestCase):
+ TEST_CASES = CASES
+
+
+class TestSolveMatrix(SolveCases, MatrixTestCase):
+ pass
+
+
+class TestInvMatrix(InvCases, MatrixTestCase):
+ pass
+
+
+class TestEigvalsMatrix(EigvalsCases, MatrixTestCase):
+ pass
+
+
+class TestEigMatrix(EigCases, MatrixTestCase):
+ pass
+
+
+class TestSVDMatrix(SVDCases, MatrixTestCase):
+ pass
+
+
+class TestCondMatrix(CondCases, MatrixTestCase):
+ pass
+
+
+class TestPinvMatrix(PinvCases, MatrixTestCase):
+ pass
+
+
+class TestDetMatrix(DetCases, MatrixTestCase):
+ pass
+
+
+class TestLstsqMatrix(LstsqCases, MatrixTestCase):
+ pass
+
+
+class _TestNorm2DMatrix(_TestNorm2D):
+ array = np.matrix
+
+
+class TestNormDoubleMatrix(_TestNorm2DMatrix, _TestNormDoubleBase):
+ pass
+
+
+class TestNormSingleMatrix(_TestNorm2DMatrix, _TestNormSingleBase):
+ pass
+
+
+class TestNormInt64Matrix(_TestNorm2DMatrix, _TestNormInt64Base):
+ pass
+
+
+class TestQRMatrix(_TestQR):
+ array = np.matrix
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_multiarray.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_multiarray.py
new file mode 100644
index 0000000000000000000000000000000000000000..638d0d1534deba060140ffda3b61950a0b4f815d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/matrixlib/tests/test_multiarray.py
@@ -0,0 +1,16 @@
+import numpy as np
+from numpy.testing import assert_, assert_equal, assert_array_equal
+
+class TestView:
+ def test_type(self):
+ x = np.array([1, 2, 3])
+ assert_(isinstance(x.view(np.matrix), np.matrix))
+
+ def test_keywords(self):
+ x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])
+ # We must be specific about the endianness here:
+ y = x.view(dtype='>> from numpy.polynomial import Chebyshev
+ >>> xdata = [1, 2, 3, 4]
+ >>> ydata = [1, 4, 9, 16]
+ >>> c = Chebyshev.fit(xdata, ydata, deg=1)
+
+is preferred over the `chebyshev.chebfit` function from the
+``np.polynomial.chebyshev`` module::
+
+ >>> from numpy.polynomial.chebyshev import chebfit
+ >>> c = chebfit(xdata, ydata, deg=1)
+
+See :doc:`routines.polynomials.classes` for more details.
+
+Convenience Classes
+===================
+
+The following lists the various constants and methods common to all of
+the classes representing the various kinds of polynomials. In the following,
+the term ``Poly`` represents any one of the convenience classes (e.g.
+`~polynomial.Polynomial`, `~chebyshev.Chebyshev`, `~hermite.Hermite`, etc.)
+while the lowercase ``p`` represents an **instance** of a polynomial class.
+
+Constants
+---------
+
+- ``Poly.domain`` -- Default domain
+- ``Poly.window`` -- Default window
+- ``Poly.basis_name`` -- String used to represent the basis
+- ``Poly.maxpower`` -- Maximum value ``n`` such that ``p**n`` is allowed
+- ``Poly.nickname`` -- String used in printing
+
+Creation
+--------
+
+Methods for creating polynomial instances.
+
+- ``Poly.basis(degree)`` -- Basis polynomial of given degree
+- ``Poly.identity()`` -- ``p`` where ``p(x) = x`` for all ``x``
+- ``Poly.fit(x, y, deg)`` -- ``p`` of degree ``deg`` with coefficients
+ determined by the least-squares fit to the data ``x``, ``y``
+- ``Poly.fromroots(roots)`` -- ``p`` with specified roots
+- ``p.copy()`` -- Create a copy of ``p``
+
+Conversion
+----------
+
+Methods for converting a polynomial instance of one kind to another.
+
+- ``p.cast(Poly)`` -- Convert ``p`` to instance of kind ``Poly``
+- ``p.convert(Poly)`` -- Convert ``p`` to instance of kind ``Poly`` or map
+ between ``domain`` and ``window``
+
+Calculus
+--------
+- ``p.deriv()`` -- Take the derivative of ``p``
+- ``p.integ()`` -- Integrate ``p``
+
+Validation
+----------
+- ``Poly.has_samecoef(p1, p2)`` -- Check if coefficients match
+- ``Poly.has_samedomain(p1, p2)`` -- Check if domains match
+- ``Poly.has_sametype(p1, p2)`` -- Check if types match
+- ``Poly.has_samewindow(p1, p2)`` -- Check if windows match
+
+Misc
+----
+- ``p.linspace()`` -- Return ``x, p(x)`` at equally-spaced points in ``domain``
+- ``p.mapparms()`` -- Return the parameters for the linear mapping between
+ ``domain`` and ``window``.
+- ``p.roots()`` -- Return the roots of ``p``.
+- ``p.trim()`` -- Remove trailing coefficients.
+- ``p.cutdeg(degree)`` -- Truncate ``p`` to given degree
+- ``p.truncate(size)`` -- Truncate ``p`` to given size
+
+"""
+from .polynomial import Polynomial
+from .chebyshev import Chebyshev
+from .legendre import Legendre
+from .hermite import Hermite
+from .hermite_e import HermiteE
+from .laguerre import Laguerre
+
+__all__ = [
+ "set_default_printstyle",
+ "polynomial", "Polynomial",
+ "chebyshev", "Chebyshev",
+ "legendre", "Legendre",
+ "hermite", "Hermite",
+ "hermite_e", "HermiteE",
+ "laguerre", "Laguerre",
+]
+
+
+def set_default_printstyle(style):
+ """
+ Set the default format for the string representation of polynomials.
+
+ Values for ``style`` must be valid inputs to ``__format__``, i.e. 'ascii'
+ or 'unicode'.
+
+ Parameters
+ ----------
+ style : str
+ Format string for default printing style. Must be either 'ascii' or
+ 'unicode'.
+
+ Notes
+ -----
+ The default format depends on the platform: 'unicode' is used on
+ Unix-based systems and 'ascii' on Windows. This determination is based on
+ default font support for the unicode superscript and subscript ranges.
+
+ Examples
+ --------
+ >>> p = np.polynomial.Polynomial([1, 2, 3])
+ >>> c = np.polynomial.Chebyshev([1, 2, 3])
+ >>> np.polynomial.set_default_printstyle('unicode')
+ >>> print(p)
+ 1.0 + 2.0·x + 3.0·x²
+ >>> print(c)
+ 1.0 + 2.0·T₁(x) + 3.0·T₂(x)
+ >>> np.polynomial.set_default_printstyle('ascii')
+ >>> print(p)
+ 1.0 + 2.0 x + 3.0 x**2
+ >>> print(c)
+ 1.0 + 2.0 T_1(x) + 3.0 T_2(x)
+ >>> # Formatting supersedes all class/package-level defaults
+ >>> print(f"{p:unicode}")
+ 1.0 + 2.0·x + 3.0·x²
+ """
+ if style not in ('unicode', 'ascii'):
+ raise ValueError(
+ f"Unsupported format string '{style}'. Valid options are 'ascii' "
+ f"and 'unicode'"
+ )
+ _use_unicode = True
+ if style == 'ascii':
+ _use_unicode = False
+ from ._polybase import ABCPolyBase
+ ABCPolyBase._use_unicode = _use_unicode
+
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..c5dccfe16dee8889508150ecfe963297f24a5fd0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/__init__.pyi
@@ -0,0 +1,24 @@
+from typing import Final, Literal
+
+from .polynomial import Polynomial
+from .chebyshev import Chebyshev
+from .legendre import Legendre
+from .hermite import Hermite
+from .hermite_e import HermiteE
+from .laguerre import Laguerre
+from . import polynomial, chebyshev, legendre, hermite, hermite_e, laguerre
+
+__all__ = [
+ "set_default_printstyle",
+ "polynomial", "Polynomial",
+ "chebyshev", "Chebyshev",
+ "legendre", "Legendre",
+ "hermite", "Hermite",
+ "hermite_e", "HermiteE",
+ "laguerre", "Laguerre",
+]
+
+def set_default_printstyle(style: Literal["ascii", "unicode"]) -> None: ...
+
+from numpy._pytesttester import PytestTester as _PytestTester
+test: Final[_PytestTester]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.py
new file mode 100644
index 0000000000000000000000000000000000000000..1c3d16c6efd7af25ef0cdfc32083802ecce2a92f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.py
@@ -0,0 +1,1197 @@
+"""
+Abstract base class for the various polynomial Classes.
+
+The ABCPolyBase class provides the methods needed to implement the common API
+for the various polynomial classes. It operates as a mixin, but uses the
+abc module from the stdlib, hence it is only available for Python >= 2.6.
+
+"""
+import os
+import abc
+import numbers
+from typing import Callable
+
+import numpy as np
+from . import polyutils as pu
+
+__all__ = ['ABCPolyBase']
+
+class ABCPolyBase(abc.ABC):
+ """An abstract base class for immutable series classes.
+
+ ABCPolyBase provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' along with the
+ methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Series coefficients in order of increasing degree, i.e.,
+ ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``, where
+ ``P_i`` is the basis polynomials of degree ``i``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is the derived class domain.
+ window : (2,) array_like, optional
+ Window, see domain for its use. The default value is the
+ derived class window.
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ Attributes
+ ----------
+ coef : (N,) ndarray
+ Series coefficients in order of increasing degree.
+ domain : (2,) ndarray
+ Domain that is mapped to window.
+ window : (2,) ndarray
+ Window that domain is mapped to.
+ symbol : str
+ Symbol representing the independent variable.
+
+ Class Attributes
+ ----------------
+ maxpower : int
+ Maximum power allowed, i.e., the largest number ``n`` such that
+ ``p(x)**n`` is allowed. This is to limit runaway polynomial size.
+ domain : (2,) ndarray
+ Default domain of the class.
+ window : (2,) ndarray
+ Default window of the class.
+
+ """
+
+ # Not hashable
+ __hash__ = None
+
+ # Opt out of numpy ufuncs and Python ops with ndarray subclasses.
+ __array_ufunc__ = None
+
+ # Limit runaway size. T_n^m has degree n*m
+ maxpower = 100
+
+ # Unicode character mappings for improved __str__
+ _superscript_mapping = str.maketrans({
+ "0": "⁰",
+ "1": "¹",
+ "2": "²",
+ "3": "³",
+ "4": "⁴",
+ "5": "⁵",
+ "6": "⁶",
+ "7": "⁷",
+ "8": "⁸",
+ "9": "⁹"
+ })
+ _subscript_mapping = str.maketrans({
+ "0": "₀",
+ "1": "₁",
+ "2": "₂",
+ "3": "₃",
+ "4": "₄",
+ "5": "₅",
+ "6": "₆",
+ "7": "₇",
+ "8": "₈",
+ "9": "₉"
+ })
+ # Some fonts don't support full unicode character ranges necessary for
+ # the full set of superscripts and subscripts, including common/default
+ # fonts in Windows shells/terminals. Therefore, default to ascii-only
+ # printing on windows.
+ _use_unicode = not os.name == 'nt'
+
+ @property
+ def symbol(self):
+ return self._symbol
+
+ @property
+ @abc.abstractmethod
+ def domain(self):
+ pass
+
+ @property
+ @abc.abstractmethod
+ def window(self):
+ pass
+
+ @property
+ @abc.abstractmethod
+ def basis_name(self):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _add(c1, c2):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _sub(c1, c2):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _mul(c1, c2):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _div(c1, c2):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _pow(c, pow, maxpower=None):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _val(x, c):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _int(c, m, k, lbnd, scl):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _der(c, m, scl):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _fit(x, y, deg, rcond, full):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _line(off, scl):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _roots(c):
+ pass
+
+ @staticmethod
+ @abc.abstractmethod
+ def _fromroots(r):
+ pass
+
+ def has_samecoef(self, other):
+ """Check if coefficients match.
+
+ Parameters
+ ----------
+ other : class instance
+ The other class must have the ``coef`` attribute.
+
+ Returns
+ -------
+ bool : boolean
+ True if the coefficients are the same, False otherwise.
+
+ """
+ if len(self.coef) != len(other.coef):
+ return False
+ elif not np.all(self.coef == other.coef):
+ return False
+ else:
+ return True
+
+ def has_samedomain(self, other):
+ """Check if domains match.
+
+ Parameters
+ ----------
+ other : class instance
+ The other class must have the ``domain`` attribute.
+
+ Returns
+ -------
+ bool : boolean
+ True if the domains are the same, False otherwise.
+
+ """
+ return np.all(self.domain == other.domain)
+
+ def has_samewindow(self, other):
+ """Check if windows match.
+
+ Parameters
+ ----------
+ other : class instance
+ The other class must have the ``window`` attribute.
+
+ Returns
+ -------
+ bool : boolean
+ True if the windows are the same, False otherwise.
+
+ """
+ return np.all(self.window == other.window)
+
+ def has_sametype(self, other):
+ """Check if types match.
+
+ Parameters
+ ----------
+ other : object
+ Class instance.
+
+ Returns
+ -------
+ bool : boolean
+ True if other is same class as self
+
+ """
+ return isinstance(other, self.__class__)
+
+ def _get_coefficients(self, other):
+ """Interpret other as polynomial coefficients.
+
+ The `other` argument is checked to see if it is of the same
+ class as self with identical domain and window. If so,
+ return its coefficients, otherwise return `other`.
+
+ Parameters
+ ----------
+ other : anything
+ Object to be checked.
+
+ Returns
+ -------
+ coef
+ The coefficients of`other` if it is a compatible instance,
+ of ABCPolyBase, otherwise `other`.
+
+ Raises
+ ------
+ TypeError
+ When `other` is an incompatible instance of ABCPolyBase.
+
+ """
+ if isinstance(other, ABCPolyBase):
+ if not isinstance(other, self.__class__):
+ raise TypeError("Polynomial types differ")
+ elif not np.all(self.domain == other.domain):
+ raise TypeError("Domains differ")
+ elif not np.all(self.window == other.window):
+ raise TypeError("Windows differ")
+ elif self.symbol != other.symbol:
+ raise ValueError("Polynomial symbols differ")
+ return other.coef
+ return other
+
+ def __init__(self, coef, domain=None, window=None, symbol='x'):
+ [coef] = pu.as_series([coef], trim=False)
+ self.coef = coef
+
+ if domain is not None:
+ [domain] = pu.as_series([domain], trim=False)
+ if len(domain) != 2:
+ raise ValueError("Domain has wrong number of elements.")
+ self.domain = domain
+
+ if window is not None:
+ [window] = pu.as_series([window], trim=False)
+ if len(window) != 2:
+ raise ValueError("Window has wrong number of elements.")
+ self.window = window
+
+ # Validation for symbol
+ try:
+ if not symbol.isidentifier():
+ raise ValueError(
+ "Symbol string must be a valid Python identifier"
+ )
+ # If a user passes in something other than a string, the above
+ # results in an AttributeError. Catch this and raise a more
+ # informative exception
+ except AttributeError:
+ raise TypeError("Symbol must be a non-empty string")
+
+ self._symbol = symbol
+
+ def __repr__(self):
+ coef = repr(self.coef)[6:-1]
+ domain = repr(self.domain)[6:-1]
+ window = repr(self.window)[6:-1]
+ name = self.__class__.__name__
+ return (f"{name}({coef}, domain={domain}, window={window}, "
+ f"symbol='{self.symbol}')")
+
+ def __format__(self, fmt_str):
+ if fmt_str == '':
+ return self.__str__()
+ if fmt_str not in ('ascii', 'unicode'):
+ raise ValueError(
+ f"Unsupported format string '{fmt_str}' passed to "
+ f"{self.__class__}.__format__. Valid options are "
+ f"'ascii' and 'unicode'"
+ )
+ if fmt_str == 'ascii':
+ return self._generate_string(self._str_term_ascii)
+ return self._generate_string(self._str_term_unicode)
+
+ def __str__(self):
+ if self._use_unicode:
+ return self._generate_string(self._str_term_unicode)
+ return self._generate_string(self._str_term_ascii)
+
+ def _generate_string(self, term_method):
+ """
+ Generate the full string representation of the polynomial, using
+ ``term_method`` to generate each polynomial term.
+ """
+ # Get configuration for line breaks
+ linewidth = np.get_printoptions().get('linewidth', 75)
+ if linewidth < 1:
+ linewidth = 1
+ out = pu.format_float(self.coef[0])
+
+ off, scale = self.mapparms()
+
+ scaled_symbol, needs_parens = self._format_term(pu.format_float,
+ off, scale)
+ if needs_parens:
+ scaled_symbol = '(' + scaled_symbol + ')'
+
+ for i, coef in enumerate(self.coef[1:]):
+ out += " "
+ power = str(i + 1)
+ # Polynomial coefficient
+ # The coefficient array can be an object array with elements that
+ # will raise a TypeError with >= 0 (e.g. strings or Python
+ # complex). In this case, represent the coefficient as-is.
+ try:
+ if coef >= 0:
+ next_term = "+ " + pu.format_float(coef, parens=True)
+ else:
+ next_term = "- " + pu.format_float(-coef, parens=True)
+ except TypeError:
+ next_term = f"+ {coef}"
+ # Polynomial term
+ next_term += term_method(power, scaled_symbol)
+ # Length of the current line with next term added
+ line_len = len(out.split('\n')[-1]) + len(next_term)
+ # If not the last term in the polynomial, it will be two
+ # characters longer due to the +/- with the next term
+ if i < len(self.coef[1:]) - 1:
+ line_len += 2
+ # Handle linebreaking
+ if line_len >= linewidth:
+ next_term = next_term.replace(" ", "\n", 1)
+ out += next_term
+ return out
+
+ @classmethod
+ def _str_term_unicode(cls, i, arg_str):
+ """
+ String representation of single polynomial term using unicode
+ characters for superscripts and subscripts.
+ """
+ if cls.basis_name is None:
+ raise NotImplementedError(
+ "Subclasses must define either a basis_name, or override "
+ "_str_term_unicode(cls, i, arg_str)"
+ )
+ return (f"·{cls.basis_name}{i.translate(cls._subscript_mapping)}"
+ f"({arg_str})")
+
+ @classmethod
+ def _str_term_ascii(cls, i, arg_str):
+ """
+ String representation of a single polynomial term using ** and _ to
+ represent superscripts and subscripts, respectively.
+ """
+ if cls.basis_name is None:
+ raise NotImplementedError(
+ "Subclasses must define either a basis_name, or override "
+ "_str_term_ascii(cls, i, arg_str)"
+ )
+ return f" {cls.basis_name}_{i}({arg_str})"
+
+ @classmethod
+ def _repr_latex_term(cls, i, arg_str, needs_parens):
+ if cls.basis_name is None:
+ raise NotImplementedError(
+ "Subclasses must define either a basis name, or override "
+ "_repr_latex_term(i, arg_str, needs_parens)")
+ # since we always add parens, we don't care if the expression needs them
+ return f"{{{cls.basis_name}}}_{{{i}}}({arg_str})"
+
+ @staticmethod
+ def _repr_latex_scalar(x, parens=False):
+ # TODO: we're stuck with disabling math formatting until we handle
+ # exponents in this function
+ return r'\text{{{}}}'.format(pu.format_float(x, parens=parens))
+
+ def _format_term(self, scalar_format: Callable, off: float, scale: float):
+ """ Format a single term in the expansion """
+ if off == 0 and scale == 1:
+ term = self.symbol
+ needs_parens = False
+ elif scale == 1:
+ term = f"{scalar_format(off)} + {self.symbol}"
+ needs_parens = True
+ elif off == 0:
+ term = f"{scalar_format(scale)}{self.symbol}"
+ needs_parens = True
+ else:
+ term = (
+ f"{scalar_format(off)} + "
+ f"{scalar_format(scale)}{self.symbol}"
+ )
+ needs_parens = True
+ return term, needs_parens
+
+ def _repr_latex_(self):
+ # get the scaled argument string to the basis functions
+ off, scale = self.mapparms()
+ term, needs_parens = self._format_term(self._repr_latex_scalar,
+ off, scale)
+
+ mute = r"\color{{LightGray}}{{{}}}".format
+
+ parts = []
+ for i, c in enumerate(self.coef):
+ # prevent duplication of + and - signs
+ if i == 0:
+ coef_str = f"{self._repr_latex_scalar(c)}"
+ elif not isinstance(c, numbers.Real):
+ coef_str = f" + ({self._repr_latex_scalar(c)})"
+ elif c >= 0:
+ coef_str = f" + {self._repr_latex_scalar(c, parens=True)}"
+ else:
+ coef_str = f" - {self._repr_latex_scalar(-c, parens=True)}"
+
+ # produce the string for the term
+ term_str = self._repr_latex_term(i, term, needs_parens)
+ if term_str == '1':
+ part = coef_str
+ else:
+ part = rf"{coef_str}\,{term_str}"
+
+ if c == 0:
+ part = mute(part)
+
+ parts.append(part)
+
+ if parts:
+ body = ''.join(parts)
+ else:
+ # in case somehow there are no coefficients at all
+ body = '0'
+
+ return rf"${self.symbol} \mapsto {body}$"
+
+
+
+ # Pickle and copy
+
+ def __getstate__(self):
+ ret = self.__dict__.copy()
+ ret['coef'] = self.coef.copy()
+ ret['domain'] = self.domain.copy()
+ ret['window'] = self.window.copy()
+ ret['symbol'] = self.symbol
+ return ret
+
+ def __setstate__(self, dict):
+ self.__dict__ = dict
+
+ # Call
+
+ def __call__(self, arg):
+ arg = pu.mapdomain(arg, self.domain, self.window)
+ return self._val(arg, self.coef)
+
+ def __iter__(self):
+ return iter(self.coef)
+
+ def __len__(self):
+ return len(self.coef)
+
+ # Numeric properties.
+
+ def __neg__(self):
+ return self.__class__(
+ -self.coef, self.domain, self.window, self.symbol
+ )
+
+ def __pos__(self):
+ return self
+
+ def __add__(self, other):
+ othercoef = self._get_coefficients(other)
+ try:
+ coef = self._add(self.coef, othercoef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __sub__(self, other):
+ othercoef = self._get_coefficients(other)
+ try:
+ coef = self._sub(self.coef, othercoef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __mul__(self, other):
+ othercoef = self._get_coefficients(other)
+ try:
+ coef = self._mul(self.coef, othercoef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __truediv__(self, other):
+ # there is no true divide if the rhs is not a Number, although it
+ # could return the first n elements of an infinite series.
+ # It is hard to see where n would come from, though.
+ if not isinstance(other, numbers.Number) or isinstance(other, bool):
+ raise TypeError(
+ f"unsupported types for true division: "
+ f"'{type(self)}', '{type(other)}'"
+ )
+ return self.__floordiv__(other)
+
+ def __floordiv__(self, other):
+ res = self.__divmod__(other)
+ if res is NotImplemented:
+ return res
+ return res[0]
+
+ def __mod__(self, other):
+ res = self.__divmod__(other)
+ if res is NotImplemented:
+ return res
+ return res[1]
+
+ def __divmod__(self, other):
+ othercoef = self._get_coefficients(other)
+ try:
+ quo, rem = self._div(self.coef, othercoef)
+ except ZeroDivisionError:
+ raise
+ except Exception:
+ return NotImplemented
+ quo = self.__class__(quo, self.domain, self.window, self.symbol)
+ rem = self.__class__(rem, self.domain, self.window, self.symbol)
+ return quo, rem
+
+ def __pow__(self, other):
+ coef = self._pow(self.coef, other, maxpower=self.maxpower)
+ res = self.__class__(coef, self.domain, self.window, self.symbol)
+ return res
+
+ def __radd__(self, other):
+ try:
+ coef = self._add(other, self.coef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __rsub__(self, other):
+ try:
+ coef = self._sub(other, self.coef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __rmul__(self, other):
+ try:
+ coef = self._mul(other, self.coef)
+ except Exception:
+ return NotImplemented
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def __rdiv__(self, other):
+ # set to __floordiv__ /.
+ return self.__rfloordiv__(other)
+
+ def __rtruediv__(self, other):
+ # An instance of ABCPolyBase is not considered a
+ # Number.
+ return NotImplemented
+
+ def __rfloordiv__(self, other):
+ res = self.__rdivmod__(other)
+ if res is NotImplemented:
+ return res
+ return res[0]
+
+ def __rmod__(self, other):
+ res = self.__rdivmod__(other)
+ if res is NotImplemented:
+ return res
+ return res[1]
+
+ def __rdivmod__(self, other):
+ try:
+ quo, rem = self._div(other, self.coef)
+ except ZeroDivisionError:
+ raise
+ except Exception:
+ return NotImplemented
+ quo = self.__class__(quo, self.domain, self.window, self.symbol)
+ rem = self.__class__(rem, self.domain, self.window, self.symbol)
+ return quo, rem
+
+ def __eq__(self, other):
+ res = (isinstance(other, self.__class__) and
+ np.all(self.domain == other.domain) and
+ np.all(self.window == other.window) and
+ (self.coef.shape == other.coef.shape) and
+ np.all(self.coef == other.coef) and
+ (self.symbol == other.symbol))
+ return res
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
+ #
+ # Extra methods.
+ #
+
+ def copy(self):
+ """Return a copy.
+
+ Returns
+ -------
+ new_series : series
+ Copy of self.
+
+ """
+ return self.__class__(self.coef, self.domain, self.window, self.symbol)
+
+ def degree(self):
+ """The degree of the series.
+
+ Returns
+ -------
+ degree : int
+ Degree of the series, one less than the number of coefficients.
+
+ Examples
+ --------
+
+ Create a polynomial object for ``1 + 7*x + 4*x**2``:
+
+ >>> poly = np.polynomial.Polynomial([1, 7, 4])
+ >>> print(poly)
+ 1.0 + 7.0·x + 4.0·x²
+ >>> poly.degree()
+ 2
+
+ Note that this method does not check for non-zero coefficients.
+ You must trim the polynomial to remove any trailing zeroes:
+
+ >>> poly = np.polynomial.Polynomial([1, 7, 0])
+ >>> print(poly)
+ 1.0 + 7.0·x + 0.0·x²
+ >>> poly.degree()
+ 2
+ >>> poly.trim().degree()
+ 1
+
+ """
+ return len(self) - 1
+
+ def cutdeg(self, deg):
+ """Truncate series to the given degree.
+
+ Reduce the degree of the series to `deg` by discarding the
+ high order terms. If `deg` is greater than the current degree a
+ copy of the current series is returned. This can be useful in least
+ squares where the coefficients of the high degree terms may be very
+ small.
+
+ Parameters
+ ----------
+ deg : non-negative int
+ The series is reduced to degree `deg` by discarding the high
+ order terms. The value of `deg` must be a non-negative integer.
+
+ Returns
+ -------
+ new_series : series
+ New instance of series with reduced degree.
+
+ """
+ return self.truncate(deg + 1)
+
+ def trim(self, tol=0):
+ """Remove trailing coefficients
+
+ Remove trailing coefficients until a coefficient is reached whose
+ absolute value greater than `tol` or the beginning of the series is
+ reached. If all the coefficients would be removed the series is set
+ to ``[0]``. A new series instance is returned with the new
+ coefficients. The current instance remains unchanged.
+
+ Parameters
+ ----------
+ tol : non-negative number.
+ All trailing coefficients less than `tol` will be removed.
+
+ Returns
+ -------
+ new_series : series
+ New instance of series with trimmed coefficients.
+
+ """
+ coef = pu.trimcoef(self.coef, tol)
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def truncate(self, size):
+ """Truncate series to length `size`.
+
+ Reduce the series to length `size` by discarding the high
+ degree terms. The value of `size` must be a positive integer. This
+ can be useful in least squares where the coefficients of the
+ high degree terms may be very small.
+
+ Parameters
+ ----------
+ size : positive int
+ The series is reduced to length `size` by discarding the high
+ degree terms. The value of `size` must be a positive integer.
+
+ Returns
+ -------
+ new_series : series
+ New instance of series with truncated coefficients.
+
+ """
+ isize = int(size)
+ if isize != size or isize < 1:
+ raise ValueError("size must be a positive integer")
+ if isize >= len(self.coef):
+ coef = self.coef
+ else:
+ coef = self.coef[:isize]
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def convert(self, domain=None, kind=None, window=None):
+ """Convert series to a different kind and/or domain and/or window.
+
+ Parameters
+ ----------
+ domain : array_like, optional
+ The domain of the converted series. If the value is None,
+ the default domain of `kind` is used.
+ kind : class, optional
+ The polynomial series type class to which the current instance
+ should be converted. If kind is None, then the class of the
+ current instance is used.
+ window : array_like, optional
+ The window of the converted series. If the value is None,
+ the default window of `kind` is used.
+
+ Returns
+ -------
+ new_series : series
+ The returned class can be of different type than the current
+ instance and/or have a different domain and/or different
+ window.
+
+ Notes
+ -----
+ Conversion between domains and class types can result in
+ numerically ill defined series.
+
+ """
+ if kind is None:
+ kind = self.__class__
+ if domain is None:
+ domain = kind.domain
+ if window is None:
+ window = kind.window
+ return self(kind.identity(domain, window=window, symbol=self.symbol))
+
+ def mapparms(self):
+ """Return the mapping parameters.
+
+ The returned values define a linear map ``off + scl*x`` that is
+ applied to the input arguments before the series is evaluated. The
+ map depends on the ``domain`` and ``window``; if the current
+ ``domain`` is equal to the ``window`` the resulting map is the
+ identity. If the coefficients of the series instance are to be
+ used by themselves outside this class, then the linear function
+ must be substituted for the ``x`` in the standard representation of
+ the base polynomials.
+
+ Returns
+ -------
+ off, scl : float or complex
+ The mapping function is defined by ``off + scl*x``.
+
+ Notes
+ -----
+ If the current domain is the interval ``[l1, r1]`` and the window
+ is ``[l2, r2]``, then the linear mapping function ``L`` is
+ defined by the equations::
+
+ L(l1) = l2
+ L(r1) = r2
+
+ """
+ return pu.mapparms(self.domain, self.window)
+
+ def integ(self, m=1, k=[], lbnd=None):
+ """Integrate.
+
+ Return a series instance that is the definite integral of the
+ current series.
+
+ Parameters
+ ----------
+ m : non-negative int
+ The number of integrations to perform.
+ k : array_like
+ Integration constants. The first constant is applied to the
+ first integration, the second to the second, and so on. The
+ list of values must less than or equal to `m` in length and any
+ missing values are set to zero.
+ lbnd : Scalar
+ The lower bound of the definite integral.
+
+ Returns
+ -------
+ new_series : series
+ A new series representing the integral. The domain is the same
+ as the domain of the integrated series.
+
+ """
+ off, scl = self.mapparms()
+ if lbnd is None:
+ lbnd = 0
+ else:
+ lbnd = off + scl*lbnd
+ coef = self._int(self.coef, m, k, lbnd, 1./scl)
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def deriv(self, m=1):
+ """Differentiate.
+
+ Return a series instance of that is the derivative of the current
+ series.
+
+ Parameters
+ ----------
+ m : non-negative int
+ Find the derivative of order `m`.
+
+ Returns
+ -------
+ new_series : series
+ A new series representing the derivative. The domain is the same
+ as the domain of the differentiated series.
+
+ """
+ off, scl = self.mapparms()
+ coef = self._der(self.coef, m, scl)
+ return self.__class__(coef, self.domain, self.window, self.symbol)
+
+ def roots(self):
+ """Return the roots of the series polynomial.
+
+ Compute the roots for the series. Note that the accuracy of the
+ roots decreases the further outside the `domain` they lie.
+
+ Returns
+ -------
+ roots : ndarray
+ Array containing the roots of the series.
+
+ """
+ roots = self._roots(self.coef)
+ return pu.mapdomain(roots, self.window, self.domain)
+
+ def linspace(self, n=100, domain=None):
+ """Return x, y values at equally spaced points in domain.
+
+ Returns the x, y values at `n` linearly spaced points across the
+ domain. Here y is the value of the polynomial at the points x. By
+ default the domain is the same as that of the series instance.
+ This method is intended mostly as a plotting aid.
+
+ Parameters
+ ----------
+ n : int, optional
+ Number of point pairs to return. The default value is 100.
+ domain : {None, array_like}, optional
+ If not None, the specified domain is used instead of that of
+ the calling instance. It should be of the form ``[beg,end]``.
+ The default is None which case the class domain is used.
+
+ Returns
+ -------
+ x, y : ndarray
+ x is equal to linspace(self.domain[0], self.domain[1], n) and
+ y is the series evaluated at element of x.
+
+ """
+ if domain is None:
+ domain = self.domain
+ x = np.linspace(domain[0], domain[1], n)
+ y = self(x)
+ return x, y
+
+ @classmethod
+ def fit(cls, x, y, deg, domain=None, rcond=None, full=False, w=None,
+ window=None, symbol='x'):
+ """Least squares fit to data.
+
+ Return a series instance that is the least squares fit to the data
+ `y` sampled at `x`. The domain of the returned instance can be
+ specified and this will often result in a superior fit with less
+ chance of ill conditioning.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,)
+ y-coordinates of the M sample points ``(x[i], y[i])``.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ domain : {None, [beg, end], []}, optional
+ Domain to use for the returned series. If ``None``,
+ then a minimal domain that covers the points `x` is chosen. If
+ ``[]`` the class domain is used. The default value was the
+ class domain in NumPy 1.4 and ``None`` in later versions.
+ The ``[]`` option was added in numpy 1.5.0.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller
+ than this relative to the largest singular value will be
+ ignored. The default value is ``len(x)*eps``, where eps is the
+ relative precision of the float type, about 2e-16 in most
+ cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False
+ (the default) just the coefficients are returned, when True
+ diagnostic information from the singular value decomposition is
+ also returned.
+ w : array_like, shape (M,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have
+ the same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+ window : {[beg, end]}, optional
+ Window to use for the returned series. The default
+ value is the default class domain
+ symbol : str, optional
+ Symbol representing the independent variable. Default is 'x'.
+
+ Returns
+ -------
+ new_series : series
+ A series that represents the least squares fit to the data and
+ has the domain and window specified in the call. If the
+ coefficients for the unscaled and unshifted basis polynomials are
+ of interest, do ``new_series.convert().coef``.
+
+ [resid, rank, sv, rcond] : list
+ These values are only returned if ``full == True``
+
+ - resid -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - sv -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `linalg.lstsq`.
+
+ """
+ if domain is None:
+ domain = pu.getdomain(x)
+ if domain[0] == domain[1]:
+ domain[0] -= 1
+ domain[1] += 1
+ elif type(domain) is list and len(domain) == 0:
+ domain = cls.domain
+
+ if window is None:
+ window = cls.window
+
+ xnew = pu.mapdomain(x, domain, window)
+ res = cls._fit(xnew, y, deg, w=w, rcond=rcond, full=full)
+ if full:
+ [coef, status] = res
+ return (
+ cls(coef, domain=domain, window=window, symbol=symbol), status
+ )
+ else:
+ coef = res
+ return cls(coef, domain=domain, window=window, symbol=symbol)
+
+ @classmethod
+ def fromroots(cls, roots, domain=[], window=None, symbol='x'):
+ """Return series instance that has the specified roots.
+
+ Returns a series representing the product
+ ``(x - r[0])*(x - r[1])*...*(x - r[n-1])``, where ``r`` is a
+ list of roots.
+
+ Parameters
+ ----------
+ roots : array_like
+ List of roots.
+ domain : {[], None, array_like}, optional
+ Domain for the resulting series. If None the domain is the
+ interval from the smallest root to the largest. If [] the
+ domain is the class domain. The default is [].
+ window : {None, array_like}, optional
+ Window for the returned series. If None the class window is
+ used. The default is None.
+ symbol : str, optional
+ Symbol representing the independent variable. Default is 'x'.
+
+ Returns
+ -------
+ new_series : series
+ Series with the specified roots.
+
+ """
+ [roots] = pu.as_series([roots], trim=False)
+ if domain is None:
+ domain = pu.getdomain(roots)
+ elif type(domain) is list and len(domain) == 0:
+ domain = cls.domain
+
+ if window is None:
+ window = cls.window
+
+ deg = len(roots)
+ off, scl = pu.mapparms(domain, window)
+ rnew = off + scl*roots
+ coef = cls._fromroots(rnew) / scl**deg
+ return cls(coef, domain=domain, window=window, symbol=symbol)
+
+ @classmethod
+ def identity(cls, domain=None, window=None, symbol='x'):
+ """Identity function.
+
+ If ``p`` is the returned series, then ``p(x) == x`` for all
+ values of x.
+
+ Parameters
+ ----------
+ domain : {None, array_like}, optional
+ If given, the array must be of the form ``[beg, end]``, where
+ ``beg`` and ``end`` are the endpoints of the domain. If None is
+ given then the class domain is used. The default is None.
+ window : {None, array_like}, optional
+ If given, the resulting array must be if the form
+ ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
+ the window. If None is given then the class window is used. The
+ default is None.
+ symbol : str, optional
+ Symbol representing the independent variable. Default is 'x'.
+
+ Returns
+ -------
+ new_series : series
+ Series of representing the identity.
+
+ """
+ if domain is None:
+ domain = cls.domain
+ if window is None:
+ window = cls.window
+ off, scl = pu.mapparms(window, domain)
+ coef = cls._line(off, scl)
+ return cls(coef, domain, window, symbol)
+
+ @classmethod
+ def basis(cls, deg, domain=None, window=None, symbol='x'):
+ """Series basis polynomial of degree `deg`.
+
+ Returns the series representing the basis polynomial of degree `deg`.
+
+ Parameters
+ ----------
+ deg : int
+ Degree of the basis polynomial for the series. Must be >= 0.
+ domain : {None, array_like}, optional
+ If given, the array must be of the form ``[beg, end]``, where
+ ``beg`` and ``end`` are the endpoints of the domain. If None is
+ given then the class domain is used. The default is None.
+ window : {None, array_like}, optional
+ If given, the resulting array must be if the form
+ ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
+ the window. If None is given then the class window is used. The
+ default is None.
+ symbol : str, optional
+ Symbol representing the independent variable. Default is 'x'.
+
+ Returns
+ -------
+ new_series : series
+ A series with the coefficient of the `deg` term set to one and
+ all others zero.
+
+ """
+ if domain is None:
+ domain = cls.domain
+ if window is None:
+ window = cls.window
+ ideg = int(deg)
+
+ if ideg != deg or ideg < 0:
+ raise ValueError("deg must be non-negative integer")
+ return cls([0]*ideg + [1], domain, window, symbol)
+
+ @classmethod
+ def cast(cls, series, domain=None, window=None):
+ """Convert series to series of this class.
+
+ The `series` is expected to be an instance of some polynomial
+ series of one of the types supported by by the numpy.polynomial
+ module, but could be some other class that supports the convert
+ method.
+
+ Parameters
+ ----------
+ series : series
+ The series instance to be converted.
+ domain : {None, array_like}, optional
+ If given, the array must be of the form ``[beg, end]``, where
+ ``beg`` and ``end`` are the endpoints of the domain. If None is
+ given then the class domain is used. The default is None.
+ window : {None, array_like}, optional
+ If given, the resulting array must be if the form
+ ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
+ the window. If None is given then the class window is used. The
+ default is None.
+
+ Returns
+ -------
+ new_series : series
+ A series of the same kind as the calling class and equal to
+ `series` when evaluated.
+
+ See Also
+ --------
+ convert : similar instance method
+
+ """
+ if domain is None:
+ domain = cls.domain
+ if window is None:
+ window = cls.window
+ return series.convert(domain, cls, window)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ca7ca628d5140c7584ef42a92fb633625ca8a657
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polybase.pyi
@@ -0,0 +1,287 @@
+import abc
+import decimal
+import numbers
+from collections.abc import Iterator, Mapping, Sequence
+from typing import (
+ Any,
+ ClassVar,
+ Final,
+ Generic,
+ Literal,
+ SupportsIndex,
+ TypeAlias,
+ TypeGuard,
+ overload,
+)
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import (
+ _FloatLike_co,
+ _NumberLike_co,
+
+ _ArrayLikeFloat_co,
+ _ArrayLikeComplex_co,
+)
+
+from ._polytypes import (
+ _AnyInt,
+ _CoefLike_co,
+
+ _Array2,
+ _Tuple2,
+
+ _Series,
+ _CoefSeries,
+
+ _SeriesLikeInt_co,
+ _SeriesLikeCoef_co,
+
+ _ArrayLikeCoefObject_co,
+ _ArrayLikeCoef_co,
+)
+
+from typing_extensions import LiteralString, TypeVar
+
+
+__all__: Final[Sequence[str]] = ("ABCPolyBase",)
+
+
+_NameCo = TypeVar("_NameCo", bound=LiteralString | None, covariant=True, default=LiteralString | None)
+_Self = TypeVar("_Self")
+_Other = TypeVar("_Other", bound=ABCPolyBase)
+
+_AnyOther: TypeAlias = ABCPolyBase | _CoefLike_co | _SeriesLikeCoef_co
+_Hundred: TypeAlias = Literal[100]
+
+
+class ABCPolyBase(Generic[_NameCo], metaclass=abc.ABCMeta):
+ __hash__: ClassVar[None] # type: ignore[assignment]
+ __array_ufunc__: ClassVar[None]
+
+ maxpower: ClassVar[_Hundred]
+ _superscript_mapping: ClassVar[Mapping[int, str]]
+ _subscript_mapping: ClassVar[Mapping[int, str]]
+ _use_unicode: ClassVar[bool]
+
+ basis_name: _NameCo
+ coef: _CoefSeries
+ domain: _Array2[np.inexact[Any] | np.object_]
+ window: _Array2[np.inexact[Any] | np.object_]
+
+ _symbol: LiteralString
+ @property
+ def symbol(self, /) -> LiteralString: ...
+
+ def __init__(
+ self,
+ /,
+ coef: _SeriesLikeCoef_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> None: ...
+
+ @overload
+ def __call__(self, /, arg: _Other) -> _Other: ...
+ # TODO: Once `_ShapeType@ndarray` is covariant and bounded (see #26081),
+ # additionally include 0-d arrays as input types with scalar return type.
+ @overload
+ def __call__(
+ self,
+ /,
+ arg: _FloatLike_co | decimal.Decimal | numbers.Real | np.object_,
+ ) -> np.float64 | np.complex128: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ arg: _NumberLike_co | numbers.Complex,
+ ) -> np.complex128: ...
+ @overload
+ def __call__(self, /, arg: _ArrayLikeFloat_co) -> (
+ npt.NDArray[np.float64]
+ | npt.NDArray[np.complex128]
+ | npt.NDArray[np.object_]
+ ): ...
+ @overload
+ def __call__(
+ self,
+ /,
+ arg: _ArrayLikeComplex_co,
+ ) -> npt.NDArray[np.complex128] | npt.NDArray[np.object_]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ arg: _ArrayLikeCoefObject_co,
+ ) -> npt.NDArray[np.object_]: ...
+
+ def __format__(self, fmt_str: str, /) -> str: ...
+ def __eq__(self, x: object, /) -> bool: ...
+ def __ne__(self, x: object, /) -> bool: ...
+ def __neg__(self: _Self, /) -> _Self: ...
+ def __pos__(self: _Self, /) -> _Self: ...
+ def __add__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __sub__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __mul__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __truediv__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __floordiv__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __mod__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __divmod__(self: _Self, x: _AnyOther, /) -> _Tuple2[_Self]: ...
+ def __pow__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __radd__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rsub__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rmul__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rtruediv__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rfloordiv__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rmod__(self: _Self, x: _AnyOther, /) -> _Self: ...
+ def __rdivmod__(self: _Self, x: _AnyOther, /) -> _Tuple2[_Self]: ...
+ def __len__(self, /) -> int: ...
+ def __iter__(self, /) -> Iterator[np.inexact[Any] | object]: ...
+ def __getstate__(self, /) -> dict[str, Any]: ...
+ def __setstate__(self, dict: dict[str, Any], /) -> None: ...
+
+ def has_samecoef(self, /, other: ABCPolyBase) -> bool: ...
+ def has_samedomain(self, /, other: ABCPolyBase) -> bool: ...
+ def has_samewindow(self, /, other: ABCPolyBase) -> bool: ...
+ @overload
+ def has_sametype(self: _Self, /, other: ABCPolyBase) -> TypeGuard[_Self]: ...
+ @overload
+ def has_sametype(self, /, other: object) -> Literal[False]: ...
+
+ def copy(self: _Self, /) -> _Self: ...
+ def degree(self, /) -> int: ...
+ def cutdeg(self: _Self, /) -> _Self: ...
+ def trim(self: _Self, /, tol: _FloatLike_co = ...) -> _Self: ...
+ def truncate(self: _Self, /, size: _AnyInt) -> _Self: ...
+
+ @overload
+ def convert(
+ self,
+ domain: None | _SeriesLikeCoef_co,
+ kind: type[_Other],
+ /,
+ window: None | _SeriesLikeCoef_co = ...,
+ ) -> _Other: ...
+ @overload
+ def convert(
+ self,
+ /,
+ domain: None | _SeriesLikeCoef_co = ...,
+ *,
+ kind: type[_Other],
+ window: None | _SeriesLikeCoef_co = ...,
+ ) -> _Other: ...
+ @overload
+ def convert(
+ self: _Self,
+ /,
+ domain: None | _SeriesLikeCoef_co = ...,
+ kind: None | type[_Self] = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ ) -> _Self: ...
+
+ def mapparms(self, /) -> _Tuple2[Any]: ...
+
+ def integ(
+ self: _Self, /,
+ m: SupportsIndex = ...,
+ k: _CoefLike_co | _SeriesLikeCoef_co = ...,
+ lbnd: None | _CoefLike_co = ...,
+ ) -> _Self: ...
+
+ def deriv(self: _Self, /, m: SupportsIndex = ...) -> _Self: ...
+
+ def roots(self, /) -> _CoefSeries: ...
+
+ def linspace(
+ self, /,
+ n: SupportsIndex = ...,
+ domain: None | _SeriesLikeCoef_co = ...,
+ ) -> _Tuple2[_Series[np.float64 | np.complex128]]: ...
+
+ @overload
+ @classmethod
+ def fit(
+ cls: type[_Self], /,
+ x: _SeriesLikeCoef_co,
+ y: _SeriesLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ rcond: _FloatLike_co = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> _Self: ...
+ @overload
+ @classmethod
+ def fit(
+ cls: type[_Self], /,
+ x: _SeriesLikeCoef_co,
+ y: _SeriesLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ rcond: _FloatLike_co = ...,
+ *,
+ full: Literal[True],
+ w: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> tuple[_Self, Sequence[np.inexact[Any] | np.int32]]: ...
+ @overload
+ @classmethod
+ def fit(
+ cls: type[_Self],
+ x: _SeriesLikeCoef_co,
+ y: _SeriesLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co,
+ rcond: _FloatLike_co,
+ full: Literal[True], /,
+ w: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> tuple[_Self, Sequence[np.inexact[Any] | np.int32]]: ...
+
+ @classmethod
+ def fromroots(
+ cls: type[_Self], /,
+ roots: _ArrayLikeCoef_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> _Self: ...
+
+ @classmethod
+ def identity(
+ cls: type[_Self], /,
+ domain: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> _Self: ...
+
+ @classmethod
+ def basis(
+ cls: type[_Self], /,
+ deg: _AnyInt,
+ domain: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ symbol: str = ...,
+ ) -> _Self: ...
+
+ @classmethod
+ def cast(
+ cls: type[_Self], /,
+ series: ABCPolyBase,
+ domain: None | _SeriesLikeCoef_co = ...,
+ window: None | _SeriesLikeCoef_co = ...,
+ ) -> _Self: ...
+
+ @classmethod
+ def _str_term_unicode(cls, /, i: str, arg_str: str) -> str: ...
+ @staticmethod
+ def _str_term_ascii(i: str, arg_str: str) -> str: ...
+ @staticmethod
+ def _repr_latex_term(i: str, arg_str: str, needs_parens: bool) -> str: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polytypes.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polytypes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b0794eb61831d396c339d54f34dc43c1554657b9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/_polytypes.pyi
@@ -0,0 +1,888 @@
+from collections.abc import Callable, Sequence
+from typing import (
+ Any,
+ Literal,
+ NoReturn,
+ Protocol,
+ SupportsIndex,
+ SupportsInt,
+ TypeAlias,
+ overload,
+ type_check_only,
+)
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import (
+ # array-likes
+ _ArrayLikeFloat_co,
+ _ArrayLikeComplex_co,
+ _ArrayLikeNumber_co,
+ _ArrayLikeObject_co,
+ _NestedSequence,
+ _SupportsArray,
+
+ # scalar-likes
+ _IntLike_co,
+ _FloatLike_co,
+ _ComplexLike_co,
+ _NumberLike_co,
+)
+
+from typing_extensions import LiteralString, TypeVar
+
+
+_T = TypeVar("_T")
+_T_contra = TypeVar("_T_contra", contravariant=True)
+_Self = TypeVar("_Self")
+_SCT = TypeVar("_SCT", bound=np.number[Any] | np.bool | np.object_)
+
+# compatible with e.g. int, float, complex, Decimal, Fraction, and ABCPolyBase
+@type_check_only
+class _SupportsCoefOps(Protocol[_T_contra]):
+ def __eq__(self, x: object, /) -> bool: ...
+ def __ne__(self, x: object, /) -> bool: ...
+
+ def __neg__(self: _Self, /) -> _Self: ...
+ def __pos__(self: _Self, /) -> _Self: ...
+
+ def __add__(self: _Self, x: _T_contra, /) -> _Self: ...
+ def __sub__(self: _Self, x: _T_contra, /) -> _Self: ...
+ def __mul__(self: _Self, x: _T_contra, /) -> _Self: ...
+ def __pow__(self: _Self, x: _T_contra, /) -> _Self | float: ...
+
+ def __radd__(self: _Self, x: _T_contra, /) -> _Self: ...
+ def __rsub__(self: _Self, x: _T_contra, /) -> _Self: ...
+ def __rmul__(self: _Self, x: _T_contra, /) -> _Self: ...
+
+_Series: TypeAlias = np.ndarray[tuple[int], np.dtype[_SCT]]
+
+_FloatSeries: TypeAlias = _Series[np.floating[Any]]
+_ComplexSeries: TypeAlias = _Series[np.complexfloating[Any, Any]]
+_ObjectSeries: TypeAlias = _Series[np.object_]
+_CoefSeries: TypeAlias = _Series[np.inexact[Any] | np.object_]
+
+_FloatArray: TypeAlias = npt.NDArray[np.floating[Any]]
+_ComplexArray: TypeAlias = npt.NDArray[np.complexfloating[Any, Any]]
+_ObjectArray: TypeAlias = npt.NDArray[np.object_]
+_CoefArray: TypeAlias = npt.NDArray[np.inexact[Any] | np.object_]
+
+_Tuple2: TypeAlias = tuple[_T, _T]
+_Array1: TypeAlias = np.ndarray[tuple[Literal[1]], np.dtype[_SCT]]
+_Array2: TypeAlias = np.ndarray[tuple[Literal[2]], np.dtype[_SCT]]
+
+_AnyInt: TypeAlias = SupportsInt | SupportsIndex
+
+_CoefObjectLike_co: TypeAlias = np.object_ | _SupportsCoefOps[Any]
+_CoefLike_co: TypeAlias = _NumberLike_co | _CoefObjectLike_co
+
+# The term "series" is used here to refer to 1-d arrays of numeric scalars.
+_SeriesLikeBool_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.bool]]
+ | Sequence[bool | np.bool]
+)
+_SeriesLikeInt_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.integer[Any] | np.bool]]
+ | Sequence[_IntLike_co]
+)
+_SeriesLikeFloat_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.floating[Any] | np.integer[Any] | np.bool]]
+ | Sequence[_FloatLike_co]
+)
+_SeriesLikeComplex_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.inexact[Any] | np.integer[Any] | np.bool]]
+ | Sequence[_ComplexLike_co]
+)
+_SeriesLikeObject_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.object_]]
+ | Sequence[_CoefObjectLike_co]
+)
+_SeriesLikeCoef_co: TypeAlias = (
+ _SupportsArray[np.dtype[np.number[Any] | np.bool | np.object_]]
+ | Sequence[_CoefLike_co]
+)
+
+_ArrayLikeCoefObject_co: TypeAlias = (
+ _CoefObjectLike_co
+ | _SeriesLikeObject_co
+ | _NestedSequence[_SeriesLikeObject_co]
+)
+_ArrayLikeCoef_co: TypeAlias = (
+ npt.NDArray[np.number[Any] | np.bool | np.object_]
+ | _ArrayLikeNumber_co
+ | _ArrayLikeCoefObject_co
+)
+
+_Name_co = TypeVar("_Name_co", bound=LiteralString, covariant=True, default=LiteralString)
+
+@type_check_only
+class _Named(Protocol[_Name_co]):
+ @property
+ def __name__(self, /) -> _Name_co: ...
+
+_Line: TypeAlias = np.ndarray[tuple[Literal[1, 2]], np.dtype[_SCT]]
+
+@type_check_only
+class _FuncLine(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(self, /, off: _SCT, scl: _SCT) -> _Line[_SCT]: ...
+ @overload
+ def __call__(self, /, off: int, scl: int) -> _Line[np.int_] : ...
+ @overload
+ def __call__(self, /, off: float, scl: float) -> _Line[np.float64]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ off: complex,
+ scl: complex,
+ ) -> _Line[np.complex128]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ off: _SupportsCoefOps[Any],
+ scl: _SupportsCoefOps[Any],
+ ) -> _Line[np.object_]: ...
+
+@type_check_only
+class _FuncFromRoots(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(self, /, roots: _SeriesLikeFloat_co) -> _FloatSeries: ...
+ @overload
+ def __call__(self, /, roots: _SeriesLikeComplex_co) -> _ComplexSeries: ...
+ @overload
+ def __call__(self, /, roots: _SeriesLikeCoef_co) -> _ObjectSeries: ...
+
+@type_check_only
+class _FuncBinOp(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c1: _SeriesLikeBool_co,
+ c2: _SeriesLikeBool_co,
+ ) -> NoReturn: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c1: _SeriesLikeFloat_co,
+ c2: _SeriesLikeFloat_co,
+ ) -> _FloatSeries: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c1: _SeriesLikeComplex_co,
+ c2: _SeriesLikeComplex_co,
+ ) -> _ComplexSeries: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c1: _SeriesLikeCoef_co,
+ c2: _SeriesLikeCoef_co,
+ ) -> _ObjectSeries: ...
+
+@type_check_only
+class _FuncUnOp(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(self, /, c: _SeriesLikeFloat_co) -> _FloatSeries: ...
+ @overload
+ def __call__(self, /, c: _SeriesLikeComplex_co) -> _ComplexSeries: ...
+ @overload
+ def __call__(self, /, c: _SeriesLikeCoef_co) -> _ObjectSeries: ...
+
+@type_check_only
+class _FuncPoly2Ortho(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(self, /, pol: _SeriesLikeFloat_co) -> _FloatSeries: ...
+ @overload
+ def __call__(self, /, pol: _SeriesLikeComplex_co) -> _ComplexSeries: ...
+ @overload
+ def __call__(self, /, pol: _SeriesLikeCoef_co) -> _ObjectSeries: ...
+
+@type_check_only
+class _FuncPow(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeFloat_co,
+ pow: _IntLike_co,
+ maxpower: None | _IntLike_co = ...,
+ ) -> _FloatSeries: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeComplex_co,
+ pow: _IntLike_co,
+ maxpower: None | _IntLike_co = ...,
+ ) -> _ComplexSeries: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeCoef_co,
+ pow: _IntLike_co,
+ maxpower: None | _IntLike_co = ...,
+ ) -> _ObjectSeries: ...
+
+@type_check_only
+class _FuncDer(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeFloat_co,
+ m: SupportsIndex = ...,
+ scl: _FloatLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeComplex_co,
+ m: SupportsIndex = ...,
+ scl: _ComplexLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeCoef_co,
+ m: SupportsIndex = ...,
+ scl: _CoefLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _ObjectArray: ...
+
+@type_check_only
+class _FuncInteg(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeFloat_co,
+ m: SupportsIndex = ...,
+ k: _FloatLike_co | _SeriesLikeFloat_co = ...,
+ lbnd: _FloatLike_co = ...,
+ scl: _FloatLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeComplex_co,
+ m: SupportsIndex = ...,
+ k: _ComplexLike_co | _SeriesLikeComplex_co = ...,
+ lbnd: _ComplexLike_co = ...,
+ scl: _ComplexLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeCoef_co,
+ m: SupportsIndex = ...,
+ k: _CoefLike_co | _SeriesLikeCoef_co = ...,
+ lbnd: _CoefLike_co = ...,
+ scl: _CoefLike_co = ...,
+ axis: SupportsIndex = ...,
+ ) -> _ObjectArray: ...
+
+@type_check_only
+class _FuncValFromRoots(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _FloatLike_co,
+ r: _FloatLike_co,
+ tensor: bool = ...,
+ ) -> np.floating[Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _NumberLike_co,
+ r: _NumberLike_co,
+ tensor: bool = ...,
+ ) -> np.complexfloating[Any, Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _FloatLike_co | _ArrayLikeFloat_co,
+ r: _ArrayLikeFloat_co,
+ tensor: bool = ...,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _NumberLike_co | _ArrayLikeComplex_co,
+ r: _ArrayLikeComplex_co,
+ tensor: bool = ...,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _CoefLike_co | _ArrayLikeCoef_co,
+ r: _ArrayLikeCoef_co,
+ tensor: bool = ...,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _CoefLike_co,
+ r: _CoefLike_co,
+ tensor: bool = ...,
+ ) -> _SupportsCoefOps[Any]: ...
+
+@type_check_only
+class _FuncVal(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _FloatLike_co,
+ c: _SeriesLikeFloat_co,
+ tensor: bool = ...,
+ ) -> np.floating[Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _NumberLike_co,
+ c: _SeriesLikeComplex_co,
+ tensor: bool = ...,
+ ) -> np.complexfloating[Any, Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ c: _ArrayLikeFloat_co,
+ tensor: bool = ...,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ c: _ArrayLikeComplex_co,
+ tensor: bool = ...,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ c: _ArrayLikeCoef_co,
+ tensor: bool = ...,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _CoefLike_co,
+ c: _SeriesLikeObject_co,
+ tensor: bool = ...,
+ ) -> _SupportsCoefOps[Any]: ...
+
+@type_check_only
+class _FuncVal2D(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _FloatLike_co,
+ y: _FloatLike_co,
+ c: _SeriesLikeFloat_co,
+ ) -> np.floating[Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _NumberLike_co,
+ y: _NumberLike_co,
+ c: _SeriesLikeComplex_co,
+ ) -> np.complexfloating[Any, Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ c: _ArrayLikeFloat_co,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ c: _ArrayLikeComplex_co,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ y: _ArrayLikeCoef_co,
+ c: _ArrayLikeCoef_co,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _CoefLike_co,
+ y: _CoefLike_co,
+ c: _SeriesLikeCoef_co,
+ ) -> _SupportsCoefOps[Any]: ...
+
+@type_check_only
+class _FuncVal3D(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _FloatLike_co,
+ y: _FloatLike_co,
+ z: _FloatLike_co,
+ c: _SeriesLikeFloat_co
+ ) -> np.floating[Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _NumberLike_co,
+ y: _NumberLike_co,
+ z: _NumberLike_co,
+ c: _SeriesLikeComplex_co,
+ ) -> np.complexfloating[Any, Any]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ z: _ArrayLikeFloat_co,
+ c: _ArrayLikeFloat_co,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ z: _ArrayLikeComplex_co,
+ c: _ArrayLikeComplex_co,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ y: _ArrayLikeCoef_co,
+ z: _ArrayLikeCoef_co,
+ c: _ArrayLikeCoef_co,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _CoefLike_co,
+ y: _CoefLike_co,
+ z: _CoefLike_co,
+ c: _SeriesLikeCoef_co,
+ ) -> _SupportsCoefOps[Any]: ...
+
+_AnyValF: TypeAlias = Callable[
+ [npt.ArrayLike, npt.ArrayLike, bool],
+ _CoefArray,
+]
+
+@type_check_only
+class _FuncValND(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _SeriesLikeFloat_co,
+ /,
+ *args: _FloatLike_co,
+ ) -> np.floating[Any]: ...
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _SeriesLikeComplex_co,
+ /,
+ *args: _NumberLike_co,
+ ) -> np.complexfloating[Any, Any]: ...
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _ArrayLikeFloat_co,
+ /,
+ *args: _ArrayLikeFloat_co,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _ArrayLikeComplex_co,
+ /,
+ *args: _ArrayLikeComplex_co,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _SeriesLikeObject_co,
+ /,
+ *args: _CoefObjectLike_co,
+ ) -> _SupportsCoefOps[Any]: ...
+ @overload
+ def __call__(
+ self,
+ val_f: _AnyValF,
+ c: _ArrayLikeCoef_co,
+ /,
+ *args: _ArrayLikeCoef_co,
+ ) -> _ObjectArray: ...
+
+@type_check_only
+class _FuncVander(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ deg: SupportsIndex,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ deg: SupportsIndex,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ deg: SupportsIndex,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: npt.ArrayLike,
+ deg: SupportsIndex,
+ ) -> _CoefArray: ...
+
+_AnyDegrees: TypeAlias = Sequence[SupportsIndex]
+
+@type_check_only
+class _FuncVander2D(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ deg: _AnyDegrees,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ deg: _AnyDegrees,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ y: _ArrayLikeCoef_co,
+ deg: _AnyDegrees,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: npt.ArrayLike,
+ y: npt.ArrayLike,
+ deg: _AnyDegrees,
+ ) -> _CoefArray: ...
+
+@type_check_only
+class _FuncVander3D(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ z: _ArrayLikeFloat_co,
+ deg: _AnyDegrees,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ z: _ArrayLikeComplex_co,
+ deg: _AnyDegrees,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _ArrayLikeCoef_co,
+ y: _ArrayLikeCoef_co,
+ z: _ArrayLikeCoef_co,
+ deg: _AnyDegrees,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: npt.ArrayLike,
+ y: npt.ArrayLike,
+ z: npt.ArrayLike,
+ deg: _AnyDegrees,
+ ) -> _CoefArray: ...
+
+# keep in sync with the broadest overload of `._FuncVander`
+_AnyFuncVander: TypeAlias = Callable[
+ [npt.ArrayLike, SupportsIndex],
+ _CoefArray,
+]
+
+@type_check_only
+class _FuncVanderND(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ vander_fs: Sequence[_AnyFuncVander],
+ points: Sequence[_ArrayLikeFloat_co],
+ degrees: Sequence[SupportsIndex],
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ vander_fs: Sequence[_AnyFuncVander],
+ points: Sequence[_ArrayLikeComplex_co],
+ degrees: Sequence[SupportsIndex],
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ vander_fs: Sequence[_AnyFuncVander],
+ points: Sequence[
+ _ArrayLikeObject_co | _ArrayLikeComplex_co,
+ ],
+ degrees: Sequence[SupportsIndex],
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ vander_fs: Sequence[_AnyFuncVander],
+ points: Sequence[npt.ArrayLike],
+ degrees: Sequence[SupportsIndex],
+ ) -> _CoefArray: ...
+
+_FullFitResult: TypeAlias = Sequence[np.inexact[Any] | np.int32]
+
+@type_check_only
+class _FuncFit(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> _FloatArray: ...
+ @overload
+ def __call__(
+ self,
+ x: _SeriesLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float,
+ full: Literal[True],
+ /,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_FloatArray, _FullFitResult]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ *,
+ full: Literal[True],
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_FloatArray, _FullFitResult]: ...
+
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> _ComplexArray: ...
+ @overload
+ def __call__(
+ self,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float,
+ full: Literal[True],
+ /,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_ComplexArray, _FullFitResult]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ *,
+ full: Literal[True],
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_ComplexArray, _FullFitResult]: ...
+
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> _ObjectArray: ...
+ @overload
+ def __call__(
+ self,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float,
+ full: Literal[True],
+ /,
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_ObjectArray, _FullFitResult]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeCoef_co,
+ deg: int | _SeriesLikeInt_co,
+ rcond: None | float = ...,
+ *,
+ full: Literal[True],
+ w: None | _SeriesLikeFloat_co = ...,
+ ) -> tuple[_ObjectArray, _FullFitResult]: ...
+
+@type_check_only
+class _FuncRoots(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeFloat_co,
+ ) -> _Series[np.float64]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeComplex_co,
+ ) -> _Series[np.complex128]: ...
+ @overload
+ def __call__(self, /, c: _SeriesLikeCoef_co) -> _ObjectSeries: ...
+
+
+_Companion: TypeAlias = np.ndarray[tuple[int, int], np.dtype[_SCT]]
+
+@type_check_only
+class _FuncCompanion(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeFloat_co,
+ ) -> _Companion[np.float64]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _SeriesLikeComplex_co,
+ ) -> _Companion[np.complex128]: ...
+ @overload
+ def __call__(self, /, c: _SeriesLikeCoef_co) -> _Companion[np.object_]: ...
+
+@type_check_only
+class _FuncGauss(_Named[_Name_co], Protocol[_Name_co]):
+ def __call__(
+ self,
+ /,
+ deg: SupportsIndex,
+ ) -> _Tuple2[_Series[np.float64]]: ...
+
+@type_check_only
+class _FuncWeight(_Named[_Name_co], Protocol[_Name_co]):
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeFloat_co,
+ ) -> npt.NDArray[np.float64]: ...
+ @overload
+ def __call__(
+ self,
+ /,
+ c: _ArrayLikeComplex_co,
+ ) -> npt.NDArray[np.complex128]: ...
+ @overload
+ def __call__(self, /, c: _ArrayLikeCoef_co) -> _ObjectArray: ...
+
+@type_check_only
+class _FuncPts(_Named[_Name_co], Protocol[_Name_co]):
+ def __call__(self, /, npts: _AnyInt) -> _Series[np.float64]: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.py
new file mode 100644
index 0000000000000000000000000000000000000000..837847e45110a9cf5cf202c496c68c5e437c4e67
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.py
@@ -0,0 +1,2003 @@
+"""
+====================================================
+Chebyshev Series (:mod:`numpy.polynomial.chebyshev`)
+====================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with Chebyshev series, including a `Chebyshev` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with such polynomials is in the
+docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+
+.. autosummary::
+ :toctree: generated/
+
+ Chebyshev
+
+
+Constants
+---------
+
+.. autosummary::
+ :toctree: generated/
+
+ chebdomain
+ chebzero
+ chebone
+ chebx
+
+Arithmetic
+----------
+
+.. autosummary::
+ :toctree: generated/
+
+ chebadd
+ chebsub
+ chebmulx
+ chebmul
+ chebdiv
+ chebpow
+ chebval
+ chebval2d
+ chebval3d
+ chebgrid2d
+ chebgrid3d
+
+Calculus
+--------
+
+.. autosummary::
+ :toctree: generated/
+
+ chebder
+ chebint
+
+Misc Functions
+--------------
+
+.. autosummary::
+ :toctree: generated/
+
+ chebfromroots
+ chebroots
+ chebvander
+ chebvander2d
+ chebvander3d
+ chebgauss
+ chebweight
+ chebcompanion
+ chebfit
+ chebpts1
+ chebpts2
+ chebtrim
+ chebline
+ cheb2poly
+ poly2cheb
+ chebinterpolate
+
+See also
+--------
+`numpy.polynomial`
+
+Notes
+-----
+The implementations of multiplication, division, integration, and
+differentiation use the algebraic identities [1]_:
+
+.. math::
+ T_n(x) = \\frac{z^n + z^{-n}}{2} \\\\
+ z\\frac{dx}{dz} = \\frac{z - z^{-1}}{2}.
+
+where
+
+.. math:: x = \\frac{z + z^{-1}}{2}.
+
+These identities allow a Chebyshev series to be expressed as a finite,
+symmetric Laurent series. In this module, this sort of Laurent series
+is referred to as a "z-series."
+
+References
+----------
+.. [1] A. T. Benjamin, et al., "Combinatorial Trigonometry with Chebyshev
+ Polynomials," *Journal of Statistical Planning and Inference 14*, 2008
+ (https://web.archive.org/web/20080221202153/https://www.math.hmc.edu/~benjamin/papers/CombTrig.pdf, pg. 4)
+
+"""
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+__all__ = [
+ 'chebzero', 'chebone', 'chebx', 'chebdomain', 'chebline', 'chebadd',
+ 'chebsub', 'chebmulx', 'chebmul', 'chebdiv', 'chebpow', 'chebval',
+ 'chebder', 'chebint', 'cheb2poly', 'poly2cheb', 'chebfromroots',
+ 'chebvander', 'chebfit', 'chebtrim', 'chebroots', 'chebpts1',
+ 'chebpts2', 'Chebyshev', 'chebval2d', 'chebval3d', 'chebgrid2d',
+ 'chebgrid3d', 'chebvander2d', 'chebvander3d', 'chebcompanion',
+ 'chebgauss', 'chebweight', 'chebinterpolate']
+
+chebtrim = pu.trimcoef
+
+#
+# A collection of functions for manipulating z-series. These are private
+# functions and do minimal error checking.
+#
+
+def _cseries_to_zseries(c):
+ """Convert Chebyshev series to z-series.
+
+ Convert a Chebyshev series to the equivalent z-series. The result is
+ never an empty array. The dtype of the return is the same as that of
+ the input. No checks are run on the arguments as this routine is for
+ internal use.
+
+ Parameters
+ ----------
+ c : 1-D ndarray
+ Chebyshev coefficients, ordered from low to high
+
+ Returns
+ -------
+ zs : 1-D ndarray
+ Odd length symmetric z-series, ordered from low to high.
+
+ """
+ n = c.size
+ zs = np.zeros(2*n-1, dtype=c.dtype)
+ zs[n-1:] = c/2
+ return zs + zs[::-1]
+
+
+def _zseries_to_cseries(zs):
+ """Convert z-series to a Chebyshev series.
+
+ Convert a z series to the equivalent Chebyshev series. The result is
+ never an empty array. The dtype of the return is the same as that of
+ the input. No checks are run on the arguments as this routine is for
+ internal use.
+
+ Parameters
+ ----------
+ zs : 1-D ndarray
+ Odd length symmetric z-series, ordered from low to high.
+
+ Returns
+ -------
+ c : 1-D ndarray
+ Chebyshev coefficients, ordered from low to high.
+
+ """
+ n = (zs.size + 1)//2
+ c = zs[n-1:].copy()
+ c[1:n] *= 2
+ return c
+
+
+def _zseries_mul(z1, z2):
+ """Multiply two z-series.
+
+ Multiply two z-series to produce a z-series.
+
+ Parameters
+ ----------
+ z1, z2 : 1-D ndarray
+ The arrays must be 1-D but this is not checked.
+
+ Returns
+ -------
+ product : 1-D ndarray
+ The product z-series.
+
+ Notes
+ -----
+ This is simply convolution. If symmetric/anti-symmetric z-series are
+ denoted by S/A then the following rules apply:
+
+ S*S, A*A -> S
+ S*A, A*S -> A
+
+ """
+ return np.convolve(z1, z2)
+
+
+def _zseries_div(z1, z2):
+ """Divide the first z-series by the second.
+
+ Divide `z1` by `z2` and return the quotient and remainder as z-series.
+ Warning: this implementation only applies when both z1 and z2 have the
+ same symmetry, which is sufficient for present purposes.
+
+ Parameters
+ ----------
+ z1, z2 : 1-D ndarray
+ The arrays must be 1-D and have the same symmetry, but this is not
+ checked.
+
+ Returns
+ -------
+
+ (quotient, remainder) : 1-D ndarrays
+ Quotient and remainder as z-series.
+
+ Notes
+ -----
+ This is not the same as polynomial division on account of the desired form
+ of the remainder. If symmetric/anti-symmetric z-series are denoted by S/A
+ then the following rules apply:
+
+ S/S -> S,S
+ A/A -> S,A
+
+ The restriction to types of the same symmetry could be fixed but seems like
+ unneeded generality. There is no natural form for the remainder in the case
+ where there is no symmetry.
+
+ """
+ z1 = z1.copy()
+ z2 = z2.copy()
+ lc1 = len(z1)
+ lc2 = len(z2)
+ if lc2 == 1:
+ z1 /= z2
+ return z1, z1[:1]*0
+ elif lc1 < lc2:
+ return z1[:1]*0, z1
+ else:
+ dlen = lc1 - lc2
+ scl = z2[0]
+ z2 /= scl
+ quo = np.empty(dlen + 1, dtype=z1.dtype)
+ i = 0
+ j = dlen
+ while i < j:
+ r = z1[i]
+ quo[i] = z1[i]
+ quo[dlen - i] = r
+ tmp = r*z2
+ z1[i:i+lc2] -= tmp
+ z1[j:j+lc2] -= tmp
+ i += 1
+ j -= 1
+ r = z1[i]
+ quo[i] = r
+ tmp = r*z2
+ z1[i:i+lc2] -= tmp
+ quo /= scl
+ rem = z1[i+1:i-1+lc2].copy()
+ return quo, rem
+
+
+def _zseries_der(zs):
+ """Differentiate a z-series.
+
+ The derivative is with respect to x, not z. This is achieved using the
+ chain rule and the value of dx/dz given in the module notes.
+
+ Parameters
+ ----------
+ zs : z-series
+ The z-series to differentiate.
+
+ Returns
+ -------
+ derivative : z-series
+ The derivative
+
+ Notes
+ -----
+ The zseries for x (ns) has been multiplied by two in order to avoid
+ using floats that are incompatible with Decimal and likely other
+ specialized scalar types. This scaling has been compensated by
+ multiplying the value of zs by two also so that the two cancels in the
+ division.
+
+ """
+ n = len(zs)//2
+ ns = np.array([-1, 0, 1], dtype=zs.dtype)
+ zs *= np.arange(-n, n+1)*2
+ d, r = _zseries_div(zs, ns)
+ return d
+
+
+def _zseries_int(zs):
+ """Integrate a z-series.
+
+ The integral is with respect to x, not z. This is achieved by a change
+ of variable using dx/dz given in the module notes.
+
+ Parameters
+ ----------
+ zs : z-series
+ The z-series to integrate
+
+ Returns
+ -------
+ integral : z-series
+ The indefinite integral
+
+ Notes
+ -----
+ The zseries for x (ns) has been multiplied by two in order to avoid
+ using floats that are incompatible with Decimal and likely other
+ specialized scalar types. This scaling has been compensated by
+ dividing the resulting zs by two.
+
+ """
+ n = 1 + len(zs)//2
+ ns = np.array([-1, 0, 1], dtype=zs.dtype)
+ zs = _zseries_mul(zs, ns)
+ div = np.arange(-n, n+1)*2
+ zs[:n] /= div[:n]
+ zs[n+1:] /= div[n+1:]
+ zs[n] = 0
+ return zs
+
+#
+# Chebyshev series functions
+#
+
+
+def poly2cheb(pol):
+ """
+ Convert a polynomial to a Chebyshev series.
+
+ Convert an array representing the coefficients of a polynomial (relative
+ to the "standard" basis) ordered from lowest degree to highest, to an
+ array of the coefficients of the equivalent Chebyshev series, ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ pol : array_like
+ 1-D array containing the polynomial coefficients
+
+ Returns
+ -------
+ c : ndarray
+ 1-D array containing the coefficients of the equivalent Chebyshev
+ series.
+
+ See Also
+ --------
+ cheb2poly
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy import polynomial as P
+ >>> p = P.Polynomial(range(4))
+ >>> p
+ Polynomial([0., 1., 2., 3.], domain=[-1., 1.], window=[-1., 1.], symbol='x')
+ >>> c = p.convert(kind=P.Chebyshev)
+ >>> c
+ Chebyshev([1. , 3.25, 1. , 0.75], domain=[-1., 1.], window=[-1., ...
+ >>> P.chebyshev.poly2cheb(range(4))
+ array([1. , 3.25, 1. , 0.75])
+
+ """
+ [pol] = pu.as_series([pol])
+ deg = len(pol) - 1
+ res = 0
+ for i in range(deg, -1, -1):
+ res = chebadd(chebmulx(res), pol[i])
+ return res
+
+
+def cheb2poly(c):
+ """
+ Convert a Chebyshev series to a polynomial.
+
+ Convert an array representing the coefficients of a Chebyshev series,
+ ordered from lowest degree to highest, to an array of the coefficients
+ of the equivalent polynomial (relative to the "standard" basis) ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array containing the Chebyshev series coefficients, ordered
+ from lowest order term to highest.
+
+ Returns
+ -------
+ pol : ndarray
+ 1-D array containing the coefficients of the equivalent polynomial
+ (relative to the "standard" basis) ordered from lowest order term
+ to highest.
+
+ See Also
+ --------
+ poly2cheb
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy import polynomial as P
+ >>> c = P.Chebyshev(range(4))
+ >>> c
+ Chebyshev([0., 1., 2., 3.], domain=[-1., 1.], window=[-1., 1.], symbol='x')
+ >>> p = c.convert(kind=P.Polynomial)
+ >>> p
+ Polynomial([-2., -8., 4., 12.], domain=[-1., 1.], window=[-1., 1.], ...
+ >>> P.chebyshev.cheb2poly(range(4))
+ array([-2., -8., 4., 12.])
+
+ """
+ from .polynomial import polyadd, polysub, polymulx
+
+ [c] = pu.as_series([c])
+ n = len(c)
+ if n < 3:
+ return c
+ else:
+ c0 = c[-2]
+ c1 = c[-1]
+ # i is the current degree of c1
+ for i in range(n - 1, 1, -1):
+ tmp = c0
+ c0 = polysub(c[i - 2], c1)
+ c1 = polyadd(tmp, polymulx(c1)*2)
+ return polyadd(c0, polymulx(c1))
+
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Chebyshev default domain.
+chebdomain = np.array([-1., 1.])
+
+# Chebyshev coefficients representing zero.
+chebzero = np.array([0])
+
+# Chebyshev coefficients representing one.
+chebone = np.array([1])
+
+# Chebyshev coefficients representing the identity x.
+chebx = np.array([0, 1])
+
+
+def chebline(off, scl):
+ """
+ Chebyshev series whose graph is a straight line.
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The specified line is given by ``off + scl*x``.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the Chebyshev series for
+ ``off + scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyline
+ numpy.polynomial.legendre.legline
+ numpy.polynomial.laguerre.lagline
+ numpy.polynomial.hermite.hermline
+ numpy.polynomial.hermite_e.hermeline
+
+ Examples
+ --------
+ >>> import numpy.polynomial.chebyshev as C
+ >>> C.chebline(3,2)
+ array([3, 2])
+ >>> C.chebval(-3, C.chebline(3,2)) # should be -3
+ -3.0
+
+ """
+ if scl != 0:
+ return np.array([off, scl])
+ else:
+ return np.array([off])
+
+
+def chebfromroots(roots):
+ """
+ Generate a Chebyshev series with given roots.
+
+ The function returns the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ in Chebyshev form, where the :math:`r_n` are the roots specified in
+ `roots`. If a zero has multiplicity n, then it must appear in `roots`
+ n times. For instance, if 2 is a root of multiplicity three and 3 is a
+ root of multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3].
+ The roots can appear in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * T_1(x) + ... + c_n * T_n(x)
+
+ The coefficient of the last term is not generally 1 for monic
+ polynomials in Chebyshev form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of coefficients. If all roots are real then `out` is a
+ real array, if some of the roots are complex, then `out` is complex
+ even if all the coefficients in the result are real (see Examples
+ below).
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfromroots
+ numpy.polynomial.legendre.legfromroots
+ numpy.polynomial.laguerre.lagfromroots
+ numpy.polynomial.hermite.hermfromroots
+ numpy.polynomial.hermite_e.hermefromroots
+
+ Examples
+ --------
+ >>> import numpy.polynomial.chebyshev as C
+ >>> C.chebfromroots((-1,0,1)) # x^3 - x relative to the standard basis
+ array([ 0. , -0.25, 0. , 0.25])
+ >>> j = complex(0,1)
+ >>> C.chebfromroots((-j,j)) # x^2 + 1 relative to the standard basis
+ array([1.5+0.j, 0. +0.j, 0.5+0.j])
+
+ """
+ return pu._fromroots(chebline, chebmul, roots)
+
+
+def chebadd(c1, c2):
+ """
+ Add one Chebyshev series to another.
+
+ Returns the sum of two Chebyshev series `c1` + `c2`. The arguments
+ are sequences of coefficients ordered from lowest order term to
+ highest, i.e., [1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Chebyshev series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the Chebyshev series of their sum.
+
+ See Also
+ --------
+ chebsub, chebmulx, chebmul, chebdiv, chebpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the sum of two Chebyshev series
+ is a Chebyshev series (without having to "reproject" the result onto
+ the basis set) so addition, just like that of "standard" polynomials,
+ is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> C.chebadd(c1,c2)
+ array([4., 4., 4.])
+
+ """
+ return pu._add(c1, c2)
+
+
+def chebsub(c1, c2):
+ """
+ Subtract one Chebyshev series from another.
+
+ Returns the difference of two Chebyshev series `c1` - `c2`. The
+ sequences of coefficients are from lowest order term to highest, i.e.,
+ [1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Chebyshev series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Chebyshev series coefficients representing their difference.
+
+ See Also
+ --------
+ chebadd, chebmulx, chebmul, chebdiv, chebpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the difference of two Chebyshev
+ series is a Chebyshev series (without having to "reproject" the result
+ onto the basis set) so subtraction, just like that of "standard"
+ polynomials, is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> C.chebsub(c1,c2)
+ array([-2., 0., 2.])
+ >>> C.chebsub(c2,c1) # -C.chebsub(c1,c2)
+ array([ 2., 0., -2.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def chebmulx(c):
+ """Multiply a Chebyshev series by x.
+
+ Multiply the polynomial `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Chebyshev series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ chebadd, chebsub, chebmul, chebdiv, chebpow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> C.chebmulx([1,2,3])
+ array([1. , 2.5, 1. , 1.5])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]*0
+ prd[1] = c[0]
+ if len(c) > 1:
+ tmp = c[1:]/2
+ prd[2:] = tmp
+ prd[0:-2] += tmp
+ return prd
+
+
+def chebmul(c1, c2):
+ """
+ Multiply one Chebyshev series by another.
+
+ Returns the product of two Chebyshev series `c1` * `c2`. The arguments
+ are sequences of coefficients, from lowest order "term" to highest,
+ e.g., [1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Chebyshev series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Chebyshev series coefficients representing their product.
+
+ See Also
+ --------
+ chebadd, chebsub, chebmulx, chebdiv, chebpow
+
+ Notes
+ -----
+ In general, the (polynomial) product of two C-series results in terms
+ that are not in the Chebyshev polynomial basis set. Thus, to express
+ the product as a C-series, it is typically necessary to "reproject"
+ the product onto said basis set, which typically produces
+ "unintuitive live" (but correct) results; see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> C.chebmul(c1,c2) # multiplication requires "reprojection"
+ array([ 6.5, 12. , 12. , 4. , 1.5])
+
+ """
+ # c1, c2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+ z1 = _cseries_to_zseries(c1)
+ z2 = _cseries_to_zseries(c2)
+ prd = _zseries_mul(z1, z2)
+ ret = _zseries_to_cseries(prd)
+ return pu.trimseq(ret)
+
+
+def chebdiv(c1, c2):
+ """
+ Divide one Chebyshev series by another.
+
+ Returns the quotient-with-remainder of two Chebyshev series
+ `c1` / `c2`. The arguments are sequences of coefficients from lowest
+ order "term" to highest, e.g., [1,2,3] represents the series
+ ``T_0 + 2*T_1 + 3*T_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Chebyshev series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ [quo, rem] : ndarrays
+ Of Chebyshev series coefficients representing the quotient and
+ remainder.
+
+ See Also
+ --------
+ chebadd, chebsub, chebmulx, chebmul, chebpow
+
+ Notes
+ -----
+ In general, the (polynomial) division of one C-series by another
+ results in quotient and remainder terms that are not in the Chebyshev
+ polynomial basis set. Thus, to express these results as C-series, it
+ is typically necessary to "reproject" the results onto said basis
+ set, which typically produces "unintuitive" (but correct) results;
+ see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> C.chebdiv(c1,c2) # quotient "intuitive," remainder not
+ (array([3.]), array([-8., -4.]))
+ >>> c2 = (0,1,2,3)
+ >>> C.chebdiv(c2,c1) # neither "intuitive"
+ (array([0., 2.]), array([-2., -4.]))
+
+ """
+ # c1, c2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+ if c2[-1] == 0:
+ raise ZeroDivisionError # FIXME: add message with details to exception
+
+ # note: this is more efficient than `pu._div(chebmul, c1, c2)`
+ lc1 = len(c1)
+ lc2 = len(c2)
+ if lc1 < lc2:
+ return c1[:1]*0, c1
+ elif lc2 == 1:
+ return c1/c2[-1], c1[:1]*0
+ else:
+ z1 = _cseries_to_zseries(c1)
+ z2 = _cseries_to_zseries(c2)
+ quo, rem = _zseries_div(z1, z2)
+ quo = pu.trimseq(_zseries_to_cseries(quo))
+ rem = pu.trimseq(_zseries_to_cseries(rem))
+ return quo, rem
+
+
+def chebpow(c, pow, maxpower=16):
+ """Raise a Chebyshev series to a power.
+
+ Returns the Chebyshev series `c` raised to the power `pow`. The
+ argument `c` is a sequence of coefficients ordered from low to high.
+ i.e., [1,2,3] is the series ``T_0 + 2*T_1 + 3*T_2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Chebyshev series coefficients ordered from low to
+ high.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Chebyshev series of power.
+
+ See Also
+ --------
+ chebadd, chebsub, chebmulx, chebmul, chebdiv
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> C.chebpow([1, 2, 3, 4], 2)
+ array([15.5, 22. , 16. , ..., 12.5, 12. , 8. ])
+
+ """
+ # note: this is more efficient than `pu._pow(chebmul, c1, c2)`, as it
+ # avoids converting between z and c series repeatedly
+
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ power = int(pow)
+ if power != pow or power < 0:
+ raise ValueError("Power must be a non-negative integer.")
+ elif maxpower is not None and power > maxpower:
+ raise ValueError("Power is too large")
+ elif power == 0:
+ return np.array([1], dtype=c.dtype)
+ elif power == 1:
+ return c
+ else:
+ # This can be made more efficient by using powers of two
+ # in the usual way.
+ zs = _cseries_to_zseries(c)
+ prd = zs
+ for i in range(2, power + 1):
+ prd = np.convolve(prd, zs)
+ return _zseries_to_cseries(prd)
+
+
+def chebder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a Chebyshev series.
+
+ Returns the Chebyshev series coefficients `c` differentiated `m` times
+ along `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The argument
+ `c` is an array of coefficients from low to high degree along each
+ axis, e.g., [1,2,3] represents the series ``1*T_0 + 2*T_1 + 3*T_2``
+ while [[1,2],[1,2]] represents ``1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) +
+ 2*T_0(x)*T_1(y) + 2*T_1(x)*T_1(y)`` if axis=0 is ``x`` and axis=1 is
+ ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Chebyshev series coefficients. If c is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change of
+ variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Chebyshev series of the derivative.
+
+ See Also
+ --------
+ chebint
+
+ Notes
+ -----
+ In general, the result of differentiating a C-series needs to be
+ "reprojected" onto the C-series basis set. Thus, typically, the
+ result of this function is "unintuitive," albeit correct; see Examples
+ section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c = (1,2,3,4)
+ >>> C.chebder(c)
+ array([14., 12., 24.])
+ >>> C.chebder(c,3)
+ array([96.])
+ >>> C.chebder(c,scl=-1)
+ array([-14., -12., -24.])
+ >>> C.chebder(c,2,-1)
+ array([12., 96.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ c = c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=c.dtype)
+ for j in range(n, 2, -1):
+ der[j - 1] = (2*j)*c[j]
+ c[j - 2] += (j*c[j])/(j - 2)
+ if n > 1:
+ der[1] = 4*c[2]
+ der[0] = c[1]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def chebint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a Chebyshev series.
+
+ Returns the Chebyshev series coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients from low to high degree along each axis, e.g., [1,2,3]
+ represents the series ``T_0 + 2*T_1 + 3*T_2`` while [[1,2],[1,2]]
+ represents ``1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) + 2*T_0(x)*T_1(y) +
+ 2*T_1(x)*T_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Chebyshev series coefficients. If c is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at zero
+ is the first value in the list, the value of the second integral
+ at zero is the second value, etc. If ``k == []`` (the default),
+ all constants are set to zero. If ``m == 1``, a single scalar can
+ be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ C-series coefficients of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 1``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ chebder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`.
+ Why is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a`- perhaps not what one would have first thought.
+
+ Also note that, in general, the result of integrating a C-series needs
+ to be "reprojected" onto the C-series basis set. Thus, typically,
+ the result of this function is "unintuitive," albeit correct; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import chebyshev as C
+ >>> c = (1,2,3)
+ >>> C.chebint(c)
+ array([ 0.5, -0.5, 0.5, 0.5])
+ >>> C.chebint(c,3)
+ array([ 0.03125 , -0.1875 , 0.04166667, -0.05208333, 0.01041667, # may vary
+ 0.00625 ])
+ >>> C.chebint(c, k=3)
+ array([ 3.5, -0.5, 0.5, 0.5])
+ >>> C.chebint(c,lbnd=-2)
+ array([ 8.5, -0.5, 0.5, 0.5])
+ >>> C.chebint(c,scl=-2)
+ array([-1., 1., -1., -1.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ k = list(k) + [0]*(cnt - len(k))
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=c.dtype)
+ tmp[0] = c[0]*0
+ tmp[1] = c[0]
+ if n > 1:
+ tmp[2] = c[1]/4
+ for j in range(2, n):
+ tmp[j + 1] = c[j]/(2*(j + 1))
+ tmp[j - 1] -= c[j]/(2*(j - 1))
+ tmp[0] += k[i] - chebval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def chebval(x, c, tensor=True):
+ """
+ Evaluate a Chebyshev series at points x.
+
+ If `c` is of length `n + 1`, this function returns the value:
+
+ .. math:: p(x) = c_0 * T_0(x) + c_1 * T_1(x) + ... + c_n * T_n(x)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, algebra_like
+ The shape of the return value is described above.
+
+ See Also
+ --------
+ chebval2d, chebgrid2d, chebval3d, chebgrid3d
+
+ Notes
+ -----
+ The evaluation uses Clenshaw recursion, aka synthetic division.
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ if len(c) == 1:
+ c0 = c[0]
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]
+ c1 = c[1]
+ else:
+ x2 = 2*x
+ c0 = c[-2]
+ c1 = c[-1]
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ c0 = c[-i] - c1
+ c1 = tmp + c1*x2
+ return c0 + c1*x
+
+
+def chebval2d(x, y, c):
+ """
+ Evaluate a 2-D Chebyshev series at points (x, y).
+
+ This function returns the values:
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * T_i(x) * T_j(y)
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` is a 1-D array a one is implicitly appended to its shape to make
+ it 2-D. The shape of the result will be c.shape[2:] + x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and if it isn't an ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than 2 the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional Chebyshev series at points formed
+ from pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ chebval, chebgrid2d, chebval3d, chebgrid3d
+ """
+ return pu._valnd(chebval, c, x, y)
+
+
+def chebgrid2d(x, y, c):
+ """
+ Evaluate a 2-D Chebyshev series on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * T_i(a) * T_j(b),
+
+ where the points `(a, b)` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape + y.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j is contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional Chebyshev series at points in the
+ Cartesian product of `x` and `y`.
+
+ See Also
+ --------
+ chebval, chebval2d, chebval3d, chebgrid3d
+ """
+ return pu._gridnd(chebval, c, x, y)
+
+
+def chebval3d(x, y, z, c):
+ """
+ Evaluate a 3-D Chebyshev series at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * T_i(x) * T_j(y) * T_k(z)
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ ``(x, y, z)``, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ chebval, chebval2d, chebgrid2d, chebgrid3d
+ """
+ return pu._valnd(chebval, c, x, y, z)
+
+
+def chebgrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D Chebyshev series on the Cartesian product of x, y, and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * T_i(a) * T_j(b) * T_k(c)
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ chebval, chebval2d, chebgrid2d, chebval3d
+ """
+ return pu._gridnd(chebval, c, x, y, z)
+
+
+def chebvander(x, deg):
+ """Pseudo-Vandermonde matrix of given degree.
+
+ Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
+ `x`. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = T_i(x),
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the degree of the Chebyshev polynomial.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ matrix ``V = chebvander(x, n)``, then ``np.dot(V, c)`` and
+ ``chebval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of Chebyshev series of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray
+ The pseudo Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where The last index is the degree of the
+ corresponding Chebyshev polynomial. The dtype will be the same as
+ the converted `x`.
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ # Use forward recursion to generate the entries.
+ v[0] = x*0 + 1
+ if ideg > 0:
+ x2 = 2*x
+ v[1] = x
+ for i in range(2, ideg + 1):
+ v[i] = v[i-1]*x2 - v[i-2]
+ return np.moveaxis(v, 0, -1)
+
+
+def chebvander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = T_i(x) * T_j(y),
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the degrees of
+ the Chebyshev polynomials.
+
+ If ``V = chebvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``chebval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D Chebyshev
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ chebvander, chebvander3d, chebval2d, chebval3d
+ """
+ return pu._vander_nd_flat((chebvander, chebvander), (x, y), deg)
+
+
+def chebvander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = T_i(x)*T_j(y)*T_k(z),
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the degrees of the Chebyshev polynomials.
+
+ If ``V = chebvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``chebval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D Chebyshev
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ chebvander, chebvander3d, chebval2d, chebval3d
+ """
+ return pu._vander_nd_flat((chebvander, chebvander, chebvander), (x, y, z), deg)
+
+
+def chebfit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least squares fit of Chebyshev series to data.
+
+ Return the coefficients of a Chebyshev series of degree `deg` that is the
+ least squares fit to the data values `y` given at points `x`. If `y` is
+ 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
+ fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * T_1(x) + ... + c_n * T_n(x),
+
+ where `n` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,) or (M, K)
+ y-coordinates of the sample points. Several data sets of sample
+ points sharing the same x-coordinates can be fitted at once by
+ passing in a 2D-array that contains one dataset per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer,
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller than
+ this relative to the largest singular value will be ignored. The
+ default value is ``len(x)*eps``, where eps is the relative precision of
+ the float type, about 2e-16 in most cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False (the
+ default) just the coefficients are returned, when True diagnostic
+ information from the singular value decomposition is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (M,) or (M, K)
+ Chebyshev coefficients ordered from low to high. If `y` was 2-D,
+ the coefficients for the data in column k of `y` are in column
+ `k`.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Warns
+ -----
+ RankWarning
+ The rank of the coefficient matrix in the least-squares fit is
+ deficient. The warning is only raised if ``full == False``. The
+ warnings can be turned off by
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfit
+ numpy.polynomial.legendre.legfit
+ numpy.polynomial.laguerre.lagfit
+ numpy.polynomial.hermite.hermfit
+ numpy.polynomial.hermite_e.hermefit
+ chebval : Evaluates a Chebyshev series.
+ chebvander : Vandermonde matrix of Chebyshev series.
+ chebweight : Chebyshev weight function.
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the Chebyshev series `p` that
+ minimizes the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where :math:`w_j` are the weights. This problem is solved by setting up
+ as the (typically) overdetermined matrix equation
+
+ .. math:: V(x) * c = w * y,
+
+ where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
+ coefficients to be solved for, `w` are the weights, and `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of `V`.
+
+ If some of the singular values of `V` are so small that they are
+ neglected, then a `~exceptions.RankWarning` will be issued. This means that
+ the coefficient values may be poorly determined. Using a lower order fit
+ will usually get rid of the warning. The `rcond` parameter can also be
+ set to a value smaller than its default, but the resulting fit may be
+ spurious and have large contributions from roundoff error.
+
+ Fits using Chebyshev series are usually better conditioned than fits
+ using power series, but much can depend on the distribution of the
+ sample points and the smoothness of the data. If the quality of the fit
+ is inadequate splines may be a good alternative.
+
+ References
+ ----------
+ .. [1] Wikipedia, "Curve fitting",
+ https://en.wikipedia.org/wiki/Curve_fitting
+
+ Examples
+ --------
+
+ """
+ return pu._fit(chebvander, x, y, deg, rcond, full, w)
+
+
+def chebcompanion(c):
+ """Return the scaled companion matrix of c.
+
+ The basis polynomials are scaled so that the companion matrix is
+ symmetric when `c` is a Chebyshev basis polynomial. This provides
+ better eigenvalue estimates than the unscaled case and for basis
+ polynomials the eigenvalues are guaranteed to be real if
+ `numpy.linalg.eigvalsh` is used to obtain them.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Chebyshev series coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Scaled companion matrix of dimensions (deg, deg).
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[-c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ scl = np.array([1.] + [np.sqrt(.5)]*(n-1))
+ top = mat.reshape(-1)[1::n+1]
+ bot = mat.reshape(-1)[n::n+1]
+ top[0] = np.sqrt(.5)
+ top[1:] = 1/2
+ bot[...] = top
+ mat[:, -1] -= (c[:-1]/c[-1])*(scl/scl[-1])*.5
+ return mat
+
+
+def chebroots(c):
+ """
+ Compute the roots of a Chebyshev series.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * T_i(x).
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the series. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyroots
+ numpy.polynomial.legendre.legroots
+ numpy.polynomial.laguerre.lagroots
+ numpy.polynomial.hermite.hermroots
+ numpy.polynomial.hermite_e.hermeroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the series for such
+ values. Roots with multiplicity greater than 1 will also show larger
+ errors as the value of the series near such points is relatively
+ insensitive to errors in the roots. Isolated roots near the origin can
+ be improved by a few iterations of Newton's method.
+
+ The Chebyshev series basis polynomials aren't powers of `x` so the
+ results of this function may seem unintuitive.
+
+ Examples
+ --------
+ >>> import numpy.polynomial.chebyshev as cheb
+ >>> cheb.chebroots((-1, 1,-1, 1)) # T3 - T2 + T1 - T0 has real roots
+ array([ -5.00000000e-01, 2.60860684e-17, 1.00000000e+00]) # may vary
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([-c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = chebcompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+def chebinterpolate(func, deg, args=()):
+ """Interpolate a function at the Chebyshev points of the first kind.
+
+ Returns the Chebyshev series that interpolates `func` at the Chebyshev
+ points of the first kind in the interval [-1, 1]. The interpolating
+ series tends to a minmax approximation to `func` with increasing `deg`
+ if the function is continuous in the interval.
+
+ Parameters
+ ----------
+ func : function
+ The function to be approximated. It must be a function of a single
+ variable of the form ``f(x, a, b, c...)``, where ``a, b, c...`` are
+ extra arguments passed in the `args` parameter.
+ deg : int
+ Degree of the interpolating polynomial
+ args : tuple, optional
+ Extra arguments to be used in the function call. Default is no extra
+ arguments.
+
+ Returns
+ -------
+ coef : ndarray, shape (deg + 1,)
+ Chebyshev coefficients of the interpolating series ordered from low to
+ high.
+
+ Examples
+ --------
+ >>> import numpy.polynomial.chebyshev as C
+ >>> C.chebinterpolate(lambda x: np.tanh(x) + 0.5, 8)
+ array([ 5.00000000e-01, 8.11675684e-01, -9.86864911e-17,
+ -5.42457905e-02, -2.71387850e-16, 4.51658839e-03,
+ 2.46716228e-17, -3.79694221e-04, -3.26899002e-16])
+
+ Notes
+ -----
+ The Chebyshev polynomials used in the interpolation are orthogonal when
+ sampled at the Chebyshev points of the first kind. If it is desired to
+ constrain some of the coefficients they can simply be set to the desired
+ value after the interpolation, no new interpolation or fit is needed. This
+ is especially useful if it is known apriori that some of coefficients are
+ zero. For instance, if the function is even then the coefficients of the
+ terms of odd degree in the result can be set to zero.
+
+ """
+ deg = np.asarray(deg)
+
+ # check arguments.
+ if deg.ndim > 0 or deg.dtype.kind not in 'iu' or deg.size == 0:
+ raise TypeError("deg must be an int")
+ if deg < 0:
+ raise ValueError("expected deg >= 0")
+
+ order = deg + 1
+ xcheb = chebpts1(order)
+ yfunc = func(xcheb, *args)
+ m = chebvander(xcheb, deg)
+ c = np.dot(m.T, yfunc)
+ c[0] /= order
+ c[1:] /= 0.5*order
+
+ return c
+
+
+def chebgauss(deg):
+ """
+ Gauss-Chebyshev quadrature.
+
+ Computes the sample points and weights for Gauss-Chebyshev quadrature.
+ These sample points and weights will correctly integrate polynomials of
+ degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
+ the weight function :math:`f(x) = 1/\\sqrt{1 - x^2}`.
+
+ Parameters
+ ----------
+ deg : int
+ Number of sample points and weights. It must be >= 1.
+
+ Returns
+ -------
+ x : ndarray
+ 1-D ndarray containing the sample points.
+ y : ndarray
+ 1-D ndarray containing the weights.
+
+ Notes
+ -----
+ The results have only been tested up to degree 100, higher degrees may
+ be problematic. For Gauss-Chebyshev there are closed form solutions for
+ the sample points and weights. If n = `deg`, then
+
+ .. math:: x_i = \\cos(\\pi (2 i - 1) / (2 n))
+
+ .. math:: w_i = \\pi / n
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg <= 0:
+ raise ValueError("deg must be a positive integer")
+
+ x = np.cos(np.pi * np.arange(1, 2*ideg, 2) / (2.0*ideg))
+ w = np.ones(ideg)*(np.pi/ideg)
+
+ return x, w
+
+
+def chebweight(x):
+ """
+ The weight function of the Chebyshev polynomials.
+
+ The weight function is :math:`1/\\sqrt{1 - x^2}` and the interval of
+ integration is :math:`[-1, 1]`. The Chebyshev polynomials are
+ orthogonal, but not normalized, with respect to this weight function.
+
+ Parameters
+ ----------
+ x : array_like
+ Values at which the weight function will be computed.
+
+ Returns
+ -------
+ w : ndarray
+ The weight function at `x`.
+ """
+ w = 1./(np.sqrt(1. + x) * np.sqrt(1. - x))
+ return w
+
+
+def chebpts1(npts):
+ """
+ Chebyshev points of the first kind.
+
+ The Chebyshev points of the first kind are the points ``cos(x)``,
+ where ``x = [pi*(k + .5)/npts for k in range(npts)]``.
+
+ Parameters
+ ----------
+ npts : int
+ Number of sample points desired.
+
+ Returns
+ -------
+ pts : ndarray
+ The Chebyshev points of the first kind.
+
+ See Also
+ --------
+ chebpts2
+ """
+ _npts = int(npts)
+ if _npts != npts:
+ raise ValueError("npts must be integer")
+ if _npts < 1:
+ raise ValueError("npts must be >= 1")
+
+ x = 0.5 * np.pi / _npts * np.arange(-_npts+1, _npts+1, 2)
+ return np.sin(x)
+
+
+def chebpts2(npts):
+ """
+ Chebyshev points of the second kind.
+
+ The Chebyshev points of the second kind are the points ``cos(x)``,
+ where ``x = [pi*k/(npts - 1) for k in range(npts)]`` sorted in ascending
+ order.
+
+ Parameters
+ ----------
+ npts : int
+ Number of sample points desired.
+
+ Returns
+ -------
+ pts : ndarray
+ The Chebyshev points of the second kind.
+ """
+ _npts = int(npts)
+ if _npts != npts:
+ raise ValueError("npts must be integer")
+ if _npts < 2:
+ raise ValueError("npts must be >= 2")
+
+ x = np.linspace(-np.pi, 0, _npts)
+ return np.cos(x)
+
+
+#
+# Chebyshev series class
+#
+
+class Chebyshev(ABCPolyBase):
+ """A Chebyshev series class.
+
+ The Chebyshev class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Chebyshev coefficients in order of increasing degree, i.e.,
+ ``(1, 2, 3)`` gives ``1*T_0(x) + 2*T_1(x) + 3*T_2(x)``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [-1., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [-1., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(chebadd)
+ _sub = staticmethod(chebsub)
+ _mul = staticmethod(chebmul)
+ _div = staticmethod(chebdiv)
+ _pow = staticmethod(chebpow)
+ _val = staticmethod(chebval)
+ _int = staticmethod(chebint)
+ _der = staticmethod(chebder)
+ _fit = staticmethod(chebfit)
+ _line = staticmethod(chebline)
+ _roots = staticmethod(chebroots)
+ _fromroots = staticmethod(chebfromroots)
+
+ @classmethod
+ def interpolate(cls, func, deg, domain=None, args=()):
+ """Interpolate a function at the Chebyshev points of the first kind.
+
+ Returns the series that interpolates `func` at the Chebyshev points of
+ the first kind scaled and shifted to the `domain`. The resulting series
+ tends to a minmax approximation of `func` when the function is
+ continuous in the domain.
+
+ Parameters
+ ----------
+ func : function
+ The function to be interpolated. It must be a function of a single
+ variable of the form ``f(x, a, b, c...)``, where ``a, b, c...`` are
+ extra arguments passed in the `args` parameter.
+ deg : int
+ Degree of the interpolating polynomial.
+ domain : {None, [beg, end]}, optional
+ Domain over which `func` is interpolated. The default is None, in
+ which case the domain is [-1, 1].
+ args : tuple, optional
+ Extra arguments to be used in the function call. Default is no
+ extra arguments.
+
+ Returns
+ -------
+ polynomial : Chebyshev instance
+ Interpolating Chebyshev instance.
+
+ Notes
+ -----
+ See `numpy.polynomial.chebinterpolate` for more details.
+
+ """
+ if domain is None:
+ domain = cls.domain
+ xfunc = lambda x: func(pu.mapdomain(x, cls.window, domain), *args)
+ coef = chebinterpolate(xfunc, deg)
+ return cls(coef, domain=domain)
+
+ # Virtual properties
+ domain = np.array(chebdomain)
+ window = np.array(chebdomain)
+ basis_name = 'T'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..067af81d635d75511469f6cd130d774f00391be6
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/chebyshev.pyi
@@ -0,0 +1,192 @@
+from collections.abc import Callable, Iterable
+from typing import (
+ Any,
+ Concatenate,
+ Final,
+ Literal as L,
+ TypeVar,
+ overload,
+)
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _IntLike_co
+
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _SeriesLikeCoef_co,
+ _Array1,
+ _Series,
+ _Array2,
+ _CoefSeries,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncGauss,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPoly2Ortho,
+ _FuncPow,
+ _FuncPts,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncValFromRoots,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncWeight,
+)
+from .polyutils import trimcoef as chebtrim
+
+__all__ = [
+ "chebzero",
+ "chebone",
+ "chebx",
+ "chebdomain",
+ "chebline",
+ "chebadd",
+ "chebsub",
+ "chebmulx",
+ "chebmul",
+ "chebdiv",
+ "chebpow",
+ "chebval",
+ "chebder",
+ "chebint",
+ "cheb2poly",
+ "poly2cheb",
+ "chebfromroots",
+ "chebvander",
+ "chebfit",
+ "chebtrim",
+ "chebroots",
+ "chebpts1",
+ "chebpts2",
+ "Chebyshev",
+ "chebval2d",
+ "chebval3d",
+ "chebgrid2d",
+ "chebgrid3d",
+ "chebvander2d",
+ "chebvander3d",
+ "chebcompanion",
+ "chebgauss",
+ "chebweight",
+ "chebinterpolate",
+]
+
+_SCT = TypeVar("_SCT", bound=np.number[Any] | np.object_)
+def _cseries_to_zseries(c: npt.NDArray[_SCT]) -> _Series[_SCT]: ...
+def _zseries_to_cseries(zs: npt.NDArray[_SCT]) -> _Series[_SCT]: ...
+def _zseries_mul(
+ z1: npt.NDArray[_SCT],
+ z2: npt.NDArray[_SCT],
+) -> _Series[_SCT]: ...
+def _zseries_div(
+ z1: npt.NDArray[_SCT],
+ z2: npt.NDArray[_SCT],
+) -> _Series[_SCT]: ...
+def _zseries_der(zs: npt.NDArray[_SCT]) -> _Series[_SCT]: ...
+def _zseries_int(zs: npt.NDArray[_SCT]) -> _Series[_SCT]: ...
+
+poly2cheb: _FuncPoly2Ortho[L["poly2cheb"]]
+cheb2poly: _FuncUnOp[L["cheb2poly"]]
+
+chebdomain: Final[_Array2[np.float64]]
+chebzero: Final[_Array1[np.int_]]
+chebone: Final[_Array1[np.int_]]
+chebx: Final[_Array2[np.int_]]
+
+chebline: _FuncLine[L["chebline"]]
+chebfromroots: _FuncFromRoots[L["chebfromroots"]]
+chebadd: _FuncBinOp[L["chebadd"]]
+chebsub: _FuncBinOp[L["chebsub"]]
+chebmulx: _FuncUnOp[L["chebmulx"]]
+chebmul: _FuncBinOp[L["chebmul"]]
+chebdiv: _FuncBinOp[L["chebdiv"]]
+chebpow: _FuncPow[L["chebpow"]]
+chebder: _FuncDer[L["chebder"]]
+chebint: _FuncInteg[L["chebint"]]
+chebval: _FuncVal[L["chebval"]]
+chebval2d: _FuncVal2D[L["chebval2d"]]
+chebval3d: _FuncVal3D[L["chebval3d"]]
+chebvalfromroots: _FuncValFromRoots[L["chebvalfromroots"]]
+chebgrid2d: _FuncVal2D[L["chebgrid2d"]]
+chebgrid3d: _FuncVal3D[L["chebgrid3d"]]
+chebvander: _FuncVander[L["chebvander"]]
+chebvander2d: _FuncVander2D[L["chebvander2d"]]
+chebvander3d: _FuncVander3D[L["chebvander3d"]]
+chebfit: _FuncFit[L["chebfit"]]
+chebcompanion: _FuncCompanion[L["chebcompanion"]]
+chebroots: _FuncRoots[L["chebroots"]]
+chebgauss: _FuncGauss[L["chebgauss"]]
+chebweight: _FuncWeight[L["chebweight"]]
+chebpts1: _FuncPts[L["chebpts1"]]
+chebpts2: _FuncPts[L["chebpts2"]]
+
+# keep in sync with `Chebyshev.interpolate`
+_RT = TypeVar("_RT", bound=np.number[Any] | np.bool | np.object_)
+@overload
+def chebinterpolate(
+ func: np.ufunc,
+ deg: _IntLike_co,
+ args: tuple[()] = ...,
+) -> npt.NDArray[np.float64 | np.complex128 | np.object_]: ...
+@overload
+def chebinterpolate(
+ func: Callable[[npt.NDArray[np.float64]], _RT],
+ deg: _IntLike_co,
+ args: tuple[()] = ...,
+) -> npt.NDArray[_RT]: ...
+@overload
+def chebinterpolate(
+ func: Callable[Concatenate[npt.NDArray[np.float64], ...], _RT],
+ deg: _IntLike_co,
+ args: Iterable[Any],
+) -> npt.NDArray[_RT]: ...
+
+_Self = TypeVar("_Self", bound=object)
+
+class Chebyshev(ABCPolyBase[L["T"]]):
+ @overload
+ @classmethod
+ def interpolate(
+ cls: type[_Self],
+ /,
+ func: Callable[[npt.NDArray[np.float64]], _CoefSeries],
+ deg: _IntLike_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ args: tuple[()] = ...,
+ ) -> _Self: ...
+ @overload
+ @classmethod
+ def interpolate(
+ cls: type[_Self],
+ /,
+ func: Callable[
+ Concatenate[npt.NDArray[np.float64], ...],
+ _CoefSeries,
+ ],
+ deg: _IntLike_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ *,
+ args: Iterable[Any],
+ ) -> _Self: ...
+ @overload
+ @classmethod
+ def interpolate(
+ cls: type[_Self],
+ func: Callable[
+ Concatenate[npt.NDArray[np.float64], ...],
+ _CoefSeries,
+ ],
+ deg: _IntLike_co,
+ domain: None | _SeriesLikeCoef_co,
+ args: Iterable[Any],
+ /,
+ ) -> _Self: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.py
new file mode 100644
index 0000000000000000000000000000000000000000..24e51dca7fa55c83dfa467013440e160b260d9d9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.py
@@ -0,0 +1,1740 @@
+"""
+==============================================================
+Hermite Series, "Physicists" (:mod:`numpy.polynomial.hermite`)
+==============================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with Hermite series, including a `Hermite` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with such polynomials is in the
+docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+.. autosummary::
+ :toctree: generated/
+
+ Hermite
+
+Constants
+---------
+.. autosummary::
+ :toctree: generated/
+
+ hermdomain
+ hermzero
+ hermone
+ hermx
+
+Arithmetic
+----------
+.. autosummary::
+ :toctree: generated/
+
+ hermadd
+ hermsub
+ hermmulx
+ hermmul
+ hermdiv
+ hermpow
+ hermval
+ hermval2d
+ hermval3d
+ hermgrid2d
+ hermgrid3d
+
+Calculus
+--------
+.. autosummary::
+ :toctree: generated/
+
+ hermder
+ hermint
+
+Misc Functions
+--------------
+.. autosummary::
+ :toctree: generated/
+
+ hermfromroots
+ hermroots
+ hermvander
+ hermvander2d
+ hermvander3d
+ hermgauss
+ hermweight
+ hermcompanion
+ hermfit
+ hermtrim
+ hermline
+ herm2poly
+ poly2herm
+
+See also
+--------
+`numpy.polynomial`
+
+"""
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+__all__ = [
+ 'hermzero', 'hermone', 'hermx', 'hermdomain', 'hermline', 'hermadd',
+ 'hermsub', 'hermmulx', 'hermmul', 'hermdiv', 'hermpow', 'hermval',
+ 'hermder', 'hermint', 'herm2poly', 'poly2herm', 'hermfromroots',
+ 'hermvander', 'hermfit', 'hermtrim', 'hermroots', 'Hermite',
+ 'hermval2d', 'hermval3d', 'hermgrid2d', 'hermgrid3d', 'hermvander2d',
+ 'hermvander3d', 'hermcompanion', 'hermgauss', 'hermweight']
+
+hermtrim = pu.trimcoef
+
+
+def poly2herm(pol):
+ """
+ poly2herm(pol)
+
+ Convert a polynomial to a Hermite series.
+
+ Convert an array representing the coefficients of a polynomial (relative
+ to the "standard" basis) ordered from lowest degree to highest, to an
+ array of the coefficients of the equivalent Hermite series, ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ pol : array_like
+ 1-D array containing the polynomial coefficients
+
+ Returns
+ -------
+ c : ndarray
+ 1-D array containing the coefficients of the equivalent Hermite
+ series.
+
+ See Also
+ --------
+ herm2poly
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import poly2herm
+ >>> poly2herm(np.arange(4))
+ array([1. , 2.75 , 0.5 , 0.375])
+
+ """
+ [pol] = pu.as_series([pol])
+ deg = len(pol) - 1
+ res = 0
+ for i in range(deg, -1, -1):
+ res = hermadd(hermmulx(res), pol[i])
+ return res
+
+
+def herm2poly(c):
+ """
+ Convert a Hermite series to a polynomial.
+
+ Convert an array representing the coefficients of a Hermite series,
+ ordered from lowest degree to highest, to an array of the coefficients
+ of the equivalent polynomial (relative to the "standard" basis) ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array containing the Hermite series coefficients, ordered
+ from lowest order term to highest.
+
+ Returns
+ -------
+ pol : ndarray
+ 1-D array containing the coefficients of the equivalent polynomial
+ (relative to the "standard" basis) ordered from lowest order term
+ to highest.
+
+ See Also
+ --------
+ poly2herm
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import herm2poly
+ >>> herm2poly([ 1. , 2.75 , 0.5 , 0.375])
+ array([0., 1., 2., 3.])
+
+ """
+ from .polynomial import polyadd, polysub, polymulx
+
+ [c] = pu.as_series([c])
+ n = len(c)
+ if n == 1:
+ return c
+ if n == 2:
+ c[1] *= 2
+ return c
+ else:
+ c0 = c[-2]
+ c1 = c[-1]
+ # i is the current degree of c1
+ for i in range(n - 1, 1, -1):
+ tmp = c0
+ c0 = polysub(c[i - 2], c1*(2*(i - 1)))
+ c1 = polyadd(tmp, polymulx(c1)*2)
+ return polyadd(c0, polymulx(c1)*2)
+
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Hermite
+hermdomain = np.array([-1., 1.])
+
+# Hermite coefficients representing zero.
+hermzero = np.array([0])
+
+# Hermite coefficients representing one.
+hermone = np.array([1])
+
+# Hermite coefficients representing the identity x.
+hermx = np.array([0, 1/2])
+
+
+def hermline(off, scl):
+ """
+ Hermite series whose graph is a straight line.
+
+
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The specified line is given by ``off + scl*x``.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the Hermite series for
+ ``off + scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyline
+ numpy.polynomial.chebyshev.chebline
+ numpy.polynomial.legendre.legline
+ numpy.polynomial.laguerre.lagline
+ numpy.polynomial.hermite_e.hermeline
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermline, hermval
+ >>> hermval(0,hermline(3, 2))
+ 3.0
+ >>> hermval(1,hermline(3, 2))
+ 5.0
+
+ """
+ if scl != 0:
+ return np.array([off, scl/2])
+ else:
+ return np.array([off])
+
+
+def hermfromroots(roots):
+ """
+ Generate a Hermite series with given roots.
+
+ The function returns the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ in Hermite form, where the :math:`r_n` are the roots specified in `roots`.
+ If a zero has multiplicity n, then it must appear in `roots` n times.
+ For instance, if 2 is a root of multiplicity three and 3 is a root of
+ multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
+ roots can appear in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * H_1(x) + ... + c_n * H_n(x)
+
+ The coefficient of the last term is not generally 1 for monic
+ polynomials in Hermite form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of coefficients. If all roots are real then `out` is a
+ real array, if some of the roots are complex, then `out` is complex
+ even if all the coefficients in the result are real (see Examples
+ below).
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfromroots
+ numpy.polynomial.legendre.legfromroots
+ numpy.polynomial.laguerre.lagfromroots
+ numpy.polynomial.chebyshev.chebfromroots
+ numpy.polynomial.hermite_e.hermefromroots
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermfromroots, hermval
+ >>> coef = hermfromroots((-1, 0, 1))
+ >>> hermval((-1, 0, 1), coef)
+ array([0., 0., 0.])
+ >>> coef = hermfromroots((-1j, 1j))
+ >>> hermval((-1j, 1j), coef)
+ array([0.+0.j, 0.+0.j])
+
+ """
+ return pu._fromroots(hermline, hermmul, roots)
+
+
+def hermadd(c1, c2):
+ """
+ Add one Hermite series to another.
+
+ Returns the sum of two Hermite series `c1` + `c2`. The arguments
+ are sequences of coefficients ordered from lowest order term to
+ highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the Hermite series of their sum.
+
+ See Also
+ --------
+ hermsub, hermmulx, hermmul, hermdiv, hermpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the sum of two Hermite series
+ is a Hermite series (without having to "reproject" the result onto
+ the basis set) so addition, just like that of "standard" polynomials,
+ is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermadd
+ >>> hermadd([1, 2, 3], [1, 2, 3, 4])
+ array([2., 4., 6., 4.])
+
+ """
+ return pu._add(c1, c2)
+
+
+def hermsub(c1, c2):
+ """
+ Subtract one Hermite series from another.
+
+ Returns the difference of two Hermite series `c1` - `c2`. The
+ sequences of coefficients are from lowest order term to highest, i.e.,
+ [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Hermite series coefficients representing their difference.
+
+ See Also
+ --------
+ hermadd, hermmulx, hermmul, hermdiv, hermpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the difference of two Hermite
+ series is a Hermite series (without having to "reproject" the result
+ onto the basis set) so subtraction, just like that of "standard"
+ polynomials, is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermsub
+ >>> hermsub([1, 2, 3, 4], [1, 2, 3])
+ array([0., 0., 0., 4.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def hermmulx(c):
+ """Multiply a Hermite series by x.
+
+ Multiply the Hermite series `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ hermadd, hermsub, hermmul, hermdiv, hermpow
+
+ Notes
+ -----
+ The multiplication uses the recursion relationship for Hermite
+ polynomials in the form
+
+ .. math::
+
+ xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x))
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermmulx
+ >>> hermmulx([1, 2, 3])
+ array([2. , 6.5, 1. , 1.5])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]*0
+ prd[1] = c[0]/2
+ for i in range(1, len(c)):
+ prd[i + 1] = c[i]/2
+ prd[i - 1] += c[i]*i
+ return prd
+
+
+def hermmul(c1, c2):
+ """
+ Multiply one Hermite series by another.
+
+ Returns the product of two Hermite series `c1` * `c2`. The arguments
+ are sequences of coefficients, from lowest order "term" to highest,
+ e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Hermite series coefficients representing their product.
+
+ See Also
+ --------
+ hermadd, hermsub, hermmulx, hermdiv, hermpow
+
+ Notes
+ -----
+ In general, the (polynomial) product of two C-series results in terms
+ that are not in the Hermite polynomial basis set. Thus, to express
+ the product as a Hermite series, it is necessary to "reproject" the
+ product onto said basis set, which may produce "unintuitive" (but
+ correct) results; see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermmul
+ >>> hermmul([1, 2, 3], [0, 1, 2])
+ array([52., 29., 52., 7., 6.])
+
+ """
+ # s1, s2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+
+ if len(c1) > len(c2):
+ c = c2
+ xs = c1
+ else:
+ c = c1
+ xs = c2
+
+ if len(c) == 1:
+ c0 = c[0]*xs
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]*xs
+ c1 = c[1]*xs
+ else:
+ nd = len(c)
+ c0 = c[-2]*xs
+ c1 = c[-1]*xs
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = hermsub(c[-i]*xs, c1*(2*(nd - 1)))
+ c1 = hermadd(tmp, hermmulx(c1)*2)
+ return hermadd(c0, hermmulx(c1)*2)
+
+
+def hermdiv(c1, c2):
+ """
+ Divide one Hermite series by another.
+
+ Returns the quotient-with-remainder of two Hermite series
+ `c1` / `c2`. The arguments are sequences of coefficients from lowest
+ order "term" to highest, e.g., [1,2,3] represents the series
+ ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ [quo, rem] : ndarrays
+ Of Hermite series coefficients representing the quotient and
+ remainder.
+
+ See Also
+ --------
+ hermadd, hermsub, hermmulx, hermmul, hermpow
+
+ Notes
+ -----
+ In general, the (polynomial) division of one Hermite series by another
+ results in quotient and remainder terms that are not in the Hermite
+ polynomial basis set. Thus, to express these results as a Hermite
+ series, it is necessary to "reproject" the results onto the Hermite
+ basis set, which may produce "unintuitive" (but correct) results; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermdiv
+ >>> hermdiv([ 52., 29., 52., 7., 6.], [0, 1, 2])
+ (array([1., 2., 3.]), array([0.]))
+ >>> hermdiv([ 54., 31., 52., 7., 6.], [0, 1, 2])
+ (array([1., 2., 3.]), array([2., 2.]))
+ >>> hermdiv([ 53., 30., 52., 7., 6.], [0, 1, 2])
+ (array([1., 2., 3.]), array([1., 1.]))
+
+ """
+ return pu._div(hermmul, c1, c2)
+
+
+def hermpow(c, pow, maxpower=16):
+ """Raise a Hermite series to a power.
+
+ Returns the Hermite series `c` raised to the power `pow`. The
+ argument `c` is a sequence of coefficients ordered from low to high.
+ i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Hermite series coefficients ordered from low to
+ high.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Hermite series of power.
+
+ See Also
+ --------
+ hermadd, hermsub, hermmulx, hermmul, hermdiv
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermpow
+ >>> hermpow([1, 2, 3], 2)
+ array([81., 52., 82., 12., 9.])
+
+ """
+ return pu._pow(hermmul, c, pow, maxpower)
+
+
+def hermder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a Hermite series.
+
+ Returns the Hermite series coefficients `c` differentiated `m` times
+ along `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The argument
+ `c` is an array of coefficients from low to high degree along each
+ axis, e.g., [1,2,3] represents the series ``1*H_0 + 2*H_1 + 3*H_2``
+ while [[1,2],[1,2]] represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) +
+ 2*H_0(x)*H_1(y) + 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is
+ ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Hermite series coefficients. If `c` is multidimensional the
+ different axis correspond to different variables with the degree in
+ each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change of
+ variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Hermite series of the derivative.
+
+ See Also
+ --------
+ hermint
+
+ Notes
+ -----
+ In general, the result of differentiating a Hermite series does not
+ resemble the same operation on a power series. Thus the result of this
+ function may be "unintuitive," albeit correct; see Examples section
+ below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermder
+ >>> hermder([ 1. , 0.5, 0.5, 0.5])
+ array([1., 2., 3.])
+ >>> hermder([-0.5, 1./2., 1./8., 1./12., 1./16.], m=2)
+ array([1., 2., 3.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ c = c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=c.dtype)
+ for j in range(n, 0, -1):
+ der[j - 1] = (2*j)*c[j]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def hermint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a Hermite series.
+
+ Returns the Hermite series coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients from low to high degree along each axis, e.g., [1,2,3]
+ represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]]
+ represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
+ 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Hermite series coefficients. If c is multidimensional the
+ different axis correspond to different variables with the degree in
+ each axis given by the corresponding index.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at
+ ``lbnd`` is the first value in the list, the value of the second
+ integral at ``lbnd`` is the second value, etc. If ``k == []`` (the
+ default), all constants are set to zero. If ``m == 1``, a single
+ scalar can be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ Hermite series coefficients of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ hermder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`.
+ Why is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a` - perhaps not what one would have first thought.
+
+ Also note that, in general, the result of integrating a C-series needs
+ to be "reprojected" onto the C-series basis set. Thus, typically,
+ the result of this function is "unintuitive," albeit correct; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermint
+ >>> hermint([1,2,3]) # integrate once, value 0 at 0.
+ array([1. , 0.5, 0.5, 0.5])
+ >>> hermint([1,2,3], m=2) # integrate twice, value & deriv 0 at 0
+ array([-0.5 , 0.5 , 0.125 , 0.08333333, 0.0625 ]) # may vary
+ >>> hermint([1,2,3], k=1) # integrate once, value 1 at 0.
+ array([2. , 0.5, 0.5, 0.5])
+ >>> hermint([1,2,3], lbnd=-1) # integrate once, value 0 at -1
+ array([-2. , 0.5, 0.5, 0.5])
+ >>> hermint([1,2,3], m=2, k=[1,2], lbnd=-1)
+ array([ 1.66666667, -0.5 , 0.125 , 0.08333333, 0.0625 ]) # may vary
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ k = list(k) + [0]*(cnt - len(k))
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=c.dtype)
+ tmp[0] = c[0]*0
+ tmp[1] = c[0]/2
+ for j in range(1, n):
+ tmp[j + 1] = c[j]/(2*(j + 1))
+ tmp[0] += k[i] - hermval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def hermval(x, c, tensor=True):
+ """
+ Evaluate an Hermite series at points x.
+
+ If `c` is of length ``n + 1``, this function returns the value:
+
+ .. math:: p(x) = c_0 * H_0(x) + c_1 * H_1(x) + ... + c_n * H_n(x)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, algebra_like
+ The shape of the return value is described above.
+
+ See Also
+ --------
+ hermval2d, hermgrid2d, hermval3d, hermgrid3d
+
+ Notes
+ -----
+ The evaluation uses Clenshaw recursion, aka synthetic division.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermval
+ >>> coef = [1,2,3]
+ >>> hermval(1, coef)
+ 11.0
+ >>> hermval([[1,2],[3,4]], coef)
+ array([[ 11., 51.],
+ [115., 203.]])
+
+ """
+ c = np.array(c, ndmin=1, copy=None)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ x2 = x*2
+ if len(c) == 1:
+ c0 = c[0]
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]
+ c1 = c[1]
+ else:
+ nd = len(c)
+ c0 = c[-2]
+ c1 = c[-1]
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = c[-i] - c1*(2*(nd - 1))
+ c1 = tmp + c1*x2
+ return c0 + c1*x2
+
+
+def hermval2d(x, y, c):
+ """
+ Evaluate a 2-D Hermite series at points (x, y).
+
+ This function returns the values:
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * H_i(x) * H_j(y)
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` is a 1-D array a one is implicitly appended to its shape to make
+ it 2-D. The shape of the result will be c.shape[2:] + x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and if it isn't an ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than two the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points formed with
+ pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ hermval, hermgrid2d, hermval3d, hermgrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermval2d
+ >>> x = [1, 2]
+ >>> y = [4, 5]
+ >>> c = [[1, 2, 3], [4, 5, 6]]
+ >>> hermval2d(x, y, c)
+ array([1035., 2883.])
+
+ """
+ return pu._valnd(hermval, c, x, y)
+
+
+def hermgrid2d(x, y, c):
+ """
+ Evaluate a 2-D Hermite series on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * H_i(a) * H_j(b)
+
+ where the points ``(a, b)`` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ hermval, hermval2d, hermval3d, hermgrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermgrid2d
+ >>> x = [1, 2, 3]
+ >>> y = [4, 5]
+ >>> c = [[1, 2, 3], [4, 5, 6]]
+ >>> hermgrid2d(x, y, c)
+ array([[1035., 1599.],
+ [1867., 2883.],
+ [2699., 4167.]])
+
+ """
+ return pu._gridnd(hermval, c, x, y)
+
+
+def hermval3d(x, y, z, c):
+ """
+ Evaluate a 3-D Hermite series at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * H_i(x) * H_j(y) * H_k(z)
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ ``(x, y, z)``, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ hermval, hermval2d, hermgrid2d, hermgrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermval3d
+ >>> x = [1, 2]
+ >>> y = [4, 5]
+ >>> z = [6, 7]
+ >>> c = [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]
+ >>> hermval3d(x, y, z, c)
+ array([ 40077., 120131.])
+
+ """
+ return pu._valnd(hermval, c, x, y, z)
+
+
+def hermgrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D Hermite series on the Cartesian product of x, y, and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * H_i(a) * H_j(b) * H_k(c)
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ hermval, hermval2d, hermgrid2d, hermval3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermgrid3d
+ >>> x = [1, 2]
+ >>> y = [4, 5]
+ >>> z = [6, 7]
+ >>> c = [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]
+ >>> hermgrid3d(x, y, z, c)
+ array([[[ 40077., 54117.],
+ [ 49293., 66561.]],
+ [[ 72375., 97719.],
+ [ 88975., 120131.]]])
+
+ """
+ return pu._gridnd(hermval, c, x, y, z)
+
+
+def hermvander(x, deg):
+ """Pseudo-Vandermonde matrix of given degree.
+
+ Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
+ `x`. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = H_i(x),
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the degree of the Hermite polynomial.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ array ``V = hermvander(x, n)``, then ``np.dot(V, c)`` and
+ ``hermval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of Hermite series of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray
+ The pseudo-Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where The last index is the degree of the
+ corresponding Hermite polynomial. The dtype will be the same as
+ the converted `x`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite import hermvander
+ >>> x = np.array([-1, 0, 1])
+ >>> hermvander(x, 3)
+ array([[ 1., -2., 2., 4.],
+ [ 1., 0., -2., -0.],
+ [ 1., 2., 2., -4.]])
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ v[0] = x*0 + 1
+ if ideg > 0:
+ x2 = x*2
+ v[1] = x2
+ for i in range(2, ideg + 1):
+ v[i] = (v[i-1]*x2 - v[i-2]*(2*(i - 1)))
+ return np.moveaxis(v, 0, -1)
+
+
+def hermvander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = H_i(x) * H_j(y),
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the degrees of
+ the Hermite polynomials.
+
+ If ``V = hermvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``hermval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D Hermite
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ hermvander, hermvander3d, hermval2d, hermval3d
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite import hermvander2d
+ >>> x = np.array([-1, 0, 1])
+ >>> y = np.array([-1, 0, 1])
+ >>> hermvander2d(x, y, [2, 2])
+ array([[ 1., -2., 2., -2., 4., -4., 2., -4., 4.],
+ [ 1., 0., -2., 0., 0., -0., -2., -0., 4.],
+ [ 1., 2., 2., 2., 4., 4., 2., 4., 4.]])
+
+ """
+ return pu._vander_nd_flat((hermvander, hermvander), (x, y), deg)
+
+
+def hermvander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = H_i(x)*H_j(y)*H_k(z),
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the degrees of the Hermite polynomials.
+
+ If ``V = hermvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``hermval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D Hermite
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ hermvander, hermvander3d, hermval2d, hermval3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermvander3d
+ >>> x = np.array([-1, 0, 1])
+ >>> y = np.array([-1, 0, 1])
+ >>> z = np.array([-1, 0, 1])
+ >>> hermvander3d(x, y, z, [0, 1, 2])
+ array([[ 1., -2., 2., -2., 4., -4.],
+ [ 1., 0., -2., 0., 0., -0.],
+ [ 1., 2., 2., 2., 4., 4.]])
+
+ """
+ return pu._vander_nd_flat((hermvander, hermvander, hermvander), (x, y, z), deg)
+
+
+def hermfit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least squares fit of Hermite series to data.
+
+ Return the coefficients of a Hermite series of degree `deg` that is the
+ least squares fit to the data values `y` given at points `x`. If `y` is
+ 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
+ fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * H_1(x) + ... + c_n * H_n(x),
+
+ where `n` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,) or (M, K)
+ y-coordinates of the sample points. Several data sets of sample
+ points sharing the same x-coordinates can be fitted at once by
+ passing in a 2D-array that contains one dataset per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller than
+ this relative to the largest singular value will be ignored. The
+ default value is len(x)*eps, where eps is the relative precision of
+ the float type, about 2e-16 in most cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False (the
+ default) just the coefficients are returned, when True diagnostic
+ information from the singular value decomposition is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (M,) or (M, K)
+ Hermite coefficients ordered from low to high. If `y` was 2-D,
+ the coefficients for the data in column k of `y` are in column
+ `k`.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Warns
+ -----
+ RankWarning
+ The rank of the coefficient matrix in the least-squares fit is
+ deficient. The warning is only raised if ``full == False``. The
+ warnings can be turned off by
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebfit
+ numpy.polynomial.legendre.legfit
+ numpy.polynomial.laguerre.lagfit
+ numpy.polynomial.polynomial.polyfit
+ numpy.polynomial.hermite_e.hermefit
+ hermval : Evaluates a Hermite series.
+ hermvander : Vandermonde matrix of Hermite series.
+ hermweight : Hermite weight function
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the Hermite series `p` that
+ minimizes the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where the :math:`w_j` are the weights. This problem is solved by
+ setting up the (typically) overdetermined matrix equation
+
+ .. math:: V(x) * c = w * y,
+
+ where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
+ coefficients to be solved for, `w` are the weights, `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of `V`.
+
+ If some of the singular values of `V` are so small that they are
+ neglected, then a `~exceptions.RankWarning` will be issued. This means that
+ the coefficient values may be poorly determined. Using a lower order fit
+ will usually get rid of the warning. The `rcond` parameter can also be
+ set to a value smaller than its default, but the resulting fit may be
+ spurious and have large contributions from roundoff error.
+
+ Fits using Hermite series are probably most useful when the data can be
+ approximated by ``sqrt(w(x)) * p(x)``, where ``w(x)`` is the Hermite
+ weight. In that case the weight ``sqrt(w(x[i]))`` should be used
+ together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
+ available as `hermweight`.
+
+ References
+ ----------
+ .. [1] Wikipedia, "Curve fitting",
+ https://en.wikipedia.org/wiki/Curve_fitting
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite import hermfit, hermval
+ >>> x = np.linspace(-10, 10)
+ >>> rng = np.random.default_rng()
+ >>> err = rng.normal(scale=1./10, size=len(x))
+ >>> y = hermval(x, [1, 2, 3]) + err
+ >>> hermfit(x, y, 2)
+ array([1.02294967, 2.00016403, 2.99994614]) # may vary
+
+ """
+ return pu._fit(hermvander, x, y, deg, rcond, full, w)
+
+
+def hermcompanion(c):
+ """Return the scaled companion matrix of c.
+
+ The basis polynomials are scaled so that the companion matrix is
+ symmetric when `c` is an Hermite basis polynomial. This provides
+ better eigenvalue estimates than the unscaled case and for basis
+ polynomials the eigenvalues are guaranteed to be real if
+ `numpy.linalg.eigvalsh` is used to obtain them.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Hermite series coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Scaled companion matrix of dimensions (deg, deg).
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermcompanion
+ >>> hermcompanion([1, 0, 1])
+ array([[0. , 0.35355339],
+ [0.70710678, 0. ]])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[-.5*c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ scl = np.hstack((1., 1./np.sqrt(2.*np.arange(n - 1, 0, -1))))
+ scl = np.multiply.accumulate(scl)[::-1]
+ top = mat.reshape(-1)[1::n+1]
+ bot = mat.reshape(-1)[n::n+1]
+ top[...] = np.sqrt(.5*np.arange(1, n))
+ bot[...] = top
+ mat[:, -1] -= scl*c[:-1]/(2.0*c[-1])
+ return mat
+
+
+def hermroots(c):
+ """
+ Compute the roots of a Hermite series.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * H_i(x).
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the series. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyroots
+ numpy.polynomial.legendre.legroots
+ numpy.polynomial.laguerre.lagroots
+ numpy.polynomial.chebyshev.chebroots
+ numpy.polynomial.hermite_e.hermeroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the series for such
+ values. Roots with multiplicity greater than 1 will also show larger
+ errors as the value of the series near such points is relatively
+ insensitive to errors in the roots. Isolated roots near the origin can
+ be improved by a few iterations of Newton's method.
+
+ The Hermite series basis polynomials aren't powers of `x` so the
+ results of this function may seem unintuitive.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermroots, hermfromroots
+ >>> coef = hermfromroots([-1, 0, 1])
+ >>> coef
+ array([0. , 0.25 , 0. , 0.125])
+ >>> hermroots(coef)
+ array([-1.00000000e+00, -1.38777878e-17, 1.00000000e+00])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) <= 1:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([-.5*c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = hermcompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+def _normed_hermite_n(x, n):
+ """
+ Evaluate a normalized Hermite polynomial.
+
+ Compute the value of the normalized Hermite polynomial of degree ``n``
+ at the points ``x``.
+
+
+ Parameters
+ ----------
+ x : ndarray of double.
+ Points at which to evaluate the function
+ n : int
+ Degree of the normalized Hermite function to be evaluated.
+
+ Returns
+ -------
+ values : ndarray
+ The shape of the return value is described above.
+
+ Notes
+ -----
+ This function is needed for finding the Gauss points and integration
+ weights for high degrees. The values of the standard Hermite functions
+ overflow when n >= 207.
+
+ """
+ if n == 0:
+ return np.full(x.shape, 1/np.sqrt(np.sqrt(np.pi)))
+
+ c0 = 0.
+ c1 = 1./np.sqrt(np.sqrt(np.pi))
+ nd = float(n)
+ for i in range(n - 1):
+ tmp = c0
+ c0 = -c1*np.sqrt((nd - 1.)/nd)
+ c1 = tmp + c1*x*np.sqrt(2./nd)
+ nd = nd - 1.0
+ return c0 + c1*x*np.sqrt(2)
+
+
+def hermgauss(deg):
+ """
+ Gauss-Hermite quadrature.
+
+ Computes the sample points and weights for Gauss-Hermite quadrature.
+ These sample points and weights will correctly integrate polynomials of
+ degree :math:`2*deg - 1` or less over the interval :math:`[-\\inf, \\inf]`
+ with the weight function :math:`f(x) = \\exp(-x^2)`.
+
+ Parameters
+ ----------
+ deg : int
+ Number of sample points and weights. It must be >= 1.
+
+ Returns
+ -------
+ x : ndarray
+ 1-D ndarray containing the sample points.
+ y : ndarray
+ 1-D ndarray containing the weights.
+
+ Notes
+ -----
+ The results have only been tested up to degree 100, higher degrees may
+ be problematic. The weights are determined by using the fact that
+
+ .. math:: w_k = c / (H'_n(x_k) * H_{n-1}(x_k))
+
+ where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
+ is the k'th root of :math:`H_n`, and then scaling the results to get
+ the right value when integrating 1.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite import hermgauss
+ >>> hermgauss(2)
+ (array([-0.70710678, 0.70710678]), array([0.88622693, 0.88622693]))
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg <= 0:
+ raise ValueError("deg must be a positive integer")
+
+ # first approximation of roots. We use the fact that the companion
+ # matrix is symmetric in this case in order to obtain better zeros.
+ c = np.array([0]*deg + [1], dtype=np.float64)
+ m = hermcompanion(c)
+ x = la.eigvalsh(m)
+
+ # improve roots by one application of Newton
+ dy = _normed_hermite_n(x, ideg)
+ df = _normed_hermite_n(x, ideg - 1) * np.sqrt(2*ideg)
+ x -= dy/df
+
+ # compute the weights. We scale the factor to avoid possible numerical
+ # overflow.
+ fm = _normed_hermite_n(x, ideg - 1)
+ fm /= np.abs(fm).max()
+ w = 1/(fm * fm)
+
+ # for Hermite we can also symmetrize
+ w = (w + w[::-1])/2
+ x = (x - x[::-1])/2
+
+ # scale w to get the right value
+ w *= np.sqrt(np.pi) / w.sum()
+
+ return x, w
+
+
+def hermweight(x):
+ """
+ Weight function of the Hermite polynomials.
+
+ The weight function is :math:`\\exp(-x^2)` and the interval of
+ integration is :math:`[-\\inf, \\inf]`. the Hermite polynomials are
+ orthogonal, but not normalized, with respect to this weight function.
+
+ Parameters
+ ----------
+ x : array_like
+ Values at which the weight function will be computed.
+
+ Returns
+ -------
+ w : ndarray
+ The weight function at `x`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite import hermweight
+ >>> x = np.arange(-2, 2)
+ >>> hermweight(x)
+ array([0.01831564, 0.36787944, 1. , 0.36787944])
+
+ """
+ w = np.exp(-x**2)
+ return w
+
+
+#
+# Hermite series class
+#
+
+class Hermite(ABCPolyBase):
+ """An Hermite series class.
+
+ The Hermite class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Hermite coefficients in order of increasing degree, i.e,
+ ``(1, 2, 3)`` gives ``1*H_0(x) + 2*H_1(x) + 3*H_2(x)``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [-1., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [-1., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(hermadd)
+ _sub = staticmethod(hermsub)
+ _mul = staticmethod(hermmul)
+ _div = staticmethod(hermdiv)
+ _pow = staticmethod(hermpow)
+ _val = staticmethod(hermval)
+ _int = staticmethod(hermint)
+ _der = staticmethod(hermder)
+ _fit = staticmethod(hermfit)
+ _line = staticmethod(hermline)
+ _roots = staticmethod(hermroots)
+ _fromroots = staticmethod(hermfromroots)
+
+ # Virtual properties
+ domain = np.array(hermdomain)
+ window = np.array(hermdomain)
+ basis_name = 'H'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..07db43d0c0006601781cd24ee3269ae2f32a0445
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite.pyi
@@ -0,0 +1,106 @@
+from typing import Any, Final, Literal as L, TypeVar
+
+import numpy as np
+
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _Array1,
+ _Array2,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncGauss,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPoly2Ortho,
+ _FuncPow,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncValFromRoots,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncWeight,
+)
+from .polyutils import trimcoef as hermtrim
+
+__all__ = [
+ "hermzero",
+ "hermone",
+ "hermx",
+ "hermdomain",
+ "hermline",
+ "hermadd",
+ "hermsub",
+ "hermmulx",
+ "hermmul",
+ "hermdiv",
+ "hermpow",
+ "hermval",
+ "hermder",
+ "hermint",
+ "herm2poly",
+ "poly2herm",
+ "hermfromroots",
+ "hermvander",
+ "hermfit",
+ "hermtrim",
+ "hermroots",
+ "Hermite",
+ "hermval2d",
+ "hermval3d",
+ "hermgrid2d",
+ "hermgrid3d",
+ "hermvander2d",
+ "hermvander3d",
+ "hermcompanion",
+ "hermgauss",
+ "hermweight",
+]
+
+poly2herm: _FuncPoly2Ortho[L["poly2herm"]]
+herm2poly: _FuncUnOp[L["herm2poly"]]
+
+hermdomain: Final[_Array2[np.float64]]
+hermzero: Final[_Array1[np.int_]]
+hermone: Final[_Array1[np.int_]]
+hermx: Final[_Array2[np.int_]]
+
+hermline: _FuncLine[L["hermline"]]
+hermfromroots: _FuncFromRoots[L["hermfromroots"]]
+hermadd: _FuncBinOp[L["hermadd"]]
+hermsub: _FuncBinOp[L["hermsub"]]
+hermmulx: _FuncUnOp[L["hermmulx"]]
+hermmul: _FuncBinOp[L["hermmul"]]
+hermdiv: _FuncBinOp[L["hermdiv"]]
+hermpow: _FuncPow[L["hermpow"]]
+hermder: _FuncDer[L["hermder"]]
+hermint: _FuncInteg[L["hermint"]]
+hermval: _FuncVal[L["hermval"]]
+hermval2d: _FuncVal2D[L["hermval2d"]]
+hermval3d: _FuncVal3D[L["hermval3d"]]
+hermvalfromroots: _FuncValFromRoots[L["hermvalfromroots"]]
+hermgrid2d: _FuncVal2D[L["hermgrid2d"]]
+hermgrid3d: _FuncVal3D[L["hermgrid3d"]]
+hermvander: _FuncVander[L["hermvander"]]
+hermvander2d: _FuncVander2D[L["hermvander2d"]]
+hermvander3d: _FuncVander3D[L["hermvander3d"]]
+hermfit: _FuncFit[L["hermfit"]]
+hermcompanion: _FuncCompanion[L["hermcompanion"]]
+hermroots: _FuncRoots[L["hermroots"]]
+
+_ND = TypeVar("_ND", bound=Any)
+def _normed_hermite_n(
+ x: np.ndarray[_ND, np.dtype[np.float64]],
+ n: int | np.intp,
+) -> np.ndarray[_ND, np.dtype[np.float64]]: ...
+
+hermgauss: _FuncGauss[L["hermgauss"]]
+hermweight: _FuncWeight[L["hermweight"]]
+
+class Hermite(ABCPolyBase[L["H"]]): ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.py
new file mode 100644
index 0000000000000000000000000000000000000000..c820760ef75c1db162b0a6e0897c88ba18582464
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.py
@@ -0,0 +1,1642 @@
+"""
+===================================================================
+HermiteE Series, "Probabilists" (:mod:`numpy.polynomial.hermite_e`)
+===================================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with Hermite_e series, including a `HermiteE` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with such polynomials is in the
+docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+.. autosummary::
+ :toctree: generated/
+
+ HermiteE
+
+Constants
+---------
+.. autosummary::
+ :toctree: generated/
+
+ hermedomain
+ hermezero
+ hermeone
+ hermex
+
+Arithmetic
+----------
+.. autosummary::
+ :toctree: generated/
+
+ hermeadd
+ hermesub
+ hermemulx
+ hermemul
+ hermediv
+ hermepow
+ hermeval
+ hermeval2d
+ hermeval3d
+ hermegrid2d
+ hermegrid3d
+
+Calculus
+--------
+.. autosummary::
+ :toctree: generated/
+
+ hermeder
+ hermeint
+
+Misc Functions
+--------------
+.. autosummary::
+ :toctree: generated/
+
+ hermefromroots
+ hermeroots
+ hermevander
+ hermevander2d
+ hermevander3d
+ hermegauss
+ hermeweight
+ hermecompanion
+ hermefit
+ hermetrim
+ hermeline
+ herme2poly
+ poly2herme
+
+See also
+--------
+`numpy.polynomial`
+
+"""
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+__all__ = [
+ 'hermezero', 'hermeone', 'hermex', 'hermedomain', 'hermeline',
+ 'hermeadd', 'hermesub', 'hermemulx', 'hermemul', 'hermediv',
+ 'hermepow', 'hermeval', 'hermeder', 'hermeint', 'herme2poly',
+ 'poly2herme', 'hermefromroots', 'hermevander', 'hermefit', 'hermetrim',
+ 'hermeroots', 'HermiteE', 'hermeval2d', 'hermeval3d', 'hermegrid2d',
+ 'hermegrid3d', 'hermevander2d', 'hermevander3d', 'hermecompanion',
+ 'hermegauss', 'hermeweight']
+
+hermetrim = pu.trimcoef
+
+
+def poly2herme(pol):
+ """
+ poly2herme(pol)
+
+ Convert a polynomial to a Hermite series.
+
+ Convert an array representing the coefficients of a polynomial (relative
+ to the "standard" basis) ordered from lowest degree to highest, to an
+ array of the coefficients of the equivalent Hermite series, ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ pol : array_like
+ 1-D array containing the polynomial coefficients
+
+ Returns
+ -------
+ c : ndarray
+ 1-D array containing the coefficients of the equivalent Hermite
+ series.
+
+ See Also
+ --------
+ herme2poly
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite_e import poly2herme
+ >>> poly2herme(np.arange(4))
+ array([ 2., 10., 2., 3.])
+
+ """
+ [pol] = pu.as_series([pol])
+ deg = len(pol) - 1
+ res = 0
+ for i in range(deg, -1, -1):
+ res = hermeadd(hermemulx(res), pol[i])
+ return res
+
+
+def herme2poly(c):
+ """
+ Convert a Hermite series to a polynomial.
+
+ Convert an array representing the coefficients of a Hermite series,
+ ordered from lowest degree to highest, to an array of the coefficients
+ of the equivalent polynomial (relative to the "standard" basis) ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array containing the Hermite series coefficients, ordered
+ from lowest order term to highest.
+
+ Returns
+ -------
+ pol : ndarray
+ 1-D array containing the coefficients of the equivalent polynomial
+ (relative to the "standard" basis) ordered from lowest order term
+ to highest.
+
+ See Also
+ --------
+ poly2herme
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import herme2poly
+ >>> herme2poly([ 2., 10., 2., 3.])
+ array([0., 1., 2., 3.])
+
+ """
+ from .polynomial import polyadd, polysub, polymulx
+
+ [c] = pu.as_series([c])
+ n = len(c)
+ if n == 1:
+ return c
+ if n == 2:
+ return c
+ else:
+ c0 = c[-2]
+ c1 = c[-1]
+ # i is the current degree of c1
+ for i in range(n - 1, 1, -1):
+ tmp = c0
+ c0 = polysub(c[i - 2], c1*(i - 1))
+ c1 = polyadd(tmp, polymulx(c1))
+ return polyadd(c0, polymulx(c1))
+
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Hermite
+hermedomain = np.array([-1., 1.])
+
+# Hermite coefficients representing zero.
+hermezero = np.array([0])
+
+# Hermite coefficients representing one.
+hermeone = np.array([1])
+
+# Hermite coefficients representing the identity x.
+hermex = np.array([0, 1])
+
+
+def hermeline(off, scl):
+ """
+ Hermite series whose graph is a straight line.
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The specified line is given by ``off + scl*x``.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the Hermite series for
+ ``off + scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyline
+ numpy.polynomial.chebyshev.chebline
+ numpy.polynomial.legendre.legline
+ numpy.polynomial.laguerre.lagline
+ numpy.polynomial.hermite.hermline
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeline
+ >>> from numpy.polynomial.hermite_e import hermeline, hermeval
+ >>> hermeval(0,hermeline(3, 2))
+ 3.0
+ >>> hermeval(1,hermeline(3, 2))
+ 5.0
+
+ """
+ if scl != 0:
+ return np.array([off, scl])
+ else:
+ return np.array([off])
+
+
+def hermefromroots(roots):
+ """
+ Generate a HermiteE series with given roots.
+
+ The function returns the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ in HermiteE form, where the :math:`r_n` are the roots specified in `roots`.
+ If a zero has multiplicity n, then it must appear in `roots` n times.
+ For instance, if 2 is a root of multiplicity three and 3 is a root of
+ multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
+ roots can appear in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * He_1(x) + ... + c_n * He_n(x)
+
+ The coefficient of the last term is not generally 1 for monic
+ polynomials in HermiteE form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of coefficients. If all roots are real then `out` is a
+ real array, if some of the roots are complex, then `out` is complex
+ even if all the coefficients in the result are real (see Examples
+ below).
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfromroots
+ numpy.polynomial.legendre.legfromroots
+ numpy.polynomial.laguerre.lagfromroots
+ numpy.polynomial.hermite.hermfromroots
+ numpy.polynomial.chebyshev.chebfromroots
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermefromroots, hermeval
+ >>> coef = hermefromroots((-1, 0, 1))
+ >>> hermeval((-1, 0, 1), coef)
+ array([0., 0., 0.])
+ >>> coef = hermefromroots((-1j, 1j))
+ >>> hermeval((-1j, 1j), coef)
+ array([0.+0.j, 0.+0.j])
+
+ """
+ return pu._fromroots(hermeline, hermemul, roots)
+
+
+def hermeadd(c1, c2):
+ """
+ Add one Hermite series to another.
+
+ Returns the sum of two Hermite series `c1` + `c2`. The arguments
+ are sequences of coefficients ordered from lowest order term to
+ highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the Hermite series of their sum.
+
+ See Also
+ --------
+ hermesub, hermemulx, hermemul, hermediv, hermepow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the sum of two Hermite series
+ is a Hermite series (without having to "reproject" the result onto
+ the basis set) so addition, just like that of "standard" polynomials,
+ is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeadd
+ >>> hermeadd([1, 2, 3], [1, 2, 3, 4])
+ array([2., 4., 6., 4.])
+
+ """
+ return pu._add(c1, c2)
+
+
+def hermesub(c1, c2):
+ """
+ Subtract one Hermite series from another.
+
+ Returns the difference of two Hermite series `c1` - `c2`. The
+ sequences of coefficients are from lowest order term to highest, i.e.,
+ [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Hermite series coefficients representing their difference.
+
+ See Also
+ --------
+ hermeadd, hermemulx, hermemul, hermediv, hermepow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the difference of two Hermite
+ series is a Hermite series (without having to "reproject" the result
+ onto the basis set) so subtraction, just like that of "standard"
+ polynomials, is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermesub
+ >>> hermesub([1, 2, 3, 4], [1, 2, 3])
+ array([0., 0., 0., 4.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def hermemulx(c):
+ """Multiply a Hermite series by x.
+
+ Multiply the Hermite series `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ hermeadd, hermesub, hermemul, hermediv, hermepow
+
+ Notes
+ -----
+ The multiplication uses the recursion relationship for Hermite
+ polynomials in the form
+
+ .. math::
+
+ xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x)))
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermemulx
+ >>> hermemulx([1, 2, 3])
+ array([2., 7., 2., 3.])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]*0
+ prd[1] = c[0]
+ for i in range(1, len(c)):
+ prd[i + 1] = c[i]
+ prd[i - 1] += c[i]*i
+ return prd
+
+
+def hermemul(c1, c2):
+ """
+ Multiply one Hermite series by another.
+
+ Returns the product of two Hermite series `c1` * `c2`. The arguments
+ are sequences of coefficients, from lowest order "term" to highest,
+ e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Hermite series coefficients representing their product.
+
+ See Also
+ --------
+ hermeadd, hermesub, hermemulx, hermediv, hermepow
+
+ Notes
+ -----
+ In general, the (polynomial) product of two C-series results in terms
+ that are not in the Hermite polynomial basis set. Thus, to express
+ the product as a Hermite series, it is necessary to "reproject" the
+ product onto said basis set, which may produce "unintuitive" (but
+ correct) results; see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermemul
+ >>> hermemul([1, 2, 3], [0, 1, 2])
+ array([14., 15., 28., 7., 6.])
+
+ """
+ # s1, s2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+
+ if len(c1) > len(c2):
+ c = c2
+ xs = c1
+ else:
+ c = c1
+ xs = c2
+
+ if len(c) == 1:
+ c0 = c[0]*xs
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]*xs
+ c1 = c[1]*xs
+ else:
+ nd = len(c)
+ c0 = c[-2]*xs
+ c1 = c[-1]*xs
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = hermesub(c[-i]*xs, c1*(nd - 1))
+ c1 = hermeadd(tmp, hermemulx(c1))
+ return hermeadd(c0, hermemulx(c1))
+
+
+def hermediv(c1, c2):
+ """
+ Divide one Hermite series by another.
+
+ Returns the quotient-with-remainder of two Hermite series
+ `c1` / `c2`. The arguments are sequences of coefficients from lowest
+ order "term" to highest, e.g., [1,2,3] represents the series
+ ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Hermite series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ [quo, rem] : ndarrays
+ Of Hermite series coefficients representing the quotient and
+ remainder.
+
+ See Also
+ --------
+ hermeadd, hermesub, hermemulx, hermemul, hermepow
+
+ Notes
+ -----
+ In general, the (polynomial) division of one Hermite series by another
+ results in quotient and remainder terms that are not in the Hermite
+ polynomial basis set. Thus, to express these results as a Hermite
+ series, it is necessary to "reproject" the results onto the Hermite
+ basis set, which may produce "unintuitive" (but correct) results; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermediv
+ >>> hermediv([ 14., 15., 28., 7., 6.], [0, 1, 2])
+ (array([1., 2., 3.]), array([0.]))
+ >>> hermediv([ 15., 17., 28., 7., 6.], [0, 1, 2])
+ (array([1., 2., 3.]), array([1., 2.]))
+
+ """
+ return pu._div(hermemul, c1, c2)
+
+
+def hermepow(c, pow, maxpower=16):
+ """Raise a Hermite series to a power.
+
+ Returns the Hermite series `c` raised to the power `pow`. The
+ argument `c` is a sequence of coefficients ordered from low to high.
+ i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Hermite series coefficients ordered from low to
+ high.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Hermite series of power.
+
+ See Also
+ --------
+ hermeadd, hermesub, hermemulx, hermemul, hermediv
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermepow
+ >>> hermepow([1, 2, 3], 2)
+ array([23., 28., 46., 12., 9.])
+
+ """
+ return pu._pow(hermemul, c, pow, maxpower)
+
+
+def hermeder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a Hermite_e series.
+
+ Returns the series coefficients `c` differentiated `m` times along
+ `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The argument
+ `c` is an array of coefficients from low to high degree along each
+ axis, e.g., [1,2,3] represents the series ``1*He_0 + 2*He_1 + 3*He_2``
+ while [[1,2],[1,2]] represents ``1*He_0(x)*He_0(y) + 1*He_1(x)*He_0(y)
+ + 2*He_0(x)*He_1(y) + 2*He_1(x)*He_1(y)`` if axis=0 is ``x`` and axis=1
+ is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Hermite_e series coefficients. If `c` is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change of
+ variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Hermite series of the derivative.
+
+ See Also
+ --------
+ hermeint
+
+ Notes
+ -----
+ In general, the result of differentiating a Hermite series does not
+ resemble the same operation on a power series. Thus the result of this
+ function may be "unintuitive," albeit correct; see Examples section
+ below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeder
+ >>> hermeder([ 1., 1., 1., 1.])
+ array([1., 2., 3.])
+ >>> hermeder([-0.25, 1., 1./2., 1./3., 1./4 ], m=2)
+ array([1., 2., 3.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ return c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=c.dtype)
+ for j in range(n, 0, -1):
+ der[j - 1] = j*c[j]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def hermeint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a Hermite_e series.
+
+ Returns the Hermite_e series coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients from low to high degree along each axis, e.g., [1,2,3]
+ represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]]
+ represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
+ 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Hermite_e series coefficients. If c is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at
+ ``lbnd`` is the first value in the list, the value of the second
+ integral at ``lbnd`` is the second value, etc. If ``k == []`` (the
+ default), all constants are set to zero. If ``m == 1``, a single
+ scalar can be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ Hermite_e series coefficients of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ hermeder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`.
+ Why is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a` - perhaps not what one would have first thought.
+
+ Also note that, in general, the result of integrating a C-series needs
+ to be "reprojected" onto the C-series basis set. Thus, typically,
+ the result of this function is "unintuitive," albeit correct; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeint
+ >>> hermeint([1, 2, 3]) # integrate once, value 0 at 0.
+ array([1., 1., 1., 1.])
+ >>> hermeint([1, 2, 3], m=2) # integrate twice, value & deriv 0 at 0
+ array([-0.25 , 1. , 0.5 , 0.33333333, 0.25 ]) # may vary
+ >>> hermeint([1, 2, 3], k=1) # integrate once, value 1 at 0.
+ array([2., 1., 1., 1.])
+ >>> hermeint([1, 2, 3], lbnd=-1) # integrate once, value 0 at -1
+ array([-1., 1., 1., 1.])
+ >>> hermeint([1, 2, 3], m=2, k=[1, 2], lbnd=-1)
+ array([ 1.83333333, 0. , 0.5 , 0.33333333, 0.25 ]) # may vary
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ k = list(k) + [0]*(cnt - len(k))
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=c.dtype)
+ tmp[0] = c[0]*0
+ tmp[1] = c[0]
+ for j in range(1, n):
+ tmp[j + 1] = c[j]/(j + 1)
+ tmp[0] += k[i] - hermeval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def hermeval(x, c, tensor=True):
+ """
+ Evaluate an HermiteE series at points x.
+
+ If `c` is of length ``n + 1``, this function returns the value:
+
+ .. math:: p(x) = c_0 * He_0(x) + c_1 * He_1(x) + ... + c_n * He_n(x)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ with themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, algebra_like
+ The shape of the return value is described above.
+
+ See Also
+ --------
+ hermeval2d, hermegrid2d, hermeval3d, hermegrid3d
+
+ Notes
+ -----
+ The evaluation uses Clenshaw recursion, aka synthetic division.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeval
+ >>> coef = [1,2,3]
+ >>> hermeval(1, coef)
+ 3.0
+ >>> hermeval([[1,2],[3,4]], coef)
+ array([[ 3., 14.],
+ [31., 54.]])
+
+ """
+ c = np.array(c, ndmin=1, copy=None)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ if len(c) == 1:
+ c0 = c[0]
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]
+ c1 = c[1]
+ else:
+ nd = len(c)
+ c0 = c[-2]
+ c1 = c[-1]
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = c[-i] - c1*(nd - 1)
+ c1 = tmp + c1*x
+ return c0 + c1*x
+
+
+def hermeval2d(x, y, c):
+ """
+ Evaluate a 2-D HermiteE series at points (x, y).
+
+ This function returns the values:
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * He_i(x) * He_j(y)
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` is a 1-D array a one is implicitly appended to its shape to make
+ it 2-D. The shape of the result will be c.shape[2:] + x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and if it isn't an ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than two the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points formed with
+ pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ hermeval, hermegrid2d, hermeval3d, hermegrid3d
+ """
+ return pu._valnd(hermeval, c, x, y)
+
+
+def hermegrid2d(x, y, c):
+ """
+ Evaluate a 2-D HermiteE series on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * H_i(a) * H_j(b)
+
+ where the points ``(a, b)`` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ hermeval, hermeval2d, hermeval3d, hermegrid3d
+ """
+ return pu._gridnd(hermeval, c, x, y)
+
+
+def hermeval3d(x, y, z, c):
+ """
+ Evaluate a 3-D Hermite_e series at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * He_i(x) * He_j(y) * He_k(z)
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ `(x, y, z)`, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ hermeval, hermeval2d, hermegrid2d, hermegrid3d
+ """
+ return pu._valnd(hermeval, c, x, y, z)
+
+
+def hermegrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D HermiteE series on the Cartesian product of x, y, and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * He_i(a) * He_j(b) * He_k(c)
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ hermeval, hermeval2d, hermegrid2d, hermeval3d
+ """
+ return pu._gridnd(hermeval, c, x, y, z)
+
+
+def hermevander(x, deg):
+ """Pseudo-Vandermonde matrix of given degree.
+
+ Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
+ `x`. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = He_i(x),
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the degree of the HermiteE polynomial.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ array ``V = hermevander(x, n)``, then ``np.dot(V, c)`` and
+ ``hermeval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of HermiteE series of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray
+ The pseudo-Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where The last index is the degree of the
+ corresponding HermiteE polynomial. The dtype will be the same as
+ the converted `x`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite_e import hermevander
+ >>> x = np.array([-1, 0, 1])
+ >>> hermevander(x, 3)
+ array([[ 1., -1., 0., 2.],
+ [ 1., 0., -1., -0.],
+ [ 1., 1., 0., -2.]])
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ v[0] = x*0 + 1
+ if ideg > 0:
+ v[1] = x
+ for i in range(2, ideg + 1):
+ v[i] = (v[i-1]*x - v[i-2]*(i - 1))
+ return np.moveaxis(v, 0, -1)
+
+
+def hermevander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = He_i(x) * He_j(y),
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the degrees of
+ the HermiteE polynomials.
+
+ If ``V = hermevander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``hermeval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D HermiteE
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ hermevander, hermevander3d, hermeval2d, hermeval3d
+ """
+ return pu._vander_nd_flat((hermevander, hermevander), (x, y), deg)
+
+
+def hermevander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then Hehe pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = He_i(x)*He_j(y)*He_k(z),
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the degrees of the HermiteE polynomials.
+
+ If ``V = hermevander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``hermeval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D HermiteE
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ hermevander, hermevander3d, hermeval2d, hermeval3d
+ """
+ return pu._vander_nd_flat((hermevander, hermevander, hermevander), (x, y, z), deg)
+
+
+def hermefit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least squares fit of Hermite series to data.
+
+ Return the coefficients of a HermiteE series of degree `deg` that is
+ the least squares fit to the data values `y` given at points `x`. If
+ `y` is 1-D the returned coefficients will also be 1-D. If `y` is 2-D
+ multiple fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * He_1(x) + ... + c_n * He_n(x),
+
+ where `n` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,) or (M, K)
+ y-coordinates of the sample points. Several data sets of sample
+ points sharing the same x-coordinates can be fitted at once by
+ passing in a 2D-array that contains one dataset per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller than
+ this relative to the largest singular value will be ignored. The
+ default value is len(x)*eps, where eps is the relative precision of
+ the float type, about 2e-16 in most cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False (the
+ default) just the coefficients are returned, when True diagnostic
+ information from the singular value decomposition is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (M,) or (M, K)
+ Hermite coefficients ordered from low to high. If `y` was 2-D,
+ the coefficients for the data in column k of `y` are in column
+ `k`.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Warns
+ -----
+ RankWarning
+ The rank of the coefficient matrix in the least-squares fit is
+ deficient. The warning is only raised if ``full = False``. The
+ warnings can be turned off by
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebfit
+ numpy.polynomial.legendre.legfit
+ numpy.polynomial.polynomial.polyfit
+ numpy.polynomial.hermite.hermfit
+ numpy.polynomial.laguerre.lagfit
+ hermeval : Evaluates a Hermite series.
+ hermevander : pseudo Vandermonde matrix of Hermite series.
+ hermeweight : HermiteE weight function.
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the HermiteE series `p` that
+ minimizes the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where the :math:`w_j` are the weights. This problem is solved by
+ setting up the (typically) overdetermined matrix equation
+
+ .. math:: V(x) * c = w * y,
+
+ where `V` is the pseudo Vandermonde matrix of `x`, the elements of `c`
+ are the coefficients to be solved for, and the elements of `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of `V`.
+
+ If some of the singular values of `V` are so small that they are
+ neglected, then a `~exceptions.RankWarning` will be issued. This means that
+ the coefficient values may be poorly determined. Using a lower order fit
+ will usually get rid of the warning. The `rcond` parameter can also be
+ set to a value smaller than its default, but the resulting fit may be
+ spurious and have large contributions from roundoff error.
+
+ Fits using HermiteE series are probably most useful when the data can
+ be approximated by ``sqrt(w(x)) * p(x)``, where ``w(x)`` is the HermiteE
+ weight. In that case the weight ``sqrt(w(x[i]))`` should be used
+ together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
+ available as `hermeweight`.
+
+ References
+ ----------
+ .. [1] Wikipedia, "Curve fitting",
+ https://en.wikipedia.org/wiki/Curve_fitting
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.hermite_e import hermefit, hermeval
+ >>> x = np.linspace(-10, 10)
+ >>> rng = np.random.default_rng()
+ >>> err = rng.normal(scale=1./10, size=len(x))
+ >>> y = hermeval(x, [1, 2, 3]) + err
+ >>> hermefit(x, y, 2)
+ array([1.02284196, 2.00032805, 2.99978457]) # may vary
+
+ """
+ return pu._fit(hermevander, x, y, deg, rcond, full, w)
+
+
+def hermecompanion(c):
+ """
+ Return the scaled companion matrix of c.
+
+ The basis polynomials are scaled so that the companion matrix is
+ symmetric when `c` is an HermiteE basis polynomial. This provides
+ better eigenvalue estimates than the unscaled case and for basis
+ polynomials the eigenvalues are guaranteed to be real if
+ `numpy.linalg.eigvalsh` is used to obtain them.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of HermiteE series coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Scaled companion matrix of dimensions (deg, deg).
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[-c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ scl = np.hstack((1., 1./np.sqrt(np.arange(n - 1, 0, -1))))
+ scl = np.multiply.accumulate(scl)[::-1]
+ top = mat.reshape(-1)[1::n+1]
+ bot = mat.reshape(-1)[n::n+1]
+ top[...] = np.sqrt(np.arange(1, n))
+ bot[...] = top
+ mat[:, -1] -= scl*c[:-1]/c[-1]
+ return mat
+
+
+def hermeroots(c):
+ """
+ Compute the roots of a HermiteE series.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * He_i(x).
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the series. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyroots
+ numpy.polynomial.legendre.legroots
+ numpy.polynomial.laguerre.lagroots
+ numpy.polynomial.hermite.hermroots
+ numpy.polynomial.chebyshev.chebroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the series for such
+ values. Roots with multiplicity greater than 1 will also show larger
+ errors as the value of the series near such points is relatively
+ insensitive to errors in the roots. Isolated roots near the origin can
+ be improved by a few iterations of Newton's method.
+
+ The HermiteE series basis polynomials aren't powers of `x` so the
+ results of this function may seem unintuitive.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.hermite_e import hermeroots, hermefromroots
+ >>> coef = hermefromroots([-1, 0, 1])
+ >>> coef
+ array([0., 2., 0., 1.])
+ >>> hermeroots(coef)
+ array([-1., 0., 1.]) # may vary
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) <= 1:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([-c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = hermecompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+def _normed_hermite_e_n(x, n):
+ """
+ Evaluate a normalized HermiteE polynomial.
+
+ Compute the value of the normalized HermiteE polynomial of degree ``n``
+ at the points ``x``.
+
+
+ Parameters
+ ----------
+ x : ndarray of double.
+ Points at which to evaluate the function
+ n : int
+ Degree of the normalized HermiteE function to be evaluated.
+
+ Returns
+ -------
+ values : ndarray
+ The shape of the return value is described above.
+
+ Notes
+ -----
+ This function is needed for finding the Gauss points and integration
+ weights for high degrees. The values of the standard HermiteE functions
+ overflow when n >= 207.
+
+ """
+ if n == 0:
+ return np.full(x.shape, 1/np.sqrt(np.sqrt(2*np.pi)))
+
+ c0 = 0.
+ c1 = 1./np.sqrt(np.sqrt(2*np.pi))
+ nd = float(n)
+ for i in range(n - 1):
+ tmp = c0
+ c0 = -c1*np.sqrt((nd - 1.)/nd)
+ c1 = tmp + c1*x*np.sqrt(1./nd)
+ nd = nd - 1.0
+ return c0 + c1*x
+
+
+def hermegauss(deg):
+ """
+ Gauss-HermiteE quadrature.
+
+ Computes the sample points and weights for Gauss-HermiteE quadrature.
+ These sample points and weights will correctly integrate polynomials of
+ degree :math:`2*deg - 1` or less over the interval :math:`[-\\inf, \\inf]`
+ with the weight function :math:`f(x) = \\exp(-x^2/2)`.
+
+ Parameters
+ ----------
+ deg : int
+ Number of sample points and weights. It must be >= 1.
+
+ Returns
+ -------
+ x : ndarray
+ 1-D ndarray containing the sample points.
+ y : ndarray
+ 1-D ndarray containing the weights.
+
+ Notes
+ -----
+ The results have only been tested up to degree 100, higher degrees may
+ be problematic. The weights are determined by using the fact that
+
+ .. math:: w_k = c / (He'_n(x_k) * He_{n-1}(x_k))
+
+ where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
+ is the k'th root of :math:`He_n`, and then scaling the results to get
+ the right value when integrating 1.
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg <= 0:
+ raise ValueError("deg must be a positive integer")
+
+ # first approximation of roots. We use the fact that the companion
+ # matrix is symmetric in this case in order to obtain better zeros.
+ c = np.array([0]*deg + [1])
+ m = hermecompanion(c)
+ x = la.eigvalsh(m)
+
+ # improve roots by one application of Newton
+ dy = _normed_hermite_e_n(x, ideg)
+ df = _normed_hermite_e_n(x, ideg - 1) * np.sqrt(ideg)
+ x -= dy/df
+
+ # compute the weights. We scale the factor to avoid possible numerical
+ # overflow.
+ fm = _normed_hermite_e_n(x, ideg - 1)
+ fm /= np.abs(fm).max()
+ w = 1/(fm * fm)
+
+ # for Hermite_e we can also symmetrize
+ w = (w + w[::-1])/2
+ x = (x - x[::-1])/2
+
+ # scale w to get the right value
+ w *= np.sqrt(2*np.pi) / w.sum()
+
+ return x, w
+
+
+def hermeweight(x):
+ """Weight function of the Hermite_e polynomials.
+
+ The weight function is :math:`\\exp(-x^2/2)` and the interval of
+ integration is :math:`[-\\inf, \\inf]`. the HermiteE polynomials are
+ orthogonal, but not normalized, with respect to this weight function.
+
+ Parameters
+ ----------
+ x : array_like
+ Values at which the weight function will be computed.
+
+ Returns
+ -------
+ w : ndarray
+ The weight function at `x`.
+ """
+ w = np.exp(-.5*x**2)
+ return w
+
+
+#
+# HermiteE series class
+#
+
+class HermiteE(ABCPolyBase):
+ """An HermiteE series class.
+
+ The HermiteE class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ HermiteE coefficients in order of increasing degree, i.e,
+ ``(1, 2, 3)`` gives ``1*He_0(x) + 2*He_1(X) + 3*He_2(x)``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [-1., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [-1., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(hermeadd)
+ _sub = staticmethod(hermesub)
+ _mul = staticmethod(hermemul)
+ _div = staticmethod(hermediv)
+ _pow = staticmethod(hermepow)
+ _val = staticmethod(hermeval)
+ _int = staticmethod(hermeint)
+ _der = staticmethod(hermeder)
+ _fit = staticmethod(hermefit)
+ _line = staticmethod(hermeline)
+ _roots = staticmethod(hermeroots)
+ _fromroots = staticmethod(hermefromroots)
+
+ # Virtual properties
+ domain = np.array(hermedomain)
+ window = np.array(hermedomain)
+ basis_name = 'He'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..94ad7248f268b9d4e4de1685063187c94db25fd7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/hermite_e.pyi
@@ -0,0 +1,106 @@
+from typing import Any, Final, Literal as L, TypeVar
+
+import numpy as np
+
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _Array1,
+ _Array2,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncGauss,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPoly2Ortho,
+ _FuncPow,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncValFromRoots,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncWeight,
+)
+from .polyutils import trimcoef as hermetrim
+
+__all__ = [
+ "hermezero",
+ "hermeone",
+ "hermex",
+ "hermedomain",
+ "hermeline",
+ "hermeadd",
+ "hermesub",
+ "hermemulx",
+ "hermemul",
+ "hermediv",
+ "hermepow",
+ "hermeval",
+ "hermeder",
+ "hermeint",
+ "herme2poly",
+ "poly2herme",
+ "hermefromroots",
+ "hermevander",
+ "hermefit",
+ "hermetrim",
+ "hermeroots",
+ "HermiteE",
+ "hermeval2d",
+ "hermeval3d",
+ "hermegrid2d",
+ "hermegrid3d",
+ "hermevander2d",
+ "hermevander3d",
+ "hermecompanion",
+ "hermegauss",
+ "hermeweight",
+]
+
+poly2herme: _FuncPoly2Ortho[L["poly2herme"]]
+herme2poly: _FuncUnOp[L["herme2poly"]]
+
+hermedomain: Final[_Array2[np.float64]]
+hermezero: Final[_Array1[np.int_]]
+hermeone: Final[_Array1[np.int_]]
+hermex: Final[_Array2[np.int_]]
+
+hermeline: _FuncLine[L["hermeline"]]
+hermefromroots: _FuncFromRoots[L["hermefromroots"]]
+hermeadd: _FuncBinOp[L["hermeadd"]]
+hermesub: _FuncBinOp[L["hermesub"]]
+hermemulx: _FuncUnOp[L["hermemulx"]]
+hermemul: _FuncBinOp[L["hermemul"]]
+hermediv: _FuncBinOp[L["hermediv"]]
+hermepow: _FuncPow[L["hermepow"]]
+hermeder: _FuncDer[L["hermeder"]]
+hermeint: _FuncInteg[L["hermeint"]]
+hermeval: _FuncVal[L["hermeval"]]
+hermeval2d: _FuncVal2D[L["hermeval2d"]]
+hermeval3d: _FuncVal3D[L["hermeval3d"]]
+hermevalfromroots: _FuncValFromRoots[L["hermevalfromroots"]]
+hermegrid2d: _FuncVal2D[L["hermegrid2d"]]
+hermegrid3d: _FuncVal3D[L["hermegrid3d"]]
+hermevander: _FuncVander[L["hermevander"]]
+hermevander2d: _FuncVander2D[L["hermevander2d"]]
+hermevander3d: _FuncVander3D[L["hermevander3d"]]
+hermefit: _FuncFit[L["hermefit"]]
+hermecompanion: _FuncCompanion[L["hermecompanion"]]
+hermeroots: _FuncRoots[L["hermeroots"]]
+
+_ND = TypeVar("_ND", bound=Any)
+def _normed_hermite_e_n(
+ x: np.ndarray[_ND, np.dtype[np.float64]],
+ n: int | np.intp,
+) -> np.ndarray[_ND, np.dtype[np.float64]]: ...
+
+hermegauss: _FuncGauss[L["hermegauss"]]
+hermeweight: _FuncWeight[L["hermeweight"]]
+
+class HermiteE(ABCPolyBase[L["He"]]): ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.py
new file mode 100644
index 0000000000000000000000000000000000000000..b2cc5817c30cb892f58f1c366746b5967670d2ad
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.py
@@ -0,0 +1,1675 @@
+"""
+==================================================
+Laguerre Series (:mod:`numpy.polynomial.laguerre`)
+==================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with Laguerre series, including a `Laguerre` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with such polynomials is in the
+docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+.. autosummary::
+ :toctree: generated/
+
+ Laguerre
+
+Constants
+---------
+.. autosummary::
+ :toctree: generated/
+
+ lagdomain
+ lagzero
+ lagone
+ lagx
+
+Arithmetic
+----------
+.. autosummary::
+ :toctree: generated/
+
+ lagadd
+ lagsub
+ lagmulx
+ lagmul
+ lagdiv
+ lagpow
+ lagval
+ lagval2d
+ lagval3d
+ laggrid2d
+ laggrid3d
+
+Calculus
+--------
+.. autosummary::
+ :toctree: generated/
+
+ lagder
+ lagint
+
+Misc Functions
+--------------
+.. autosummary::
+ :toctree: generated/
+
+ lagfromroots
+ lagroots
+ lagvander
+ lagvander2d
+ lagvander3d
+ laggauss
+ lagweight
+ lagcompanion
+ lagfit
+ lagtrim
+ lagline
+ lag2poly
+ poly2lag
+
+See also
+--------
+`numpy.polynomial`
+
+"""
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+__all__ = [
+ 'lagzero', 'lagone', 'lagx', 'lagdomain', 'lagline', 'lagadd',
+ 'lagsub', 'lagmulx', 'lagmul', 'lagdiv', 'lagpow', 'lagval', 'lagder',
+ 'lagint', 'lag2poly', 'poly2lag', 'lagfromroots', 'lagvander',
+ 'lagfit', 'lagtrim', 'lagroots', 'Laguerre', 'lagval2d', 'lagval3d',
+ 'laggrid2d', 'laggrid3d', 'lagvander2d', 'lagvander3d', 'lagcompanion',
+ 'laggauss', 'lagweight']
+
+lagtrim = pu.trimcoef
+
+
+def poly2lag(pol):
+ """
+ poly2lag(pol)
+
+ Convert a polynomial to a Laguerre series.
+
+ Convert an array representing the coefficients of a polynomial (relative
+ to the "standard" basis) ordered from lowest degree to highest, to an
+ array of the coefficients of the equivalent Laguerre series, ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ pol : array_like
+ 1-D array containing the polynomial coefficients
+
+ Returns
+ -------
+ c : ndarray
+ 1-D array containing the coefficients of the equivalent Laguerre
+ series.
+
+ See Also
+ --------
+ lag2poly
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.laguerre import poly2lag
+ >>> poly2lag(np.arange(4))
+ array([ 23., -63., 58., -18.])
+
+ """
+ [pol] = pu.as_series([pol])
+ res = 0
+ for p in pol[::-1]:
+ res = lagadd(lagmulx(res), p)
+ return res
+
+
+def lag2poly(c):
+ """
+ Convert a Laguerre series to a polynomial.
+
+ Convert an array representing the coefficients of a Laguerre series,
+ ordered from lowest degree to highest, to an array of the coefficients
+ of the equivalent polynomial (relative to the "standard" basis) ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array containing the Laguerre series coefficients, ordered
+ from lowest order term to highest.
+
+ Returns
+ -------
+ pol : ndarray
+ 1-D array containing the coefficients of the equivalent polynomial
+ (relative to the "standard" basis) ordered from lowest order term
+ to highest.
+
+ See Also
+ --------
+ poly2lag
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lag2poly
+ >>> lag2poly([ 23., -63., 58., -18.])
+ array([0., 1., 2., 3.])
+
+ """
+ from .polynomial import polyadd, polysub, polymulx
+
+ [c] = pu.as_series([c])
+ n = len(c)
+ if n == 1:
+ return c
+ else:
+ c0 = c[-2]
+ c1 = c[-1]
+ # i is the current degree of c1
+ for i in range(n - 1, 1, -1):
+ tmp = c0
+ c0 = polysub(c[i - 2], (c1*(i - 1))/i)
+ c1 = polyadd(tmp, polysub((2*i - 1)*c1, polymulx(c1))/i)
+ return polyadd(c0, polysub(c1, polymulx(c1)))
+
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Laguerre
+lagdomain = np.array([0., 1.])
+
+# Laguerre coefficients representing zero.
+lagzero = np.array([0])
+
+# Laguerre coefficients representing one.
+lagone = np.array([1])
+
+# Laguerre coefficients representing the identity x.
+lagx = np.array([1, -1])
+
+
+def lagline(off, scl):
+ """
+ Laguerre series whose graph is a straight line.
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The specified line is given by ``off + scl*x``.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the Laguerre series for
+ ``off + scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyline
+ numpy.polynomial.chebyshev.chebline
+ numpy.polynomial.legendre.legline
+ numpy.polynomial.hermite.hermline
+ numpy.polynomial.hermite_e.hermeline
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagline, lagval
+ >>> lagval(0,lagline(3, 2))
+ 3.0
+ >>> lagval(1,lagline(3, 2))
+ 5.0
+
+ """
+ if scl != 0:
+ return np.array([off + scl, -scl])
+ else:
+ return np.array([off])
+
+
+def lagfromroots(roots):
+ """
+ Generate a Laguerre series with given roots.
+
+ The function returns the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ in Laguerre form, where the :math:`r_n` are the roots specified in `roots`.
+ If a zero has multiplicity n, then it must appear in `roots` n times.
+ For instance, if 2 is a root of multiplicity three and 3 is a root of
+ multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
+ roots can appear in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x)
+
+ The coefficient of the last term is not generally 1 for monic
+ polynomials in Laguerre form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of coefficients. If all roots are real then `out` is a
+ real array, if some of the roots are complex, then `out` is complex
+ even if all the coefficients in the result are real (see Examples
+ below).
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfromroots
+ numpy.polynomial.legendre.legfromroots
+ numpy.polynomial.chebyshev.chebfromroots
+ numpy.polynomial.hermite.hermfromroots
+ numpy.polynomial.hermite_e.hermefromroots
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagfromroots, lagval
+ >>> coef = lagfromroots((-1, 0, 1))
+ >>> lagval((-1, 0, 1), coef)
+ array([0., 0., 0.])
+ >>> coef = lagfromroots((-1j, 1j))
+ >>> lagval((-1j, 1j), coef)
+ array([0.+0.j, 0.+0.j])
+
+ """
+ return pu._fromroots(lagline, lagmul, roots)
+
+
+def lagadd(c1, c2):
+ """
+ Add one Laguerre series to another.
+
+ Returns the sum of two Laguerre series `c1` + `c2`. The arguments
+ are sequences of coefficients ordered from lowest order term to
+ highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Laguerre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the Laguerre series of their sum.
+
+ See Also
+ --------
+ lagsub, lagmulx, lagmul, lagdiv, lagpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the sum of two Laguerre series
+ is a Laguerre series (without having to "reproject" the result onto
+ the basis set) so addition, just like that of "standard" polynomials,
+ is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagadd
+ >>> lagadd([1, 2, 3], [1, 2, 3, 4])
+ array([2., 4., 6., 4.])
+
+ """
+ return pu._add(c1, c2)
+
+
+def lagsub(c1, c2):
+ """
+ Subtract one Laguerre series from another.
+
+ Returns the difference of two Laguerre series `c1` - `c2`. The
+ sequences of coefficients are from lowest order term to highest, i.e.,
+ [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Laguerre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Laguerre series coefficients representing their difference.
+
+ See Also
+ --------
+ lagadd, lagmulx, lagmul, lagdiv, lagpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the difference of two Laguerre
+ series is a Laguerre series (without having to "reproject" the result
+ onto the basis set) so subtraction, just like that of "standard"
+ polynomials, is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagsub
+ >>> lagsub([1, 2, 3, 4], [1, 2, 3])
+ array([0., 0., 0., 4.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def lagmulx(c):
+ """Multiply a Laguerre series by x.
+
+ Multiply the Laguerre series `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Laguerre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ lagadd, lagsub, lagmul, lagdiv, lagpow
+
+ Notes
+ -----
+ The multiplication uses the recursion relationship for Laguerre
+ polynomials in the form
+
+ .. math::
+
+ xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x))
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagmulx
+ >>> lagmulx([1, 2, 3])
+ array([-1., -1., 11., -9.])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]
+ prd[1] = -c[0]
+ for i in range(1, len(c)):
+ prd[i + 1] = -c[i]*(i + 1)
+ prd[i] += c[i]*(2*i + 1)
+ prd[i - 1] -= c[i]*i
+ return prd
+
+
+def lagmul(c1, c2):
+ """
+ Multiply one Laguerre series by another.
+
+ Returns the product of two Laguerre series `c1` * `c2`. The arguments
+ are sequences of coefficients, from lowest order "term" to highest,
+ e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Laguerre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Laguerre series coefficients representing their product.
+
+ See Also
+ --------
+ lagadd, lagsub, lagmulx, lagdiv, lagpow
+
+ Notes
+ -----
+ In general, the (polynomial) product of two C-series results in terms
+ that are not in the Laguerre polynomial basis set. Thus, to express
+ the product as a Laguerre series, it is necessary to "reproject" the
+ product onto said basis set, which may produce "unintuitive" (but
+ correct) results; see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagmul
+ >>> lagmul([1, 2, 3], [0, 1, 2])
+ array([ 8., -13., 38., -51., 36.])
+
+ """
+ # s1, s2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+
+ if len(c1) > len(c2):
+ c = c2
+ xs = c1
+ else:
+ c = c1
+ xs = c2
+
+ if len(c) == 1:
+ c0 = c[0]*xs
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]*xs
+ c1 = c[1]*xs
+ else:
+ nd = len(c)
+ c0 = c[-2]*xs
+ c1 = c[-1]*xs
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = lagsub(c[-i]*xs, (c1*(nd - 1))/nd)
+ c1 = lagadd(tmp, lagsub((2*nd - 1)*c1, lagmulx(c1))/nd)
+ return lagadd(c0, lagsub(c1, lagmulx(c1)))
+
+
+def lagdiv(c1, c2):
+ """
+ Divide one Laguerre series by another.
+
+ Returns the quotient-with-remainder of two Laguerre series
+ `c1` / `c2`. The arguments are sequences of coefficients from lowest
+ order "term" to highest, e.g., [1,2,3] represents the series
+ ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Laguerre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ [quo, rem] : ndarrays
+ Of Laguerre series coefficients representing the quotient and
+ remainder.
+
+ See Also
+ --------
+ lagadd, lagsub, lagmulx, lagmul, lagpow
+
+ Notes
+ -----
+ In general, the (polynomial) division of one Laguerre series by another
+ results in quotient and remainder terms that are not in the Laguerre
+ polynomial basis set. Thus, to express these results as a Laguerre
+ series, it is necessary to "reproject" the results onto the Laguerre
+ basis set, which may produce "unintuitive" (but correct) results; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagdiv
+ >>> lagdiv([ 8., -13., 38., -51., 36.], [0, 1, 2])
+ (array([1., 2., 3.]), array([0.]))
+ >>> lagdiv([ 9., -12., 38., -51., 36.], [0, 1, 2])
+ (array([1., 2., 3.]), array([1., 1.]))
+
+ """
+ return pu._div(lagmul, c1, c2)
+
+
+def lagpow(c, pow, maxpower=16):
+ """Raise a Laguerre series to a power.
+
+ Returns the Laguerre series `c` raised to the power `pow`. The
+ argument `c` is a sequence of coefficients ordered from low to high.
+ i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Laguerre series coefficients ordered from low to
+ high.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Laguerre series of power.
+
+ See Also
+ --------
+ lagadd, lagsub, lagmulx, lagmul, lagdiv
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagpow
+ >>> lagpow([1, 2, 3], 2)
+ array([ 14., -16., 56., -72., 54.])
+
+ """
+ return pu._pow(lagmul, c, pow, maxpower)
+
+
+def lagder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a Laguerre series.
+
+ Returns the Laguerre series coefficients `c` differentiated `m` times
+ along `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The argument
+ `c` is an array of coefficients from low to high degree along each
+ axis, e.g., [1,2,3] represents the series ``1*L_0 + 2*L_1 + 3*L_2``
+ while [[1,2],[1,2]] represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) +
+ 2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is
+ ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Laguerre series coefficients. If `c` is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change of
+ variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Laguerre series of the derivative.
+
+ See Also
+ --------
+ lagint
+
+ Notes
+ -----
+ In general, the result of differentiating a Laguerre series does not
+ resemble the same operation on a power series. Thus the result of this
+ function may be "unintuitive," albeit correct; see Examples section
+ below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagder
+ >>> lagder([ 1., 1., 1., -3.])
+ array([1., 2., 3.])
+ >>> lagder([ 1., 0., 0., -4., 3.], m=2)
+ array([1., 2., 3.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ c = c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=c.dtype)
+ for j in range(n, 1, -1):
+ der[j - 1] = -c[j]
+ c[j - 1] += c[j]
+ der[0] = -c[1]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a Laguerre series.
+
+ Returns the Laguerre series coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients from low to high degree along each axis, e.g., [1,2,3]
+ represents the series ``L_0 + 2*L_1 + 3*L_2`` while [[1,2],[1,2]]
+ represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) +
+ 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
+
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Laguerre series coefficients. If `c` is multidimensional
+ the different axis correspond to different variables with the
+ degree in each axis given by the corresponding index.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at
+ ``lbnd`` is the first value in the list, the value of the second
+ integral at ``lbnd`` is the second value, etc. If ``k == []`` (the
+ default), all constants are set to zero. If ``m == 1``, a single
+ scalar can be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ Laguerre series coefficients of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ lagder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`.
+ Why is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a` - perhaps not what one would have first thought.
+
+ Also note that, in general, the result of integrating a C-series needs
+ to be "reprojected" onto the C-series basis set. Thus, typically,
+ the result of this function is "unintuitive," albeit correct; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagint
+ >>> lagint([1,2,3])
+ array([ 1., 1., 1., -3.])
+ >>> lagint([1,2,3], m=2)
+ array([ 1., 0., 0., -4., 3.])
+ >>> lagint([1,2,3], k=1)
+ array([ 2., 1., 1., -3.])
+ >>> lagint([1,2,3], lbnd=-1)
+ array([11.5, 1. , 1. , -3. ])
+ >>> lagint([1,2], m=2, k=[1,2], lbnd=-1)
+ array([ 11.16666667, -5. , -3. , 2. ]) # may vary
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ k = list(k) + [0]*(cnt - len(k))
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=c.dtype)
+ tmp[0] = c[0]
+ tmp[1] = -c[0]
+ for j in range(1, n):
+ tmp[j] += c[j]
+ tmp[j + 1] = -c[j]
+ tmp[0] += k[i] - lagval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def lagval(x, c, tensor=True):
+ """
+ Evaluate a Laguerre series at points x.
+
+ If `c` is of length ``n + 1``, this function returns the value:
+
+ .. math:: p(x) = c_0 * L_0(x) + c_1 * L_1(x) + ... + c_n * L_n(x)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, algebra_like
+ The shape of the return value is described above.
+
+ See Also
+ --------
+ lagval2d, laggrid2d, lagval3d, laggrid3d
+
+ Notes
+ -----
+ The evaluation uses Clenshaw recursion, aka synthetic division.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagval
+ >>> coef = [1, 2, 3]
+ >>> lagval(1, coef)
+ -0.5
+ >>> lagval([[1, 2],[3, 4]], coef)
+ array([[-0.5, -4. ],
+ [-4.5, -2. ]])
+
+ """
+ c = np.array(c, ndmin=1, copy=None)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ if len(c) == 1:
+ c0 = c[0]
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]
+ c1 = c[1]
+ else:
+ nd = len(c)
+ c0 = c[-2]
+ c1 = c[-1]
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = c[-i] - (c1*(nd - 1))/nd
+ c1 = tmp + (c1*((2*nd - 1) - x))/nd
+ return c0 + c1*(1 - x)
+
+
+def lagval2d(x, y, c):
+ """
+ Evaluate a 2-D Laguerre series at points (x, y).
+
+ This function returns the values:
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * L_i(x) * L_j(y)
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` is a 1-D array a one is implicitly appended to its shape to make
+ it 2-D. The shape of the result will be c.shape[2:] + x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and if it isn't an ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than two the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points formed with
+ pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ lagval, laggrid2d, lagval3d, laggrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagval2d
+ >>> c = [[1, 2],[3, 4]]
+ >>> lagval2d(1, 1, c)
+ 1.0
+ """
+ return pu._valnd(lagval, c, x, y)
+
+
+def laggrid2d(x, y, c):
+ """
+ Evaluate a 2-D Laguerre series on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * L_i(a) * L_j(b)
+
+ where the points ``(a, b)`` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape + y.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j is contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional Chebyshev series at points in the
+ Cartesian product of `x` and `y`.
+
+ See Also
+ --------
+ lagval, lagval2d, lagval3d, laggrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import laggrid2d
+ >>> c = [[1, 2], [3, 4]]
+ >>> laggrid2d([0, 1], [0, 1], c)
+ array([[10., 4.],
+ [ 3., 1.]])
+
+ """
+ return pu._gridnd(lagval, c, x, y)
+
+
+def lagval3d(x, y, z, c):
+ """
+ Evaluate a 3-D Laguerre series at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * L_i(x) * L_j(y) * L_k(z)
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ ``(x, y, z)``, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ lagval, lagval2d, laggrid2d, laggrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagval3d
+ >>> c = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
+ >>> lagval3d(1, 1, 2, c)
+ -1.0
+
+ """
+ return pu._valnd(lagval, c, x, y, z)
+
+
+def laggrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D Laguerre series on the Cartesian product of x, y, and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * L_i(a) * L_j(b) * L_k(c)
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ lagval, lagval2d, laggrid2d, lagval3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import laggrid3d
+ >>> c = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
+ >>> laggrid3d([0, 1], [0, 1], [2, 4], c)
+ array([[[ -4., -44.],
+ [ -2., -18.]],
+ [[ -2., -14.],
+ [ -1., -5.]]])
+
+ """
+ return pu._gridnd(lagval, c, x, y, z)
+
+
+def lagvander(x, deg):
+ """Pseudo-Vandermonde matrix of given degree.
+
+ Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
+ `x`. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = L_i(x)
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the degree of the Laguerre polynomial.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ array ``V = lagvander(x, n)``, then ``np.dot(V, c)`` and
+ ``lagval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of Laguerre series of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray
+ The pseudo-Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where The last index is the degree of the
+ corresponding Laguerre polynomial. The dtype will be the same as
+ the converted `x`.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.laguerre import lagvander
+ >>> x = np.array([0, 1, 2])
+ >>> lagvander(x, 3)
+ array([[ 1. , 1. , 1. , 1. ],
+ [ 1. , 0. , -0.5 , -0.66666667],
+ [ 1. , -1. , -1. , -0.33333333]])
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ v[0] = x*0 + 1
+ if ideg > 0:
+ v[1] = 1 - x
+ for i in range(2, ideg + 1):
+ v[i] = (v[i-1]*(2*i - 1 - x) - v[i-2]*(i - 1))/i
+ return np.moveaxis(v, 0, -1)
+
+
+def lagvander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = L_i(x) * L_j(y),
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the degrees of
+ the Laguerre polynomials.
+
+ If ``V = lagvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``lagval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D Laguerre
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ lagvander, lagvander3d, lagval2d, lagval3d
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.laguerre import lagvander2d
+ >>> x = np.array([0])
+ >>> y = np.array([2])
+ >>> lagvander2d(x, y, [2, 1])
+ array([[ 1., -1., 1., -1., 1., -1.]])
+
+ """
+ return pu._vander_nd_flat((lagvander, lagvander), (x, y), deg)
+
+
+def lagvander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = L_i(x)*L_j(y)*L_k(z),
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the degrees of the Laguerre polynomials.
+
+ If ``V = lagvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``lagval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D Laguerre
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ lagvander, lagvander3d, lagval2d, lagval3d
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.laguerre import lagvander3d
+ >>> x = np.array([0])
+ >>> y = np.array([2])
+ >>> z = np.array([0])
+ >>> lagvander3d(x, y, z, [2, 1, 3])
+ array([[ 1., 1., 1., 1., -1., -1., -1., -1., 1., 1., 1., 1., -1.,
+ -1., -1., -1., 1., 1., 1., 1., -1., -1., -1., -1.]])
+
+ """
+ return pu._vander_nd_flat((lagvander, lagvander, lagvander), (x, y, z), deg)
+
+
+def lagfit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least squares fit of Laguerre series to data.
+
+ Return the coefficients of a Laguerre series of degree `deg` that is the
+ least squares fit to the data values `y` given at points `x`. If `y` is
+ 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
+ fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x),
+
+ where ``n`` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,) or (M, K)
+ y-coordinates of the sample points. Several data sets of sample
+ points sharing the same x-coordinates can be fitted at once by
+ passing in a 2D-array that contains one dataset per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller than
+ this relative to the largest singular value will be ignored. The
+ default value is len(x)*eps, where eps is the relative precision of
+ the float type, about 2e-16 in most cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False (the
+ default) just the coefficients are returned, when True diagnostic
+ information from the singular value decomposition is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (M,) or (M, K)
+ Laguerre coefficients ordered from low to high. If `y` was 2-D,
+ the coefficients for the data in column *k* of `y` are in column
+ *k*.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Warns
+ -----
+ RankWarning
+ The rank of the coefficient matrix in the least-squares fit is
+ deficient. The warning is only raised if ``full == False``. The
+ warnings can be turned off by
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfit
+ numpy.polynomial.legendre.legfit
+ numpy.polynomial.chebyshev.chebfit
+ numpy.polynomial.hermite.hermfit
+ numpy.polynomial.hermite_e.hermefit
+ lagval : Evaluates a Laguerre series.
+ lagvander : pseudo Vandermonde matrix of Laguerre series.
+ lagweight : Laguerre weight function.
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the Laguerre series ``p`` that
+ minimizes the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where the :math:`w_j` are the weights. This problem is solved by
+ setting up as the (typically) overdetermined matrix equation
+
+ .. math:: V(x) * c = w * y,
+
+ where ``V`` is the weighted pseudo Vandermonde matrix of `x`, ``c`` are the
+ coefficients to be solved for, `w` are the weights, and `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of ``V``.
+
+ If some of the singular values of `V` are so small that they are
+ neglected, then a `~exceptions.RankWarning` will be issued. This means that
+ the coefficient values may be poorly determined. Using a lower order fit
+ will usually get rid of the warning. The `rcond` parameter can also be
+ set to a value smaller than its default, but the resulting fit may be
+ spurious and have large contributions from roundoff error.
+
+ Fits using Laguerre series are probably most useful when the data can
+ be approximated by ``sqrt(w(x)) * p(x)``, where ``w(x)`` is the Laguerre
+ weight. In that case the weight ``sqrt(w(x[i]))`` should be used
+ together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
+ available as `lagweight`.
+
+ References
+ ----------
+ .. [1] Wikipedia, "Curve fitting",
+ https://en.wikipedia.org/wiki/Curve_fitting
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.laguerre import lagfit, lagval
+ >>> x = np.linspace(0, 10)
+ >>> rng = np.random.default_rng()
+ >>> err = rng.normal(scale=1./10, size=len(x))
+ >>> y = lagval(x, [1, 2, 3]) + err
+ >>> lagfit(x, y, 2)
+ array([1.00578369, 1.99417356, 2.99827656]) # may vary
+
+ """
+ return pu._fit(lagvander, x, y, deg, rcond, full, w)
+
+
+def lagcompanion(c):
+ """
+ Return the companion matrix of c.
+
+ The usual companion matrix of the Laguerre polynomials is already
+ symmetric when `c` is a basis Laguerre polynomial, so no scaling is
+ applied.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Laguerre series coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Companion matrix of dimensions (deg, deg).
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagcompanion
+ >>> lagcompanion([1, 2, 3])
+ array([[ 1. , -0.33333333],
+ [-1. , 4.33333333]])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[1 + c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ top = mat.reshape(-1)[1::n+1]
+ mid = mat.reshape(-1)[0::n+1]
+ bot = mat.reshape(-1)[n::n+1]
+ top[...] = -np.arange(1, n)
+ mid[...] = 2.*np.arange(n) + 1.
+ bot[...] = top
+ mat[:, -1] += (c[:-1]/c[-1])*n
+ return mat
+
+
+def lagroots(c):
+ """
+ Compute the roots of a Laguerre series.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * L_i(x).
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the series. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyroots
+ numpy.polynomial.legendre.legroots
+ numpy.polynomial.chebyshev.chebroots
+ numpy.polynomial.hermite.hermroots
+ numpy.polynomial.hermite_e.hermeroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the series for such
+ values. Roots with multiplicity greater than 1 will also show larger
+ errors as the value of the series near such points is relatively
+ insensitive to errors in the roots. Isolated roots near the origin can
+ be improved by a few iterations of Newton's method.
+
+ The Laguerre series basis polynomials aren't powers of `x` so the
+ results of this function may seem unintuitive.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagroots, lagfromroots
+ >>> coef = lagfromroots([0, 1, 2])
+ >>> coef
+ array([ 2., -8., 12., -6.])
+ >>> lagroots(coef)
+ array([-4.4408921e-16, 1.0000000e+00, 2.0000000e+00])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) <= 1:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([1 + c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = lagcompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+def laggauss(deg):
+ """
+ Gauss-Laguerre quadrature.
+
+ Computes the sample points and weights for Gauss-Laguerre quadrature.
+ These sample points and weights will correctly integrate polynomials of
+ degree :math:`2*deg - 1` or less over the interval :math:`[0, \\inf]`
+ with the weight function :math:`f(x) = \\exp(-x)`.
+
+ Parameters
+ ----------
+ deg : int
+ Number of sample points and weights. It must be >= 1.
+
+ Returns
+ -------
+ x : ndarray
+ 1-D ndarray containing the sample points.
+ y : ndarray
+ 1-D ndarray containing the weights.
+
+ Notes
+ -----
+ The results have only been tested up to degree 100 higher degrees may
+ be problematic. The weights are determined by using the fact that
+
+ .. math:: w_k = c / (L'_n(x_k) * L_{n-1}(x_k))
+
+ where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
+ is the k'th root of :math:`L_n`, and then scaling the results to get
+ the right value when integrating 1.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import laggauss
+ >>> laggauss(2)
+ (array([0.58578644, 3.41421356]), array([0.85355339, 0.14644661]))
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg <= 0:
+ raise ValueError("deg must be a positive integer")
+
+ # first approximation of roots. We use the fact that the companion
+ # matrix is symmetric in this case in order to obtain better zeros.
+ c = np.array([0]*deg + [1])
+ m = lagcompanion(c)
+ x = la.eigvalsh(m)
+
+ # improve roots by one application of Newton
+ dy = lagval(x, c)
+ df = lagval(x, lagder(c))
+ x -= dy/df
+
+ # compute the weights. We scale the factor to avoid possible numerical
+ # overflow.
+ fm = lagval(x, c[1:])
+ fm /= np.abs(fm).max()
+ df /= np.abs(df).max()
+ w = 1/(fm * df)
+
+ # scale w to get the right value, 1 in this case
+ w /= w.sum()
+
+ return x, w
+
+
+def lagweight(x):
+ """Weight function of the Laguerre polynomials.
+
+ The weight function is :math:`exp(-x)` and the interval of integration
+ is :math:`[0, \\inf]`. The Laguerre polynomials are orthogonal, but not
+ normalized, with respect to this weight function.
+
+ Parameters
+ ----------
+ x : array_like
+ Values at which the weight function will be computed.
+
+ Returns
+ -------
+ w : ndarray
+ The weight function at `x`.
+
+ Examples
+ --------
+ >>> from numpy.polynomial.laguerre import lagweight
+ >>> x = np.array([0, 1, 2])
+ >>> lagweight(x)
+ array([1. , 0.36787944, 0.13533528])
+
+ """
+ w = np.exp(-x)
+ return w
+
+#
+# Laguerre series class
+#
+
+class Laguerre(ABCPolyBase):
+ """A Laguerre series class.
+
+ The Laguerre class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Laguerre coefficients in order of increasing degree, i.e,
+ ``(1, 2, 3)`` gives ``1*L_0(x) + 2*L_1(X) + 3*L_2(x)``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [0., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [0., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(lagadd)
+ _sub = staticmethod(lagsub)
+ _mul = staticmethod(lagmul)
+ _div = staticmethod(lagdiv)
+ _pow = staticmethod(lagpow)
+ _val = staticmethod(lagval)
+ _int = staticmethod(lagint)
+ _der = staticmethod(lagder)
+ _fit = staticmethod(lagfit)
+ _line = staticmethod(lagline)
+ _roots = staticmethod(lagroots)
+ _fromroots = staticmethod(lagfromroots)
+
+ # Virtual properties
+ domain = np.array(lagdomain)
+ window = np.array(lagdomain)
+ basis_name = 'L'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ee81157957482006cde90445fa73cf4223723d5f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/laguerre.pyi
@@ -0,0 +1,100 @@
+from typing import Final, Literal as L
+
+import numpy as np
+
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _Array1,
+ _Array2,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncGauss,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPoly2Ortho,
+ _FuncPow,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncValFromRoots,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncWeight,
+)
+from .polyutils import trimcoef as lagtrim
+
+__all__ = [
+ "lagzero",
+ "lagone",
+ "lagx",
+ "lagdomain",
+ "lagline",
+ "lagadd",
+ "lagsub",
+ "lagmulx",
+ "lagmul",
+ "lagdiv",
+ "lagpow",
+ "lagval",
+ "lagder",
+ "lagint",
+ "lag2poly",
+ "poly2lag",
+ "lagfromroots",
+ "lagvander",
+ "lagfit",
+ "lagtrim",
+ "lagroots",
+ "Laguerre",
+ "lagval2d",
+ "lagval3d",
+ "laggrid2d",
+ "laggrid3d",
+ "lagvander2d",
+ "lagvander3d",
+ "lagcompanion",
+ "laggauss",
+ "lagweight",
+]
+
+poly2lag: _FuncPoly2Ortho[L["poly2lag"]]
+lag2poly: _FuncUnOp[L["lag2poly"]]
+
+lagdomain: Final[_Array2[np.float64]]
+lagzero: Final[_Array1[np.int_]]
+lagone: Final[_Array1[np.int_]]
+lagx: Final[_Array2[np.int_]]
+
+lagline: _FuncLine[L["lagline"]]
+lagfromroots: _FuncFromRoots[L["lagfromroots"]]
+lagadd: _FuncBinOp[L["lagadd"]]
+lagsub: _FuncBinOp[L["lagsub"]]
+lagmulx: _FuncUnOp[L["lagmulx"]]
+lagmul: _FuncBinOp[L["lagmul"]]
+lagdiv: _FuncBinOp[L["lagdiv"]]
+lagpow: _FuncPow[L["lagpow"]]
+lagder: _FuncDer[L["lagder"]]
+lagint: _FuncInteg[L["lagint"]]
+lagval: _FuncVal[L["lagval"]]
+lagval2d: _FuncVal2D[L["lagval2d"]]
+lagval3d: _FuncVal3D[L["lagval3d"]]
+lagvalfromroots: _FuncValFromRoots[L["lagvalfromroots"]]
+laggrid2d: _FuncVal2D[L["laggrid2d"]]
+laggrid3d: _FuncVal3D[L["laggrid3d"]]
+lagvander: _FuncVander[L["lagvander"]]
+lagvander2d: _FuncVander2D[L["lagvander2d"]]
+lagvander3d: _FuncVander3D[L["lagvander3d"]]
+lagfit: _FuncFit[L["lagfit"]]
+lagcompanion: _FuncCompanion[L["lagcompanion"]]
+lagroots: _FuncRoots[L["lagroots"]]
+laggauss: _FuncGauss[L["laggauss"]]
+lagweight: _FuncWeight[L["lagweight"]]
+
+
+class Laguerre(ABCPolyBase[L["L"]]): ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.py
new file mode 100644
index 0000000000000000000000000000000000000000..c2cd3fbfe76021c908b0e5a004f68617c1da6d7f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.py
@@ -0,0 +1,1605 @@
+"""
+==================================================
+Legendre Series (:mod:`numpy.polynomial.legendre`)
+==================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with Legendre series, including a `Legendre` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with such polynomials is in the
+docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+.. autosummary::
+ :toctree: generated/
+
+ Legendre
+
+Constants
+---------
+
+.. autosummary::
+ :toctree: generated/
+
+ legdomain
+ legzero
+ legone
+ legx
+
+Arithmetic
+----------
+
+.. autosummary::
+ :toctree: generated/
+
+ legadd
+ legsub
+ legmulx
+ legmul
+ legdiv
+ legpow
+ legval
+ legval2d
+ legval3d
+ leggrid2d
+ leggrid3d
+
+Calculus
+--------
+
+.. autosummary::
+ :toctree: generated/
+
+ legder
+ legint
+
+Misc Functions
+--------------
+
+.. autosummary::
+ :toctree: generated/
+
+ legfromroots
+ legroots
+ legvander
+ legvander2d
+ legvander3d
+ leggauss
+ legweight
+ legcompanion
+ legfit
+ legtrim
+ legline
+ leg2poly
+ poly2leg
+
+See also
+--------
+numpy.polynomial
+
+"""
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+__all__ = [
+ 'legzero', 'legone', 'legx', 'legdomain', 'legline', 'legadd',
+ 'legsub', 'legmulx', 'legmul', 'legdiv', 'legpow', 'legval', 'legder',
+ 'legint', 'leg2poly', 'poly2leg', 'legfromroots', 'legvander',
+ 'legfit', 'legtrim', 'legroots', 'Legendre', 'legval2d', 'legval3d',
+ 'leggrid2d', 'leggrid3d', 'legvander2d', 'legvander3d', 'legcompanion',
+ 'leggauss', 'legweight']
+
+legtrim = pu.trimcoef
+
+
+def poly2leg(pol):
+ """
+ Convert a polynomial to a Legendre series.
+
+ Convert an array representing the coefficients of a polynomial (relative
+ to the "standard" basis) ordered from lowest degree to highest, to an
+ array of the coefficients of the equivalent Legendre series, ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ pol : array_like
+ 1-D array containing the polynomial coefficients
+
+ Returns
+ -------
+ c : ndarray
+ 1-D array containing the coefficients of the equivalent Legendre
+ series.
+
+ See Also
+ --------
+ leg2poly
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy import polynomial as P
+ >>> p = P.Polynomial(np.arange(4))
+ >>> p
+ Polynomial([0., 1., 2., 3.], domain=[-1., 1.], window=[-1., 1.], ...
+ >>> c = P.Legendre(P.legendre.poly2leg(p.coef))
+ >>> c
+ Legendre([ 1. , 3.25, 1. , 0.75], domain=[-1, 1], window=[-1, 1]) # may vary
+
+ """
+ [pol] = pu.as_series([pol])
+ deg = len(pol) - 1
+ res = 0
+ for i in range(deg, -1, -1):
+ res = legadd(legmulx(res), pol[i])
+ return res
+
+
+def leg2poly(c):
+ """
+ Convert a Legendre series to a polynomial.
+
+ Convert an array representing the coefficients of a Legendre series,
+ ordered from lowest degree to highest, to an array of the coefficients
+ of the equivalent polynomial (relative to the "standard" basis) ordered
+ from lowest to highest degree.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array containing the Legendre series coefficients, ordered
+ from lowest order term to highest.
+
+ Returns
+ -------
+ pol : ndarray
+ 1-D array containing the coefficients of the equivalent polynomial
+ (relative to the "standard" basis) ordered from lowest order term
+ to highest.
+
+ See Also
+ --------
+ poly2leg
+
+ Notes
+ -----
+ The easy way to do conversions between polynomial basis sets
+ is to use the convert method of a class instance.
+
+ Examples
+ --------
+ >>> from numpy import polynomial as P
+ >>> c = P.Legendre(range(4))
+ >>> c
+ Legendre([0., 1., 2., 3.], domain=[-1., 1.], window=[-1., 1.], symbol='x')
+ >>> p = c.convert(kind=P.Polynomial)
+ >>> p
+ Polynomial([-1. , -3.5, 3. , 7.5], domain=[-1., 1.], window=[-1., ...
+ >>> P.legendre.leg2poly(range(4))
+ array([-1. , -3.5, 3. , 7.5])
+
+
+ """
+ from .polynomial import polyadd, polysub, polymulx
+
+ [c] = pu.as_series([c])
+ n = len(c)
+ if n < 3:
+ return c
+ else:
+ c0 = c[-2]
+ c1 = c[-1]
+ # i is the current degree of c1
+ for i in range(n - 1, 1, -1):
+ tmp = c0
+ c0 = polysub(c[i - 2], (c1*(i - 1))/i)
+ c1 = polyadd(tmp, (polymulx(c1)*(2*i - 1))/i)
+ return polyadd(c0, polymulx(c1))
+
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Legendre
+legdomain = np.array([-1., 1.])
+
+# Legendre coefficients representing zero.
+legzero = np.array([0])
+
+# Legendre coefficients representing one.
+legone = np.array([1])
+
+# Legendre coefficients representing the identity x.
+legx = np.array([0, 1])
+
+
+def legline(off, scl):
+ """
+ Legendre series whose graph is a straight line.
+
+
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The specified line is given by ``off + scl*x``.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the Legendre series for
+ ``off + scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyline
+ numpy.polynomial.chebyshev.chebline
+ numpy.polynomial.laguerre.lagline
+ numpy.polynomial.hermite.hermline
+ numpy.polynomial.hermite_e.hermeline
+
+ Examples
+ --------
+ >>> import numpy.polynomial.legendre as L
+ >>> L.legline(3,2)
+ array([3, 2])
+ >>> L.legval(-3, L.legline(3,2)) # should be -3
+ -3.0
+
+ """
+ if scl != 0:
+ return np.array([off, scl])
+ else:
+ return np.array([off])
+
+
+def legfromroots(roots):
+ """
+ Generate a Legendre series with given roots.
+
+ The function returns the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ in Legendre form, where the :math:`r_n` are the roots specified in `roots`.
+ If a zero has multiplicity n, then it must appear in `roots` n times.
+ For instance, if 2 is a root of multiplicity three and 3 is a root of
+ multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
+ roots can appear in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x)
+
+ The coefficient of the last term is not generally 1 for monic
+ polynomials in Legendre form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of coefficients. If all roots are real then `out` is a
+ real array, if some of the roots are complex, then `out` is complex
+ even if all the coefficients in the result are real (see Examples
+ below).
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfromroots
+ numpy.polynomial.chebyshev.chebfromroots
+ numpy.polynomial.laguerre.lagfromroots
+ numpy.polynomial.hermite.hermfromroots
+ numpy.polynomial.hermite_e.hermefromroots
+
+ Examples
+ --------
+ >>> import numpy.polynomial.legendre as L
+ >>> L.legfromroots((-1,0,1)) # x^3 - x relative to the standard basis
+ array([ 0. , -0.4, 0. , 0.4])
+ >>> j = complex(0,1)
+ >>> L.legfromroots((-j,j)) # x^2 + 1 relative to the standard basis
+ array([ 1.33333333+0.j, 0.00000000+0.j, 0.66666667+0.j]) # may vary
+
+ """
+ return pu._fromroots(legline, legmul, roots)
+
+
+def legadd(c1, c2):
+ """
+ Add one Legendre series to another.
+
+ Returns the sum of two Legendre series `c1` + `c2`. The arguments
+ are sequences of coefficients ordered from lowest order term to
+ highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Legendre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the Legendre series of their sum.
+
+ See Also
+ --------
+ legsub, legmulx, legmul, legdiv, legpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the sum of two Legendre series
+ is a Legendre series (without having to "reproject" the result onto
+ the basis set) so addition, just like that of "standard" polynomials,
+ is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> L.legadd(c1,c2)
+ array([4., 4., 4.])
+
+ """
+ return pu._add(c1, c2)
+
+
+def legsub(c1, c2):
+ """
+ Subtract one Legendre series from another.
+
+ Returns the difference of two Legendre series `c1` - `c2`. The
+ sequences of coefficients are from lowest order term to highest, i.e.,
+ [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Legendre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Legendre series coefficients representing their difference.
+
+ See Also
+ --------
+ legadd, legmulx, legmul, legdiv, legpow
+
+ Notes
+ -----
+ Unlike multiplication, division, etc., the difference of two Legendre
+ series is a Legendre series (without having to "reproject" the result
+ onto the basis set) so subtraction, just like that of "standard"
+ polynomials, is simply "component-wise."
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> L.legsub(c1,c2)
+ array([-2., 0., 2.])
+ >>> L.legsub(c2,c1) # -C.legsub(c1,c2)
+ array([ 2., 0., -2.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def legmulx(c):
+ """Multiply a Legendre series by x.
+
+ Multiply the Legendre series `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Legendre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ legadd, legsub, legmul, legdiv, legpow
+
+ Notes
+ -----
+ The multiplication uses the recursion relationship for Legendre
+ polynomials in the form
+
+ .. math::
+
+ xP_i(x) = ((i + 1)*P_{i + 1}(x) + i*P_{i - 1}(x))/(2i + 1)
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> L.legmulx([1,2,3])
+ array([ 0.66666667, 2.2, 1.33333333, 1.8]) # may vary
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]*0
+ prd[1] = c[0]
+ for i in range(1, len(c)):
+ j = i + 1
+ k = i - 1
+ s = i + j
+ prd[j] = (c[i]*j)/s
+ prd[k] += (c[i]*i)/s
+ return prd
+
+
+def legmul(c1, c2):
+ """
+ Multiply one Legendre series by another.
+
+ Returns the product of two Legendre series `c1` * `c2`. The arguments
+ are sequences of coefficients, from lowest order "term" to highest,
+ e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Legendre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of Legendre series coefficients representing their product.
+
+ See Also
+ --------
+ legadd, legsub, legmulx, legdiv, legpow
+
+ Notes
+ -----
+ In general, the (polynomial) product of two C-series results in terms
+ that are not in the Legendre polynomial basis set. Thus, to express
+ the product as a Legendre series, it is necessary to "reproject" the
+ product onto said basis set, which may produce "unintuitive" (but
+ correct) results; see Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2)
+ >>> L.legmul(c1,c2) # multiplication requires "reprojection"
+ array([ 4.33333333, 10.4 , 11.66666667, 3.6 ]) # may vary
+
+ """
+ # s1, s2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+
+ if len(c1) > len(c2):
+ c = c2
+ xs = c1
+ else:
+ c = c1
+ xs = c2
+
+ if len(c) == 1:
+ c0 = c[0]*xs
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]*xs
+ c1 = c[1]*xs
+ else:
+ nd = len(c)
+ c0 = c[-2]*xs
+ c1 = c[-1]*xs
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = legsub(c[-i]*xs, (c1*(nd - 1))/nd)
+ c1 = legadd(tmp, (legmulx(c1)*(2*nd - 1))/nd)
+ return legadd(c0, legmulx(c1))
+
+
+def legdiv(c1, c2):
+ """
+ Divide one Legendre series by another.
+
+ Returns the quotient-with-remainder of two Legendre series
+ `c1` / `c2`. The arguments are sequences of coefficients from lowest
+ order "term" to highest, e.g., [1,2,3] represents the series
+ ``P_0 + 2*P_1 + 3*P_2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of Legendre series coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ quo, rem : ndarrays
+ Of Legendre series coefficients representing the quotient and
+ remainder.
+
+ See Also
+ --------
+ legadd, legsub, legmulx, legmul, legpow
+
+ Notes
+ -----
+ In general, the (polynomial) division of one Legendre series by another
+ results in quotient and remainder terms that are not in the Legendre
+ polynomial basis set. Thus, to express these results as a Legendre
+ series, it is necessary to "reproject" the results onto the Legendre
+ basis set, which may produce "unintuitive" (but correct) results; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c1 = (1,2,3)
+ >>> c2 = (3,2,1)
+ >>> L.legdiv(c1,c2) # quotient "intuitive," remainder not
+ (array([3.]), array([-8., -4.]))
+ >>> c2 = (0,1,2,3)
+ >>> L.legdiv(c2,c1) # neither "intuitive"
+ (array([-0.07407407, 1.66666667]), array([-1.03703704, -2.51851852])) # may vary
+
+ """
+ return pu._div(legmul, c1, c2)
+
+
+def legpow(c, pow, maxpower=16):
+ """Raise a Legendre series to a power.
+
+ Returns the Legendre series `c` raised to the power `pow`. The
+ argument `c` is a sequence of coefficients ordered from low to high.
+ i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Legendre series coefficients ordered from low to
+ high.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Legendre series of power.
+
+ See Also
+ --------
+ legadd, legsub, legmulx, legmul, legdiv
+
+ """
+ return pu._pow(legmul, c, pow, maxpower)
+
+
+def legder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a Legendre series.
+
+ Returns the Legendre series coefficients `c` differentiated `m` times
+ along `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The argument
+ `c` is an array of coefficients from low to high degree along each
+ axis, e.g., [1,2,3] represents the series ``1*L_0 + 2*L_1 + 3*L_2``
+ while [[1,2],[1,2]] represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) +
+ 2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is
+ ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Legendre series coefficients. If c is multidimensional the
+ different axis correspond to different variables with the degree in
+ each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change of
+ variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Legendre series of the derivative.
+
+ See Also
+ --------
+ legint
+
+ Notes
+ -----
+ In general, the result of differentiating a Legendre series does not
+ resemble the same operation on a power series. Thus the result of this
+ function may be "unintuitive," albeit correct; see Examples section
+ below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c = (1,2,3,4)
+ >>> L.legder(c)
+ array([ 6., 9., 20.])
+ >>> L.legder(c, 3)
+ array([60.])
+ >>> L.legder(c, scl=-1)
+ array([ -6., -9., -20.])
+ >>> L.legder(c, 2,-1)
+ array([ 9., 60.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ c = c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=c.dtype)
+ for j in range(n, 2, -1):
+ der[j - 1] = (2*j - 1)*c[j]
+ c[j - 2] += c[j]
+ if n > 1:
+ der[1] = 3*c[2]
+ der[0] = c[1]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def legint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a Legendre series.
+
+ Returns the Legendre series coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients from low to high degree along each axis, e.g., [1,2,3]
+ represents the series ``L_0 + 2*L_1 + 3*L_2`` while [[1,2],[1,2]]
+ represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) +
+ 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of Legendre series coefficients. If c is multidimensional the
+ different axis correspond to different variables with the degree in
+ each axis given by the corresponding index.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at
+ ``lbnd`` is the first value in the list, the value of the second
+ integral at ``lbnd`` is the second value, etc. If ``k == []`` (the
+ default), all constants are set to zero. If ``m == 1``, a single
+ scalar can be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ Legendre series coefficient array of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ legder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`.
+ Why is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a` - perhaps not what one would have first thought.
+
+ Also note that, in general, the result of integrating a C-series needs
+ to be "reprojected" onto the C-series basis set. Thus, typically,
+ the result of this function is "unintuitive," albeit correct; see
+ Examples section below.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import legendre as L
+ >>> c = (1,2,3)
+ >>> L.legint(c)
+ array([ 0.33333333, 0.4 , 0.66666667, 0.6 ]) # may vary
+ >>> L.legint(c, 3)
+ array([ 1.66666667e-02, -1.78571429e-02, 4.76190476e-02, # may vary
+ -1.73472348e-18, 1.90476190e-02, 9.52380952e-03])
+ >>> L.legint(c, k=3)
+ array([ 3.33333333, 0.4 , 0.66666667, 0.6 ]) # may vary
+ >>> L.legint(c, lbnd=-2)
+ array([ 7.33333333, 0.4 , 0.66666667, 0.6 ]) # may vary
+ >>> L.legint(c, scl=2)
+ array([ 0.66666667, 0.8 , 1.33333333, 1.2 ]) # may vary
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ k = list(k) + [0]*(cnt - len(k))
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=c.dtype)
+ tmp[0] = c[0]*0
+ tmp[1] = c[0]
+ if n > 1:
+ tmp[2] = c[1]/3
+ for j in range(2, n):
+ t = c[j]/(2*j + 1)
+ tmp[j + 1] = t
+ tmp[j - 1] -= t
+ tmp[0] += k[i] - legval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def legval(x, c, tensor=True):
+ """
+ Evaluate a Legendre series at points x.
+
+ If `c` is of length ``n + 1``, this function returns the value:
+
+ .. math:: p(x) = c_0 * L_0(x) + c_1 * L_1(x) + ... + c_n * L_n(x)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, algebra_like
+ The shape of the return value is described above.
+
+ See Also
+ --------
+ legval2d, leggrid2d, legval3d, leggrid3d
+
+ Notes
+ -----
+ The evaluation uses Clenshaw recursion, aka synthetic division.
+
+ """
+ c = np.array(c, ndmin=1, copy=None)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ c = c.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ if len(c) == 1:
+ c0 = c[0]
+ c1 = 0
+ elif len(c) == 2:
+ c0 = c[0]
+ c1 = c[1]
+ else:
+ nd = len(c)
+ c0 = c[-2]
+ c1 = c[-1]
+ for i in range(3, len(c) + 1):
+ tmp = c0
+ nd = nd - 1
+ c0 = c[-i] - (c1*(nd - 1))/nd
+ c1 = tmp + (c1*x*(2*nd - 1))/nd
+ return c0 + c1*x
+
+
+def legval2d(x, y, c):
+ """
+ Evaluate a 2-D Legendre series at points (x, y).
+
+ This function returns the values:
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * L_i(x) * L_j(y)
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` is a 1-D array a one is implicitly appended to its shape to make
+ it 2-D. The shape of the result will be c.shape[2:] + x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and if it isn't an ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than two the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional Legendre series at points formed
+ from pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ legval, leggrid2d, legval3d, leggrid3d
+ """
+ return pu._valnd(legval, c, x, y)
+
+
+def leggrid2d(x, y, c):
+ """
+ Evaluate a 2-D Legendre series on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * L_i(a) * L_j(b)
+
+ where the points ``(a, b)`` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape + y.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j is contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional Chebyshev series at points in the
+ Cartesian product of `x` and `y`.
+
+ See Also
+ --------
+ legval, legval2d, legval3d, leggrid3d
+ """
+ return pu._gridnd(legval, c, x, y)
+
+
+def legval3d(x, y, z, c):
+ """
+ Evaluate a 3-D Legendre series at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * L_i(x) * L_j(y) * L_k(z)
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ ``(x, y, z)``, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ legval, legval2d, leggrid2d, leggrid3d
+ """
+ return pu._valnd(legval, c, x, y, z)
+
+
+def leggrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D Legendre series on the Cartesian product of x, y, and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * L_i(a) * L_j(b) * L_k(c)
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ legval, legval2d, leggrid2d, legval3d
+ """
+ return pu._gridnd(legval, c, x, y, z)
+
+
+def legvander(x, deg):
+ """Pseudo-Vandermonde matrix of given degree.
+
+ Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
+ `x`. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = L_i(x)
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the degree of the Legendre polynomial.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ array ``V = legvander(x, n)``, then ``np.dot(V, c)`` and
+ ``legval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of Legendre series of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray
+ The pseudo-Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where The last index is the degree of the
+ corresponding Legendre polynomial. The dtype will be the same as
+ the converted `x`.
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ # Use forward recursion to generate the entries. This is not as accurate
+ # as reverse recursion in this application but it is more efficient.
+ v[0] = x*0 + 1
+ if ideg > 0:
+ v[1] = x
+ for i in range(2, ideg + 1):
+ v[i] = (v[i-1]*x*(2*i - 1) - v[i-2]*(i - 1))/i
+ return np.moveaxis(v, 0, -1)
+
+
+def legvander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = L_i(x) * L_j(y),
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the degrees of
+ the Legendre polynomials.
+
+ If ``V = legvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``legval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D Legendre
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ legvander, legvander3d, legval2d, legval3d
+ """
+ return pu._vander_nd_flat((legvander, legvander), (x, y), deg)
+
+
+def legvander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = L_i(x)*L_j(y)*L_k(z),
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the degrees of the Legendre polynomials.
+
+ If ``V = legvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``legval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D Legendre
+ series of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ legvander, legvander3d, legval2d, legval3d
+ """
+ return pu._vander_nd_flat((legvander, legvander, legvander), (x, y, z), deg)
+
+
+def legfit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least squares fit of Legendre series to data.
+
+ Return the coefficients of a Legendre series of degree `deg` that is the
+ least squares fit to the data values `y` given at points `x`. If `y` is
+ 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
+ fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x),
+
+ where `n` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (M,)
+ x-coordinates of the M sample points ``(x[i], y[i])``.
+ y : array_like, shape (M,) or (M, K)
+ y-coordinates of the sample points. Several data sets of sample
+ points sharing the same x-coordinates can be fitted at once by
+ passing in a 2D-array that contains one dataset per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller than
+ this relative to the largest singular value will be ignored. The
+ default value is len(x)*eps, where eps is the relative precision of
+ the float type, about 2e-16 in most cases.
+ full : bool, optional
+ Switch determining nature of return value. When it is False (the
+ default) just the coefficients are returned, when True diagnostic
+ information from the singular value decomposition is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (M,) or (M, K)
+ Legendre coefficients ordered from low to high. If `y` was
+ 2-D, the coefficients for the data in column k of `y` are in
+ column `k`. If `deg` is specified as a list, coefficients for
+ terms not included in the fit are set equal to zero in the
+ returned `coef`.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Warns
+ -----
+ RankWarning
+ The rank of the coefficient matrix in the least-squares fit is
+ deficient. The warning is only raised if ``full == False``. The
+ warnings can be turned off by
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyfit
+ numpy.polynomial.chebyshev.chebfit
+ numpy.polynomial.laguerre.lagfit
+ numpy.polynomial.hermite.hermfit
+ numpy.polynomial.hermite_e.hermefit
+ legval : Evaluates a Legendre series.
+ legvander : Vandermonde matrix of Legendre series.
+ legweight : Legendre weight function (= 1).
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the Legendre series `p` that
+ minimizes the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where :math:`w_j` are the weights. This problem is solved by setting up
+ as the (typically) overdetermined matrix equation
+
+ .. math:: V(x) * c = w * y,
+
+ where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
+ coefficients to be solved for, `w` are the weights, and `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of `V`.
+
+ If some of the singular values of `V` are so small that they are
+ neglected, then a `~exceptions.RankWarning` will be issued. This means that
+ the coefficient values may be poorly determined. Using a lower order fit
+ will usually get rid of the warning. The `rcond` parameter can also be
+ set to a value smaller than its default, but the resulting fit may be
+ spurious and have large contributions from roundoff error.
+
+ Fits using Legendre series are usually better conditioned than fits
+ using power series, but much can depend on the distribution of the
+ sample points and the smoothness of the data. If the quality of the fit
+ is inadequate splines may be a good alternative.
+
+ References
+ ----------
+ .. [1] Wikipedia, "Curve fitting",
+ https://en.wikipedia.org/wiki/Curve_fitting
+
+ Examples
+ --------
+
+ """
+ return pu._fit(legvander, x, y, deg, rcond, full, w)
+
+
+def legcompanion(c):
+ """Return the scaled companion matrix of c.
+
+ The basis polynomials are scaled so that the companion matrix is
+ symmetric when `c` is an Legendre basis polynomial. This provides
+ better eigenvalue estimates than the unscaled case and for basis
+ polynomials the eigenvalues are guaranteed to be real if
+ `numpy.linalg.eigvalsh` is used to obtain them.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of Legendre series coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Scaled companion matrix of dimensions (deg, deg).
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[-c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ scl = 1./np.sqrt(2*np.arange(n) + 1)
+ top = mat.reshape(-1)[1::n+1]
+ bot = mat.reshape(-1)[n::n+1]
+ top[...] = np.arange(1, n)*scl[:n-1]*scl[1:n]
+ bot[...] = top
+ mat[:, -1] -= (c[:-1]/c[-1])*(scl/scl[-1])*(n/(2*n - 1))
+ return mat
+
+
+def legroots(c):
+ """
+ Compute the roots of a Legendre series.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * L_i(x).
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the series. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.polynomial.polyroots
+ numpy.polynomial.chebyshev.chebroots
+ numpy.polynomial.laguerre.lagroots
+ numpy.polynomial.hermite.hermroots
+ numpy.polynomial.hermite_e.hermeroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the series for such values.
+ Roots with multiplicity greater than 1 will also show larger errors as
+ the value of the series near such points is relatively insensitive to
+ errors in the roots. Isolated roots near the origin can be improved by
+ a few iterations of Newton's method.
+
+ The Legendre series basis polynomials aren't powers of ``x`` so the
+ results of this function may seem unintuitive.
+
+ Examples
+ --------
+ >>> import numpy.polynomial.legendre as leg
+ >>> leg.legroots((1, 2, 3, 4)) # 4L_3 + 3L_2 + 2L_1 + 1L_0, all real roots
+ array([-0.85099543, -0.11407192, 0.51506735]) # may vary
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([-c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = legcompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+def leggauss(deg):
+ """
+ Gauss-Legendre quadrature.
+
+ Computes the sample points and weights for Gauss-Legendre quadrature.
+ These sample points and weights will correctly integrate polynomials of
+ degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
+ the weight function :math:`f(x) = 1`.
+
+ Parameters
+ ----------
+ deg : int
+ Number of sample points and weights. It must be >= 1.
+
+ Returns
+ -------
+ x : ndarray
+ 1-D ndarray containing the sample points.
+ y : ndarray
+ 1-D ndarray containing the weights.
+
+ Notes
+ -----
+ The results have only been tested up to degree 100, higher degrees may
+ be problematic. The weights are determined by using the fact that
+
+ .. math:: w_k = c / (L'_n(x_k) * L_{n-1}(x_k))
+
+ where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
+ is the k'th root of :math:`L_n`, and then scaling the results to get
+ the right value when integrating 1.
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg <= 0:
+ raise ValueError("deg must be a positive integer")
+
+ # first approximation of roots. We use the fact that the companion
+ # matrix is symmetric in this case in order to obtain better zeros.
+ c = np.array([0]*deg + [1])
+ m = legcompanion(c)
+ x = la.eigvalsh(m)
+
+ # improve roots by one application of Newton
+ dy = legval(x, c)
+ df = legval(x, legder(c))
+ x -= dy/df
+
+ # compute the weights. We scale the factor to avoid possible numerical
+ # overflow.
+ fm = legval(x, c[1:])
+ fm /= np.abs(fm).max()
+ df /= np.abs(df).max()
+ w = 1/(fm * df)
+
+ # for Legendre we can also symmetrize
+ w = (w + w[::-1])/2
+ x = (x - x[::-1])/2
+
+ # scale w to get the right value
+ w *= 2. / w.sum()
+
+ return x, w
+
+
+def legweight(x):
+ """
+ Weight function of the Legendre polynomials.
+
+ The weight function is :math:`1` and the interval of integration is
+ :math:`[-1, 1]`. The Legendre polynomials are orthogonal, but not
+ normalized, with respect to this weight function.
+
+ Parameters
+ ----------
+ x : array_like
+ Values at which the weight function will be computed.
+
+ Returns
+ -------
+ w : ndarray
+ The weight function at `x`.
+ """
+ w = x*0.0 + 1.0
+ return w
+
+#
+# Legendre series class
+#
+
+class Legendre(ABCPolyBase):
+ """A Legendre series class.
+
+ The Legendre class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Legendre coefficients in order of increasing degree, i.e.,
+ ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [-1., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [-1., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(legadd)
+ _sub = staticmethod(legsub)
+ _mul = staticmethod(legmul)
+ _div = staticmethod(legdiv)
+ _pow = staticmethod(legpow)
+ _val = staticmethod(legval)
+ _int = staticmethod(legint)
+ _der = staticmethod(legder)
+ _fit = staticmethod(legfit)
+ _line = staticmethod(legline)
+ _roots = staticmethod(legroots)
+ _fromroots = staticmethod(legfromroots)
+
+ # Virtual properties
+ domain = np.array(legdomain)
+ window = np.array(legdomain)
+ basis_name = 'P'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d81f3e6f54a4f72fd2cbc341f0efaa973aa3195a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/legendre.pyi
@@ -0,0 +1,99 @@
+from typing import Final, Literal as L
+
+import numpy as np
+
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _Array1,
+ _Array2,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncGauss,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPoly2Ortho,
+ _FuncPow,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncValFromRoots,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncWeight,
+)
+from .polyutils import trimcoef as legtrim
+
+__all__ = [
+ "legzero",
+ "legone",
+ "legx",
+ "legdomain",
+ "legline",
+ "legadd",
+ "legsub",
+ "legmulx",
+ "legmul",
+ "legdiv",
+ "legpow",
+ "legval",
+ "legder",
+ "legint",
+ "leg2poly",
+ "poly2leg",
+ "legfromroots",
+ "legvander",
+ "legfit",
+ "legtrim",
+ "legroots",
+ "Legendre",
+ "legval2d",
+ "legval3d",
+ "leggrid2d",
+ "leggrid3d",
+ "legvander2d",
+ "legvander3d",
+ "legcompanion",
+ "leggauss",
+ "legweight",
+]
+
+poly2leg: _FuncPoly2Ortho[L["poly2leg"]]
+leg2poly: _FuncUnOp[L["leg2poly"]]
+
+legdomain: Final[_Array2[np.float64]]
+legzero: Final[_Array1[np.int_]]
+legone: Final[_Array1[np.int_]]
+legx: Final[_Array2[np.int_]]
+
+legline: _FuncLine[L["legline"]]
+legfromroots: _FuncFromRoots[L["legfromroots"]]
+legadd: _FuncBinOp[L["legadd"]]
+legsub: _FuncBinOp[L["legsub"]]
+legmulx: _FuncUnOp[L["legmulx"]]
+legmul: _FuncBinOp[L["legmul"]]
+legdiv: _FuncBinOp[L["legdiv"]]
+legpow: _FuncPow[L["legpow"]]
+legder: _FuncDer[L["legder"]]
+legint: _FuncInteg[L["legint"]]
+legval: _FuncVal[L["legval"]]
+legval2d: _FuncVal2D[L["legval2d"]]
+legval3d: _FuncVal3D[L["legval3d"]]
+legvalfromroots: _FuncValFromRoots[L["legvalfromroots"]]
+leggrid2d: _FuncVal2D[L["leggrid2d"]]
+leggrid3d: _FuncVal3D[L["leggrid3d"]]
+legvander: _FuncVander[L["legvander"]]
+legvander2d: _FuncVander2D[L["legvander2d"]]
+legvander3d: _FuncVander3D[L["legvander3d"]]
+legfit: _FuncFit[L["legfit"]]
+legcompanion: _FuncCompanion[L["legcompanion"]]
+legroots: _FuncRoots[L["legroots"]]
+leggauss: _FuncGauss[L["leggauss"]]
+legweight: _FuncWeight[L["legweight"]]
+
+class Legendre(ABCPolyBase[L["P"]]): ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.py
new file mode 100644
index 0000000000000000000000000000000000000000..86ea3a5d1d6e030929bc9de2f4744983a2a0417e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.py
@@ -0,0 +1,1617 @@
+"""
+=================================================
+Power Series (:mod:`numpy.polynomial.polynomial`)
+=================================================
+
+This module provides a number of objects (mostly functions) useful for
+dealing with polynomials, including a `Polynomial` class that
+encapsulates the usual arithmetic operations. (General information
+on how this module represents and works with polynomial objects is in
+the docstring for its "parent" sub-package, `numpy.polynomial`).
+
+Classes
+-------
+.. autosummary::
+ :toctree: generated/
+
+ Polynomial
+
+Constants
+---------
+.. autosummary::
+ :toctree: generated/
+
+ polydomain
+ polyzero
+ polyone
+ polyx
+
+Arithmetic
+----------
+.. autosummary::
+ :toctree: generated/
+
+ polyadd
+ polysub
+ polymulx
+ polymul
+ polydiv
+ polypow
+ polyval
+ polyval2d
+ polyval3d
+ polygrid2d
+ polygrid3d
+
+Calculus
+--------
+.. autosummary::
+ :toctree: generated/
+
+ polyder
+ polyint
+
+Misc Functions
+--------------
+.. autosummary::
+ :toctree: generated/
+
+ polyfromroots
+ polyroots
+ polyvalfromroots
+ polyvander
+ polyvander2d
+ polyvander3d
+ polycompanion
+ polyfit
+ polytrim
+ polyline
+
+See Also
+--------
+`numpy.polynomial`
+
+"""
+__all__ = [
+ 'polyzero', 'polyone', 'polyx', 'polydomain', 'polyline', 'polyadd',
+ 'polysub', 'polymulx', 'polymul', 'polydiv', 'polypow', 'polyval',
+ 'polyvalfromroots', 'polyder', 'polyint', 'polyfromroots', 'polyvander',
+ 'polyfit', 'polytrim', 'polyroots', 'Polynomial', 'polyval2d', 'polyval3d',
+ 'polygrid2d', 'polygrid3d', 'polyvander2d', 'polyvander3d',
+ 'polycompanion']
+
+import numpy as np
+import numpy.linalg as la
+from numpy.lib.array_utils import normalize_axis_index
+
+from . import polyutils as pu
+from ._polybase import ABCPolyBase
+
+polytrim = pu.trimcoef
+
+#
+# These are constant arrays are of integer type so as to be compatible
+# with the widest range of other types, such as Decimal.
+#
+
+# Polynomial default domain.
+polydomain = np.array([-1., 1.])
+
+# Polynomial coefficients representing zero.
+polyzero = np.array([0])
+
+# Polynomial coefficients representing one.
+polyone = np.array([1])
+
+# Polynomial coefficients representing the identity x.
+polyx = np.array([0, 1])
+
+#
+# Polynomial series functions
+#
+
+
+def polyline(off, scl):
+ """
+ Returns an array representing a linear polynomial.
+
+ Parameters
+ ----------
+ off, scl : scalars
+ The "y-intercept" and "slope" of the line, respectively.
+
+ Returns
+ -------
+ y : ndarray
+ This module's representation of the linear polynomial ``off +
+ scl*x``.
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebline
+ numpy.polynomial.legendre.legline
+ numpy.polynomial.laguerre.lagline
+ numpy.polynomial.hermite.hermline
+ numpy.polynomial.hermite_e.hermeline
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> P.polyline(1, -1)
+ array([ 1, -1])
+ >>> P.polyval(1, P.polyline(1, -1)) # should be 0
+ 0.0
+
+ """
+ if scl != 0:
+ return np.array([off, scl])
+ else:
+ return np.array([off])
+
+
+def polyfromroots(roots):
+ """
+ Generate a monic polynomial with given roots.
+
+ Return the coefficients of the polynomial
+
+ .. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),
+
+ where the :math:`r_n` are the roots specified in `roots`. If a zero has
+ multiplicity n, then it must appear in `roots` n times. For instance,
+ if 2 is a root of multiplicity three and 3 is a root of multiplicity 2,
+ then `roots` looks something like [2, 2, 2, 3, 3]. The roots can appear
+ in any order.
+
+ If the returned coefficients are `c`, then
+
+ .. math:: p(x) = c_0 + c_1 * x + ... + x^n
+
+ The coefficient of the last term is 1 for monic polynomials in this
+ form.
+
+ Parameters
+ ----------
+ roots : array_like
+ Sequence containing the roots.
+
+ Returns
+ -------
+ out : ndarray
+ 1-D array of the polynomial's coefficients If all the roots are
+ real, then `out` is also real, otherwise it is complex. (see
+ Examples below).
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebfromroots
+ numpy.polynomial.legendre.legfromroots
+ numpy.polynomial.laguerre.lagfromroots
+ numpy.polynomial.hermite.hermfromroots
+ numpy.polynomial.hermite_e.hermefromroots
+
+ Notes
+ -----
+ The coefficients are determined by multiplying together linear factors
+ of the form ``(x - r_i)``, i.e.
+
+ .. math:: p(x) = (x - r_0) (x - r_1) ... (x - r_n)
+
+ where ``n == len(roots) - 1``; note that this implies that ``1`` is always
+ returned for :math:`a_n`.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> P.polyfromroots((-1,0,1)) # x(x - 1)(x + 1) = x^3 - x
+ array([ 0., -1., 0., 1.])
+ >>> j = complex(0,1)
+ >>> P.polyfromroots((-j,j)) # complex returned, though values are real
+ array([1.+0.j, 0.+0.j, 1.+0.j])
+
+ """
+ return pu._fromroots(polyline, polymul, roots)
+
+
+def polyadd(c1, c2):
+ """
+ Add one polynomial to another.
+
+ Returns the sum of two polynomials `c1` + `c2`. The arguments are
+ sequences of coefficients from lowest order term to highest, i.e.,
+ [1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of polynomial coefficients ordered from low to high.
+
+ Returns
+ -------
+ out : ndarray
+ The coefficient array representing their sum.
+
+ See Also
+ --------
+ polysub, polymulx, polymul, polydiv, polypow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c1 = (1, 2, 3)
+ >>> c2 = (3, 2, 1)
+ >>> sum = P.polyadd(c1,c2); sum
+ array([4., 4., 4.])
+ >>> P.polyval(2, sum) # 4 + 4(2) + 4(2**2)
+ 28.0
+
+ """
+ return pu._add(c1, c2)
+
+
+def polysub(c1, c2):
+ """
+ Subtract one polynomial from another.
+
+ Returns the difference of two polynomials `c1` - `c2`. The arguments
+ are sequences of coefficients from lowest order term to highest, i.e.,
+ [1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of polynomial coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Of coefficients representing their difference.
+
+ See Also
+ --------
+ polyadd, polymulx, polymul, polydiv, polypow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c1 = (1, 2, 3)
+ >>> c2 = (3, 2, 1)
+ >>> P.polysub(c1,c2)
+ array([-2., 0., 2.])
+ >>> P.polysub(c2, c1) # -P.polysub(c1,c2)
+ array([ 2., 0., -2.])
+
+ """
+ return pu._sub(c1, c2)
+
+
+def polymulx(c):
+ """Multiply a polynomial by x.
+
+ Multiply the polynomial `c` by x, where x is the independent
+ variable.
+
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of polynomial coefficients ordered from low to
+ high.
+
+ Returns
+ -------
+ out : ndarray
+ Array representing the result of the multiplication.
+
+ See Also
+ --------
+ polyadd, polysub, polymul, polydiv, polypow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = (1, 2, 3)
+ >>> P.polymulx(c)
+ array([0., 1., 2., 3.])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ # The zero series needs special treatment
+ if len(c) == 1 and c[0] == 0:
+ return c
+
+ prd = np.empty(len(c) + 1, dtype=c.dtype)
+ prd[0] = c[0]*0
+ prd[1:] = c
+ return prd
+
+
+def polymul(c1, c2):
+ """
+ Multiply one polynomial by another.
+
+ Returns the product of two polynomials `c1` * `c2`. The arguments are
+ sequences of coefficients, from lowest order term to highest, e.g.,
+ [1,2,3] represents the polynomial ``1 + 2*x + 3*x**2.``
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of coefficients representing a polynomial, relative to the
+ "standard" basis, and ordered from lowest order term to highest.
+
+ Returns
+ -------
+ out : ndarray
+ Of the coefficients of their product.
+
+ See Also
+ --------
+ polyadd, polysub, polymulx, polydiv, polypow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c1 = (1, 2, 3)
+ >>> c2 = (3, 2, 1)
+ >>> P.polymul(c1, c2)
+ array([ 3., 8., 14., 8., 3.])
+
+ """
+ # c1, c2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+ ret = np.convolve(c1, c2)
+ return pu.trimseq(ret)
+
+
+def polydiv(c1, c2):
+ """
+ Divide one polynomial by another.
+
+ Returns the quotient-with-remainder of two polynomials `c1` / `c2`.
+ The arguments are sequences of coefficients, from lowest order term
+ to highest, e.g., [1,2,3] represents ``1 + 2*x + 3*x**2``.
+
+ Parameters
+ ----------
+ c1, c2 : array_like
+ 1-D arrays of polynomial coefficients ordered from low to high.
+
+ Returns
+ -------
+ [quo, rem] : ndarrays
+ Of coefficient series representing the quotient and remainder.
+
+ See Also
+ --------
+ polyadd, polysub, polymulx, polymul, polypow
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c1 = (1, 2, 3)
+ >>> c2 = (3, 2, 1)
+ >>> P.polydiv(c1, c2)
+ (array([3.]), array([-8., -4.]))
+ >>> P.polydiv(c2, c1)
+ (array([ 0.33333333]), array([ 2.66666667, 1.33333333])) # may vary
+
+ """
+ # c1, c2 are trimmed copies
+ [c1, c2] = pu.as_series([c1, c2])
+ if c2[-1] == 0:
+ raise ZeroDivisionError # FIXME: add message with details to exception
+
+ # note: this is more efficient than `pu._div(polymul, c1, c2)`
+ lc1 = len(c1)
+ lc2 = len(c2)
+ if lc1 < lc2:
+ return c1[:1]*0, c1
+ elif lc2 == 1:
+ return c1/c2[-1], c1[:1]*0
+ else:
+ dlen = lc1 - lc2
+ scl = c2[-1]
+ c2 = c2[:-1]/scl
+ i = dlen
+ j = lc1 - 1
+ while i >= 0:
+ c1[i:j] -= c2*c1[j]
+ i -= 1
+ j -= 1
+ return c1[j+1:]/scl, pu.trimseq(c1[:j+1])
+
+
+def polypow(c, pow, maxpower=None):
+ """Raise a polynomial to a power.
+
+ Returns the polynomial `c` raised to the power `pow`. The argument
+ `c` is a sequence of coefficients ordered from low to high. i.e.,
+ [1,2,3] is the series ``1 + 2*x + 3*x**2.``
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of array of series coefficients ordered from low to
+ high degree.
+ pow : integer
+ Power to which the series will be raised
+ maxpower : integer, optional
+ Maximum power allowed. This is mainly to limit growth of the series
+ to unmanageable size. Default is 16
+
+ Returns
+ -------
+ coef : ndarray
+ Power series of power.
+
+ See Also
+ --------
+ polyadd, polysub, polymulx, polymul, polydiv
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> P.polypow([1, 2, 3], 2)
+ array([ 1., 4., 10., 12., 9.])
+
+ """
+ # note: this is more efficient than `pu._pow(polymul, c1, c2)`, as it
+ # avoids calling `as_series` repeatedly
+ return pu._pow(np.convolve, c, pow, maxpower)
+
+
+def polyder(c, m=1, scl=1, axis=0):
+ """
+ Differentiate a polynomial.
+
+ Returns the polynomial coefficients `c` differentiated `m` times along
+ `axis`. At each iteration the result is multiplied by `scl` (the
+ scaling factor is for use in a linear change of variable). The
+ argument `c` is an array of coefficients from low to high degree along
+ each axis, e.g., [1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``
+ while [[1,2],[1,2]] represents ``1 + 1*x + 2*y + 2*x*y`` if axis=0 is
+ ``x`` and axis=1 is ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ Array of polynomial coefficients. If c is multidimensional the
+ different axis correspond to different variables with the degree
+ in each axis given by the corresponding index.
+ m : int, optional
+ Number of derivatives taken, must be non-negative. (Default: 1)
+ scl : scalar, optional
+ Each differentiation is multiplied by `scl`. The end result is
+ multiplication by ``scl**m``. This is for use in a linear change
+ of variable. (Default: 1)
+ axis : int, optional
+ Axis over which the derivative is taken. (Default: 0).
+
+ Returns
+ -------
+ der : ndarray
+ Polynomial coefficients of the derivative.
+
+ See Also
+ --------
+ polyint
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = (1, 2, 3, 4)
+ >>> P.polyder(c) # (d/dx)(c)
+ array([ 2., 6., 12.])
+ >>> P.polyder(c, 3) # (d**3/dx**3)(c)
+ array([24.])
+ >>> P.polyder(c, scl=-1) # (d/d(-x))(c)
+ array([ -2., -6., -12.])
+ >>> P.polyder(c, 2, -1) # (d**2/d(-x)**2)(c)
+ array([ 6., 24.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ # astype fails with NA
+ c = c + 0.0
+ cdt = c.dtype
+ cnt = pu._as_int(m, "the order of derivation")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of derivation must be non-negative")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ c = np.moveaxis(c, iaxis, 0)
+ n = len(c)
+ if cnt >= n:
+ c = c[:1]*0
+ else:
+ for i in range(cnt):
+ n = n - 1
+ c *= scl
+ der = np.empty((n,) + c.shape[1:], dtype=cdt)
+ for j in range(n, 0, -1):
+ der[j - 1] = j*c[j]
+ c = der
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def polyint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
+ """
+ Integrate a polynomial.
+
+ Returns the polynomial coefficients `c` integrated `m` times from
+ `lbnd` along `axis`. At each iteration the resulting series is
+ **multiplied** by `scl` and an integration constant, `k`, is added.
+ The scaling factor is for use in a linear change of variable. ("Buyer
+ beware": note that, depending on what one is doing, one may want `scl`
+ to be the reciprocal of what one might expect; for more information,
+ see the Notes section below.) The argument `c` is an array of
+ coefficients, from low to high degree along each axis, e.g., [1,2,3]
+ represents the polynomial ``1 + 2*x + 3*x**2`` while [[1,2],[1,2]]
+ represents ``1 + 1*x + 2*y + 2*x*y`` if axis=0 is ``x`` and axis=1 is
+ ``y``.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of polynomial coefficients, ordered from low to high.
+ m : int, optional
+ Order of integration, must be positive. (Default: 1)
+ k : {[], list, scalar}, optional
+ Integration constant(s). The value of the first integral at zero
+ is the first value in the list, the value of the second integral
+ at zero is the second value, etc. If ``k == []`` (the default),
+ all constants are set to zero. If ``m == 1``, a single scalar can
+ be given instead of a list.
+ lbnd : scalar, optional
+ The lower bound of the integral. (Default: 0)
+ scl : scalar, optional
+ Following each integration the result is *multiplied* by `scl`
+ before the integration constant is added. (Default: 1)
+ axis : int, optional
+ Axis over which the integral is taken. (Default: 0).
+
+ Returns
+ -------
+ S : ndarray
+ Coefficient array of the integral.
+
+ Raises
+ ------
+ ValueError
+ If ``m < 1``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
+ ``np.ndim(scl) != 0``.
+
+ See Also
+ --------
+ polyder
+
+ Notes
+ -----
+ Note that the result of each integration is *multiplied* by `scl`. Why
+ is this important to note? Say one is making a linear change of
+ variable :math:`u = ax + b` in an integral relative to `x`. Then
+ :math:`dx = du/a`, so one will need to set `scl` equal to
+ :math:`1/a` - perhaps not what one would have first thought.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = (1, 2, 3)
+ >>> P.polyint(c) # should return array([0, 1, 1, 1])
+ array([0., 1., 1., 1.])
+ >>> P.polyint(c, 3) # should return array([0, 0, 0, 1/6, 1/12, 1/20])
+ array([ 0. , 0. , 0. , 0.16666667, 0.08333333, # may vary
+ 0.05 ])
+ >>> P.polyint(c, k=3) # should return array([3, 1, 1, 1])
+ array([3., 1., 1., 1.])
+ >>> P.polyint(c,lbnd=-2) # should return array([6, 1, 1, 1])
+ array([6., 1., 1., 1.])
+ >>> P.polyint(c,scl=-2) # should return array([0, -2, -2, -2])
+ array([ 0., -2., -2., -2.])
+
+ """
+ c = np.array(c, ndmin=1, copy=True)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ # astype doesn't preserve mask attribute.
+ c = c + 0.0
+ cdt = c.dtype
+ if not np.iterable(k):
+ k = [k]
+ cnt = pu._as_int(m, "the order of integration")
+ iaxis = pu._as_int(axis, "the axis")
+ if cnt < 0:
+ raise ValueError("The order of integration must be non-negative")
+ if len(k) > cnt:
+ raise ValueError("Too many integration constants")
+ if np.ndim(lbnd) != 0:
+ raise ValueError("lbnd must be a scalar.")
+ if np.ndim(scl) != 0:
+ raise ValueError("scl must be a scalar.")
+ iaxis = normalize_axis_index(iaxis, c.ndim)
+
+ if cnt == 0:
+ return c
+
+ k = list(k) + [0]*(cnt - len(k))
+ c = np.moveaxis(c, iaxis, 0)
+ for i in range(cnt):
+ n = len(c)
+ c *= scl
+ if n == 1 and np.all(c[0] == 0):
+ c[0] += k[i]
+ else:
+ tmp = np.empty((n + 1,) + c.shape[1:], dtype=cdt)
+ tmp[0] = c[0]*0
+ tmp[1] = c[0]
+ for j in range(1, n):
+ tmp[j + 1] = c[j]/(j + 1)
+ tmp[0] += k[i] - polyval(lbnd, tmp)
+ c = tmp
+ c = np.moveaxis(c, 0, iaxis)
+ return c
+
+
+def polyval(x, c, tensor=True):
+ """
+ Evaluate a polynomial at points x.
+
+ If `c` is of length ``n + 1``, this function returns the value
+
+ .. math:: p(x) = c_0 + c_1 * x + ... + c_n * x^n
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `c`.
+
+ If `c` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If
+ `c` is multidimensional, then the shape of the result depends on the
+ value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
+ x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
+ scalars have shape (,).
+
+ Trailing zeros in the coefficients will be used in the evaluation, so
+ they should be avoided if efficiency is a concern.
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ with themselves and with the elements of `c`.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree n are contained in c[n]. If `c` is multidimensional the
+ remaining indices enumerate multiple polynomials. In the two
+ dimensional case the coefficients may be thought of as stored in
+ the columns of `c`.
+ tensor : boolean, optional
+ If True, the shape of the coefficient array is extended with ones
+ on the right, one for each dimension of `x`. Scalars have dimension 0
+ for this action. The result is that every column of coefficients in
+ `c` is evaluated for every element of `x`. If False, `x` is broadcast
+ over the columns of `c` for the evaluation. This keyword is useful
+ when `c` is multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The shape of the returned array is described above.
+
+ See Also
+ --------
+ polyval2d, polygrid2d, polyval3d, polygrid3d
+
+ Notes
+ -----
+ The evaluation uses Horner's method.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial.polynomial import polyval
+ >>> polyval(1, [1,2,3])
+ 6.0
+ >>> a = np.arange(4).reshape(2,2)
+ >>> a
+ array([[0, 1],
+ [2, 3]])
+ >>> polyval(a, [1, 2, 3])
+ array([[ 1., 6.],
+ [17., 34.]])
+ >>> coef = np.arange(4).reshape(2, 2) # multidimensional coefficients
+ >>> coef
+ array([[0, 1],
+ [2, 3]])
+ >>> polyval([1, 2], coef, tensor=True)
+ array([[2., 4.],
+ [4., 7.]])
+ >>> polyval([1, 2], coef, tensor=False)
+ array([2., 7.])
+
+ """
+ c = np.array(c, ndmin=1, copy=None)
+ if c.dtype.char in '?bBhHiIlLqQpP':
+ # astype fails with NA
+ c = c + 0.0
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray) and tensor:
+ c = c.reshape(c.shape + (1,)*x.ndim)
+
+ c0 = c[-1] + x*0
+ for i in range(2, len(c) + 1):
+ c0 = c[-i] + c0*x
+ return c0
+
+
+def polyvalfromroots(x, r, tensor=True):
+ """
+ Evaluate a polynomial specified by its roots at points x.
+
+ If `r` is of length ``N``, this function returns the value
+
+ .. math:: p(x) = \\prod_{n=1}^{N} (x - r_n)
+
+ The parameter `x` is converted to an array only if it is a tuple or a
+ list, otherwise it is treated as a scalar. In either case, either `x`
+ or its elements must support multiplication and addition both with
+ themselves and with the elements of `r`.
+
+ If `r` is a 1-D array, then ``p(x)`` will have the same shape as `x`. If `r`
+ is multidimensional, then the shape of the result depends on the value of
+ `tensor`. If `tensor` is ``True`` the shape will be r.shape[1:] + x.shape;
+ that is, each polynomial is evaluated at every value of `x`. If `tensor` is
+ ``False``, the shape will be r.shape[1:]; that is, each polynomial is
+ evaluated only for the corresponding broadcast value of `x`. Note that
+ scalars have shape (,).
+
+ Parameters
+ ----------
+ x : array_like, compatible object
+ If `x` is a list or tuple, it is converted to an ndarray, otherwise
+ it is left unchanged and treated as a scalar. In either case, `x`
+ or its elements must support addition and multiplication with
+ with themselves and with the elements of `r`.
+ r : array_like
+ Array of roots. If `r` is multidimensional the first index is the
+ root index, while the remaining indices enumerate multiple
+ polynomials. For instance, in the two dimensional case the roots
+ of each polynomial may be thought of as stored in the columns of `r`.
+ tensor : boolean, optional
+ If True, the shape of the roots array is extended with ones on the
+ right, one for each dimension of `x`. Scalars have dimension 0 for this
+ action. The result is that every column of coefficients in `r` is
+ evaluated for every element of `x`. If False, `x` is broadcast over the
+ columns of `r` for the evaluation. This keyword is useful when `r` is
+ multidimensional. The default value is True.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The shape of the returned array is described above.
+
+ See Also
+ --------
+ polyroots, polyfromroots, polyval
+
+ Examples
+ --------
+ >>> from numpy.polynomial.polynomial import polyvalfromroots
+ >>> polyvalfromroots(1, [1, 2, 3])
+ 0.0
+ >>> a = np.arange(4).reshape(2, 2)
+ >>> a
+ array([[0, 1],
+ [2, 3]])
+ >>> polyvalfromroots(a, [-1, 0, 1])
+ array([[-0., 0.],
+ [ 6., 24.]])
+ >>> r = np.arange(-2, 2).reshape(2,2) # multidimensional coefficients
+ >>> r # each column of r defines one polynomial
+ array([[-2, -1],
+ [ 0, 1]])
+ >>> b = [-2, 1]
+ >>> polyvalfromroots(b, r, tensor=True)
+ array([[-0., 3.],
+ [ 3., 0.]])
+ >>> polyvalfromroots(b, r, tensor=False)
+ array([-0., 0.])
+
+ """
+ r = np.array(r, ndmin=1, copy=None)
+ if r.dtype.char in '?bBhHiIlLqQpP':
+ r = r.astype(np.double)
+ if isinstance(x, (tuple, list)):
+ x = np.asarray(x)
+ if isinstance(x, np.ndarray):
+ if tensor:
+ r = r.reshape(r.shape + (1,)*x.ndim)
+ elif x.ndim >= r.ndim:
+ raise ValueError("x.ndim must be < r.ndim when tensor == False")
+ return np.prod(x - r, axis=0)
+
+
+def polyval2d(x, y, c):
+ """
+ Evaluate a 2-D polynomial at points (x, y).
+
+ This function returns the value
+
+ .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * x^i * y^j
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars and they
+ must have the same shape after conversion. In either case, either `x`
+ and `y` or their elements must support multiplication and addition both
+ with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points ``(x, y)``,
+ where `x` and `y` must have the same shape. If `x` or `y` is a list
+ or tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term
+ of multi-degree i,j is contained in ``c[i,j]``. If `c` has
+ dimension greater than two the remaining indices enumerate multiple
+ sets of coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points formed with
+ pairs of corresponding values from `x` and `y`.
+
+ See Also
+ --------
+ polyval, polygrid2d, polyval3d, polygrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = ((1, 2, 3), (4, 5, 6))
+ >>> P.polyval2d(1, 1, c)
+ 21.0
+
+ """
+ return pu._valnd(polyval, c, x, y)
+
+
+def polygrid2d(x, y, c):
+ """
+ Evaluate a 2-D polynomial on the Cartesian product of x and y.
+
+ This function returns the values:
+
+ .. math:: p(a,b) = \\sum_{i,j} c_{i,j} * a^i * b^j
+
+ where the points ``(a, b)`` consist of all pairs formed by taking
+ `a` from `x` and `b` from `y`. The resulting points form a grid with
+ `x` in the first dimension and `y` in the second.
+
+ The parameters `x` and `y` are converted to arrays only if they are
+ tuples or a lists, otherwise they are treated as a scalars. In either
+ case, either `x` and `y` or their elements must support multiplication
+ and addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than two dimensions, ones are implicitly appended to
+ its shape to make it 2-D. The shape of the result will be c.shape[2:] +
+ x.shape + y.shape.
+
+ Parameters
+ ----------
+ x, y : array_like, compatible objects
+ The two dimensional series is evaluated at the points in the
+ Cartesian product of `x` and `y`. If `x` or `y` is a list or
+ tuple, it is first converted to an ndarray, otherwise it is left
+ unchanged and, if it isn't an ndarray, it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ polyval, polyval2d, polyval3d, polygrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = ((1, 2, 3), (4, 5, 6))
+ >>> P.polygrid2d([0, 1], [0, 1], c)
+ array([[ 1., 6.],
+ [ 5., 21.]])
+
+ """
+ return pu._gridnd(polyval, c, x, y)
+
+
+def polyval3d(x, y, z, c):
+ """
+ Evaluate a 3-D polynomial at points (x, y, z).
+
+ This function returns the values:
+
+ .. math:: p(x,y,z) = \\sum_{i,j,k} c_{i,j,k} * x^i * y^j * z^k
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if
+ they are tuples or a lists, otherwise they are treated as a scalars and
+ they must have the same shape after conversion. In either case, either
+ `x`, `y`, and `z` or their elements must support multiplication and
+ addition both with themselves and with the elements of `c`.
+
+ If `c` has fewer than 3 dimensions, ones are implicitly appended to its
+ shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible object
+ The three dimensional series is evaluated at the points
+ ``(x, y, z)``, where `x`, `y`, and `z` must have the same shape. If
+ any of `x`, `y`, or `z` is a list or tuple, it is first converted
+ to an ndarray, otherwise it is left unchanged and if it isn't an
+ ndarray it is treated as a scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficient of the term of
+ multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
+ greater than 3 the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the multidimensional polynomial on points formed with
+ triples of corresponding values from `x`, `y`, and `z`.
+
+ See Also
+ --------
+ polyval, polyval2d, polygrid2d, polygrid3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = ((1, 2, 3), (4, 5, 6), (7, 8, 9))
+ >>> P.polyval3d(1, 1, 1, c)
+ 45.0
+
+ """
+ return pu._valnd(polyval, c, x, y, z)
+
+
+def polygrid3d(x, y, z, c):
+ """
+ Evaluate a 3-D polynomial on the Cartesian product of x, y and z.
+
+ This function returns the values:
+
+ .. math:: p(a,b,c) = \\sum_{i,j,k} c_{i,j,k} * a^i * b^j * c^k
+
+ where the points ``(a, b, c)`` consist of all triples formed by taking
+ `a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
+ a grid with `x` in the first dimension, `y` in the second, and `z` in
+ the third.
+
+ The parameters `x`, `y`, and `z` are converted to arrays only if they
+ are tuples or a lists, otherwise they are treated as a scalars. In
+ either case, either `x`, `y`, and `z` or their elements must support
+ multiplication and addition both with themselves and with the elements
+ of `c`.
+
+ If `c` has fewer than three dimensions, ones are implicitly appended to
+ its shape to make it 3-D. The shape of the result will be c.shape[3:] +
+ x.shape + y.shape + z.shape.
+
+ Parameters
+ ----------
+ x, y, z : array_like, compatible objects
+ The three dimensional series is evaluated at the points in the
+ Cartesian product of `x`, `y`, and `z`. If `x`, `y`, or `z` is a
+ list or tuple, it is first converted to an ndarray, otherwise it is
+ left unchanged and, if it isn't an ndarray, it is treated as a
+ scalar.
+ c : array_like
+ Array of coefficients ordered so that the coefficients for terms of
+ degree i,j are contained in ``c[i,j]``. If `c` has dimension
+ greater than two the remaining indices enumerate multiple sets of
+ coefficients.
+
+ Returns
+ -------
+ values : ndarray, compatible object
+ The values of the two dimensional polynomial at points in the Cartesian
+ product of `x` and `y`.
+
+ See Also
+ --------
+ polyval, polyval2d, polygrid2d, polyval3d
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = ((1, 2, 3), (4, 5, 6), (7, 8, 9))
+ >>> P.polygrid3d([0, 1], [0, 1], [0, 1], c)
+ array([[ 1., 13.],
+ [ 6., 51.]])
+
+ """
+ return pu._gridnd(polyval, c, x, y, z)
+
+
+def polyvander(x, deg):
+ """Vandermonde matrix of given degree.
+
+ Returns the Vandermonde matrix of degree `deg` and sample points
+ `x`. The Vandermonde matrix is defined by
+
+ .. math:: V[..., i] = x^i,
+
+ where ``0 <= i <= deg``. The leading indices of `V` index the elements of
+ `x` and the last index is the power of `x`.
+
+ If `c` is a 1-D array of coefficients of length ``n + 1`` and `V` is the
+ matrix ``V = polyvander(x, n)``, then ``np.dot(V, c)`` and
+ ``polyval(x, c)`` are the same up to roundoff. This equivalence is
+ useful both for least squares fitting and for the evaluation of a large
+ number of polynomials of the same degree and sample points.
+
+ Parameters
+ ----------
+ x : array_like
+ Array of points. The dtype is converted to float64 or complex128
+ depending on whether any of the elements are complex. If `x` is
+ scalar it is converted to a 1-D array.
+ deg : int
+ Degree of the resulting matrix.
+
+ Returns
+ -------
+ vander : ndarray.
+ The Vandermonde matrix. The shape of the returned matrix is
+ ``x.shape + (deg + 1,)``, where the last index is the power of `x`.
+ The dtype will be the same as the converted `x`.
+
+ See Also
+ --------
+ polyvander2d, polyvander3d
+
+ Examples
+ --------
+ The Vandermonde matrix of degree ``deg = 5`` and sample points
+ ``x = [-1, 2, 3]`` contains the element-wise powers of `x`
+ from 0 to 5 as its columns.
+
+ >>> from numpy.polynomial import polynomial as P
+ >>> x, deg = [-1, 2, 3], 5
+ >>> P.polyvander(x=x, deg=deg)
+ array([[ 1., -1., 1., -1., 1., -1.],
+ [ 1., 2., 4., 8., 16., 32.],
+ [ 1., 3., 9., 27., 81., 243.]])
+
+ """
+ ideg = pu._as_int(deg, "deg")
+ if ideg < 0:
+ raise ValueError("deg must be non-negative")
+
+ x = np.array(x, copy=None, ndmin=1) + 0.0
+ dims = (ideg + 1,) + x.shape
+ dtyp = x.dtype
+ v = np.empty(dims, dtype=dtyp)
+ v[0] = x*0 + 1
+ if ideg > 0:
+ v[1] = x
+ for i in range(2, ideg + 1):
+ v[i] = v[i-1]*x
+ return np.moveaxis(v, 0, -1)
+
+
+def polyvander2d(x, y, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y)``. The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (deg[1] + 1)*i + j] = x^i * y^j,
+
+ where ``0 <= i <= deg[0]`` and ``0 <= j <= deg[1]``. The leading indices of
+ `V` index the points ``(x, y)`` and the last index encodes the powers of
+ `x` and `y`.
+
+ If ``V = polyvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
+ correspond to the elements of a 2-D coefficient array `c` of shape
+ (xdeg + 1, ydeg + 1) in the order
+
+ .. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
+
+ and ``np.dot(V, c.flat)`` and ``polyval2d(x, y, c)`` will be the same
+ up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 2-D polynomials
+ of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg].
+
+ Returns
+ -------
+ vander2d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg([1]+1)`. The dtype will be the same
+ as the converted `x` and `y`.
+
+ See Also
+ --------
+ polyvander, polyvander3d, polyval2d, polyval3d
+
+ Examples
+ --------
+ >>> import numpy as np
+
+ The 2-D pseudo-Vandermonde matrix of degree ``[1, 2]`` and sample
+ points ``x = [-1, 2]`` and ``y = [1, 3]`` is as follows:
+
+ >>> from numpy.polynomial import polynomial as P
+ >>> x = np.array([-1, 2])
+ >>> y = np.array([1, 3])
+ >>> m, n = 1, 2
+ >>> deg = np.array([m, n])
+ >>> V = P.polyvander2d(x=x, y=y, deg=deg)
+ >>> V
+ array([[ 1., 1., 1., -1., -1., -1.],
+ [ 1., 3., 9., 2., 6., 18.]])
+
+ We can verify the columns for any ``0 <= i <= m`` and ``0 <= j <= n``:
+
+ >>> i, j = 0, 1
+ >>> V[:, (deg[1]+1)*i + j] == x**i * y**j
+ array([ True, True])
+
+ The (1D) Vandermonde matrix of sample points ``x`` and degree ``m`` is a
+ special case of the (2D) pseudo-Vandermonde matrix with ``y`` points all
+ zero and degree ``[m, 0]``.
+
+ >>> P.polyvander2d(x=x, y=0*x, deg=(m, 0)) == P.polyvander(x=x, deg=m)
+ array([[ True, True],
+ [ True, True]])
+
+ """
+ return pu._vander_nd_flat((polyvander, polyvander), (x, y), deg)
+
+
+def polyvander3d(x, y, z, deg):
+ """Pseudo-Vandermonde matrix of given degrees.
+
+ Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
+ points ``(x, y, z)``. If `l`, `m`, `n` are the given degrees in `x`, `y`, `z`,
+ then The pseudo-Vandermonde matrix is defined by
+
+ .. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = x^i * y^j * z^k,
+
+ where ``0 <= i <= l``, ``0 <= j <= m``, and ``0 <= j <= n``. The leading
+ indices of `V` index the points ``(x, y, z)`` and the last index encodes
+ the powers of `x`, `y`, and `z`.
+
+ If ``V = polyvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
+ of `V` correspond to the elements of a 3-D coefficient array `c` of
+ shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order
+
+ .. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...
+
+ and ``np.dot(V, c.flat)`` and ``polyval3d(x, y, z, c)`` will be the
+ same up to roundoff. This equivalence is useful both for least squares
+ fitting and for the evaluation of a large number of 3-D polynomials
+ of the same degrees and sample points.
+
+ Parameters
+ ----------
+ x, y, z : array_like
+ Arrays of point coordinates, all of the same shape. The dtypes will
+ be converted to either float64 or complex128 depending on whether
+ any of the elements are complex. Scalars are converted to 1-D
+ arrays.
+ deg : list of ints
+ List of maximum degrees of the form [x_deg, y_deg, z_deg].
+
+ Returns
+ -------
+ vander3d : ndarray
+ The shape of the returned matrix is ``x.shape + (order,)``, where
+ :math:`order = (deg[0]+1)*(deg([1]+1)*(deg[2]+1)`. The dtype will
+ be the same as the converted `x`, `y`, and `z`.
+
+ See Also
+ --------
+ polyvander, polyvander3d, polyval2d, polyval3d
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial import polynomial as P
+ >>> x = np.asarray([-1, 2, 1])
+ >>> y = np.asarray([1, -2, -3])
+ >>> z = np.asarray([2, 2, 5])
+ >>> l, m, n = [2, 2, 1]
+ >>> deg = [l, m, n]
+ >>> V = P.polyvander3d(x=x, y=y, z=z, deg=deg)
+ >>> V
+ array([[ 1., 2., 1., 2., 1., 2., -1., -2., -1.,
+ -2., -1., -2., 1., 2., 1., 2., 1., 2.],
+ [ 1., 2., -2., -4., 4., 8., 2., 4., -4.,
+ -8., 8., 16., 4., 8., -8., -16., 16., 32.],
+ [ 1., 5., -3., -15., 9., 45., 1., 5., -3.,
+ -15., 9., 45., 1., 5., -3., -15., 9., 45.]])
+
+ We can verify the columns for any ``0 <= i <= l``, ``0 <= j <= m``,
+ and ``0 <= k <= n``
+
+ >>> i, j, k = 2, 1, 0
+ >>> V[:, (m+1)*(n+1)*i + (n+1)*j + k] == x**i * y**j * z**k
+ array([ True, True, True])
+
+ """
+ return pu._vander_nd_flat((polyvander, polyvander, polyvander), (x, y, z), deg)
+
+
+def polyfit(x, y, deg, rcond=None, full=False, w=None):
+ """
+ Least-squares fit of a polynomial to data.
+
+ Return the coefficients of a polynomial of degree `deg` that is the
+ least squares fit to the data values `y` given at points `x`. If `y` is
+ 1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
+ fits are done, one for each column of `y`, and the resulting
+ coefficients are stored in the corresponding columns of a 2-D return.
+ The fitted polynomial(s) are in the form
+
+ .. math:: p(x) = c_0 + c_1 * x + ... + c_n * x^n,
+
+ where `n` is `deg`.
+
+ Parameters
+ ----------
+ x : array_like, shape (`M`,)
+ x-coordinates of the `M` sample (data) points ``(x[i], y[i])``.
+ y : array_like, shape (`M`,) or (`M`, `K`)
+ y-coordinates of the sample points. Several sets of sample points
+ sharing the same x-coordinates can be (independently) fit with one
+ call to `polyfit` by passing in for `y` a 2-D array that contains
+ one data set per column.
+ deg : int or 1-D array_like
+ Degree(s) of the fitting polynomials. If `deg` is a single integer
+ all terms up to and including the `deg`'th term are included in the
+ fit. For NumPy versions >= 1.11.0 a list of integers specifying the
+ degrees of the terms to include may be used instead.
+ rcond : float, optional
+ Relative condition number of the fit. Singular values smaller
+ than `rcond`, relative to the largest singular value, will be
+ ignored. The default value is ``len(x)*eps``, where `eps` is the
+ relative precision of the platform's float type, about 2e-16 in
+ most cases.
+ full : bool, optional
+ Switch determining the nature of the return value. When ``False``
+ (the default) just the coefficients are returned; when ``True``,
+ diagnostic information from the singular value decomposition (used
+ to solve the fit's matrix equation) is also returned.
+ w : array_like, shape (`M`,), optional
+ Weights. If not None, the weight ``w[i]`` applies to the unsquared
+ residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
+ chosen so that the errors of the products ``w[i]*y[i]`` all have the
+ same variance. When using inverse-variance weighting, use
+ ``w[i] = 1/sigma(y[i])``. The default value is None.
+
+ Returns
+ -------
+ coef : ndarray, shape (`deg` + 1,) or (`deg` + 1, `K`)
+ Polynomial coefficients ordered from low to high. If `y` was 2-D,
+ the coefficients in column `k` of `coef` represent the polynomial
+ fit to the data in `y`'s `k`-th column.
+
+ [residuals, rank, singular_values, rcond] : list
+ These values are only returned if ``full == True``
+
+ - residuals -- sum of squared residuals of the least squares fit
+ - rank -- the numerical rank of the scaled Vandermonde matrix
+ - singular_values -- singular values of the scaled Vandermonde matrix
+ - rcond -- value of `rcond`.
+
+ For more details, see `numpy.linalg.lstsq`.
+
+ Raises
+ ------
+ RankWarning
+ Raised if the matrix in the least-squares fit is rank deficient.
+ The warning is only raised if ``full == False``. The warnings can
+ be turned off by:
+
+ >>> import warnings
+ >>> warnings.simplefilter('ignore', np.exceptions.RankWarning)
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebfit
+ numpy.polynomial.legendre.legfit
+ numpy.polynomial.laguerre.lagfit
+ numpy.polynomial.hermite.hermfit
+ numpy.polynomial.hermite_e.hermefit
+ polyval : Evaluates a polynomial.
+ polyvander : Vandermonde matrix for powers.
+ numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
+ scipy.interpolate.UnivariateSpline : Computes spline fits.
+
+ Notes
+ -----
+ The solution is the coefficients of the polynomial `p` that minimizes
+ the sum of the weighted squared errors
+
+ .. math:: E = \\sum_j w_j^2 * |y_j - p(x_j)|^2,
+
+ where the :math:`w_j` are the weights. This problem is solved by
+ setting up the (typically) over-determined matrix equation:
+
+ .. math:: V(x) * c = w * y,
+
+ where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
+ coefficients to be solved for, `w` are the weights, and `y` are the
+ observed values. This equation is then solved using the singular value
+ decomposition of `V`.
+
+ If some of the singular values of `V` are so small that they are
+ neglected (and `full` == ``False``), a `~exceptions.RankWarning` will be
+ raised. This means that the coefficient values may be poorly determined.
+ Fitting to a lower order polynomial will usually get rid of the warning
+ (but may not be what you want, of course; if you have independent
+ reason(s) for choosing the degree which isn't working, you may have to:
+ a) reconsider those reasons, and/or b) reconsider the quality of your
+ data). The `rcond` parameter can also be set to a value smaller than
+ its default, but the resulting fit may be spurious and have large
+ contributions from roundoff error.
+
+ Polynomial fits using double precision tend to "fail" at about
+ (polynomial) degree 20. Fits using Chebyshev or Legendre series are
+ generally better conditioned, but much can still depend on the
+ distribution of the sample points and the smoothness of the data. If
+ the quality of the fit is inadequate, splines may be a good
+ alternative.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial import polynomial as P
+ >>> x = np.linspace(-1,1,51) # x "data": [-1, -0.96, ..., 0.96, 1]
+ >>> rng = np.random.default_rng()
+ >>> err = rng.normal(size=len(x))
+ >>> y = x**3 - x + err # x^3 - x + Gaussian noise
+ >>> c, stats = P.polyfit(x,y,3,full=True)
+ >>> c # c[0], c[1] approx. -1, c[2] should be approx. 0, c[3] approx. 1
+ array([ 0.23111996, -1.02785049, -0.2241444 , 1.08405657]) # may vary
+ >>> stats # note the large SSR, explaining the rather poor results
+ [array([48.312088]), # may vary
+ 4,
+ array([1.38446749, 1.32119158, 0.50443316, 0.28853036]),
+ 1.1324274851176597e-14]
+
+ Same thing without the added noise
+
+ >>> y = x**3 - x
+ >>> c, stats = P.polyfit(x,y,3,full=True)
+ >>> c # c[0], c[1] ~= -1, c[2] should be "very close to 0", c[3] ~= 1
+ array([-6.73496154e-17, -1.00000000e+00, 0.00000000e+00, 1.00000000e+00])
+ >>> stats # note the minuscule SSR
+ [array([8.79579319e-31]),
+ np.int32(4),
+ array([1.38446749, 1.32119158, 0.50443316, 0.28853036]),
+ 1.1324274851176597e-14]
+
+ """
+ return pu._fit(polyvander, x, y, deg, rcond, full, w)
+
+
+def polycompanion(c):
+ """
+ Return the companion matrix of c.
+
+ The companion matrix for power series cannot be made symmetric by
+ scaling the basis, so this function differs from those for the
+ orthogonal polynomials.
+
+ Parameters
+ ----------
+ c : array_like
+ 1-D array of polynomial coefficients ordered from low to high
+ degree.
+
+ Returns
+ -------
+ mat : ndarray
+ Companion matrix of dimensions (deg, deg).
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polynomial as P
+ >>> c = (1, 2, 3)
+ >>> P.polycompanion(c)
+ array([[ 0. , -0.33333333],
+ [ 1. , -0.66666667]])
+
+ """
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ raise ValueError('Series must have maximum degree of at least 1.')
+ if len(c) == 2:
+ return np.array([[-c[0]/c[1]]])
+
+ n = len(c) - 1
+ mat = np.zeros((n, n), dtype=c.dtype)
+ bot = mat.reshape(-1)[n::n+1]
+ bot[...] = 1
+ mat[:, -1] -= c[:-1]/c[-1]
+ return mat
+
+
+def polyroots(c):
+ """
+ Compute the roots of a polynomial.
+
+ Return the roots (a.k.a. "zeros") of the polynomial
+
+ .. math:: p(x) = \\sum_i c[i] * x^i.
+
+ Parameters
+ ----------
+ c : 1-D array_like
+ 1-D array of polynomial coefficients.
+
+ Returns
+ -------
+ out : ndarray
+ Array of the roots of the polynomial. If all the roots are real,
+ then `out` is also real, otherwise it is complex.
+
+ See Also
+ --------
+ numpy.polynomial.chebyshev.chebroots
+ numpy.polynomial.legendre.legroots
+ numpy.polynomial.laguerre.lagroots
+ numpy.polynomial.hermite.hermroots
+ numpy.polynomial.hermite_e.hermeroots
+
+ Notes
+ -----
+ The root estimates are obtained as the eigenvalues of the companion
+ matrix, Roots far from the origin of the complex plane may have large
+ errors due to the numerical instability of the power series for such
+ values. Roots with multiplicity greater than 1 will also show larger
+ errors as the value of the series near such points is relatively
+ insensitive to errors in the roots. Isolated roots near the origin can
+ be improved by a few iterations of Newton's method.
+
+ Examples
+ --------
+ >>> import numpy.polynomial.polynomial as poly
+ >>> poly.polyroots(poly.polyfromroots((-1,0,1)))
+ array([-1., 0., 1.])
+ >>> poly.polyroots(poly.polyfromroots((-1,0,1))).dtype
+ dtype('float64')
+ >>> j = complex(0,1)
+ >>> poly.polyroots(poly.polyfromroots((-j,0,j)))
+ array([ 0.00000000e+00+0.j, 0.00000000e+00+1.j, 2.77555756e-17-1.j]) # may vary
+
+ """ # noqa: E501
+ # c is a trimmed copy
+ [c] = pu.as_series([c])
+ if len(c) < 2:
+ return np.array([], dtype=c.dtype)
+ if len(c) == 2:
+ return np.array([-c[0]/c[1]])
+
+ # rotated companion matrix reduces error
+ m = polycompanion(c)[::-1,::-1]
+ r = la.eigvals(m)
+ r.sort()
+ return r
+
+
+#
+# polynomial class
+#
+
+class Polynomial(ABCPolyBase):
+ """A power series class.
+
+ The Polynomial class provides the standard Python numerical methods
+ '+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
+ attributes and methods listed below.
+
+ Parameters
+ ----------
+ coef : array_like
+ Polynomial coefficients in order of increasing degree, i.e.,
+ ``(1, 2, 3)`` give ``1 + 2*x + 3*x**2``.
+ domain : (2,) array_like, optional
+ Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
+ to the interval ``[window[0], window[1]]`` by shifting and scaling.
+ The default value is [-1., 1.].
+ window : (2,) array_like, optional
+ Window, see `domain` for its use. The default value is [-1., 1.].
+ symbol : str, optional
+ Symbol used to represent the independent variable in string
+ representations of the polynomial expression, e.g. for printing.
+ The symbol must be a valid Python identifier. Default value is 'x'.
+
+ .. versionadded:: 1.24
+
+ """
+ # Virtual Functions
+ _add = staticmethod(polyadd)
+ _sub = staticmethod(polysub)
+ _mul = staticmethod(polymul)
+ _div = staticmethod(polydiv)
+ _pow = staticmethod(polypow)
+ _val = staticmethod(polyval)
+ _int = staticmethod(polyint)
+ _der = staticmethod(polyder)
+ _fit = staticmethod(polyfit)
+ _line = staticmethod(polyline)
+ _roots = staticmethod(polyroots)
+ _fromroots = staticmethod(polyfromroots)
+
+ # Virtual properties
+ domain = np.array(polydomain)
+ window = np.array(polydomain)
+ basis_name = None
+
+ @classmethod
+ def _str_term_unicode(cls, i, arg_str):
+ if i == '1':
+ return f"·{arg_str}"
+ else:
+ return f"·{arg_str}{i.translate(cls._superscript_mapping)}"
+
+ @staticmethod
+ def _str_term_ascii(i, arg_str):
+ if i == '1':
+ return f" {arg_str}"
+ else:
+ return f" {arg_str}**{i}"
+
+ @staticmethod
+ def _repr_latex_term(i, arg_str, needs_parens):
+ if needs_parens:
+ arg_str = rf"\left({arg_str}\right)"
+ if i == 0:
+ return '1'
+ elif i == 1:
+ return arg_str
+ else:
+ return f"{arg_str}^{{{i}}}"
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..89a8b57185f3e326f8891e71ab2b47f48cd908e9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polynomial.pyi
@@ -0,0 +1,87 @@
+from typing import Final, Literal as L
+
+import numpy as np
+from ._polybase import ABCPolyBase
+from ._polytypes import (
+ _Array1,
+ _Array2,
+ _FuncVal2D,
+ _FuncVal3D,
+ _FuncBinOp,
+ _FuncCompanion,
+ _FuncDer,
+ _FuncFit,
+ _FuncFromRoots,
+ _FuncInteg,
+ _FuncLine,
+ _FuncPow,
+ _FuncRoots,
+ _FuncUnOp,
+ _FuncVal,
+ _FuncVander,
+ _FuncVander2D,
+ _FuncVander3D,
+ _FuncValFromRoots,
+)
+from .polyutils import trimcoef as polytrim
+
+__all__ = [
+ "polyzero",
+ "polyone",
+ "polyx",
+ "polydomain",
+ "polyline",
+ "polyadd",
+ "polysub",
+ "polymulx",
+ "polymul",
+ "polydiv",
+ "polypow",
+ "polyval",
+ "polyvalfromroots",
+ "polyder",
+ "polyint",
+ "polyfromroots",
+ "polyvander",
+ "polyfit",
+ "polytrim",
+ "polyroots",
+ "Polynomial",
+ "polyval2d",
+ "polyval3d",
+ "polygrid2d",
+ "polygrid3d",
+ "polyvander2d",
+ "polyvander3d",
+ "polycompanion",
+]
+
+polydomain: Final[_Array2[np.float64]]
+polyzero: Final[_Array1[np.int_]]
+polyone: Final[_Array1[np.int_]]
+polyx: Final[_Array2[np.int_]]
+
+polyline: _FuncLine[L["Polyline"]]
+polyfromroots: _FuncFromRoots[L["polyfromroots"]]
+polyadd: _FuncBinOp[L["polyadd"]]
+polysub: _FuncBinOp[L["polysub"]]
+polymulx: _FuncUnOp[L["polymulx"]]
+polymul: _FuncBinOp[L["polymul"]]
+polydiv: _FuncBinOp[L["polydiv"]]
+polypow: _FuncPow[L["polypow"]]
+polyder: _FuncDer[L["polyder"]]
+polyint: _FuncInteg[L["polyint"]]
+polyval: _FuncVal[L["polyval"]]
+polyval2d: _FuncVal2D[L["polyval2d"]]
+polyval3d: _FuncVal3D[L["polyval3d"]]
+polyvalfromroots: _FuncValFromRoots[L["polyvalfromroots"]]
+polygrid2d: _FuncVal2D[L["polygrid2d"]]
+polygrid3d: _FuncVal3D[L["polygrid3d"]]
+polyvander: _FuncVander[L["polyvander"]]
+polyvander2d: _FuncVander2D[L["polyvander2d"]]
+polyvander3d: _FuncVander3D[L["polyvander3d"]]
+polyfit: _FuncFit[L["polyfit"]]
+polycompanion: _FuncCompanion[L["polycompanion"]]
+polyroots: _FuncRoots[L["polyroots"]]
+
+class Polynomial(ABCPolyBase[None]): ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..1a6813b786c9bdd7eaa7961b5c50a5b187f7837a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.py
@@ -0,0 +1,757 @@
+"""
+Utility classes and functions for the polynomial modules.
+
+This module provides: error and warning objects; a polynomial base class;
+and some routines used in both the `polynomial` and `chebyshev` modules.
+
+Functions
+---------
+
+.. autosummary::
+ :toctree: generated/
+
+ as_series convert list of array_likes into 1-D arrays of common type.
+ trimseq remove trailing zeros.
+ trimcoef remove small trailing coefficients.
+ getdomain return the domain appropriate for a given set of abscissae.
+ mapdomain maps points between domains.
+ mapparms parameters of the linear map between domains.
+
+"""
+import operator
+import functools
+import warnings
+
+import numpy as np
+
+from numpy._core.multiarray import dragon4_positional, dragon4_scientific
+from numpy.exceptions import RankWarning
+
+__all__ = [
+ 'as_series', 'trimseq', 'trimcoef', 'getdomain', 'mapdomain', 'mapparms',
+ 'format_float']
+
+#
+# Helper functions to convert inputs to 1-D arrays
+#
+def trimseq(seq):
+ """Remove small Poly series coefficients.
+
+ Parameters
+ ----------
+ seq : sequence
+ Sequence of Poly series coefficients.
+
+ Returns
+ -------
+ series : sequence
+ Subsequence with trailing zeros removed. If the resulting sequence
+ would be empty, return the first element. The returned sequence may
+ or may not be a view.
+
+ Notes
+ -----
+ Do not lose the type info if the sequence contains unknown objects.
+
+ """
+ if len(seq) == 0 or seq[-1] != 0:
+ return seq
+ else:
+ for i in range(len(seq) - 1, -1, -1):
+ if seq[i] != 0:
+ break
+ return seq[:i+1]
+
+
+def as_series(alist, trim=True):
+ """
+ Return argument as a list of 1-d arrays.
+
+ The returned list contains array(s) of dtype double, complex double, or
+ object. A 1-d argument of shape ``(N,)`` is parsed into ``N`` arrays of
+ size one; a 2-d argument of shape ``(M,N)`` is parsed into ``M`` arrays
+ of size ``N`` (i.e., is "parsed by row"); and a higher dimensional array
+ raises a Value Error if it is not first reshaped into either a 1-d or 2-d
+ array.
+
+ Parameters
+ ----------
+ alist : array_like
+ A 1- or 2-d array_like
+ trim : boolean, optional
+ When True, trailing zeros are removed from the inputs.
+ When False, the inputs are passed through intact.
+
+ Returns
+ -------
+ [a1, a2,...] : list of 1-D arrays
+ A copy of the input data as a list of 1-d arrays.
+
+ Raises
+ ------
+ ValueError
+ Raised when `as_series` cannot convert its input to 1-d arrays, or at
+ least one of the resulting arrays is empty.
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial import polyutils as pu
+ >>> a = np.arange(4)
+ >>> pu.as_series(a)
+ [array([0.]), array([1.]), array([2.]), array([3.])]
+ >>> b = np.arange(6).reshape((2,3))
+ >>> pu.as_series(b)
+ [array([0., 1., 2.]), array([3., 4., 5.])]
+
+ >>> pu.as_series((1, np.arange(3), np.arange(2, dtype=np.float16)))
+ [array([1.]), array([0., 1., 2.]), array([0., 1.])]
+
+ >>> pu.as_series([2, [1.1, 0.]])
+ [array([2.]), array([1.1])]
+
+ >>> pu.as_series([2, [1.1, 0.]], trim=False)
+ [array([2.]), array([1.1, 0. ])]
+
+ """
+ arrays = [np.array(a, ndmin=1, copy=None) for a in alist]
+ for a in arrays:
+ if a.size == 0:
+ raise ValueError("Coefficient array is empty")
+ if any(a.ndim != 1 for a in arrays):
+ raise ValueError("Coefficient array is not 1-d")
+ if trim:
+ arrays = [trimseq(a) for a in arrays]
+
+ if any(a.dtype == np.dtype(object) for a in arrays):
+ ret = []
+ for a in arrays:
+ if a.dtype != np.dtype(object):
+ tmp = np.empty(len(a), dtype=np.dtype(object))
+ tmp[:] = a[:]
+ ret.append(tmp)
+ else:
+ ret.append(a.copy())
+ else:
+ try:
+ dtype = np.common_type(*arrays)
+ except Exception as e:
+ raise ValueError("Coefficient arrays have no common type") from e
+ ret = [np.array(a, copy=True, dtype=dtype) for a in arrays]
+ return ret
+
+
+def trimcoef(c, tol=0):
+ """
+ Remove "small" "trailing" coefficients from a polynomial.
+
+ "Small" means "small in absolute value" and is controlled by the
+ parameter `tol`; "trailing" means highest order coefficient(s), e.g., in
+ ``[0, 1, 1, 0, 0]`` (which represents ``0 + x + x**2 + 0*x**3 + 0*x**4``)
+ both the 3-rd and 4-th order coefficients would be "trimmed."
+
+ Parameters
+ ----------
+ c : array_like
+ 1-d array of coefficients, ordered from lowest order to highest.
+ tol : number, optional
+ Trailing (i.e., highest order) elements with absolute value less
+ than or equal to `tol` (default value is zero) are removed.
+
+ Returns
+ -------
+ trimmed : ndarray
+ 1-d array with trailing zeros removed. If the resulting series
+ would be empty, a series containing a single zero is returned.
+
+ Raises
+ ------
+ ValueError
+ If `tol` < 0
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polyutils as pu
+ >>> pu.trimcoef((0,0,3,0,5,0,0))
+ array([0., 0., 3., 0., 5.])
+ >>> pu.trimcoef((0,0,1e-3,0,1e-5,0,0),1e-3) # item == tol is trimmed
+ array([0.])
+ >>> i = complex(0,1) # works for complex
+ >>> pu.trimcoef((3e-4,1e-3*(1-i),5e-4,2e-5*(1+i)), 1e-3)
+ array([0.0003+0.j , 0.001 -0.001j])
+
+ """
+ if tol < 0:
+ raise ValueError("tol must be non-negative")
+
+ [c] = as_series([c])
+ [ind] = np.nonzero(np.abs(c) > tol)
+ if len(ind) == 0:
+ return c[:1]*0
+ else:
+ return c[:ind[-1] + 1].copy()
+
+def getdomain(x):
+ """
+ Return a domain suitable for given abscissae.
+
+ Find a domain suitable for a polynomial or Chebyshev series
+ defined at the values supplied.
+
+ Parameters
+ ----------
+ x : array_like
+ 1-d array of abscissae whose domain will be determined.
+
+ Returns
+ -------
+ domain : ndarray
+ 1-d array containing two values. If the inputs are complex, then
+ the two returned points are the lower left and upper right corners
+ of the smallest rectangle (aligned with the axes) in the complex
+ plane containing the points `x`. If the inputs are real, then the
+ two points are the ends of the smallest interval containing the
+ points `x`.
+
+ See Also
+ --------
+ mapparms, mapdomain
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial import polyutils as pu
+ >>> points = np.arange(4)**2 - 5; points
+ array([-5, -4, -1, 4])
+ >>> pu.getdomain(points)
+ array([-5., 4.])
+ >>> c = np.exp(complex(0,1)*np.pi*np.arange(12)/6) # unit circle
+ >>> pu.getdomain(c)
+ array([-1.-1.j, 1.+1.j])
+
+ """
+ [x] = as_series([x], trim=False)
+ if x.dtype.char in np.typecodes['Complex']:
+ rmin, rmax = x.real.min(), x.real.max()
+ imin, imax = x.imag.min(), x.imag.max()
+ return np.array((complex(rmin, imin), complex(rmax, imax)))
+ else:
+ return np.array((x.min(), x.max()))
+
+def mapparms(old, new):
+ """
+ Linear map parameters between domains.
+
+ Return the parameters of the linear map ``offset + scale*x`` that maps
+ `old` to `new` such that ``old[i] -> new[i]``, ``i = 0, 1``.
+
+ Parameters
+ ----------
+ old, new : array_like
+ Domains. Each domain must (successfully) convert to a 1-d array
+ containing precisely two values.
+
+ Returns
+ -------
+ offset, scale : scalars
+ The map ``L(x) = offset + scale*x`` maps the first domain to the
+ second.
+
+ See Also
+ --------
+ getdomain, mapdomain
+
+ Notes
+ -----
+ Also works for complex numbers, and thus can be used to calculate the
+ parameters required to map any line in the complex plane to any other
+ line therein.
+
+ Examples
+ --------
+ >>> from numpy.polynomial import polyutils as pu
+ >>> pu.mapparms((-1,1),(-1,1))
+ (0.0, 1.0)
+ >>> pu.mapparms((1,-1),(-1,1))
+ (-0.0, -1.0)
+ >>> i = complex(0,1)
+ >>> pu.mapparms((-i,-1),(1,i))
+ ((1+1j), (1-0j))
+
+ """
+ oldlen = old[1] - old[0]
+ newlen = new[1] - new[0]
+ off = (old[1]*new[0] - old[0]*new[1])/oldlen
+ scl = newlen/oldlen
+ return off, scl
+
+def mapdomain(x, old, new):
+ """
+ Apply linear map to input points.
+
+ The linear map ``offset + scale*x`` that maps the domain `old` to
+ the domain `new` is applied to the points `x`.
+
+ Parameters
+ ----------
+ x : array_like
+ Points to be mapped. If `x` is a subtype of ndarray the subtype
+ will be preserved.
+ old, new : array_like
+ The two domains that determine the map. Each must (successfully)
+ convert to 1-d arrays containing precisely two values.
+
+ Returns
+ -------
+ x_out : ndarray
+ Array of points of the same shape as `x`, after application of the
+ linear map between the two domains.
+
+ See Also
+ --------
+ getdomain, mapparms
+
+ Notes
+ -----
+ Effectively, this implements:
+
+ .. math::
+ x\\_out = new[0] + m(x - old[0])
+
+ where
+
+ .. math::
+ m = \\frac{new[1]-new[0]}{old[1]-old[0]}
+
+ Examples
+ --------
+ >>> import numpy as np
+ >>> from numpy.polynomial import polyutils as pu
+ >>> old_domain = (-1,1)
+ >>> new_domain = (0,2*np.pi)
+ >>> x = np.linspace(-1,1,6); x
+ array([-1. , -0.6, -0.2, 0.2, 0.6, 1. ])
+ >>> x_out = pu.mapdomain(x, old_domain, new_domain); x_out
+ array([ 0. , 1.25663706, 2.51327412, 3.76991118, 5.02654825, # may vary
+ 6.28318531])
+ >>> x - pu.mapdomain(x_out, new_domain, old_domain)
+ array([0., 0., 0., 0., 0., 0.])
+
+ Also works for complex numbers (and thus can be used to map any line in
+ the complex plane to any other line therein).
+
+ >>> i = complex(0,1)
+ >>> old = (-1 - i, 1 + i)
+ >>> new = (-1 + i, 1 - i)
+ >>> z = np.linspace(old[0], old[1], 6); z
+ array([-1. -1.j , -0.6-0.6j, -0.2-0.2j, 0.2+0.2j, 0.6+0.6j, 1. +1.j ])
+ >>> new_z = pu.mapdomain(z, old, new); new_z
+ array([-1.0+1.j , -0.6+0.6j, -0.2+0.2j, 0.2-0.2j, 0.6-0.6j, 1.0-1.j ]) # may vary
+
+ """
+ if type(x) not in (int, float, complex) and not isinstance(x, np.generic):
+ x = np.asanyarray(x)
+ off, scl = mapparms(old, new)
+ return off + scl*x
+
+
+def _nth_slice(i, ndim):
+ sl = [np.newaxis] * ndim
+ sl[i] = slice(None)
+ return tuple(sl)
+
+
+def _vander_nd(vander_fs, points, degrees):
+ r"""
+ A generalization of the Vandermonde matrix for N dimensions
+
+ The result is built by combining the results of 1d Vandermonde matrices,
+
+ .. math::
+ W[i_0, \ldots, i_M, j_0, \ldots, j_N] = \prod_{k=0}^N{V_k(x_k)[i_0, \ldots, i_M, j_k]}
+
+ where
+
+ .. math::
+ N &= \texttt{len(points)} = \texttt{len(degrees)} = \texttt{len(vander\_fs)} \\
+ M &= \texttt{points[k].ndim} \\
+ V_k &= \texttt{vander\_fs[k]} \\
+ x_k &= \texttt{points[k]} \\
+ 0 \le j_k &\le \texttt{degrees[k]}
+
+ Expanding the one-dimensional :math:`V_k` functions gives:
+
+ .. math::
+ W[i_0, \ldots, i_M, j_0, \ldots, j_N] = \prod_{k=0}^N{B_{k, j_k}(x_k[i_0, \ldots, i_M])}
+
+ where :math:`B_{k,m}` is the m'th basis of the polynomial construction used along
+ dimension :math:`k`. For a regular polynomial, :math:`B_{k, m}(x) = P_m(x) = x^m`.
+
+ Parameters
+ ----------
+ vander_fs : Sequence[function(array_like, int) -> ndarray]
+ The 1d vander function to use for each axis, such as ``polyvander``
+ points : Sequence[array_like]
+ Arrays of point coordinates, all of the same shape. The dtypes
+ will be converted to either float64 or complex128 depending on
+ whether any of the elements are complex. Scalars are converted to
+ 1-D arrays.
+ This must be the same length as `vander_fs`.
+ degrees : Sequence[int]
+ The maximum degree (inclusive) to use for each axis.
+ This must be the same length as `vander_fs`.
+
+ Returns
+ -------
+ vander_nd : ndarray
+ An array of shape ``points[0].shape + tuple(d + 1 for d in degrees)``.
+ """
+ n_dims = len(vander_fs)
+ if n_dims != len(points):
+ raise ValueError(
+ f"Expected {n_dims} dimensions of sample points, got {len(points)}")
+ if n_dims != len(degrees):
+ raise ValueError(
+ f"Expected {n_dims} dimensions of degrees, got {len(degrees)}")
+ if n_dims == 0:
+ raise ValueError("Unable to guess a dtype or shape when no points are given")
+
+ # convert to the same shape and type
+ points = tuple(np.asarray(tuple(points)) + 0.0)
+
+ # produce the vandermonde matrix for each dimension, placing the last
+ # axis of each in an independent trailing axis of the output
+ vander_arrays = (
+ vander_fs[i](points[i], degrees[i])[(...,) + _nth_slice(i, n_dims)]
+ for i in range(n_dims)
+ )
+
+ # we checked this wasn't empty already, so no `initial` needed
+ return functools.reduce(operator.mul, vander_arrays)
+
+
+def _vander_nd_flat(vander_fs, points, degrees):
+ """
+ Like `_vander_nd`, but flattens the last ``len(degrees)`` axes into a single axis
+
+ Used to implement the public ``vanderd`` functions.
+ """
+ v = _vander_nd(vander_fs, points, degrees)
+ return v.reshape(v.shape[:-len(degrees)] + (-1,))
+
+
+def _fromroots(line_f, mul_f, roots):
+ """
+ Helper function used to implement the ``fromroots`` functions.
+
+ Parameters
+ ----------
+ line_f : function(float, float) -> ndarray
+ The ``line`` function, such as ``polyline``
+ mul_f : function(array_like, array_like) -> ndarray
+ The ``mul`` function, such as ``polymul``
+ roots
+ See the ``fromroots`` functions for more detail
+ """
+ if len(roots) == 0:
+ return np.ones(1)
+ else:
+ [roots] = as_series([roots], trim=False)
+ roots.sort()
+ p = [line_f(-r, 1) for r in roots]
+ n = len(p)
+ while n > 1:
+ m, r = divmod(n, 2)
+ tmp = [mul_f(p[i], p[i+m]) for i in range(m)]
+ if r:
+ tmp[0] = mul_f(tmp[0], p[-1])
+ p = tmp
+ n = m
+ return p[0]
+
+
+def _valnd(val_f, c, *args):
+ """
+ Helper function used to implement the ``vald`` functions.
+
+ Parameters
+ ----------
+ val_f : function(array_like, array_like, tensor: bool) -> array_like
+ The ``val`` function, such as ``polyval``
+ c, args
+ See the ``vald`` functions for more detail
+ """
+ args = [np.asanyarray(a) for a in args]
+ shape0 = args[0].shape
+ if not all(a.shape == shape0 for a in args[1:]):
+ if len(args) == 3:
+ raise ValueError('x, y, z are incompatible')
+ elif len(args) == 2:
+ raise ValueError('x, y are incompatible')
+ else:
+ raise ValueError('ordinates are incompatible')
+ it = iter(args)
+ x0 = next(it)
+
+ # use tensor on only the first
+ c = val_f(x0, c)
+ for xi in it:
+ c = val_f(xi, c, tensor=False)
+ return c
+
+
+def _gridnd(val_f, c, *args):
+ """
+ Helper function used to implement the ``gridd`` functions.
+
+ Parameters
+ ----------
+ val_f : function(array_like, array_like, tensor: bool) -> array_like
+ The ``val`` function, such as ``polyval``
+ c, args
+ See the ``gridd`` functions for more detail
+ """
+ for xi in args:
+ c = val_f(xi, c)
+ return c
+
+
+def _div(mul_f, c1, c2):
+ """
+ Helper function used to implement the ``div`` functions.
+
+ Implementation uses repeated subtraction of c2 multiplied by the nth basis.
+ For some polynomial types, a more efficient approach may be possible.
+
+ Parameters
+ ----------
+ mul_f : function(array_like, array_like) -> array_like
+ The ``mul`` function, such as ``polymul``
+ c1, c2
+ See the ``div`` functions for more detail
+ """
+ # c1, c2 are trimmed copies
+ [c1, c2] = as_series([c1, c2])
+ if c2[-1] == 0:
+ raise ZeroDivisionError # FIXME: add message with details to exception
+
+ lc1 = len(c1)
+ lc2 = len(c2)
+ if lc1 < lc2:
+ return c1[:1]*0, c1
+ elif lc2 == 1:
+ return c1/c2[-1], c1[:1]*0
+ else:
+ quo = np.empty(lc1 - lc2 + 1, dtype=c1.dtype)
+ rem = c1
+ for i in range(lc1 - lc2, - 1, -1):
+ p = mul_f([0]*i + [1], c2)
+ q = rem[-1]/p[-1]
+ rem = rem[:-1] - q*p[:-1]
+ quo[i] = q
+ return quo, trimseq(rem)
+
+
+def _add(c1, c2):
+ """ Helper function used to implement the ``add`` functions. """
+ # c1, c2 are trimmed copies
+ [c1, c2] = as_series([c1, c2])
+ if len(c1) > len(c2):
+ c1[:c2.size] += c2
+ ret = c1
+ else:
+ c2[:c1.size] += c1
+ ret = c2
+ return trimseq(ret)
+
+
+def _sub(c1, c2):
+ """ Helper function used to implement the ``sub`` functions. """
+ # c1, c2 are trimmed copies
+ [c1, c2] = as_series([c1, c2])
+ if len(c1) > len(c2):
+ c1[:c2.size] -= c2
+ ret = c1
+ else:
+ c2 = -c2
+ c2[:c1.size] += c1
+ ret = c2
+ return trimseq(ret)
+
+
+def _fit(vander_f, x, y, deg, rcond=None, full=False, w=None):
+ """
+ Helper function used to implement the ``fit`` functions.
+
+ Parameters
+ ----------
+ vander_f : function(array_like, int) -> ndarray
+ The 1d vander function, such as ``polyvander``
+ c1, c2
+ See the ``fit`` functions for more detail
+ """
+ x = np.asarray(x) + 0.0
+ y = np.asarray(y) + 0.0
+ deg = np.asarray(deg)
+
+ # check arguments.
+ if deg.ndim > 1 or deg.dtype.kind not in 'iu' or deg.size == 0:
+ raise TypeError("deg must be an int or non-empty 1-D array of int")
+ if deg.min() < 0:
+ raise ValueError("expected deg >= 0")
+ if x.ndim != 1:
+ raise TypeError("expected 1D vector for x")
+ if x.size == 0:
+ raise TypeError("expected non-empty vector for x")
+ if y.ndim < 1 or y.ndim > 2:
+ raise TypeError("expected 1D or 2D array for y")
+ if len(x) != len(y):
+ raise TypeError("expected x and y to have same length")
+
+ if deg.ndim == 0:
+ lmax = deg
+ order = lmax + 1
+ van = vander_f(x, lmax)
+ else:
+ deg = np.sort(deg)
+ lmax = deg[-1]
+ order = len(deg)
+ van = vander_f(x, lmax)[:, deg]
+
+ # set up the least squares matrices in transposed form
+ lhs = van.T
+ rhs = y.T
+ if w is not None:
+ w = np.asarray(w) + 0.0
+ if w.ndim != 1:
+ raise TypeError("expected 1D vector for w")
+ if len(x) != len(w):
+ raise TypeError("expected x and w to have same length")
+ # apply weights. Don't use inplace operations as they
+ # can cause problems with NA.
+ lhs = lhs * w
+ rhs = rhs * w
+
+ # set rcond
+ if rcond is None:
+ rcond = len(x)*np.finfo(x.dtype).eps
+
+ # Determine the norms of the design matrix columns.
+ if issubclass(lhs.dtype.type, np.complexfloating):
+ scl = np.sqrt((np.square(lhs.real) + np.square(lhs.imag)).sum(1))
+ else:
+ scl = np.sqrt(np.square(lhs).sum(1))
+ scl[scl == 0] = 1
+
+ # Solve the least squares problem.
+ c, resids, rank, s = np.linalg.lstsq(lhs.T/scl, rhs.T, rcond)
+ c = (c.T/scl).T
+
+ # Expand c to include non-fitted coefficients which are set to zero
+ if deg.ndim > 0:
+ if c.ndim == 2:
+ cc = np.zeros((lmax+1, c.shape[1]), dtype=c.dtype)
+ else:
+ cc = np.zeros(lmax+1, dtype=c.dtype)
+ cc[deg] = c
+ c = cc
+
+ # warn on rank reduction
+ if rank != order and not full:
+ msg = "The fit may be poorly conditioned"
+ warnings.warn(msg, RankWarning, stacklevel=2)
+
+ if full:
+ return c, [resids, rank, s, rcond]
+ else:
+ return c
+
+
+def _pow(mul_f, c, pow, maxpower):
+ """
+ Helper function used to implement the ``pow`` functions.
+
+ Parameters
+ ----------
+ mul_f : function(array_like, array_like) -> ndarray
+ The ``mul`` function, such as ``polymul``
+ c : array_like
+ 1-D array of array of series coefficients
+ pow, maxpower
+ See the ``pow`` functions for more detail
+ """
+ # c is a trimmed copy
+ [c] = as_series([c])
+ power = int(pow)
+ if power != pow or power < 0:
+ raise ValueError("Power must be a non-negative integer.")
+ elif maxpower is not None and power > maxpower:
+ raise ValueError("Power is too large")
+ elif power == 0:
+ return np.array([1], dtype=c.dtype)
+ elif power == 1:
+ return c
+ else:
+ # This can be made more efficient by using powers of two
+ # in the usual way.
+ prd = c
+ for i in range(2, power + 1):
+ prd = mul_f(prd, c)
+ return prd
+
+
+def _as_int(x, desc):
+ """
+ Like `operator.index`, but emits a custom exception when passed an
+ incorrect type
+
+ Parameters
+ ----------
+ x : int-like
+ Value to interpret as an integer
+ desc : str
+ description to include in any error message
+
+ Raises
+ ------
+ TypeError : if x is a float or non-numeric
+ """
+ try:
+ return operator.index(x)
+ except TypeError as e:
+ raise TypeError(f"{desc} must be an integer, received {x}") from e
+
+
+def format_float(x, parens=False):
+ if not np.issubdtype(type(x), np.floating):
+ return str(x)
+
+ opts = np.get_printoptions()
+
+ if np.isnan(x):
+ return opts['nanstr']
+ elif np.isinf(x):
+ return opts['infstr']
+
+ exp_format = False
+ if x != 0:
+ a = np.abs(x)
+ if a >= 1.e8 or a < 10**min(0, -(opts['precision']-1)//2):
+ exp_format = True
+
+ trim, unique = '0', True
+ if opts['floatmode'] == 'fixed':
+ trim, unique = 'k', False
+
+ if exp_format:
+ s = dragon4_scientific(x, precision=opts['precision'],
+ unique=unique, trim=trim,
+ sign=opts['sign'] == '+')
+ if parens:
+ s = '(' + s + ')'
+ else:
+ s = dragon4_positional(x, precision=opts['precision'],
+ fractional=True,
+ unique=unique, trim=trim,
+ sign=opts['sign'] == '+')
+ return s
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9299b23975b1ff9c59d36c9e6e804e06d415cf4b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/polyutils.pyi
@@ -0,0 +1,431 @@
+from collections.abc import Callable, Iterable, Sequence
+from typing import (
+ Any,
+ Final,
+ Literal,
+ SupportsIndex,
+ TypeAlias,
+ TypeVar,
+ overload,
+)
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import (
+ _FloatLike_co,
+ _NumberLike_co,
+
+ _ArrayLikeFloat_co,
+ _ArrayLikeComplex_co,
+)
+
+from ._polytypes import (
+ _AnyInt,
+ _CoefLike_co,
+
+ _Array2,
+ _Tuple2,
+
+ _FloatSeries,
+ _CoefSeries,
+ _ComplexSeries,
+ _ObjectSeries,
+
+ _ComplexArray,
+ _FloatArray,
+ _CoefArray,
+ _ObjectArray,
+
+ _SeriesLikeInt_co,
+ _SeriesLikeFloat_co,
+ _SeriesLikeComplex_co,
+ _SeriesLikeCoef_co,
+
+ _ArrayLikeCoef_co,
+
+ _FuncBinOp,
+ _FuncValND,
+ _FuncVanderND,
+)
+
+__all__: Final[Sequence[str]] = [
+ "as_series",
+ "format_float",
+ "getdomain",
+ "mapdomain",
+ "mapparms",
+ "trimcoef",
+ "trimseq",
+]
+
+_AnyLineF: TypeAlias = Callable[
+ [_CoefLike_co, _CoefLike_co],
+ _CoefArray,
+]
+_AnyMulF: TypeAlias = Callable[
+ [npt.ArrayLike, npt.ArrayLike],
+ _CoefArray,
+]
+_AnyVanderF: TypeAlias = Callable[
+ [npt.ArrayLike, SupportsIndex],
+ _CoefArray,
+]
+
+@overload
+def as_series(
+ alist: npt.NDArray[np.integer[Any]] | _FloatArray,
+ trim: bool = ...,
+) -> list[_FloatSeries]: ...
+@overload
+def as_series(
+ alist: _ComplexArray,
+ trim: bool = ...,
+) -> list[_ComplexSeries]: ...
+@overload
+def as_series(
+ alist: _ObjectArray,
+ trim: bool = ...,
+) -> list[_ObjectSeries]: ...
+@overload
+def as_series( # type: ignore[overload-overlap]
+ alist: Iterable[_FloatArray | npt.NDArray[np.integer[Any]]],
+ trim: bool = ...,
+) -> list[_FloatSeries]: ...
+@overload
+def as_series(
+ alist: Iterable[_ComplexArray],
+ trim: bool = ...,
+) -> list[_ComplexSeries]: ...
+@overload
+def as_series(
+ alist: Iterable[_ObjectArray],
+ trim: bool = ...,
+) -> list[_ObjectSeries]: ...
+@overload
+def as_series( # type: ignore[overload-overlap]
+ alist: Iterable[_SeriesLikeFloat_co | float],
+ trim: bool = ...,
+) -> list[_FloatSeries]: ...
+@overload
+def as_series(
+ alist: Iterable[_SeriesLikeComplex_co | complex],
+ trim: bool = ...,
+) -> list[_ComplexSeries]: ...
+@overload
+def as_series(
+ alist: Iterable[_SeriesLikeCoef_co | object],
+ trim: bool = ...,
+) -> list[_ObjectSeries]: ...
+
+_T_seq = TypeVar("_T_seq", bound=_CoefArray | Sequence[_CoefLike_co])
+def trimseq(seq: _T_seq) -> _T_seq: ...
+
+@overload
+def trimcoef( # type: ignore[overload-overlap]
+ c: npt.NDArray[np.integer[Any]] | _FloatArray,
+ tol: _FloatLike_co = ...,
+) -> _FloatSeries: ...
+@overload
+def trimcoef(
+ c: _ComplexArray,
+ tol: _FloatLike_co = ...,
+) -> _ComplexSeries: ...
+@overload
+def trimcoef(
+ c: _ObjectArray,
+ tol: _FloatLike_co = ...,
+) -> _ObjectSeries: ...
+@overload
+def trimcoef( # type: ignore[overload-overlap]
+ c: _SeriesLikeFloat_co | float,
+ tol: _FloatLike_co = ...,
+) -> _FloatSeries: ...
+@overload
+def trimcoef(
+ c: _SeriesLikeComplex_co | complex,
+ tol: _FloatLike_co = ...,
+) -> _ComplexSeries: ...
+@overload
+def trimcoef(
+ c: _SeriesLikeCoef_co | object,
+ tol: _FloatLike_co = ...,
+) -> _ObjectSeries: ...
+
+@overload
+def getdomain( # type: ignore[overload-overlap]
+ x: _FloatArray | npt.NDArray[np.integer[Any]],
+) -> _Array2[np.float64]: ...
+@overload
+def getdomain(
+ x: _ComplexArray,
+) -> _Array2[np.complex128]: ...
+@overload
+def getdomain(
+ x: _ObjectArray,
+) -> _Array2[np.object_]: ...
+@overload
+def getdomain( # type: ignore[overload-overlap]
+ x: _SeriesLikeFloat_co | float,
+) -> _Array2[np.float64]: ...
+@overload
+def getdomain(
+ x: _SeriesLikeComplex_co | complex,
+) -> _Array2[np.complex128]: ...
+@overload
+def getdomain(
+ x: _SeriesLikeCoef_co | object,
+) -> _Array2[np.object_]: ...
+
+@overload
+def mapparms( # type: ignore[overload-overlap]
+ old: npt.NDArray[np.floating[Any] | np.integer[Any]],
+ new: npt.NDArray[np.floating[Any] | np.integer[Any]],
+) -> _Tuple2[np.floating[Any]]: ...
+@overload
+def mapparms(
+ old: npt.NDArray[np.number[Any]],
+ new: npt.NDArray[np.number[Any]],
+) -> _Tuple2[np.complexfloating[Any, Any]]: ...
+@overload
+def mapparms(
+ old: npt.NDArray[np.object_ | np.number[Any]],
+ new: npt.NDArray[np.object_ | np.number[Any]],
+) -> _Tuple2[object]: ...
+@overload
+def mapparms( # type: ignore[overload-overlap]
+ old: Sequence[float],
+ new: Sequence[float],
+) -> _Tuple2[float]: ...
+@overload
+def mapparms(
+ old: Sequence[complex],
+ new: Sequence[complex],
+) -> _Tuple2[complex]: ...
+@overload
+def mapparms(
+ old: _SeriesLikeFloat_co,
+ new: _SeriesLikeFloat_co,
+) -> _Tuple2[np.floating[Any]]: ...
+@overload
+def mapparms(
+ old: _SeriesLikeComplex_co,
+ new: _SeriesLikeComplex_co,
+) -> _Tuple2[np.complexfloating[Any, Any]]: ...
+@overload
+def mapparms(
+ old: _SeriesLikeCoef_co,
+ new: _SeriesLikeCoef_co,
+) -> _Tuple2[object]: ...
+
+@overload
+def mapdomain( # type: ignore[overload-overlap]
+ x: _FloatLike_co,
+ old: _SeriesLikeFloat_co,
+ new: _SeriesLikeFloat_co,
+) -> np.floating[Any]: ...
+@overload
+def mapdomain(
+ x: _NumberLike_co,
+ old: _SeriesLikeComplex_co,
+ new: _SeriesLikeComplex_co,
+) -> np.complexfloating[Any, Any]: ...
+@overload
+def mapdomain( # type: ignore[overload-overlap]
+ x: npt.NDArray[np.floating[Any] | np.integer[Any]],
+ old: npt.NDArray[np.floating[Any] | np.integer[Any]],
+ new: npt.NDArray[np.floating[Any] | np.integer[Any]],
+) -> _FloatSeries: ...
+@overload
+def mapdomain(
+ x: npt.NDArray[np.number[Any]],
+ old: npt.NDArray[np.number[Any]],
+ new: npt.NDArray[np.number[Any]],
+) -> _ComplexSeries: ...
+@overload
+def mapdomain(
+ x: npt.NDArray[np.object_ | np.number[Any]],
+ old: npt.NDArray[np.object_ | np.number[Any]],
+ new: npt.NDArray[np.object_ | np.number[Any]],
+) -> _ObjectSeries: ...
+@overload
+def mapdomain( # type: ignore[overload-overlap]
+ x: _SeriesLikeFloat_co,
+ old: _SeriesLikeFloat_co,
+ new: _SeriesLikeFloat_co,
+) -> _FloatSeries: ...
+@overload
+def mapdomain(
+ x: _SeriesLikeComplex_co,
+ old: _SeriesLikeComplex_co,
+ new: _SeriesLikeComplex_co,
+) -> _ComplexSeries: ...
+@overload
+def mapdomain(
+ x: _SeriesLikeCoef_co,
+ old:_SeriesLikeCoef_co,
+ new: _SeriesLikeCoef_co,
+) -> _ObjectSeries: ...
+@overload
+def mapdomain(
+ x: _CoefLike_co,
+ old: _SeriesLikeCoef_co,
+ new: _SeriesLikeCoef_co,
+) -> object: ...
+
+def _nth_slice(
+ i: SupportsIndex,
+ ndim: SupportsIndex,
+) -> tuple[None | slice, ...]: ...
+
+_vander_nd: _FuncVanderND[Literal["_vander_nd"]]
+_vander_nd_flat: _FuncVanderND[Literal["_vander_nd_flat"]]
+
+# keep in sync with `._polytypes._FuncFromRoots`
+@overload
+def _fromroots( # type: ignore[overload-overlap]
+ line_f: _AnyLineF,
+ mul_f: _AnyMulF,
+ roots: _SeriesLikeFloat_co,
+) -> _FloatSeries: ...
+@overload
+def _fromroots(
+ line_f: _AnyLineF,
+ mul_f: _AnyMulF,
+ roots: _SeriesLikeComplex_co,
+) -> _ComplexSeries: ...
+@overload
+def _fromroots(
+ line_f: _AnyLineF,
+ mul_f: _AnyMulF,
+ roots: _SeriesLikeCoef_co,
+) -> _ObjectSeries: ...
+@overload
+def _fromroots(
+ line_f: _AnyLineF,
+ mul_f: _AnyMulF,
+ roots: _SeriesLikeCoef_co,
+) -> _CoefSeries: ...
+
+_valnd: _FuncValND[Literal["_valnd"]]
+_gridnd: _FuncValND[Literal["_gridnd"]]
+
+# keep in sync with `_polytypes._FuncBinOp`
+@overload
+def _div( # type: ignore[overload-overlap]
+ mul_f: _AnyMulF,
+ c1: _SeriesLikeFloat_co,
+ c2: _SeriesLikeFloat_co,
+) -> _Tuple2[_FloatSeries]: ...
+@overload
+def _div(
+ mul_f: _AnyMulF,
+ c1: _SeriesLikeComplex_co,
+ c2: _SeriesLikeComplex_co,
+) -> _Tuple2[_ComplexSeries]: ...
+@overload
+def _div(
+ mul_f: _AnyMulF,
+ c1: _SeriesLikeCoef_co,
+ c2: _SeriesLikeCoef_co,
+) -> _Tuple2[_ObjectSeries]: ...
+@overload
+def _div(
+ mul_f: _AnyMulF,
+ c1: _SeriesLikeCoef_co,
+ c2: _SeriesLikeCoef_co,
+) -> _Tuple2[_CoefSeries]: ...
+
+_add: Final[_FuncBinOp]
+_sub: Final[_FuncBinOp]
+
+# keep in sync with `_polytypes._FuncPow`
+@overload
+def _pow( # type: ignore[overload-overlap]
+ mul_f: _AnyMulF,
+ c: _SeriesLikeFloat_co,
+ pow: _AnyInt,
+ maxpower: None | _AnyInt = ...,
+) -> _FloatSeries: ...
+@overload
+def _pow(
+ mul_f: _AnyMulF,
+ c: _SeriesLikeComplex_co,
+ pow: _AnyInt,
+ maxpower: None | _AnyInt = ...,
+) -> _ComplexSeries: ...
+@overload
+def _pow(
+ mul_f: _AnyMulF,
+ c: _SeriesLikeCoef_co,
+ pow: _AnyInt,
+ maxpower: None | _AnyInt = ...,
+) -> _ObjectSeries: ...
+@overload
+def _pow(
+ mul_f: _AnyMulF,
+ c: _SeriesLikeCoef_co,
+ pow: _AnyInt,
+ maxpower: None | _AnyInt = ...,
+) -> _CoefSeries: ...
+
+# keep in sync with `_polytypes._FuncFit`
+@overload
+def _fit( # type: ignore[overload-overlap]
+ vander_f: _AnyVanderF,
+ x: _SeriesLikeFloat_co,
+ y: _ArrayLikeFloat_co,
+ deg: _SeriesLikeInt_co,
+ domain: None | _SeriesLikeFloat_co = ...,
+ rcond: None | _FloatLike_co = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeFloat_co = ...,
+) -> _FloatArray: ...
+@overload
+def _fit(
+ vander_f: _AnyVanderF,
+ x: _SeriesLikeComplex_co,
+ y: _ArrayLikeComplex_co,
+ deg: _SeriesLikeInt_co,
+ domain: None | _SeriesLikeComplex_co = ...,
+ rcond: None | _FloatLike_co = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeComplex_co = ...,
+) -> _ComplexArray: ...
+@overload
+def _fit(
+ vander_f: _AnyVanderF,
+ x: _SeriesLikeCoef_co,
+ y: _ArrayLikeCoef_co,
+ deg: _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ rcond: None | _FloatLike_co = ...,
+ full: Literal[False] = ...,
+ w: None | _SeriesLikeCoef_co = ...,
+) -> _CoefArray: ...
+@overload
+def _fit(
+ vander_f: _AnyVanderF,
+ x: _SeriesLikeCoef_co,
+ y: _SeriesLikeCoef_co,
+ deg: _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co,
+ rcond: None | _FloatLike_co ,
+ full: Literal[True],
+ /,
+ w: None | _SeriesLikeCoef_co = ...,
+) -> tuple[_CoefSeries, Sequence[np.inexact[Any] | np.int32]]: ...
+@overload
+def _fit(
+ vander_f: _AnyVanderF,
+ x: _SeriesLikeCoef_co,
+ y: _SeriesLikeCoef_co,
+ deg: _SeriesLikeInt_co,
+ domain: None | _SeriesLikeCoef_co = ...,
+ rcond: None | _FloatLike_co = ...,
+ *,
+ full: Literal[True],
+ w: None | _SeriesLikeCoef_co = ...,
+) -> tuple[_CoefSeries, Sequence[np.inexact[Any] | np.int32]]: ...
+
+def _as_int(x: SupportsIndex, desc: str) -> int: ...
+def format_float(x: _FloatLike_co, parens: bool = ...) -> str: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_chebyshev.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_chebyshev.py
new file mode 100644
index 0000000000000000000000000000000000000000..2f54bebfdb27d54f436378e4ab6d6c8f2426dd90
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_chebyshev.py
@@ -0,0 +1,619 @@
+"""Tests for chebyshev module.
+
+"""
+from functools import reduce
+
+import numpy as np
+import numpy.polynomial.chebyshev as cheb
+from numpy.polynomial.polynomial import polyval
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+
+def trim(x):
+ return cheb.chebtrim(x, tol=1e-6)
+
+T0 = [1]
+T1 = [0, 1]
+T2 = [-1, 0, 2]
+T3 = [0, -3, 0, 4]
+T4 = [1, 0, -8, 0, 8]
+T5 = [0, 5, 0, -20, 0, 16]
+T6 = [-1, 0, 18, 0, -48, 0, 32]
+T7 = [0, -7, 0, 56, 0, -112, 0, 64]
+T8 = [1, 0, -32, 0, 160, 0, -256, 0, 128]
+T9 = [0, 9, 0, -120, 0, 432, 0, -576, 0, 256]
+
+Tlist = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
+
+
+class TestPrivate:
+
+ def test__cseries_to_zseries(self):
+ for i in range(5):
+ inp = np.array([2] + [1]*i, np.double)
+ tgt = np.array([.5]*i + [2] + [.5]*i, np.double)
+ res = cheb._cseries_to_zseries(inp)
+ assert_equal(res, tgt)
+
+ def test__zseries_to_cseries(self):
+ for i in range(5):
+ inp = np.array([.5]*i + [2] + [.5]*i, np.double)
+ tgt = np.array([2] + [1]*i, np.double)
+ res = cheb._zseries_to_cseries(inp)
+ assert_equal(res, tgt)
+
+
+class TestConstants:
+
+ def test_chebdomain(self):
+ assert_equal(cheb.chebdomain, [-1, 1])
+
+ def test_chebzero(self):
+ assert_equal(cheb.chebzero, [0])
+
+ def test_chebone(self):
+ assert_equal(cheb.chebone, [1])
+
+ def test_chebx(self):
+ assert_equal(cheb.chebx, [0, 1])
+
+
+class TestArithmetic:
+
+ def test_chebadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = cheb.chebadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_chebsub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = cheb.chebsub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_chebmulx(self):
+ assert_equal(cheb.chebmulx([0]), [0])
+ assert_equal(cheb.chebmulx([1]), [0, 1])
+ for i in range(1, 5):
+ ser = [0]*i + [1]
+ tgt = [0]*(i - 1) + [.5, 0, .5]
+ assert_equal(cheb.chebmulx(ser), tgt)
+
+ def test_chebmul(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(i + j + 1)
+ tgt[i + j] += .5
+ tgt[abs(i - j)] += .5
+ res = cheb.chebmul([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_chebdiv(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1]
+ cj = [0]*j + [1]
+ tgt = cheb.chebadd(ci, cj)
+ quo, rem = cheb.chebdiv(tgt, ci)
+ res = cheb.chebadd(cheb.chebmul(quo, ci), rem)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_chebpow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(cheb.chebmul, [c]*j, np.array([1]))
+ res = cheb.chebpow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([2.5, 2., 1.5])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = polyval(x, [1., 2., 3.])
+
+ def test_chebval(self):
+ #check empty input
+ assert_equal(cheb.chebval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [polyval(x, c) for c in Tlist]
+ for i in range(10):
+ msg = f"At i={i}"
+ tgt = y[i]
+ res = cheb.chebval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt, err_msg=msg)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(cheb.chebval(x, [1]).shape, dims)
+ assert_equal(cheb.chebval(x, [1, 0]).shape, dims)
+ assert_equal(cheb.chebval(x, [1, 0, 0]).shape, dims)
+
+ def test_chebval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, cheb.chebval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = cheb.chebval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = cheb.chebval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_chebval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, cheb.chebval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = cheb.chebval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = cheb.chebval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_chebgrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = cheb.chebgrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = cheb.chebgrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_chebgrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = cheb.chebgrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = cheb.chebgrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_chebint(self):
+ # check exceptions
+ assert_raises(TypeError, cheb.chebint, [0], .5)
+ assert_raises(ValueError, cheb.chebint, [0], -1)
+ assert_raises(ValueError, cheb.chebint, [0], 1, [0, 0])
+ assert_raises(ValueError, cheb.chebint, [0], lbnd=[0])
+ assert_raises(ValueError, cheb.chebint, [0], scl=[0])
+ assert_raises(TypeError, cheb.chebint, [0], axis=.5)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = cheb.chebint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ chebpol = cheb.poly2cheb(pol)
+ chebint = cheb.chebint(chebpol, m=1, k=[i])
+ res = cheb.cheb2poly(chebint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ chebpol = cheb.poly2cheb(pol)
+ chebint = cheb.chebint(chebpol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(cheb.chebval(-1, chebint), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ chebpol = cheb.poly2cheb(pol)
+ chebint = cheb.chebint(chebpol, m=1, k=[i], scl=2)
+ res = cheb.cheb2poly(chebint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = cheb.chebint(tgt, m=1)
+ res = cheb.chebint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = cheb.chebint(tgt, m=1, k=[k])
+ res = cheb.chebint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = cheb.chebint(tgt, m=1, k=[k], lbnd=-1)
+ res = cheb.chebint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = cheb.chebint(tgt, m=1, k=[k], scl=2)
+ res = cheb.chebint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_chebint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([cheb.chebint(c) for c in c2d.T]).T
+ res = cheb.chebint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([cheb.chebint(c) for c in c2d])
+ res = cheb.chebint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([cheb.chebint(c, k=3) for c in c2d])
+ res = cheb.chebint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestDerivative:
+
+ def test_chebder(self):
+ # check exceptions
+ assert_raises(TypeError, cheb.chebder, [0], .5)
+ assert_raises(ValueError, cheb.chebder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = cheb.chebder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = cheb.chebder(cheb.chebint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = cheb.chebder(cheb.chebint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_chebder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([cheb.chebder(c) for c in c2d.T]).T
+ res = cheb.chebder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([cheb.chebder(c) for c in c2d])
+ res = cheb.chebder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_chebvander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = cheb.chebvander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], cheb.chebval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = cheb.chebvander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], cheb.chebval(x, coef))
+
+ def test_chebvander2d(self):
+ # also tests chebval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = cheb.chebvander2d(x1, x2, [1, 2])
+ tgt = cheb.chebval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = cheb.chebvander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_chebvander3d(self):
+ # also tests chebval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = cheb.chebvander3d(x1, x2, x3, [1, 2, 3])
+ tgt = cheb.chebval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = cheb.chebvander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+
+class TestFitting:
+
+ def test_chebfit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ def f2(x):
+ return x**4 + x**2 + 1
+
+ # Test exceptions
+ assert_raises(ValueError, cheb.chebfit, [1], [1], -1)
+ assert_raises(TypeError, cheb.chebfit, [[1]], [1], 0)
+ assert_raises(TypeError, cheb.chebfit, [], [1], 0)
+ assert_raises(TypeError, cheb.chebfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, cheb.chebfit, [1, 2], [1], 0)
+ assert_raises(TypeError, cheb.chebfit, [1], [1, 2], 0)
+ assert_raises(TypeError, cheb.chebfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, cheb.chebfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, cheb.chebfit, [1], [1], [-1,])
+ assert_raises(ValueError, cheb.chebfit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, cheb.chebfit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = cheb.chebfit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(cheb.chebval(x, coef3), y)
+ coef3 = cheb.chebfit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(cheb.chebval(x, coef3), y)
+ #
+ coef4 = cheb.chebfit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(cheb.chebval(x, coef4), y)
+ coef4 = cheb.chebfit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(cheb.chebval(x, coef4), y)
+ # check things still work if deg is not in strict increasing
+ coef4 = cheb.chebfit(x, y, [2, 3, 4, 1, 0])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(cheb.chebval(x, coef4), y)
+ #
+ coef2d = cheb.chebfit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = cheb.chebfit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ y[0::2] = 0
+ wcoef3 = cheb.chebfit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = cheb.chebfit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = cheb.chebfit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = cheb.chebfit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(cheb.chebfit(x, x, 1), [0, 1])
+ assert_almost_equal(cheb.chebfit(x, x, [0, 1]), [0, 1])
+ # test fitting only even polynomials
+ x = np.linspace(-1, 1)
+ y = f2(x)
+ coef1 = cheb.chebfit(x, y, 4)
+ assert_almost_equal(cheb.chebval(x, coef1), y)
+ coef2 = cheb.chebfit(x, y, [0, 2, 4])
+ assert_almost_equal(cheb.chebval(x, coef2), y)
+ assert_almost_equal(coef1, coef2)
+
+
+class TestInterpolate:
+
+ def f(self, x):
+ return x * (x - 1) * (x - 2)
+
+ def test_raises(self):
+ assert_raises(ValueError, cheb.chebinterpolate, self.f, -1)
+ assert_raises(TypeError, cheb.chebinterpolate, self.f, 10.)
+
+ def test_dimensions(self):
+ for deg in range(1, 5):
+ assert_(cheb.chebinterpolate(self.f, deg).shape == (deg + 1,))
+
+ def test_approximation(self):
+
+ def powx(x, p):
+ return x**p
+
+ x = np.linspace(-1, 1, 10)
+ for deg in range(0, 10):
+ for p in range(0, deg + 1):
+ c = cheb.chebinterpolate(powx, deg, (p,))
+ assert_almost_equal(cheb.chebval(x, c), powx(x, p), decimal=12)
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, cheb.chebcompanion, [])
+ assert_raises(ValueError, cheb.chebcompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(cheb.chebcompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(cheb.chebcompanion([1, 2])[0, 0] == -.5)
+
+
+class TestGauss:
+
+ def test_100(self):
+ x, w = cheb.chebgauss(100)
+
+ # test orthogonality. Note that the results need to be normalized,
+ # otherwise the huge values that can arise from fast growing
+ # functions like Laguerre can be very confusing.
+ v = cheb.chebvander(x, 99)
+ vv = np.dot(v.T * w, v)
+ vd = 1/np.sqrt(vv.diagonal())
+ vv = vd[:, None] * vv * vd
+ assert_almost_equal(vv, np.eye(100))
+
+ # check that the integral of 1 is correct
+ tgt = np.pi
+ assert_almost_equal(w.sum(), tgt)
+
+
+class TestMisc:
+
+ def test_chebfromroots(self):
+ res = cheb.chebfromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ tgt = [0]*i + [1]
+ res = cheb.chebfromroots(roots)*2**(i-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_chebroots(self):
+ assert_almost_equal(cheb.chebroots([1]), [])
+ assert_almost_equal(cheb.chebroots([1, 2]), [-.5])
+ for i in range(2, 5):
+ tgt = np.linspace(-1, 1, i)
+ res = cheb.chebroots(cheb.chebfromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_chebtrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, cheb.chebtrim, coef, -1)
+
+ # Test results
+ assert_equal(cheb.chebtrim(coef), coef[:-1])
+ assert_equal(cheb.chebtrim(coef, 1), coef[:-3])
+ assert_equal(cheb.chebtrim(coef, 2), [0])
+
+ def test_chebline(self):
+ assert_equal(cheb.chebline(3, 4), [3, 4])
+
+ def test_cheb2poly(self):
+ for i in range(10):
+ assert_almost_equal(cheb.cheb2poly([0]*i + [1]), Tlist[i])
+
+ def test_poly2cheb(self):
+ for i in range(10):
+ assert_almost_equal(cheb.poly2cheb(Tlist[i]), [0]*i + [1])
+
+ def test_weight(self):
+ x = np.linspace(-1, 1, 11)[1:-1]
+ tgt = 1./(np.sqrt(1 + x) * np.sqrt(1 - x))
+ res = cheb.chebweight(x)
+ assert_almost_equal(res, tgt)
+
+ def test_chebpts1(self):
+ #test exceptions
+ assert_raises(ValueError, cheb.chebpts1, 1.5)
+ assert_raises(ValueError, cheb.chebpts1, 0)
+
+ #test points
+ tgt = [0]
+ assert_almost_equal(cheb.chebpts1(1), tgt)
+ tgt = [-0.70710678118654746, 0.70710678118654746]
+ assert_almost_equal(cheb.chebpts1(2), tgt)
+ tgt = [-0.86602540378443871, 0, 0.86602540378443871]
+ assert_almost_equal(cheb.chebpts1(3), tgt)
+ tgt = [-0.9238795325, -0.3826834323, 0.3826834323, 0.9238795325]
+ assert_almost_equal(cheb.chebpts1(4), tgt)
+
+ def test_chebpts2(self):
+ #test exceptions
+ assert_raises(ValueError, cheb.chebpts2, 1.5)
+ assert_raises(ValueError, cheb.chebpts2, 1)
+
+ #test points
+ tgt = [-1, 1]
+ assert_almost_equal(cheb.chebpts2(2), tgt)
+ tgt = [-1, 0, 1]
+ assert_almost_equal(cheb.chebpts2(3), tgt)
+ tgt = [-1, -0.5, .5, 1]
+ assert_almost_equal(cheb.chebpts2(4), tgt)
+ tgt = [-1.0, -0.707106781187, 0, 0.707106781187, 1.0]
+ assert_almost_equal(cheb.chebpts2(5), tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_classes.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_classes.py
new file mode 100644
index 0000000000000000000000000000000000000000..75672a148524d8887663b986ec5d9e6c13d1193a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_classes.py
@@ -0,0 +1,607 @@
+"""Test inter-conversion of different polynomial classes.
+
+This tests the convert and cast methods of all the polynomial classes.
+
+"""
+import operator as op
+from numbers import Number
+
+import pytest
+import numpy as np
+from numpy.polynomial import (
+ Polynomial, Legendre, Chebyshev, Laguerre, Hermite, HermiteE)
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+from numpy.exceptions import RankWarning
+
+#
+# fixtures
+#
+
+classes = (
+ Polynomial, Legendre, Chebyshev, Laguerre,
+ Hermite, HermiteE
+ )
+classids = tuple(cls.__name__ for cls in classes)
+
+@pytest.fixture(params=classes, ids=classids)
+def Poly(request):
+ return request.param
+
+#
+# helper functions
+#
+random = np.random.random
+
+
+def assert_poly_almost_equal(p1, p2, msg=""):
+ try:
+ assert_(np.all(p1.domain == p2.domain))
+ assert_(np.all(p1.window == p2.window))
+ assert_almost_equal(p1.coef, p2.coef)
+ except AssertionError:
+ msg = f"Result: {p1}\nTarget: {p2}"
+ raise AssertionError(msg)
+
+
+#
+# Test conversion methods that depend on combinations of two classes.
+#
+
+Poly1 = Poly
+Poly2 = Poly
+
+
+def test_conversion(Poly1, Poly2):
+ x = np.linspace(0, 1, 10)
+ coef = random((3,))
+
+ d1 = Poly1.domain + random((2,))*.25
+ w1 = Poly1.window + random((2,))*.25
+ p1 = Poly1(coef, domain=d1, window=w1)
+
+ d2 = Poly2.domain + random((2,))*.25
+ w2 = Poly2.window + random((2,))*.25
+ p2 = p1.convert(kind=Poly2, domain=d2, window=w2)
+
+ assert_almost_equal(p2.domain, d2)
+ assert_almost_equal(p2.window, w2)
+ assert_almost_equal(p2(x), p1(x))
+
+
+def test_cast(Poly1, Poly2):
+ x = np.linspace(0, 1, 10)
+ coef = random((3,))
+
+ d1 = Poly1.domain + random((2,))*.25
+ w1 = Poly1.window + random((2,))*.25
+ p1 = Poly1(coef, domain=d1, window=w1)
+
+ d2 = Poly2.domain + random((2,))*.25
+ w2 = Poly2.window + random((2,))*.25
+ p2 = Poly2.cast(p1, domain=d2, window=w2)
+
+ assert_almost_equal(p2.domain, d2)
+ assert_almost_equal(p2.window, w2)
+ assert_almost_equal(p2(x), p1(x))
+
+
+#
+# test methods that depend on one class
+#
+
+
+def test_identity(Poly):
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ x = np.linspace(d[0], d[1], 11)
+ p = Poly.identity(domain=d, window=w)
+ assert_equal(p.domain, d)
+ assert_equal(p.window, w)
+ assert_almost_equal(p(x), x)
+
+
+def test_basis(Poly):
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ p = Poly.basis(5, domain=d, window=w)
+ assert_equal(p.domain, d)
+ assert_equal(p.window, w)
+ assert_equal(p.coef, [0]*5 + [1])
+
+
+def test_fromroots(Poly):
+ # check that requested roots are zeros of a polynomial
+ # of correct degree, domain, and window.
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ r = random((5,))
+ p1 = Poly.fromroots(r, domain=d, window=w)
+ assert_equal(p1.degree(), len(r))
+ assert_equal(p1.domain, d)
+ assert_equal(p1.window, w)
+ assert_almost_equal(p1(r), 0)
+
+ # check that polynomial is monic
+ pdom = Polynomial.domain
+ pwin = Polynomial.window
+ p2 = Polynomial.cast(p1, domain=pdom, window=pwin)
+ assert_almost_equal(p2.coef[-1], 1)
+
+
+def test_bad_conditioned_fit(Poly):
+
+ x = [0., 0., 1.]
+ y = [1., 2., 3.]
+
+ # check RankWarning is raised
+ with pytest.warns(RankWarning) as record:
+ Poly.fit(x, y, 2)
+ assert record[0].message.args[0] == "The fit may be poorly conditioned"
+
+
+def test_fit(Poly):
+
+ def f(x):
+ return x*(x - 1)*(x - 2)
+ x = np.linspace(0, 3)
+ y = f(x)
+
+ # check default value of domain and window
+ p = Poly.fit(x, y, 3)
+ assert_almost_equal(p.domain, [0, 3])
+ assert_almost_equal(p(x), y)
+ assert_equal(p.degree(), 3)
+
+ # check with given domains and window
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ p = Poly.fit(x, y, 3, domain=d, window=w)
+ assert_almost_equal(p(x), y)
+ assert_almost_equal(p.domain, d)
+ assert_almost_equal(p.window, w)
+ p = Poly.fit(x, y, [0, 1, 2, 3], domain=d, window=w)
+ assert_almost_equal(p(x), y)
+ assert_almost_equal(p.domain, d)
+ assert_almost_equal(p.window, w)
+
+ # check with class domain default
+ p = Poly.fit(x, y, 3, [])
+ assert_equal(p.domain, Poly.domain)
+ assert_equal(p.window, Poly.window)
+ p = Poly.fit(x, y, [0, 1, 2, 3], [])
+ assert_equal(p.domain, Poly.domain)
+ assert_equal(p.window, Poly.window)
+
+ # check that fit accepts weights.
+ w = np.zeros_like(x)
+ z = y + random(y.shape)*.25
+ w[::2] = 1
+ p1 = Poly.fit(x[::2], z[::2], 3)
+ p2 = Poly.fit(x, z, 3, w=w)
+ p3 = Poly.fit(x, z, [0, 1, 2, 3], w=w)
+ assert_almost_equal(p1(x), p2(x))
+ assert_almost_equal(p2(x), p3(x))
+
+
+def test_equal(Poly):
+ p1 = Poly([1, 2, 3], domain=[0, 1], window=[2, 3])
+ p2 = Poly([1, 1, 1], domain=[0, 1], window=[2, 3])
+ p3 = Poly([1, 2, 3], domain=[1, 2], window=[2, 3])
+ p4 = Poly([1, 2, 3], domain=[0, 1], window=[1, 2])
+ assert_(p1 == p1)
+ assert_(not p1 == p2)
+ assert_(not p1 == p3)
+ assert_(not p1 == p4)
+
+
+def test_not_equal(Poly):
+ p1 = Poly([1, 2, 3], domain=[0, 1], window=[2, 3])
+ p2 = Poly([1, 1, 1], domain=[0, 1], window=[2, 3])
+ p3 = Poly([1, 2, 3], domain=[1, 2], window=[2, 3])
+ p4 = Poly([1, 2, 3], domain=[0, 1], window=[1, 2])
+ assert_(not p1 != p1)
+ assert_(p1 != p2)
+ assert_(p1 != p3)
+ assert_(p1 != p4)
+
+
+def test_add(Poly):
+ # This checks commutation, not numerical correctness
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = p1 + p2
+ assert_poly_almost_equal(p2 + p1, p3)
+ assert_poly_almost_equal(p1 + c2, p3)
+ assert_poly_almost_equal(c2 + p1, p3)
+ assert_poly_almost_equal(p1 + tuple(c2), p3)
+ assert_poly_almost_equal(tuple(c2) + p1, p3)
+ assert_poly_almost_equal(p1 + np.array(c2), p3)
+ assert_poly_almost_equal(np.array(c2) + p1, p3)
+ assert_raises(TypeError, op.add, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(TypeError, op.add, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, op.add, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, op.add, p1, Polynomial([0]))
+
+
+def test_sub(Poly):
+ # This checks commutation, not numerical correctness
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = p1 - p2
+ assert_poly_almost_equal(p2 - p1, -p3)
+ assert_poly_almost_equal(p1 - c2, p3)
+ assert_poly_almost_equal(c2 - p1, -p3)
+ assert_poly_almost_equal(p1 - tuple(c2), p3)
+ assert_poly_almost_equal(tuple(c2) - p1, -p3)
+ assert_poly_almost_equal(p1 - np.array(c2), p3)
+ assert_poly_almost_equal(np.array(c2) - p1, -p3)
+ assert_raises(TypeError, op.sub, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(TypeError, op.sub, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, op.sub, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, op.sub, p1, Polynomial([0]))
+
+
+def test_mul(Poly):
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = p1 * p2
+ assert_poly_almost_equal(p2 * p1, p3)
+ assert_poly_almost_equal(p1 * c2, p3)
+ assert_poly_almost_equal(c2 * p1, p3)
+ assert_poly_almost_equal(p1 * tuple(c2), p3)
+ assert_poly_almost_equal(tuple(c2) * p1, p3)
+ assert_poly_almost_equal(p1 * np.array(c2), p3)
+ assert_poly_almost_equal(np.array(c2) * p1, p3)
+ assert_poly_almost_equal(p1 * 2, p1 * Poly([2]))
+ assert_poly_almost_equal(2 * p1, p1 * Poly([2]))
+ assert_raises(TypeError, op.mul, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(TypeError, op.mul, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, op.mul, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, op.mul, p1, Polynomial([0]))
+
+
+def test_floordiv(Poly):
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ c3 = list(random((2,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = Poly(c3)
+ p4 = p1 * p2 + p3
+ c4 = list(p4.coef)
+ assert_poly_almost_equal(p4 // p2, p1)
+ assert_poly_almost_equal(p4 // c2, p1)
+ assert_poly_almost_equal(c4 // p2, p1)
+ assert_poly_almost_equal(p4 // tuple(c2), p1)
+ assert_poly_almost_equal(tuple(c4) // p2, p1)
+ assert_poly_almost_equal(p4 // np.array(c2), p1)
+ assert_poly_almost_equal(np.array(c4) // p2, p1)
+ assert_poly_almost_equal(2 // p2, Poly([0]))
+ assert_poly_almost_equal(p2 // 2, 0.5*p2)
+ assert_raises(
+ TypeError, op.floordiv, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(
+ TypeError, op.floordiv, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, op.floordiv, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, op.floordiv, p1, Polynomial([0]))
+
+
+def test_truediv(Poly):
+ # true division is valid only if the denominator is a Number and
+ # not a python bool.
+ p1 = Poly([1,2,3])
+ p2 = p1 * 5
+
+ for stype in np.ScalarType:
+ if not issubclass(stype, Number) or issubclass(stype, bool):
+ continue
+ s = stype(5)
+ assert_poly_almost_equal(op.truediv(p2, s), p1)
+ assert_raises(TypeError, op.truediv, s, p2)
+ for stype in (int, float):
+ s = stype(5)
+ assert_poly_almost_equal(op.truediv(p2, s), p1)
+ assert_raises(TypeError, op.truediv, s, p2)
+ for stype in [complex]:
+ s = stype(5, 0)
+ assert_poly_almost_equal(op.truediv(p2, s), p1)
+ assert_raises(TypeError, op.truediv, s, p2)
+ for s in [tuple(), list(), dict(), bool(), np.array([1])]:
+ assert_raises(TypeError, op.truediv, p2, s)
+ assert_raises(TypeError, op.truediv, s, p2)
+ for ptype in classes:
+ assert_raises(TypeError, op.truediv, p2, ptype(1))
+
+
+def test_mod(Poly):
+ # This checks commutation, not numerical correctness
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ c3 = list(random((2,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = Poly(c3)
+ p4 = p1 * p2 + p3
+ c4 = list(p4.coef)
+ assert_poly_almost_equal(p4 % p2, p3)
+ assert_poly_almost_equal(p4 % c2, p3)
+ assert_poly_almost_equal(c4 % p2, p3)
+ assert_poly_almost_equal(p4 % tuple(c2), p3)
+ assert_poly_almost_equal(tuple(c4) % p2, p3)
+ assert_poly_almost_equal(p4 % np.array(c2), p3)
+ assert_poly_almost_equal(np.array(c4) % p2, p3)
+ assert_poly_almost_equal(2 % p2, Poly([2]))
+ assert_poly_almost_equal(p2 % 2, Poly([0]))
+ assert_raises(TypeError, op.mod, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(TypeError, op.mod, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, op.mod, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, op.mod, p1, Polynomial([0]))
+
+
+def test_divmod(Poly):
+ # This checks commutation, not numerical correctness
+ c1 = list(random((4,)) + .5)
+ c2 = list(random((3,)) + .5)
+ c3 = list(random((2,)) + .5)
+ p1 = Poly(c1)
+ p2 = Poly(c2)
+ p3 = Poly(c3)
+ p4 = p1 * p2 + p3
+ c4 = list(p4.coef)
+ quo, rem = divmod(p4, p2)
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(p4, c2)
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(c4, p2)
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(p4, tuple(c2))
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(tuple(c4), p2)
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(p4, np.array(c2))
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(np.array(c4), p2)
+ assert_poly_almost_equal(quo, p1)
+ assert_poly_almost_equal(rem, p3)
+ quo, rem = divmod(p2, 2)
+ assert_poly_almost_equal(quo, 0.5*p2)
+ assert_poly_almost_equal(rem, Poly([0]))
+ quo, rem = divmod(2, p2)
+ assert_poly_almost_equal(quo, Poly([0]))
+ assert_poly_almost_equal(rem, Poly([2]))
+ assert_raises(TypeError, divmod, p1, Poly([0], domain=Poly.domain + 1))
+ assert_raises(TypeError, divmod, p1, Poly([0], window=Poly.window + 1))
+ if Poly is Polynomial:
+ assert_raises(TypeError, divmod, p1, Chebyshev([0]))
+ else:
+ assert_raises(TypeError, divmod, p1, Polynomial([0]))
+
+
+def test_roots(Poly):
+ d = Poly.domain * 1.25 + .25
+ w = Poly.window
+ tgt = np.linspace(d[0], d[1], 5)
+ res = np.sort(Poly.fromroots(tgt, domain=d, window=w).roots())
+ assert_almost_equal(res, tgt)
+ # default domain and window
+ res = np.sort(Poly.fromroots(tgt).roots())
+ assert_almost_equal(res, tgt)
+
+
+def test_degree(Poly):
+ p = Poly.basis(5)
+ assert_equal(p.degree(), 5)
+
+
+def test_copy(Poly):
+ p1 = Poly.basis(5)
+ p2 = p1.copy()
+ assert_(p1 == p2)
+ assert_(p1 is not p2)
+ assert_(p1.coef is not p2.coef)
+ assert_(p1.domain is not p2.domain)
+ assert_(p1.window is not p2.window)
+
+
+def test_integ(Poly):
+ P = Polynomial
+ # Check defaults
+ p0 = Poly.cast(P([1*2, 2*3, 3*4]))
+ p1 = P.cast(p0.integ())
+ p2 = P.cast(p0.integ(2))
+ assert_poly_almost_equal(p1, P([0, 2, 3, 4]))
+ assert_poly_almost_equal(p2, P([0, 0, 1, 1, 1]))
+ # Check with k
+ p0 = Poly.cast(P([1*2, 2*3, 3*4]))
+ p1 = P.cast(p0.integ(k=1))
+ p2 = P.cast(p0.integ(2, k=[1, 1]))
+ assert_poly_almost_equal(p1, P([1, 2, 3, 4]))
+ assert_poly_almost_equal(p2, P([1, 1, 1, 1, 1]))
+ # Check with lbnd
+ p0 = Poly.cast(P([1*2, 2*3, 3*4]))
+ p1 = P.cast(p0.integ(lbnd=1))
+ p2 = P.cast(p0.integ(2, lbnd=1))
+ assert_poly_almost_equal(p1, P([-9, 2, 3, 4]))
+ assert_poly_almost_equal(p2, P([6, -9, 1, 1, 1]))
+ # Check scaling
+ d = 2*Poly.domain
+ p0 = Poly.cast(P([1*2, 2*3, 3*4]), domain=d)
+ p1 = P.cast(p0.integ())
+ p2 = P.cast(p0.integ(2))
+ assert_poly_almost_equal(p1, P([0, 2, 3, 4]))
+ assert_poly_almost_equal(p2, P([0, 0, 1, 1, 1]))
+
+
+def test_deriv(Poly):
+ # Check that the derivative is the inverse of integration. It is
+ # assumes that the integration has been checked elsewhere.
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ p1 = Poly([1, 2, 3], domain=d, window=w)
+ p2 = p1.integ(2, k=[1, 2])
+ p3 = p1.integ(1, k=[1])
+ assert_almost_equal(p2.deriv(1).coef, p3.coef)
+ assert_almost_equal(p2.deriv(2).coef, p1.coef)
+ # default domain and window
+ p1 = Poly([1, 2, 3])
+ p2 = p1.integ(2, k=[1, 2])
+ p3 = p1.integ(1, k=[1])
+ assert_almost_equal(p2.deriv(1).coef, p3.coef)
+ assert_almost_equal(p2.deriv(2).coef, p1.coef)
+
+
+def test_linspace(Poly):
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ p = Poly([1, 2, 3], domain=d, window=w)
+ # check default domain
+ xtgt = np.linspace(d[0], d[1], 20)
+ ytgt = p(xtgt)
+ xres, yres = p.linspace(20)
+ assert_almost_equal(xres, xtgt)
+ assert_almost_equal(yres, ytgt)
+ # check specified domain
+ xtgt = np.linspace(0, 2, 20)
+ ytgt = p(xtgt)
+ xres, yres = p.linspace(20, domain=[0, 2])
+ assert_almost_equal(xres, xtgt)
+ assert_almost_equal(yres, ytgt)
+
+
+def test_pow(Poly):
+ d = Poly.domain + random((2,))*.25
+ w = Poly.window + random((2,))*.25
+ tgt = Poly([1], domain=d, window=w)
+ tst = Poly([1, 2, 3], domain=d, window=w)
+ for i in range(5):
+ assert_poly_almost_equal(tst**i, tgt)
+ tgt = tgt * tst
+ # default domain and window
+ tgt = Poly([1])
+ tst = Poly([1, 2, 3])
+ for i in range(5):
+ assert_poly_almost_equal(tst**i, tgt)
+ tgt = tgt * tst
+ # check error for invalid powers
+ assert_raises(ValueError, op.pow, tgt, 1.5)
+ assert_raises(ValueError, op.pow, tgt, -1)
+
+
+def test_call(Poly):
+ P = Polynomial
+ d = Poly.domain
+ x = np.linspace(d[0], d[1], 11)
+
+ # Check defaults
+ p = Poly.cast(P([1, 2, 3]))
+ tgt = 1 + x*(2 + 3*x)
+ res = p(x)
+ assert_almost_equal(res, tgt)
+
+
+def test_call_with_list(Poly):
+ p = Poly([1, 2, 3])
+ x = [-1, 0, 2]
+ res = p(x)
+ assert_equal(res, p(np.array(x)))
+
+
+def test_cutdeg(Poly):
+ p = Poly([1, 2, 3])
+ assert_raises(ValueError, p.cutdeg, .5)
+ assert_raises(ValueError, p.cutdeg, -1)
+ assert_equal(len(p.cutdeg(3)), 3)
+ assert_equal(len(p.cutdeg(2)), 3)
+ assert_equal(len(p.cutdeg(1)), 2)
+ assert_equal(len(p.cutdeg(0)), 1)
+
+
+def test_truncate(Poly):
+ p = Poly([1, 2, 3])
+ assert_raises(ValueError, p.truncate, .5)
+ assert_raises(ValueError, p.truncate, 0)
+ assert_equal(len(p.truncate(4)), 3)
+ assert_equal(len(p.truncate(3)), 3)
+ assert_equal(len(p.truncate(2)), 2)
+ assert_equal(len(p.truncate(1)), 1)
+
+
+def test_trim(Poly):
+ c = [1, 1e-6, 1e-12, 0]
+ p = Poly(c)
+ assert_equal(p.trim().coef, c[:3])
+ assert_equal(p.trim(1e-10).coef, c[:2])
+ assert_equal(p.trim(1e-5).coef, c[:1])
+
+
+def test_mapparms(Poly):
+ # check with defaults. Should be identity.
+ d = Poly.domain
+ w = Poly.window
+ p = Poly([1], domain=d, window=w)
+ assert_almost_equal([0, 1], p.mapparms())
+ #
+ w = 2*d + 1
+ p = Poly([1], domain=d, window=w)
+ assert_almost_equal([1, 2], p.mapparms())
+
+
+def test_ufunc_override(Poly):
+ p = Poly([1, 2, 3])
+ x = np.ones(3)
+ assert_raises(TypeError, np.add, p, x)
+ assert_raises(TypeError, np.add, x, p)
+
+
+#
+# Test class method that only exists for some classes
+#
+
+
+class TestInterpolate:
+
+ def f(self, x):
+ return x * (x - 1) * (x - 2)
+
+ def test_raises(self):
+ assert_raises(ValueError, Chebyshev.interpolate, self.f, -1)
+ assert_raises(TypeError, Chebyshev.interpolate, self.f, 10.)
+
+ def test_dimensions(self):
+ for deg in range(1, 5):
+ assert_(Chebyshev.interpolate(self.f, deg).degree() == deg)
+
+ def test_approximation(self):
+
+ def powx(x, p):
+ return x**p
+
+ x = np.linspace(0, 2, 10)
+ for deg in range(0, 10):
+ for t in range(0, deg + 1):
+ p = Chebyshev.interpolate(powx, deg, domain=[0, 2], args=(t,))
+ assert_almost_equal(p(x), powx(x, t), decimal=11)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite.py
new file mode 100644
index 0000000000000000000000000000000000000000..2188800853f2f5e9a98d2d7087893a7cf11440ef
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite.py
@@ -0,0 +1,555 @@
+"""Tests for hermite module.
+
+"""
+from functools import reduce
+
+import numpy as np
+import numpy.polynomial.hermite as herm
+from numpy.polynomial.polynomial import polyval
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+H0 = np.array([1])
+H1 = np.array([0, 2])
+H2 = np.array([-2, 0, 4])
+H3 = np.array([0, -12, 0, 8])
+H4 = np.array([12, 0, -48, 0, 16])
+H5 = np.array([0, 120, 0, -160, 0, 32])
+H6 = np.array([-120, 0, 720, 0, -480, 0, 64])
+H7 = np.array([0, -1680, 0, 3360, 0, -1344, 0, 128])
+H8 = np.array([1680, 0, -13440, 0, 13440, 0, -3584, 0, 256])
+H9 = np.array([0, 30240, 0, -80640, 0, 48384, 0, -9216, 0, 512])
+
+Hlist = [H0, H1, H2, H3, H4, H5, H6, H7, H8, H9]
+
+
+def trim(x):
+ return herm.hermtrim(x, tol=1e-6)
+
+
+class TestConstants:
+
+ def test_hermdomain(self):
+ assert_equal(herm.hermdomain, [-1, 1])
+
+ def test_hermzero(self):
+ assert_equal(herm.hermzero, [0])
+
+ def test_hermone(self):
+ assert_equal(herm.hermone, [1])
+
+ def test_hermx(self):
+ assert_equal(herm.hermx, [0, .5])
+
+
+class TestArithmetic:
+ x = np.linspace(-3, 3, 100)
+
+ def test_hermadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = herm.hermadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermsub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = herm.hermsub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermmulx(self):
+ assert_equal(herm.hermmulx([0]), [0])
+ assert_equal(herm.hermmulx([1]), [0, .5])
+ for i in range(1, 5):
+ ser = [0]*i + [1]
+ tgt = [0]*(i - 1) + [i, 0, .5]
+ assert_equal(herm.hermmulx(ser), tgt)
+
+ def test_hermmul(self):
+ # check values of result
+ for i in range(5):
+ pol1 = [0]*i + [1]
+ val1 = herm.hermval(self.x, pol1)
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ pol2 = [0]*j + [1]
+ val2 = herm.hermval(self.x, pol2)
+ pol3 = herm.hermmul(pol1, pol2)
+ val3 = herm.hermval(self.x, pol3)
+ assert_(len(pol3) == i + j + 1, msg)
+ assert_almost_equal(val3, val1*val2, err_msg=msg)
+
+ def test_hermdiv(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1]
+ cj = [0]*j + [1]
+ tgt = herm.hermadd(ci, cj)
+ quo, rem = herm.hermdiv(tgt, ci)
+ res = herm.hermadd(herm.hermmul(quo, ci), rem)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermpow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(herm.hermmul, [c]*j, np.array([1]))
+ res = herm.hermpow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([2.5, 1., .75])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = polyval(x, [1., 2., 3.])
+
+ def test_hermval(self):
+ #check empty input
+ assert_equal(herm.hermval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [polyval(x, c) for c in Hlist]
+ for i in range(10):
+ msg = f"At i={i}"
+ tgt = y[i]
+ res = herm.hermval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt, err_msg=msg)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(herm.hermval(x, [1]).shape, dims)
+ assert_equal(herm.hermval(x, [1, 0]).shape, dims)
+ assert_equal(herm.hermval(x, [1, 0, 0]).shape, dims)
+
+ def test_hermval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, herm.hermval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = herm.hermval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herm.hermval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_hermval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, herm.hermval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = herm.hermval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herm.hermval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_hermgrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = herm.hermgrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herm.hermgrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_hermgrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = herm.hermgrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herm.hermgrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_hermint(self):
+ # check exceptions
+ assert_raises(TypeError, herm.hermint, [0], .5)
+ assert_raises(ValueError, herm.hermint, [0], -1)
+ assert_raises(ValueError, herm.hermint, [0], 1, [0, 0])
+ assert_raises(ValueError, herm.hermint, [0], lbnd=[0])
+ assert_raises(ValueError, herm.hermint, [0], scl=[0])
+ assert_raises(TypeError, herm.hermint, [0], axis=.5)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = herm.hermint([0], m=i, k=k)
+ assert_almost_equal(res, [0, .5])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ hermpol = herm.poly2herm(pol)
+ hermint = herm.hermint(hermpol, m=1, k=[i])
+ res = herm.herm2poly(hermint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ hermpol = herm.poly2herm(pol)
+ hermint = herm.hermint(hermpol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(herm.hermval(-1, hermint), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ hermpol = herm.poly2herm(pol)
+ hermint = herm.hermint(hermpol, m=1, k=[i], scl=2)
+ res = herm.herm2poly(hermint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herm.hermint(tgt, m=1)
+ res = herm.hermint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herm.hermint(tgt, m=1, k=[k])
+ res = herm.hermint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herm.hermint(tgt, m=1, k=[k], lbnd=-1)
+ res = herm.hermint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herm.hermint(tgt, m=1, k=[k], scl=2)
+ res = herm.hermint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([herm.hermint(c) for c in c2d.T]).T
+ res = herm.hermint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herm.hermint(c) for c in c2d])
+ res = herm.hermint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herm.hermint(c, k=3) for c in c2d])
+ res = herm.hermint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestDerivative:
+
+ def test_hermder(self):
+ # check exceptions
+ assert_raises(TypeError, herm.hermder, [0], .5)
+ assert_raises(ValueError, herm.hermder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = herm.hermder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = herm.hermder(herm.hermint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = herm.hermder(herm.hermint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([herm.hermder(c) for c in c2d.T]).T
+ res = herm.hermder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herm.hermder(c) for c in c2d])
+ res = herm.hermder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_hermvander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = herm.hermvander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], herm.hermval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = herm.hermvander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], herm.hermval(x, coef))
+
+ def test_hermvander2d(self):
+ # also tests hermval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = herm.hermvander2d(x1, x2, [1, 2])
+ tgt = herm.hermval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = herm.hermvander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_hermvander3d(self):
+ # also tests hermval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = herm.hermvander3d(x1, x2, x3, [1, 2, 3])
+ tgt = herm.hermval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = herm.hermvander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+
+class TestFitting:
+
+ def test_hermfit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ def f2(x):
+ return x**4 + x**2 + 1
+
+ # Test exceptions
+ assert_raises(ValueError, herm.hermfit, [1], [1], -1)
+ assert_raises(TypeError, herm.hermfit, [[1]], [1], 0)
+ assert_raises(TypeError, herm.hermfit, [], [1], 0)
+ assert_raises(TypeError, herm.hermfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, herm.hermfit, [1, 2], [1], 0)
+ assert_raises(TypeError, herm.hermfit, [1], [1, 2], 0)
+ assert_raises(TypeError, herm.hermfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, herm.hermfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, herm.hermfit, [1], [1], [-1,])
+ assert_raises(ValueError, herm.hermfit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, herm.hermfit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = herm.hermfit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(herm.hermval(x, coef3), y)
+ coef3 = herm.hermfit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(herm.hermval(x, coef3), y)
+ #
+ coef4 = herm.hermfit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herm.hermval(x, coef4), y)
+ coef4 = herm.hermfit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herm.hermval(x, coef4), y)
+ # check things still work if deg is not in strict increasing
+ coef4 = herm.hermfit(x, y, [2, 3, 4, 1, 0])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herm.hermval(x, coef4), y)
+ #
+ coef2d = herm.hermfit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = herm.hermfit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ y[0::2] = 0
+ wcoef3 = herm.hermfit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = herm.hermfit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = herm.hermfit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = herm.hermfit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(herm.hermfit(x, x, 1), [0, .5])
+ assert_almost_equal(herm.hermfit(x, x, [0, 1]), [0, .5])
+ # test fitting only even Legendre polynomials
+ x = np.linspace(-1, 1)
+ y = f2(x)
+ coef1 = herm.hermfit(x, y, 4)
+ assert_almost_equal(herm.hermval(x, coef1), y)
+ coef2 = herm.hermfit(x, y, [0, 2, 4])
+ assert_almost_equal(herm.hermval(x, coef2), y)
+ assert_almost_equal(coef1, coef2)
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, herm.hermcompanion, [])
+ assert_raises(ValueError, herm.hermcompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(herm.hermcompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(herm.hermcompanion([1, 2])[0, 0] == -.25)
+
+
+class TestGauss:
+
+ def test_100(self):
+ x, w = herm.hermgauss(100)
+
+ # test orthogonality. Note that the results need to be normalized,
+ # otherwise the huge values that can arise from fast growing
+ # functions like Laguerre can be very confusing.
+ v = herm.hermvander(x, 99)
+ vv = np.dot(v.T * w, v)
+ vd = 1/np.sqrt(vv.diagonal())
+ vv = vd[:, None] * vv * vd
+ assert_almost_equal(vv, np.eye(100))
+
+ # check that the integral of 1 is correct
+ tgt = np.sqrt(np.pi)
+ assert_almost_equal(w.sum(), tgt)
+
+
+class TestMisc:
+
+ def test_hermfromroots(self):
+ res = herm.hermfromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ pol = herm.hermfromroots(roots)
+ res = herm.hermval(roots, pol)
+ tgt = 0
+ assert_(len(pol) == i + 1)
+ assert_almost_equal(herm.herm2poly(pol)[-1], 1)
+ assert_almost_equal(res, tgt)
+
+ def test_hermroots(self):
+ assert_almost_equal(herm.hermroots([1]), [])
+ assert_almost_equal(herm.hermroots([1, 1]), [-.5])
+ for i in range(2, 5):
+ tgt = np.linspace(-1, 1, i)
+ res = herm.hermroots(herm.hermfromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermtrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, herm.hermtrim, coef, -1)
+
+ # Test results
+ assert_equal(herm.hermtrim(coef), coef[:-1])
+ assert_equal(herm.hermtrim(coef, 1), coef[:-3])
+ assert_equal(herm.hermtrim(coef, 2), [0])
+
+ def test_hermline(self):
+ assert_equal(herm.hermline(3, 4), [3, 2])
+
+ def test_herm2poly(self):
+ for i in range(10):
+ assert_almost_equal(herm.herm2poly([0]*i + [1]), Hlist[i])
+
+ def test_poly2herm(self):
+ for i in range(10):
+ assert_almost_equal(herm.poly2herm(Hlist[i]), [0]*i + [1])
+
+ def test_weight(self):
+ x = np.linspace(-5, 5, 11)
+ tgt = np.exp(-x**2)
+ res = herm.hermweight(x)
+ assert_almost_equal(res, tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite_e.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite_e.py
new file mode 100644
index 0000000000000000000000000000000000000000..2d262a3306222bd79f682b09763b0bd2b90ba8fe
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_hermite_e.py
@@ -0,0 +1,556 @@
+"""Tests for hermite_e module.
+
+"""
+from functools import reduce
+
+import numpy as np
+import numpy.polynomial.hermite_e as herme
+from numpy.polynomial.polynomial import polyval
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+He0 = np.array([1])
+He1 = np.array([0, 1])
+He2 = np.array([-1, 0, 1])
+He3 = np.array([0, -3, 0, 1])
+He4 = np.array([3, 0, -6, 0, 1])
+He5 = np.array([0, 15, 0, -10, 0, 1])
+He6 = np.array([-15, 0, 45, 0, -15, 0, 1])
+He7 = np.array([0, -105, 0, 105, 0, -21, 0, 1])
+He8 = np.array([105, 0, -420, 0, 210, 0, -28, 0, 1])
+He9 = np.array([0, 945, 0, -1260, 0, 378, 0, -36, 0, 1])
+
+Helist = [He0, He1, He2, He3, He4, He5, He6, He7, He8, He9]
+
+
+def trim(x):
+ return herme.hermetrim(x, tol=1e-6)
+
+
+class TestConstants:
+
+ def test_hermedomain(self):
+ assert_equal(herme.hermedomain, [-1, 1])
+
+ def test_hermezero(self):
+ assert_equal(herme.hermezero, [0])
+
+ def test_hermeone(self):
+ assert_equal(herme.hermeone, [1])
+
+ def test_hermex(self):
+ assert_equal(herme.hermex, [0, 1])
+
+
+class TestArithmetic:
+ x = np.linspace(-3, 3, 100)
+
+ def test_hermeadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = herme.hermeadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermesub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = herme.hermesub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermemulx(self):
+ assert_equal(herme.hermemulx([0]), [0])
+ assert_equal(herme.hermemulx([1]), [0, 1])
+ for i in range(1, 5):
+ ser = [0]*i + [1]
+ tgt = [0]*(i - 1) + [i, 0, 1]
+ assert_equal(herme.hermemulx(ser), tgt)
+
+ def test_hermemul(self):
+ # check values of result
+ for i in range(5):
+ pol1 = [0]*i + [1]
+ val1 = herme.hermeval(self.x, pol1)
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ pol2 = [0]*j + [1]
+ val2 = herme.hermeval(self.x, pol2)
+ pol3 = herme.hermemul(pol1, pol2)
+ val3 = herme.hermeval(self.x, pol3)
+ assert_(len(pol3) == i + j + 1, msg)
+ assert_almost_equal(val3, val1*val2, err_msg=msg)
+
+ def test_hermediv(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1]
+ cj = [0]*j + [1]
+ tgt = herme.hermeadd(ci, cj)
+ quo, rem = herme.hermediv(tgt, ci)
+ res = herme.hermeadd(herme.hermemul(quo, ci), rem)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_hermepow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(herme.hermemul, [c]*j, np.array([1]))
+ res = herme.hermepow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([4., 2., 3.])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = polyval(x, [1., 2., 3.])
+
+ def test_hermeval(self):
+ #check empty input
+ assert_equal(herme.hermeval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [polyval(x, c) for c in Helist]
+ for i in range(10):
+ msg = f"At i={i}"
+ tgt = y[i]
+ res = herme.hermeval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt, err_msg=msg)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(herme.hermeval(x, [1]).shape, dims)
+ assert_equal(herme.hermeval(x, [1, 0]).shape, dims)
+ assert_equal(herme.hermeval(x, [1, 0, 0]).shape, dims)
+
+ def test_hermeval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, herme.hermeval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = herme.hermeval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herme.hermeval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_hermeval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, herme.hermeval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = herme.hermeval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herme.hermeval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_hermegrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = herme.hermegrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herme.hermegrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_hermegrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = herme.hermegrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = herme.hermegrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_hermeint(self):
+ # check exceptions
+ assert_raises(TypeError, herme.hermeint, [0], .5)
+ assert_raises(ValueError, herme.hermeint, [0], -1)
+ assert_raises(ValueError, herme.hermeint, [0], 1, [0, 0])
+ assert_raises(ValueError, herme.hermeint, [0], lbnd=[0])
+ assert_raises(ValueError, herme.hermeint, [0], scl=[0])
+ assert_raises(TypeError, herme.hermeint, [0], axis=.5)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = herme.hermeint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ hermepol = herme.poly2herme(pol)
+ hermeint = herme.hermeint(hermepol, m=1, k=[i])
+ res = herme.herme2poly(hermeint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ hermepol = herme.poly2herme(pol)
+ hermeint = herme.hermeint(hermepol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(herme.hermeval(-1, hermeint), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ hermepol = herme.poly2herme(pol)
+ hermeint = herme.hermeint(hermepol, m=1, k=[i], scl=2)
+ res = herme.herme2poly(hermeint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herme.hermeint(tgt, m=1)
+ res = herme.hermeint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herme.hermeint(tgt, m=1, k=[k])
+ res = herme.hermeint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herme.hermeint(tgt, m=1, k=[k], lbnd=-1)
+ res = herme.hermeint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = herme.hermeint(tgt, m=1, k=[k], scl=2)
+ res = herme.hermeint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermeint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([herme.hermeint(c) for c in c2d.T]).T
+ res = herme.hermeint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herme.hermeint(c) for c in c2d])
+ res = herme.hermeint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herme.hermeint(c, k=3) for c in c2d])
+ res = herme.hermeint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestDerivative:
+
+ def test_hermeder(self):
+ # check exceptions
+ assert_raises(TypeError, herme.hermeder, [0], .5)
+ assert_raises(ValueError, herme.hermeder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = herme.hermeder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = herme.hermeder(herme.hermeint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = herme.hermeder(
+ herme.hermeint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermeder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([herme.hermeder(c) for c in c2d.T]).T
+ res = herme.hermeder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([herme.hermeder(c) for c in c2d])
+ res = herme.hermeder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_hermevander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = herme.hermevander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], herme.hermeval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = herme.hermevander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], herme.hermeval(x, coef))
+
+ def test_hermevander2d(self):
+ # also tests hermeval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = herme.hermevander2d(x1, x2, [1, 2])
+ tgt = herme.hermeval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = herme.hermevander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_hermevander3d(self):
+ # also tests hermeval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = herme.hermevander3d(x1, x2, x3, [1, 2, 3])
+ tgt = herme.hermeval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = herme.hermevander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+
+class TestFitting:
+
+ def test_hermefit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ def f2(x):
+ return x**4 + x**2 + 1
+
+ # Test exceptions
+ assert_raises(ValueError, herme.hermefit, [1], [1], -1)
+ assert_raises(TypeError, herme.hermefit, [[1]], [1], 0)
+ assert_raises(TypeError, herme.hermefit, [], [1], 0)
+ assert_raises(TypeError, herme.hermefit, [1], [[[1]]], 0)
+ assert_raises(TypeError, herme.hermefit, [1, 2], [1], 0)
+ assert_raises(TypeError, herme.hermefit, [1], [1, 2], 0)
+ assert_raises(TypeError, herme.hermefit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, herme.hermefit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, herme.hermefit, [1], [1], [-1,])
+ assert_raises(ValueError, herme.hermefit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, herme.hermefit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = herme.hermefit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(herme.hermeval(x, coef3), y)
+ coef3 = herme.hermefit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(herme.hermeval(x, coef3), y)
+ #
+ coef4 = herme.hermefit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herme.hermeval(x, coef4), y)
+ coef4 = herme.hermefit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herme.hermeval(x, coef4), y)
+ # check things still work if deg is not in strict increasing
+ coef4 = herme.hermefit(x, y, [2, 3, 4, 1, 0])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(herme.hermeval(x, coef4), y)
+ #
+ coef2d = herme.hermefit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = herme.hermefit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ y[0::2] = 0
+ wcoef3 = herme.hermefit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = herme.hermefit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = herme.hermefit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = herme.hermefit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(herme.hermefit(x, x, 1), [0, 1])
+ assert_almost_equal(herme.hermefit(x, x, [0, 1]), [0, 1])
+ # test fitting only even Legendre polynomials
+ x = np.linspace(-1, 1)
+ y = f2(x)
+ coef1 = herme.hermefit(x, y, 4)
+ assert_almost_equal(herme.hermeval(x, coef1), y)
+ coef2 = herme.hermefit(x, y, [0, 2, 4])
+ assert_almost_equal(herme.hermeval(x, coef2), y)
+ assert_almost_equal(coef1, coef2)
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, herme.hermecompanion, [])
+ assert_raises(ValueError, herme.hermecompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(herme.hermecompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(herme.hermecompanion([1, 2])[0, 0] == -.5)
+
+
+class TestGauss:
+
+ def test_100(self):
+ x, w = herme.hermegauss(100)
+
+ # test orthogonality. Note that the results need to be normalized,
+ # otherwise the huge values that can arise from fast growing
+ # functions like Laguerre can be very confusing.
+ v = herme.hermevander(x, 99)
+ vv = np.dot(v.T * w, v)
+ vd = 1/np.sqrt(vv.diagonal())
+ vv = vd[:, None] * vv * vd
+ assert_almost_equal(vv, np.eye(100))
+
+ # check that the integral of 1 is correct
+ tgt = np.sqrt(2*np.pi)
+ assert_almost_equal(w.sum(), tgt)
+
+
+class TestMisc:
+
+ def test_hermefromroots(self):
+ res = herme.hermefromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ pol = herme.hermefromroots(roots)
+ res = herme.hermeval(roots, pol)
+ tgt = 0
+ assert_(len(pol) == i + 1)
+ assert_almost_equal(herme.herme2poly(pol)[-1], 1)
+ assert_almost_equal(res, tgt)
+
+ def test_hermeroots(self):
+ assert_almost_equal(herme.hermeroots([1]), [])
+ assert_almost_equal(herme.hermeroots([1, 1]), [-1])
+ for i in range(2, 5):
+ tgt = np.linspace(-1, 1, i)
+ res = herme.hermeroots(herme.hermefromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_hermetrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, herme.hermetrim, coef, -1)
+
+ # Test results
+ assert_equal(herme.hermetrim(coef), coef[:-1])
+ assert_equal(herme.hermetrim(coef, 1), coef[:-3])
+ assert_equal(herme.hermetrim(coef, 2), [0])
+
+ def test_hermeline(self):
+ assert_equal(herme.hermeline(3, 4), [3, 4])
+
+ def test_herme2poly(self):
+ for i in range(10):
+ assert_almost_equal(herme.herme2poly([0]*i + [1]), Helist[i])
+
+ def test_poly2herme(self):
+ for i in range(10):
+ assert_almost_equal(herme.poly2herme(Helist[i]), [0]*i + [1])
+
+ def test_weight(self):
+ x = np.linspace(-5, 5, 11)
+ tgt = np.exp(-.5*x**2)
+ res = herme.hermeweight(x)
+ assert_almost_equal(res, tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_laguerre.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_laguerre.py
new file mode 100644
index 0000000000000000000000000000000000000000..49f7c7e115bec499a04f58c38d803d3e8be1247e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_laguerre.py
@@ -0,0 +1,537 @@
+"""Tests for laguerre module.
+
+"""
+from functools import reduce
+
+import numpy as np
+import numpy.polynomial.laguerre as lag
+from numpy.polynomial.polynomial import polyval
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+L0 = np.array([1])/1
+L1 = np.array([1, -1])/1
+L2 = np.array([2, -4, 1])/2
+L3 = np.array([6, -18, 9, -1])/6
+L4 = np.array([24, -96, 72, -16, 1])/24
+L5 = np.array([120, -600, 600, -200, 25, -1])/120
+L6 = np.array([720, -4320, 5400, -2400, 450, -36, 1])/720
+
+Llist = [L0, L1, L2, L3, L4, L5, L6]
+
+
+def trim(x):
+ return lag.lagtrim(x, tol=1e-6)
+
+
+class TestConstants:
+
+ def test_lagdomain(self):
+ assert_equal(lag.lagdomain, [0, 1])
+
+ def test_lagzero(self):
+ assert_equal(lag.lagzero, [0])
+
+ def test_lagone(self):
+ assert_equal(lag.lagone, [1])
+
+ def test_lagx(self):
+ assert_equal(lag.lagx, [1, -1])
+
+
+class TestArithmetic:
+ x = np.linspace(-3, 3, 100)
+
+ def test_lagadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = lag.lagadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_lagsub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = lag.lagsub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_lagmulx(self):
+ assert_equal(lag.lagmulx([0]), [0])
+ assert_equal(lag.lagmulx([1]), [1, -1])
+ for i in range(1, 5):
+ ser = [0]*i + [1]
+ tgt = [0]*(i - 1) + [-i, 2*i + 1, -(i + 1)]
+ assert_almost_equal(lag.lagmulx(ser), tgt)
+
+ def test_lagmul(self):
+ # check values of result
+ for i in range(5):
+ pol1 = [0]*i + [1]
+ val1 = lag.lagval(self.x, pol1)
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ pol2 = [0]*j + [1]
+ val2 = lag.lagval(self.x, pol2)
+ pol3 = lag.lagmul(pol1, pol2)
+ val3 = lag.lagval(self.x, pol3)
+ assert_(len(pol3) == i + j + 1, msg)
+ assert_almost_equal(val3, val1*val2, err_msg=msg)
+
+ def test_lagdiv(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1]
+ cj = [0]*j + [1]
+ tgt = lag.lagadd(ci, cj)
+ quo, rem = lag.lagdiv(tgt, ci)
+ res = lag.lagadd(lag.lagmul(quo, ci), rem)
+ assert_almost_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_lagpow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(lag.lagmul, [c]*j, np.array([1]))
+ res = lag.lagpow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([9., -14., 6.])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = polyval(x, [1., 2., 3.])
+
+ def test_lagval(self):
+ #check empty input
+ assert_equal(lag.lagval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [polyval(x, c) for c in Llist]
+ for i in range(7):
+ msg = f"At i={i}"
+ tgt = y[i]
+ res = lag.lagval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt, err_msg=msg)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(lag.lagval(x, [1]).shape, dims)
+ assert_equal(lag.lagval(x, [1, 0]).shape, dims)
+ assert_equal(lag.lagval(x, [1, 0, 0]).shape, dims)
+
+ def test_lagval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, lag.lagval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = lag.lagval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = lag.lagval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_lagval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, lag.lagval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = lag.lagval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = lag.lagval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_laggrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = lag.laggrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = lag.laggrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_laggrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = lag.laggrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = lag.laggrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_lagint(self):
+ # check exceptions
+ assert_raises(TypeError, lag.lagint, [0], .5)
+ assert_raises(ValueError, lag.lagint, [0], -1)
+ assert_raises(ValueError, lag.lagint, [0], 1, [0, 0])
+ assert_raises(ValueError, lag.lagint, [0], lbnd=[0])
+ assert_raises(ValueError, lag.lagint, [0], scl=[0])
+ assert_raises(TypeError, lag.lagint, [0], axis=.5)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = lag.lagint([0], m=i, k=k)
+ assert_almost_equal(res, [1, -1])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ lagpol = lag.poly2lag(pol)
+ lagint = lag.lagint(lagpol, m=1, k=[i])
+ res = lag.lag2poly(lagint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ lagpol = lag.poly2lag(pol)
+ lagint = lag.lagint(lagpol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(lag.lagval(-1, lagint), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ lagpol = lag.poly2lag(pol)
+ lagint = lag.lagint(lagpol, m=1, k=[i], scl=2)
+ res = lag.lag2poly(lagint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = lag.lagint(tgt, m=1)
+ res = lag.lagint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = lag.lagint(tgt, m=1, k=[k])
+ res = lag.lagint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = lag.lagint(tgt, m=1, k=[k], lbnd=-1)
+ res = lag.lagint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = lag.lagint(tgt, m=1, k=[k], scl=2)
+ res = lag.lagint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_lagint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([lag.lagint(c) for c in c2d.T]).T
+ res = lag.lagint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([lag.lagint(c) for c in c2d])
+ res = lag.lagint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([lag.lagint(c, k=3) for c in c2d])
+ res = lag.lagint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestDerivative:
+
+ def test_lagder(self):
+ # check exceptions
+ assert_raises(TypeError, lag.lagder, [0], .5)
+ assert_raises(ValueError, lag.lagder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = lag.lagder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = lag.lagder(lag.lagint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = lag.lagder(lag.lagint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_lagder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([lag.lagder(c) for c in c2d.T]).T
+ res = lag.lagder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([lag.lagder(c) for c in c2d])
+ res = lag.lagder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_lagvander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = lag.lagvander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], lag.lagval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = lag.lagvander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], lag.lagval(x, coef))
+
+ def test_lagvander2d(self):
+ # also tests lagval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = lag.lagvander2d(x1, x2, [1, 2])
+ tgt = lag.lagval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = lag.lagvander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_lagvander3d(self):
+ # also tests lagval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = lag.lagvander3d(x1, x2, x3, [1, 2, 3])
+ tgt = lag.lagval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = lag.lagvander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+
+class TestFitting:
+
+ def test_lagfit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ # Test exceptions
+ assert_raises(ValueError, lag.lagfit, [1], [1], -1)
+ assert_raises(TypeError, lag.lagfit, [[1]], [1], 0)
+ assert_raises(TypeError, lag.lagfit, [], [1], 0)
+ assert_raises(TypeError, lag.lagfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, lag.lagfit, [1, 2], [1], 0)
+ assert_raises(TypeError, lag.lagfit, [1], [1, 2], 0)
+ assert_raises(TypeError, lag.lagfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, lag.lagfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, lag.lagfit, [1], [1], [-1,])
+ assert_raises(ValueError, lag.lagfit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, lag.lagfit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = lag.lagfit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(lag.lagval(x, coef3), y)
+ coef3 = lag.lagfit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(lag.lagval(x, coef3), y)
+ #
+ coef4 = lag.lagfit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(lag.lagval(x, coef4), y)
+ coef4 = lag.lagfit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(lag.lagval(x, coef4), y)
+ #
+ coef2d = lag.lagfit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = lag.lagfit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ y[0::2] = 0
+ wcoef3 = lag.lagfit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = lag.lagfit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = lag.lagfit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = lag.lagfit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(lag.lagfit(x, x, 1), [1, -1])
+ assert_almost_equal(lag.lagfit(x, x, [0, 1]), [1, -1])
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, lag.lagcompanion, [])
+ assert_raises(ValueError, lag.lagcompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(lag.lagcompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(lag.lagcompanion([1, 2])[0, 0] == 1.5)
+
+
+class TestGauss:
+
+ def test_100(self):
+ x, w = lag.laggauss(100)
+
+ # test orthogonality. Note that the results need to be normalized,
+ # otherwise the huge values that can arise from fast growing
+ # functions like Laguerre can be very confusing.
+ v = lag.lagvander(x, 99)
+ vv = np.dot(v.T * w, v)
+ vd = 1/np.sqrt(vv.diagonal())
+ vv = vd[:, None] * vv * vd
+ assert_almost_equal(vv, np.eye(100))
+
+ # check that the integral of 1 is correct
+ tgt = 1.0
+ assert_almost_equal(w.sum(), tgt)
+
+
+class TestMisc:
+
+ def test_lagfromroots(self):
+ res = lag.lagfromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ pol = lag.lagfromroots(roots)
+ res = lag.lagval(roots, pol)
+ tgt = 0
+ assert_(len(pol) == i + 1)
+ assert_almost_equal(lag.lag2poly(pol)[-1], 1)
+ assert_almost_equal(res, tgt)
+
+ def test_lagroots(self):
+ assert_almost_equal(lag.lagroots([1]), [])
+ assert_almost_equal(lag.lagroots([0, 1]), [1])
+ for i in range(2, 5):
+ tgt = np.linspace(0, 3, i)
+ res = lag.lagroots(lag.lagfromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_lagtrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, lag.lagtrim, coef, -1)
+
+ # Test results
+ assert_equal(lag.lagtrim(coef), coef[:-1])
+ assert_equal(lag.lagtrim(coef, 1), coef[:-3])
+ assert_equal(lag.lagtrim(coef, 2), [0])
+
+ def test_lagline(self):
+ assert_equal(lag.lagline(3, 4), [7, -4])
+
+ def test_lag2poly(self):
+ for i in range(7):
+ assert_almost_equal(lag.lag2poly([0]*i + [1]), Llist[i])
+
+ def test_poly2lag(self):
+ for i in range(7):
+ assert_almost_equal(lag.poly2lag(Llist[i]), [0]*i + [1])
+
+ def test_weight(self):
+ x = np.linspace(0, 10, 11)
+ tgt = np.exp(-x)
+ res = lag.lagweight(x)
+ assert_almost_equal(res, tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_legendre.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_legendre.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f1c9733a91121e208d7037f8e93b27f0cdbf9bb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_legendre.py
@@ -0,0 +1,568 @@
+"""Tests for legendre module.
+
+"""
+from functools import reduce
+
+import numpy as np
+import numpy.polynomial.legendre as leg
+from numpy.polynomial.polynomial import polyval
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+L0 = np.array([1])
+L1 = np.array([0, 1])
+L2 = np.array([-1, 0, 3])/2
+L3 = np.array([0, -3, 0, 5])/2
+L4 = np.array([3, 0, -30, 0, 35])/8
+L5 = np.array([0, 15, 0, -70, 0, 63])/8
+L6 = np.array([-5, 0, 105, 0, -315, 0, 231])/16
+L7 = np.array([0, -35, 0, 315, 0, -693, 0, 429])/16
+L8 = np.array([35, 0, -1260, 0, 6930, 0, -12012, 0, 6435])/128
+L9 = np.array([0, 315, 0, -4620, 0, 18018, 0, -25740, 0, 12155])/128
+
+Llist = [L0, L1, L2, L3, L4, L5, L6, L7, L8, L9]
+
+
+def trim(x):
+ return leg.legtrim(x, tol=1e-6)
+
+
+class TestConstants:
+
+ def test_legdomain(self):
+ assert_equal(leg.legdomain, [-1, 1])
+
+ def test_legzero(self):
+ assert_equal(leg.legzero, [0])
+
+ def test_legone(self):
+ assert_equal(leg.legone, [1])
+
+ def test_legx(self):
+ assert_equal(leg.legx, [0, 1])
+
+
+class TestArithmetic:
+ x = np.linspace(-1, 1, 100)
+
+ def test_legadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = leg.legadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_legsub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = leg.legsub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_legmulx(self):
+ assert_equal(leg.legmulx([0]), [0])
+ assert_equal(leg.legmulx([1]), [0, 1])
+ for i in range(1, 5):
+ tmp = 2*i + 1
+ ser = [0]*i + [1]
+ tgt = [0]*(i - 1) + [i/tmp, 0, (i + 1)/tmp]
+ assert_equal(leg.legmulx(ser), tgt)
+
+ def test_legmul(self):
+ # check values of result
+ for i in range(5):
+ pol1 = [0]*i + [1]
+ val1 = leg.legval(self.x, pol1)
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ pol2 = [0]*j + [1]
+ val2 = leg.legval(self.x, pol2)
+ pol3 = leg.legmul(pol1, pol2)
+ val3 = leg.legval(self.x, pol3)
+ assert_(len(pol3) == i + j + 1, msg)
+ assert_almost_equal(val3, val1*val2, err_msg=msg)
+
+ def test_legdiv(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1]
+ cj = [0]*j + [1]
+ tgt = leg.legadd(ci, cj)
+ quo, rem = leg.legdiv(tgt, ci)
+ res = leg.legadd(leg.legmul(quo, ci), rem)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_legpow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(leg.legmul, [c]*j, np.array([1]))
+ res = leg.legpow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([2., 2., 2.])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = polyval(x, [1., 2., 3.])
+
+ def test_legval(self):
+ #check empty input
+ assert_equal(leg.legval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [polyval(x, c) for c in Llist]
+ for i in range(10):
+ msg = f"At i={i}"
+ tgt = y[i]
+ res = leg.legval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt, err_msg=msg)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(leg.legval(x, [1]).shape, dims)
+ assert_equal(leg.legval(x, [1, 0]).shape, dims)
+ assert_equal(leg.legval(x, [1, 0, 0]).shape, dims)
+
+ def test_legval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, leg.legval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = leg.legval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = leg.legval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_legval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises(ValueError, leg.legval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = leg.legval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = leg.legval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_leggrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = leg.leggrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = leg.leggrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_leggrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = leg.leggrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = leg.leggrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_legint(self):
+ # check exceptions
+ assert_raises(TypeError, leg.legint, [0], .5)
+ assert_raises(ValueError, leg.legint, [0], -1)
+ assert_raises(ValueError, leg.legint, [0], 1, [0, 0])
+ assert_raises(ValueError, leg.legint, [0], lbnd=[0])
+ assert_raises(ValueError, leg.legint, [0], scl=[0])
+ assert_raises(TypeError, leg.legint, [0], axis=.5)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = leg.legint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ legpol = leg.poly2leg(pol)
+ legint = leg.legint(legpol, m=1, k=[i])
+ res = leg.leg2poly(legint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ legpol = leg.poly2leg(pol)
+ legint = leg.legint(legpol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(leg.legval(-1, legint), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ legpol = leg.poly2leg(pol)
+ legint = leg.legint(legpol, m=1, k=[i], scl=2)
+ res = leg.leg2poly(legint)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = leg.legint(tgt, m=1)
+ res = leg.legint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = leg.legint(tgt, m=1, k=[k])
+ res = leg.legint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = leg.legint(tgt, m=1, k=[k], lbnd=-1)
+ res = leg.legint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = leg.legint(tgt, m=1, k=[k], scl=2)
+ res = leg.legint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_legint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([leg.legint(c) for c in c2d.T]).T
+ res = leg.legint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([leg.legint(c) for c in c2d])
+ res = leg.legint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([leg.legint(c, k=3) for c in c2d])
+ res = leg.legint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+ def test_legint_zerointord(self):
+ assert_equal(leg.legint((1, 2, 3), 0), (1, 2, 3))
+
+
+class TestDerivative:
+
+ def test_legder(self):
+ # check exceptions
+ assert_raises(TypeError, leg.legder, [0], .5)
+ assert_raises(ValueError, leg.legder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = leg.legder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = leg.legder(leg.legint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = leg.legder(leg.legint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_legder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([leg.legder(c) for c in c2d.T]).T
+ res = leg.legder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([leg.legder(c) for c in c2d])
+ res = leg.legder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ def test_legder_orderhigherthancoeff(self):
+ c = (1, 2, 3, 4)
+ assert_equal(leg.legder(c, 4), [0])
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_legvander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = leg.legvander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], leg.legval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = leg.legvander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], leg.legval(x, coef))
+
+ def test_legvander2d(self):
+ # also tests polyval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = leg.legvander2d(x1, x2, [1, 2])
+ tgt = leg.legval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = leg.legvander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_legvander3d(self):
+ # also tests polyval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = leg.legvander3d(x1, x2, x3, [1, 2, 3])
+ tgt = leg.legval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = leg.legvander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+ def test_legvander_negdeg(self):
+ assert_raises(ValueError, leg.legvander, (1, 2, 3), -1)
+
+
+class TestFitting:
+
+ def test_legfit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ def f2(x):
+ return x**4 + x**2 + 1
+
+ # Test exceptions
+ assert_raises(ValueError, leg.legfit, [1], [1], -1)
+ assert_raises(TypeError, leg.legfit, [[1]], [1], 0)
+ assert_raises(TypeError, leg.legfit, [], [1], 0)
+ assert_raises(TypeError, leg.legfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, leg.legfit, [1, 2], [1], 0)
+ assert_raises(TypeError, leg.legfit, [1], [1, 2], 0)
+ assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, leg.legfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, leg.legfit, [1], [1], [-1,])
+ assert_raises(ValueError, leg.legfit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, leg.legfit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = leg.legfit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(leg.legval(x, coef3), y)
+ coef3 = leg.legfit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(leg.legval(x, coef3), y)
+ #
+ coef4 = leg.legfit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(leg.legval(x, coef4), y)
+ coef4 = leg.legfit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(leg.legval(x, coef4), y)
+ # check things still work if deg is not in strict increasing
+ coef4 = leg.legfit(x, y, [2, 3, 4, 1, 0])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(leg.legval(x, coef4), y)
+ #
+ coef2d = leg.legfit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = leg.legfit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ y[0::2] = 0
+ wcoef3 = leg.legfit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = leg.legfit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = leg.legfit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = leg.legfit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(leg.legfit(x, x, 1), [0, 1])
+ assert_almost_equal(leg.legfit(x, x, [0, 1]), [0, 1])
+ # test fitting only even Legendre polynomials
+ x = np.linspace(-1, 1)
+ y = f2(x)
+ coef1 = leg.legfit(x, y, 4)
+ assert_almost_equal(leg.legval(x, coef1), y)
+ coef2 = leg.legfit(x, y, [0, 2, 4])
+ assert_almost_equal(leg.legval(x, coef2), y)
+ assert_almost_equal(coef1, coef2)
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, leg.legcompanion, [])
+ assert_raises(ValueError, leg.legcompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(leg.legcompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(leg.legcompanion([1, 2])[0, 0] == -.5)
+
+
+class TestGauss:
+
+ def test_100(self):
+ x, w = leg.leggauss(100)
+
+ # test orthogonality. Note that the results need to be normalized,
+ # otherwise the huge values that can arise from fast growing
+ # functions like Laguerre can be very confusing.
+ v = leg.legvander(x, 99)
+ vv = np.dot(v.T * w, v)
+ vd = 1/np.sqrt(vv.diagonal())
+ vv = vd[:, None] * vv * vd
+ assert_almost_equal(vv, np.eye(100))
+
+ # check that the integral of 1 is correct
+ tgt = 2.0
+ assert_almost_equal(w.sum(), tgt)
+
+
+class TestMisc:
+
+ def test_legfromroots(self):
+ res = leg.legfromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ pol = leg.legfromroots(roots)
+ res = leg.legval(roots, pol)
+ tgt = 0
+ assert_(len(pol) == i + 1)
+ assert_almost_equal(leg.leg2poly(pol)[-1], 1)
+ assert_almost_equal(res, tgt)
+
+ def test_legroots(self):
+ assert_almost_equal(leg.legroots([1]), [])
+ assert_almost_equal(leg.legroots([1, 2]), [-.5])
+ for i in range(2, 5):
+ tgt = np.linspace(-1, 1, i)
+ res = leg.legroots(leg.legfromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_legtrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, leg.legtrim, coef, -1)
+
+ # Test results
+ assert_equal(leg.legtrim(coef), coef[:-1])
+ assert_equal(leg.legtrim(coef, 1), coef[:-3])
+ assert_equal(leg.legtrim(coef, 2), [0])
+
+ def test_legline(self):
+ assert_equal(leg.legline(3, 4), [3, 4])
+
+ def test_legline_zeroscl(self):
+ assert_equal(leg.legline(3, 0), [3])
+
+ def test_leg2poly(self):
+ for i in range(10):
+ assert_almost_equal(leg.leg2poly([0]*i + [1]), Llist[i])
+
+ def test_poly2leg(self):
+ for i in range(10):
+ assert_almost_equal(leg.poly2leg(Llist[i]), [0]*i + [1])
+
+ def test_weight(self):
+ x = np.linspace(-1, 1, 11)
+ tgt = 1.
+ res = leg.legweight(x)
+ assert_almost_equal(res, tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polynomial.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polynomial.py
new file mode 100644
index 0000000000000000000000000000000000000000..d36b07dbd9536b4c1bd1f3129ae7ccaa2a320ed3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polynomial.py
@@ -0,0 +1,647 @@
+"""Tests for polynomial module.
+
+"""
+from functools import reduce
+from fractions import Fraction
+import numpy as np
+import numpy.polynomial.polynomial as poly
+import numpy.polynomial.polyutils as pu
+import pickle
+from copy import deepcopy
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ assert_array_equal, assert_raises_regex, assert_warns)
+
+
+def trim(x):
+ return poly.polytrim(x, tol=1e-6)
+
+T0 = [1]
+T1 = [0, 1]
+T2 = [-1, 0, 2]
+T3 = [0, -3, 0, 4]
+T4 = [1, 0, -8, 0, 8]
+T5 = [0, 5, 0, -20, 0, 16]
+T6 = [-1, 0, 18, 0, -48, 0, 32]
+T7 = [0, -7, 0, 56, 0, -112, 0, 64]
+T8 = [1, 0, -32, 0, 160, 0, -256, 0, 128]
+T9 = [0, 9, 0, -120, 0, 432, 0, -576, 0, 256]
+
+Tlist = [T0, T1, T2, T3, T4, T5, T6, T7, T8, T9]
+
+
+class TestConstants:
+
+ def test_polydomain(self):
+ assert_equal(poly.polydomain, [-1, 1])
+
+ def test_polyzero(self):
+ assert_equal(poly.polyzero, [0])
+
+ def test_polyone(self):
+ assert_equal(poly.polyone, [1])
+
+ def test_polyx(self):
+ assert_equal(poly.polyx, [0, 1])
+
+ def test_copy(self):
+ x = poly.Polynomial([1, 2, 3])
+ y = deepcopy(x)
+ assert_equal(x, y)
+
+ def test_pickle(self):
+ x = poly.Polynomial([1, 2, 3])
+ y = pickle.loads(pickle.dumps(x))
+ assert_equal(x, y)
+
+class TestArithmetic:
+
+ def test_polyadd(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] += 1
+ res = poly.polyadd([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_polysub(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(max(i, j) + 1)
+ tgt[i] += 1
+ tgt[j] -= 1
+ res = poly.polysub([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_polymulx(self):
+ assert_equal(poly.polymulx([0]), [0])
+ assert_equal(poly.polymulx([1]), [0, 1])
+ for i in range(1, 5):
+ ser = [0]*i + [1]
+ tgt = [0]*(i + 1) + [1]
+ assert_equal(poly.polymulx(ser), tgt)
+
+ def test_polymul(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ tgt = np.zeros(i + j + 1)
+ tgt[i + j] += 1
+ res = poly.polymul([0]*i + [1], [0]*j + [1])
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+ def test_polydiv(self):
+ # check zero division
+ assert_raises(ZeroDivisionError, poly.polydiv, [1], [0])
+
+ # check scalar division
+ quo, rem = poly.polydiv([2], [2])
+ assert_equal((quo, rem), (1, 0))
+ quo, rem = poly.polydiv([2, 2], [2])
+ assert_equal((quo, rem), ((1, 1), 0))
+
+ # check rest.
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ ci = [0]*i + [1, 2]
+ cj = [0]*j + [1, 2]
+ tgt = poly.polyadd(ci, cj)
+ quo, rem = poly.polydiv(tgt, ci)
+ res = poly.polyadd(poly.polymul(quo, ci), rem)
+ assert_equal(res, tgt, err_msg=msg)
+
+ def test_polypow(self):
+ for i in range(5):
+ for j in range(5):
+ msg = f"At i={i}, j={j}"
+ c = np.arange(i + 1)
+ tgt = reduce(poly.polymul, [c]*j, np.array([1]))
+ res = poly.polypow(c, j)
+ assert_equal(trim(res), trim(tgt), err_msg=msg)
+
+class TestFraction:
+
+ def test_Fraction(self):
+ # assert we can use Polynomials with coefficients of object dtype
+ f = Fraction(2, 3)
+ one = Fraction(1, 1)
+ zero = Fraction(0, 1)
+ p = poly.Polynomial([f, f], domain=[zero, one], window=[zero, one])
+
+ x = 2 * p + p ** 2
+ assert_equal(x.coef, np.array([Fraction(16, 9), Fraction(20, 9),
+ Fraction(4, 9)], dtype=object))
+ assert_equal(p.domain, [zero, one])
+ assert_equal(p.coef.dtype, np.dtypes.ObjectDType())
+ assert_(isinstance(p(f), Fraction))
+ assert_equal(p(f), Fraction(10, 9))
+ p_deriv = poly.Polynomial([Fraction(2, 3)], domain=[zero, one],
+ window=[zero, one])
+ assert_equal(p.deriv(), p_deriv)
+
+class TestEvaluation:
+ # coefficients of 1 + 2*x + 3*x**2
+ c1d = np.array([1., 2., 3.])
+ c2d = np.einsum('i,j->ij', c1d, c1d)
+ c3d = np.einsum('i,j,k->ijk', c1d, c1d, c1d)
+
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+ y = poly.polyval(x, [1., 2., 3.])
+
+ def test_polyval(self):
+ #check empty input
+ assert_equal(poly.polyval([], [1]).size, 0)
+
+ #check normal input)
+ x = np.linspace(-1, 1)
+ y = [x**i for i in range(5)]
+ for i in range(5):
+ tgt = y[i]
+ res = poly.polyval(x, [0]*i + [1])
+ assert_almost_equal(res, tgt)
+ tgt = x*(x**2 - 1)
+ res = poly.polyval(x, [0, -1, 0, 1])
+ assert_almost_equal(res, tgt)
+
+ #check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(poly.polyval(x, [1]).shape, dims)
+ assert_equal(poly.polyval(x, [1, 0]).shape, dims)
+ assert_equal(poly.polyval(x, [1, 0, 0]).shape, dims)
+
+ #check masked arrays are processed correctly
+ mask = [False, True, False]
+ mx = np.ma.array([1, 2, 3], mask=mask)
+ res = np.polyval([7, 5, 3], mx)
+ assert_array_equal(res.mask, mask)
+
+ #check subtypes of ndarray are preserved
+ class C(np.ndarray):
+ pass
+
+ cx = np.array([1, 2, 3]).view(C)
+ assert_equal(type(np.polyval([2, 3, 4], cx)), C)
+
+ def test_polyvalfromroots(self):
+ # check exception for broadcasting x values over root array with
+ # too few dimensions
+ assert_raises(ValueError, poly.polyvalfromroots,
+ [1], [1], tensor=False)
+
+ # check empty input
+ assert_equal(poly.polyvalfromroots([], [1]).size, 0)
+ assert_(poly.polyvalfromroots([], [1]).shape == (0,))
+
+ # check empty input + multidimensional roots
+ assert_equal(poly.polyvalfromroots([], [[1] * 5]).size, 0)
+ assert_(poly.polyvalfromroots([], [[1] * 5]).shape == (5, 0))
+
+ # check scalar input
+ assert_equal(poly.polyvalfromroots(1, 1), 0)
+ assert_(poly.polyvalfromroots(1, np.ones((3, 3))).shape == (3,))
+
+ # check normal input)
+ x = np.linspace(-1, 1)
+ y = [x**i for i in range(5)]
+ for i in range(1, 5):
+ tgt = y[i]
+ res = poly.polyvalfromroots(x, [0]*i)
+ assert_almost_equal(res, tgt)
+ tgt = x*(x - 1)*(x + 1)
+ res = poly.polyvalfromroots(x, [-1, 0, 1])
+ assert_almost_equal(res, tgt)
+
+ # check that shape is preserved
+ for i in range(3):
+ dims = [2]*i
+ x = np.zeros(dims)
+ assert_equal(poly.polyvalfromroots(x, [1]).shape, dims)
+ assert_equal(poly.polyvalfromroots(x, [1, 0]).shape, dims)
+ assert_equal(poly.polyvalfromroots(x, [1, 0, 0]).shape, dims)
+
+ # check compatibility with factorization
+ ptest = [15, 2, -16, -2, 1]
+ r = poly.polyroots(ptest)
+ x = np.linspace(-1, 1)
+ assert_almost_equal(poly.polyval(x, ptest),
+ poly.polyvalfromroots(x, r))
+
+ # check multidimensional arrays of roots and values
+ # check tensor=False
+ rshape = (3, 5)
+ x = np.arange(-3, 2)
+ r = np.random.randint(-5, 5, size=rshape)
+ res = poly.polyvalfromroots(x, r, tensor=False)
+ tgt = np.empty(r.shape[1:])
+ for ii in range(tgt.size):
+ tgt[ii] = poly.polyvalfromroots(x[ii], r[:, ii])
+ assert_equal(res, tgt)
+
+ # check tensor=True
+ x = np.vstack([x, 2*x])
+ res = poly.polyvalfromroots(x, r, tensor=True)
+ tgt = np.empty(r.shape[1:] + x.shape)
+ for ii in range(r.shape[1]):
+ for jj in range(x.shape[0]):
+ tgt[ii, jj, :] = poly.polyvalfromroots(x[jj], r[:, ii])
+ assert_equal(res, tgt)
+
+ def test_polyval2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises_regex(ValueError, 'incompatible',
+ poly.polyval2d, x1, x2[:2], self.c2d)
+
+ #test values
+ tgt = y1*y2
+ res = poly.polyval2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = poly.polyval2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3))
+
+ def test_polyval3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test exceptions
+ assert_raises_regex(ValueError, 'incompatible',
+ poly.polyval3d, x1, x2, x3[:2], self.c3d)
+
+ #test values
+ tgt = y1*y2*y3
+ res = poly.polyval3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = poly.polyval3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3))
+
+ def test_polygrid2d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j->ij', y1, y2)
+ res = poly.polygrid2d(x1, x2, self.c2d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = poly.polygrid2d(z, z, self.c2d)
+ assert_(res.shape == (2, 3)*2)
+
+ def test_polygrid3d(self):
+ x1, x2, x3 = self.x
+ y1, y2, y3 = self.y
+
+ #test values
+ tgt = np.einsum('i,j,k->ijk', y1, y2, y3)
+ res = poly.polygrid3d(x1, x2, x3, self.c3d)
+ assert_almost_equal(res, tgt)
+
+ #test shape
+ z = np.ones((2, 3))
+ res = poly.polygrid3d(z, z, z, self.c3d)
+ assert_(res.shape == (2, 3)*3)
+
+
+class TestIntegral:
+
+ def test_polyint(self):
+ # check exceptions
+ assert_raises(TypeError, poly.polyint, [0], .5)
+ assert_raises(ValueError, poly.polyint, [0], -1)
+ assert_raises(ValueError, poly.polyint, [0], 1, [0, 0])
+ assert_raises(ValueError, poly.polyint, [0], lbnd=[0])
+ assert_raises(ValueError, poly.polyint, [0], scl=[0])
+ assert_raises(TypeError, poly.polyint, [0], axis=.5)
+ assert_raises(TypeError, poly.polyint, [1, 1], 1.)
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = poly.polyint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
+
+ # check single integration with integration constant
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [1/scl]
+ res = poly.polyint(pol, m=1, k=[i])
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check single integration with integration constant and lbnd
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ res = poly.polyint(pol, m=1, k=[i], lbnd=-1)
+ assert_almost_equal(poly.polyval(-1, res), i)
+
+ # check single integration with integration constant and scaling
+ for i in range(5):
+ scl = i + 1
+ pol = [0]*i + [1]
+ tgt = [i] + [0]*i + [2/scl]
+ res = poly.polyint(pol, m=1, k=[i], scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with default k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = poly.polyint(tgt, m=1)
+ res = poly.polyint(pol, m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with defined k
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = poly.polyint(tgt, m=1, k=[k])
+ res = poly.polyint(pol, m=j, k=list(range(j)))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with lbnd
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = poly.polyint(tgt, m=1, k=[k], lbnd=-1)
+ res = poly.polyint(pol, m=j, k=list(range(j)), lbnd=-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check multiple integrations with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ pol = [0]*i + [1]
+ tgt = pol[:]
+ for k in range(j):
+ tgt = poly.polyint(tgt, m=1, k=[k], scl=2)
+ res = poly.polyint(pol, m=j, k=list(range(j)), scl=2)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_polyint_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([poly.polyint(c) for c in c2d.T]).T
+ res = poly.polyint(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([poly.polyint(c) for c in c2d])
+ res = poly.polyint(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([poly.polyint(c, k=3) for c in c2d])
+ res = poly.polyint(c2d, k=3, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestDerivative:
+
+ def test_polyder(self):
+ # check exceptions
+ assert_raises(TypeError, poly.polyder, [0], .5)
+ assert_raises(ValueError, poly.polyder, [0], -1)
+
+ # check that zeroth derivative does nothing
+ for i in range(5):
+ tgt = [0]*i + [1]
+ res = poly.polyder(tgt, m=0)
+ assert_equal(trim(res), trim(tgt))
+
+ # check that derivation is the inverse of integration
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = poly.polyder(poly.polyint(tgt, m=j), m=j)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ # check derivation with scaling
+ for i in range(5):
+ for j in range(2, 5):
+ tgt = [0]*i + [1]
+ res = poly.polyder(poly.polyint(tgt, m=j, scl=2), m=j, scl=.5)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_polyder_axis(self):
+ # check that axis keyword works
+ c2d = np.random.random((3, 4))
+
+ tgt = np.vstack([poly.polyder(c) for c in c2d.T]).T
+ res = poly.polyder(c2d, axis=0)
+ assert_almost_equal(res, tgt)
+
+ tgt = np.vstack([poly.polyder(c) for c in c2d])
+ res = poly.polyder(c2d, axis=1)
+ assert_almost_equal(res, tgt)
+
+
+class TestVander:
+ # some random values in [-1, 1)
+ x = np.random.random((3, 5))*2 - 1
+
+ def test_polyvander(self):
+ # check for 1d x
+ x = np.arange(3)
+ v = poly.polyvander(x, 3)
+ assert_(v.shape == (3, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], poly.polyval(x, coef))
+
+ # check for 2d x
+ x = np.array([[1, 2], [3, 4], [5, 6]])
+ v = poly.polyvander(x, 3)
+ assert_(v.shape == (3, 2, 4))
+ for i in range(4):
+ coef = [0]*i + [1]
+ assert_almost_equal(v[..., i], poly.polyval(x, coef))
+
+ def test_polyvander2d(self):
+ # also tests polyval2d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3))
+ van = poly.polyvander2d(x1, x2, [1, 2])
+ tgt = poly.polyval2d(x1, x2, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = poly.polyvander2d([x1], [x2], [1, 2])
+ assert_(van.shape == (1, 5, 6))
+
+ def test_polyvander3d(self):
+ # also tests polyval3d for non-square coefficient array
+ x1, x2, x3 = self.x
+ c = np.random.random((2, 3, 4))
+ van = poly.polyvander3d(x1, x2, x3, [1, 2, 3])
+ tgt = poly.polyval3d(x1, x2, x3, c)
+ res = np.dot(van, c.flat)
+ assert_almost_equal(res, tgt)
+
+ # check shape
+ van = poly.polyvander3d([x1], [x2], [x3], [1, 2, 3])
+ assert_(van.shape == (1, 5, 24))
+
+ def test_polyvandernegdeg(self):
+ x = np.arange(3)
+ assert_raises(ValueError, poly.polyvander, x, -1)
+
+
+class TestCompanion:
+
+ def test_raises(self):
+ assert_raises(ValueError, poly.polycompanion, [])
+ assert_raises(ValueError, poly.polycompanion, [1])
+
+ def test_dimensions(self):
+ for i in range(1, 5):
+ coef = [0]*i + [1]
+ assert_(poly.polycompanion(coef).shape == (i, i))
+
+ def test_linear_root(self):
+ assert_(poly.polycompanion([1, 2])[0, 0] == -.5)
+
+
+class TestMisc:
+
+ def test_polyfromroots(self):
+ res = poly.polyfromroots([])
+ assert_almost_equal(trim(res), [1])
+ for i in range(1, 5):
+ roots = np.cos(np.linspace(-np.pi, 0, 2*i + 1)[1::2])
+ tgt = Tlist[i]
+ res = poly.polyfromroots(roots)*2**(i-1)
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_polyroots(self):
+ assert_almost_equal(poly.polyroots([1]), [])
+ assert_almost_equal(poly.polyroots([1, 2]), [-.5])
+ for i in range(2, 5):
+ tgt = np.linspace(-1, 1, i)
+ res = poly.polyroots(poly.polyfromroots(tgt))
+ assert_almost_equal(trim(res), trim(tgt))
+
+ def test_polyfit(self):
+ def f(x):
+ return x*(x - 1)*(x - 2)
+
+ def f2(x):
+ return x**4 + x**2 + 1
+
+ # Test exceptions
+ assert_raises(ValueError, poly.polyfit, [1], [1], -1)
+ assert_raises(TypeError, poly.polyfit, [[1]], [1], 0)
+ assert_raises(TypeError, poly.polyfit, [], [1], 0)
+ assert_raises(TypeError, poly.polyfit, [1], [[[1]]], 0)
+ assert_raises(TypeError, poly.polyfit, [1, 2], [1], 0)
+ assert_raises(TypeError, poly.polyfit, [1], [1, 2], 0)
+ assert_raises(TypeError, poly.polyfit, [1], [1], 0, w=[[1]])
+ assert_raises(TypeError, poly.polyfit, [1], [1], 0, w=[1, 1])
+ assert_raises(ValueError, poly.polyfit, [1], [1], [-1,])
+ assert_raises(ValueError, poly.polyfit, [1], [1], [2, -1, 6])
+ assert_raises(TypeError, poly.polyfit, [1], [1], [])
+
+ # Test fit
+ x = np.linspace(0, 2)
+ y = f(x)
+ #
+ coef3 = poly.polyfit(x, y, 3)
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(poly.polyval(x, coef3), y)
+ coef3 = poly.polyfit(x, y, [0, 1, 2, 3])
+ assert_equal(len(coef3), 4)
+ assert_almost_equal(poly.polyval(x, coef3), y)
+ #
+ coef4 = poly.polyfit(x, y, 4)
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(poly.polyval(x, coef4), y)
+ coef4 = poly.polyfit(x, y, [0, 1, 2, 3, 4])
+ assert_equal(len(coef4), 5)
+ assert_almost_equal(poly.polyval(x, coef4), y)
+ #
+ coef2d = poly.polyfit(x, np.array([y, y]).T, 3)
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ coef2d = poly.polyfit(x, np.array([y, y]).T, [0, 1, 2, 3])
+ assert_almost_equal(coef2d, np.array([coef3, coef3]).T)
+ # test weighting
+ w = np.zeros_like(x)
+ yw = y.copy()
+ w[1::2] = 1
+ yw[0::2] = 0
+ wcoef3 = poly.polyfit(x, yw, 3, w=w)
+ assert_almost_equal(wcoef3, coef3)
+ wcoef3 = poly.polyfit(x, yw, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef3, coef3)
+ #
+ wcoef2d = poly.polyfit(x, np.array([yw, yw]).T, 3, w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ wcoef2d = poly.polyfit(x, np.array([yw, yw]).T, [0, 1, 2, 3], w=w)
+ assert_almost_equal(wcoef2d, np.array([coef3, coef3]).T)
+ # test scaling with complex values x points whose square
+ # is zero when summed.
+ x = [1, 1j, -1, -1j]
+ assert_almost_equal(poly.polyfit(x, x, 1), [0, 1])
+ assert_almost_equal(poly.polyfit(x, x, [0, 1]), [0, 1])
+ # test fitting only even Polyendre polynomials
+ x = np.linspace(-1, 1)
+ y = f2(x)
+ coef1 = poly.polyfit(x, y, 4)
+ assert_almost_equal(poly.polyval(x, coef1), y)
+ coef2 = poly.polyfit(x, y, [0, 2, 4])
+ assert_almost_equal(poly.polyval(x, coef2), y)
+ assert_almost_equal(coef1, coef2)
+
+ def test_polytrim(self):
+ coef = [2, -1, 1, 0]
+
+ # Test exceptions
+ assert_raises(ValueError, poly.polytrim, coef, -1)
+
+ # Test results
+ assert_equal(poly.polytrim(coef), coef[:-1])
+ assert_equal(poly.polytrim(coef, 1), coef[:-3])
+ assert_equal(poly.polytrim(coef, 2), [0])
+
+ def test_polyline(self):
+ assert_equal(poly.polyline(3, 4), [3, 4])
+
+ def test_polyline_zero(self):
+ assert_equal(poly.polyline(3, 0), [3])
+
+ def test_fit_degenerate_domain(self):
+ p = poly.Polynomial.fit([1], [2], deg=0)
+ assert_equal(p.coef, [2.])
+ p = poly.Polynomial.fit([1, 1], [2, 2.1], deg=0)
+ assert_almost_equal(p.coef, [2.05])
+ with assert_warns(pu.RankWarning):
+ p = poly.Polynomial.fit([1, 1], [2, 2.1], deg=1)
+
+ def test_result_type(self):
+ w = np.array([-1, 1], dtype=np.float32)
+ p = np.polynomial.Polynomial(w, domain=w, window=w)
+ v = p(2)
+ assert_equal(v.dtype, np.float32)
+
+ arr = np.polydiv(1, np.float32(1))
+ assert_equal(arr[0].dtype, np.float64)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polyutils.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polyutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..e5143ed5c3e4a1651c67b5260cef47112c5ea071
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_polyutils.py
@@ -0,0 +1,125 @@
+"""Tests for polyutils module.
+
+"""
+import numpy as np
+import numpy.polynomial.polyutils as pu
+from numpy.testing import (
+ assert_almost_equal, assert_raises, assert_equal, assert_,
+ )
+
+
+class TestMisc:
+
+ def test_trimseq(self):
+ tgt = [1]
+ for num_trailing_zeros in range(5):
+ res = pu.trimseq([1] + [0] * num_trailing_zeros)
+ assert_equal(res, tgt)
+
+ def test_trimseq_empty_input(self):
+ for empty_seq in [[], np.array([], dtype=np.int32)]:
+ assert_equal(pu.trimseq(empty_seq), empty_seq)
+
+ def test_as_series(self):
+ # check exceptions
+ assert_raises(ValueError, pu.as_series, [[]])
+ assert_raises(ValueError, pu.as_series, [[[1, 2]]])
+ assert_raises(ValueError, pu.as_series, [[1], ['a']])
+ # check common types
+ types = ['i', 'd', 'O']
+ for i in range(len(types)):
+ for j in range(i):
+ ci = np.ones(1, types[i])
+ cj = np.ones(1, types[j])
+ [resi, resj] = pu.as_series([ci, cj])
+ assert_(resi.dtype.char == resj.dtype.char)
+ assert_(resj.dtype.char == types[i])
+
+ def test_trimcoef(self):
+ coef = [2, -1, 1, 0]
+ # Test exceptions
+ assert_raises(ValueError, pu.trimcoef, coef, -1)
+ # Test results
+ assert_equal(pu.trimcoef(coef), coef[:-1])
+ assert_equal(pu.trimcoef(coef, 1), coef[:-3])
+ assert_equal(pu.trimcoef(coef, 2), [0])
+
+ def test_vander_nd_exception(self):
+ # n_dims != len(points)
+ assert_raises(ValueError, pu._vander_nd, (), (1, 2, 3), [90])
+ # n_dims != len(degrees)
+ assert_raises(ValueError, pu._vander_nd, (), (), [90.65])
+ # n_dims == 0
+ assert_raises(ValueError, pu._vander_nd, (), (), [])
+
+ def test_div_zerodiv(self):
+ # c2[-1] == 0
+ assert_raises(ZeroDivisionError, pu._div, pu._div, (1, 2, 3), [0])
+
+ def test_pow_too_large(self):
+ # power > maxpower
+ assert_raises(ValueError, pu._pow, (), [1, 2, 3], 5, 4)
+
+class TestDomain:
+
+ def test_getdomain(self):
+ # test for real values
+ x = [1, 10, 3, -1]
+ tgt = [-1, 10]
+ res = pu.getdomain(x)
+ assert_almost_equal(res, tgt)
+
+ # test for complex values
+ x = [1 + 1j, 1 - 1j, 0, 2]
+ tgt = [-1j, 2 + 1j]
+ res = pu.getdomain(x)
+ assert_almost_equal(res, tgt)
+
+ def test_mapdomain(self):
+ # test for real values
+ dom1 = [0, 4]
+ dom2 = [1, 3]
+ tgt = dom2
+ res = pu.mapdomain(dom1, dom1, dom2)
+ assert_almost_equal(res, tgt)
+
+ # test for complex values
+ dom1 = [0 - 1j, 2 + 1j]
+ dom2 = [-2, 2]
+ tgt = dom2
+ x = dom1
+ res = pu.mapdomain(x, dom1, dom2)
+ assert_almost_equal(res, tgt)
+
+ # test for multidimensional arrays
+ dom1 = [0, 4]
+ dom2 = [1, 3]
+ tgt = np.array([dom2, dom2])
+ x = np.array([dom1, dom1])
+ res = pu.mapdomain(x, dom1, dom2)
+ assert_almost_equal(res, tgt)
+
+ # test that subtypes are preserved.
+ class MyNDArray(np.ndarray):
+ pass
+
+ dom1 = [0, 4]
+ dom2 = [1, 3]
+ x = np.array([dom1, dom1]).view(MyNDArray)
+ res = pu.mapdomain(x, dom1, dom2)
+ assert_(isinstance(res, MyNDArray))
+
+ def test_mapparms(self):
+ # test for real values
+ dom1 = [0, 4]
+ dom2 = [1, 3]
+ tgt = [1, .5]
+ res = pu. mapparms(dom1, dom2)
+ assert_almost_equal(res, tgt)
+
+ # test for complex values
+ dom1 = [0 - 1j, 2 + 1j]
+ dom2 = [-2, 2]
+ tgt = [-1 + 1j, 1 - 1j]
+ res = pu.mapparms(dom1, dom2)
+ assert_almost_equal(res, tgt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_printing.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_printing.py
new file mode 100644
index 0000000000000000000000000000000000000000..6651f6cd92056f94d19f62cd818eeed642df2b2e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_printing.py
@@ -0,0 +1,552 @@
+from math import nan, inf
+import pytest
+from numpy._core import array, arange, printoptions
+import numpy.polynomial as poly
+from numpy.testing import assert_equal, assert_
+
+# For testing polynomial printing with object arrays
+from fractions import Fraction
+from decimal import Decimal
+
+
+class TestStrUnicodeSuperSubscripts:
+
+ @pytest.fixture(scope='class', autouse=True)
+ def use_unicode(self):
+ poly.set_default_printstyle('unicode')
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·x + 3.0·x²"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·x + 3.0·x² - 1.0·x³"),
+ (arange(12), ("0.0 + 1.0·x + 2.0·x² + 3.0·x³ + 4.0·x⁴ + 5.0·x⁵ + "
+ "6.0·x⁶ + 7.0·x⁷ +\n8.0·x⁸ + 9.0·x⁹ + 10.0·x¹⁰ + "
+ "11.0·x¹¹")),
+ ))
+ def test_polynomial_str(self, inp, tgt):
+ p = poly.Polynomial(inp)
+ res = str(p)
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·T₁(x) + 3.0·T₂(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·T₁(x) + 3.0·T₂(x) - 1.0·T₃(x)"),
+ (arange(12), ("0.0 + 1.0·T₁(x) + 2.0·T₂(x) + 3.0·T₃(x) + 4.0·T₄(x) + "
+ "5.0·T₅(x) +\n6.0·T₆(x) + 7.0·T₇(x) + 8.0·T₈(x) + "
+ "9.0·T₉(x) + 10.0·T₁₀(x) + 11.0·T₁₁(x)")),
+ ))
+ def test_chebyshev_str(self, inp, tgt):
+ res = str(poly.Chebyshev(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·P₁(x) + 3.0·P₂(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·P₁(x) + 3.0·P₂(x) - 1.0·P₃(x)"),
+ (arange(12), ("0.0 + 1.0·P₁(x) + 2.0·P₂(x) + 3.0·P₃(x) + 4.0·P₄(x) + "
+ "5.0·P₅(x) +\n6.0·P₆(x) + 7.0·P₇(x) + 8.0·P₈(x) + "
+ "9.0·P₉(x) + 10.0·P₁₀(x) + 11.0·P₁₁(x)")),
+ ))
+ def test_legendre_str(self, inp, tgt):
+ res = str(poly.Legendre(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·H₁(x) + 3.0·H₂(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·H₁(x) + 3.0·H₂(x) - 1.0·H₃(x)"),
+ (arange(12), ("0.0 + 1.0·H₁(x) + 2.0·H₂(x) + 3.0·H₃(x) + 4.0·H₄(x) + "
+ "5.0·H₅(x) +\n6.0·H₆(x) + 7.0·H₇(x) + 8.0·H₈(x) + "
+ "9.0·H₉(x) + 10.0·H₁₀(x) + 11.0·H₁₁(x)")),
+ ))
+ def test_hermite_str(self, inp, tgt):
+ res = str(poly.Hermite(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·He₁(x) + 3.0·He₂(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·He₁(x) + 3.0·He₂(x) - 1.0·He₃(x)"),
+ (arange(12), ("0.0 + 1.0·He₁(x) + 2.0·He₂(x) + 3.0·He₃(x) + "
+ "4.0·He₄(x) + 5.0·He₅(x) +\n6.0·He₆(x) + 7.0·He₇(x) + "
+ "8.0·He₈(x) + 9.0·He₉(x) + 10.0·He₁₀(x) +\n"
+ "11.0·He₁₁(x)")),
+ ))
+ def test_hermiteE_str(self, inp, tgt):
+ res = str(poly.HermiteE(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0·L₁(x) + 3.0·L₂(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0·L₁(x) + 3.0·L₂(x) - 1.0·L₃(x)"),
+ (arange(12), ("0.0 + 1.0·L₁(x) + 2.0·L₂(x) + 3.0·L₃(x) + 4.0·L₄(x) + "
+ "5.0·L₅(x) +\n6.0·L₆(x) + 7.0·L₇(x) + 8.0·L₈(x) + "
+ "9.0·L₉(x) + 10.0·L₁₀(x) + 11.0·L₁₁(x)")),
+ ))
+ def test_laguerre_str(self, inp, tgt):
+ res = str(poly.Laguerre(inp))
+ assert_equal(res, tgt)
+
+ def test_polynomial_str_domains(self):
+ res = str(poly.Polynomial([0, 1]))
+ tgt = '0.0 + 1.0·x'
+ assert_equal(res, tgt)
+
+ res = str(poly.Polynomial([0, 1], domain=[1, 2]))
+ tgt = '0.0 + 1.0·(-3.0 + 2.0x)'
+ assert_equal(res, tgt)
+
+class TestStrAscii:
+
+ @pytest.fixture(scope='class', autouse=True)
+ def use_ascii(self):
+ poly.set_default_printstyle('ascii')
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 x + 3.0 x**2"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 x + 3.0 x**2 - 1.0 x**3"),
+ (arange(12), ("0.0 + 1.0 x + 2.0 x**2 + 3.0 x**3 + 4.0 x**4 + "
+ "5.0 x**5 + 6.0 x**6 +\n7.0 x**7 + 8.0 x**8 + "
+ "9.0 x**9 + 10.0 x**10 + 11.0 x**11")),
+ ))
+ def test_polynomial_str(self, inp, tgt):
+ res = str(poly.Polynomial(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 T_1(x) + 3.0 T_2(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 T_1(x) + 3.0 T_2(x) - 1.0 T_3(x)"),
+ (arange(12), ("0.0 + 1.0 T_1(x) + 2.0 T_2(x) + 3.0 T_3(x) + "
+ "4.0 T_4(x) + 5.0 T_5(x) +\n6.0 T_6(x) + 7.0 T_7(x) + "
+ "8.0 T_8(x) + 9.0 T_9(x) + 10.0 T_10(x) +\n"
+ "11.0 T_11(x)")),
+ ))
+ def test_chebyshev_str(self, inp, tgt):
+ res = str(poly.Chebyshev(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 P_1(x) + 3.0 P_2(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 P_1(x) + 3.0 P_2(x) - 1.0 P_3(x)"),
+ (arange(12), ("0.0 + 1.0 P_1(x) + 2.0 P_2(x) + 3.0 P_3(x) + "
+ "4.0 P_4(x) + 5.0 P_5(x) +\n6.0 P_6(x) + 7.0 P_7(x) + "
+ "8.0 P_8(x) + 9.0 P_9(x) + 10.0 P_10(x) +\n"
+ "11.0 P_11(x)")),
+ ))
+ def test_legendre_str(self, inp, tgt):
+ res = str(poly.Legendre(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 H_1(x) + 3.0 H_2(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 H_1(x) + 3.0 H_2(x) - 1.0 H_3(x)"),
+ (arange(12), ("0.0 + 1.0 H_1(x) + 2.0 H_2(x) + 3.0 H_3(x) + "
+ "4.0 H_4(x) + 5.0 H_5(x) +\n6.0 H_6(x) + 7.0 H_7(x) + "
+ "8.0 H_8(x) + 9.0 H_9(x) + 10.0 H_10(x) +\n"
+ "11.0 H_11(x)")),
+ ))
+ def test_hermite_str(self, inp, tgt):
+ res = str(poly.Hermite(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 He_1(x) + 3.0 He_2(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 He_1(x) + 3.0 He_2(x) - 1.0 He_3(x)"),
+ (arange(12), ("0.0 + 1.0 He_1(x) + 2.0 He_2(x) + 3.0 He_3(x) + "
+ "4.0 He_4(x) +\n5.0 He_5(x) + 6.0 He_6(x) + "
+ "7.0 He_7(x) + 8.0 He_8(x) + 9.0 He_9(x) +\n"
+ "10.0 He_10(x) + 11.0 He_11(x)")),
+ ))
+ def test_hermiteE_str(self, inp, tgt):
+ res = str(poly.HermiteE(inp))
+ assert_equal(res, tgt)
+
+ @pytest.mark.parametrize(('inp', 'tgt'), (
+ ([1, 2, 3], "1.0 + 2.0 L_1(x) + 3.0 L_2(x)"),
+ ([-1, 0, 3, -1], "-1.0 + 0.0 L_1(x) + 3.0 L_2(x) - 1.0 L_3(x)"),
+ (arange(12), ("0.0 + 1.0 L_1(x) + 2.0 L_2(x) + 3.0 L_3(x) + "
+ "4.0 L_4(x) + 5.0 L_5(x) +\n6.0 L_6(x) + 7.0 L_7(x) + "
+ "8.0 L_8(x) + 9.0 L_9(x) + 10.0 L_10(x) +\n"
+ "11.0 L_11(x)")),
+ ))
+ def test_laguerre_str(self, inp, tgt):
+ res = str(poly.Laguerre(inp))
+ assert_equal(res, tgt)
+
+ def test_polynomial_str_domains(self):
+ res = str(poly.Polynomial([0, 1]))
+ tgt = '0.0 + 1.0 x'
+ assert_equal(res, tgt)
+
+ res = str(poly.Polynomial([0, 1], domain=[1, 2]))
+ tgt = '0.0 + 1.0 (-3.0 + 2.0x)'
+ assert_equal(res, tgt)
+
+class TestLinebreaking:
+
+ @pytest.fixture(scope='class', autouse=True)
+ def use_ascii(self):
+ poly.set_default_printstyle('ascii')
+
+ def test_single_line_one_less(self):
+ # With 'ascii' style, len(str(p)) is default linewidth - 1 (i.e. 74)
+ p = poly.Polynomial([12345678, 12345678, 12345678, 12345678, 123])
+ assert_equal(len(str(p)), 74)
+ assert_equal(str(p), (
+ '12345678.0 + 12345678.0 x + 12345678.0 x**2 + '
+ '12345678.0 x**3 + 123.0 x**4'
+ ))
+
+ def test_num_chars_is_linewidth(self):
+ # len(str(p)) == default linewidth == 75
+ p = poly.Polynomial([12345678, 12345678, 12345678, 12345678, 1234])
+ assert_equal(len(str(p)), 75)
+ assert_equal(str(p), (
+ '12345678.0 + 12345678.0 x + 12345678.0 x**2 + '
+ '12345678.0 x**3 +\n1234.0 x**4'
+ ))
+
+ def test_first_linebreak_multiline_one_less_than_linewidth(self):
+ # Multiline str where len(first_line) + len(next_term) == lw - 1 == 74
+ p = poly.Polynomial(
+ [12345678, 12345678, 12345678, 12345678, 1, 12345678]
+ )
+ assert_equal(len(str(p).split('\n')[0]), 74)
+ assert_equal(str(p), (
+ '12345678.0 + 12345678.0 x + 12345678.0 x**2 + '
+ '12345678.0 x**3 + 1.0 x**4 +\n12345678.0 x**5'
+ ))
+
+ def test_first_linebreak_multiline_on_linewidth(self):
+ # First line is one character longer than previous test
+ p = poly.Polynomial(
+ [12345678, 12345678, 12345678, 12345678.12, 1, 12345678]
+ )
+ assert_equal(str(p), (
+ '12345678.0 + 12345678.0 x + 12345678.0 x**2 + '
+ '12345678.12 x**3 +\n1.0 x**4 + 12345678.0 x**5'
+ ))
+
+ @pytest.mark.parametrize(('lw', 'tgt'), (
+ (75, ('0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 + 40000.0 x**4 + '
+ '500000.0 x**5 +\n600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 + '
+ '900.0 x**9')),
+ (45, ('0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 +\n40000.0 x**4 + '
+ '500000.0 x**5 +\n600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 +\n'
+ '900.0 x**9')),
+ (132, ('0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 + 40000.0 x**4 + '
+ '500000.0 x**5 + 600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 + '
+ '900.0 x**9')),
+ ))
+ def test_linewidth_printoption(self, lw, tgt):
+ p = poly.Polynomial(
+ [0, 10, 200, 3000, 40000, 500000, 600000, 70000, 8000, 900]
+ )
+ with printoptions(linewidth=lw):
+ assert_equal(str(p), tgt)
+ for line in str(p).split('\n'):
+ assert_(len(line) < lw)
+
+
+def test_set_default_printoptions():
+ p = poly.Polynomial([1, 2, 3])
+ c = poly.Chebyshev([1, 2, 3])
+ poly.set_default_printstyle('ascii')
+ assert_equal(str(p), "1.0 + 2.0 x + 3.0 x**2")
+ assert_equal(str(c), "1.0 + 2.0 T_1(x) + 3.0 T_2(x)")
+ poly.set_default_printstyle('unicode')
+ assert_equal(str(p), "1.0 + 2.0·x + 3.0·x²")
+ assert_equal(str(c), "1.0 + 2.0·T₁(x) + 3.0·T₂(x)")
+ with pytest.raises(ValueError):
+ poly.set_default_printstyle('invalid_input')
+
+
+def test_complex_coefficients():
+ """Test both numpy and built-in complex."""
+ coefs = [0+1j, 1+1j, -2+2j, 3+0j]
+ # numpy complex
+ p1 = poly.Polynomial(coefs)
+ # Python complex
+ p2 = poly.Polynomial(array(coefs, dtype=object))
+ poly.set_default_printstyle('unicode')
+ assert_equal(str(p1), "1j + (1+1j)·x - (2-2j)·x² + (3+0j)·x³")
+ assert_equal(str(p2), "1j + (1+1j)·x + (-2+2j)·x² + (3+0j)·x³")
+ poly.set_default_printstyle('ascii')
+ assert_equal(str(p1), "1j + (1+1j) x - (2-2j) x**2 + (3+0j) x**3")
+ assert_equal(str(p2), "1j + (1+1j) x + (-2+2j) x**2 + (3+0j) x**3")
+
+
+@pytest.mark.parametrize(('coefs', 'tgt'), (
+ (array([Fraction(1, 2), Fraction(3, 4)], dtype=object), (
+ "1/2 + 3/4·x"
+ )),
+ (array([1, 2, Fraction(5, 7)], dtype=object), (
+ "1 + 2·x + 5/7·x²"
+ )),
+ (array([Decimal('1.00'), Decimal('2.2'), 3], dtype=object), (
+ "1.00 + 2.2·x + 3·x²"
+ )),
+))
+def test_numeric_object_coefficients(coefs, tgt):
+ p = poly.Polynomial(coefs)
+ poly.set_default_printstyle('unicode')
+ assert_equal(str(p), tgt)
+
+
+@pytest.mark.parametrize(('coefs', 'tgt'), (
+ (array([1, 2, 'f'], dtype=object), '1 + 2·x + f·x²'),
+ (array([1, 2, [3, 4]], dtype=object), '1 + 2·x + [3, 4]·x²'),
+))
+def test_nonnumeric_object_coefficients(coefs, tgt):
+ """
+ Test coef fallback for object arrays of non-numeric coefficients.
+ """
+ p = poly.Polynomial(coefs)
+ poly.set_default_printstyle('unicode')
+ assert_equal(str(p), tgt)
+
+
+class TestFormat:
+ def test_format_unicode(self):
+ poly.set_default_printstyle('ascii')
+ p = poly.Polynomial([1, 2, 0, -1])
+ assert_equal(format(p, 'unicode'), "1.0 + 2.0·x + 0.0·x² - 1.0·x³")
+
+ def test_format_ascii(self):
+ poly.set_default_printstyle('unicode')
+ p = poly.Polynomial([1, 2, 0, -1])
+ assert_equal(
+ format(p, 'ascii'), "1.0 + 2.0 x + 0.0 x**2 - 1.0 x**3"
+ )
+
+ def test_empty_formatstr(self):
+ poly.set_default_printstyle('ascii')
+ p = poly.Polynomial([1, 2, 3])
+ assert_equal(format(p), "1.0 + 2.0 x + 3.0 x**2")
+ assert_equal(f"{p}", "1.0 + 2.0 x + 3.0 x**2")
+
+ def test_bad_formatstr(self):
+ p = poly.Polynomial([1, 2, 0, -1])
+ with pytest.raises(ValueError):
+ format(p, '.2f')
+
+
+@pytest.mark.parametrize(('poly', 'tgt'), (
+ (poly.Polynomial, '1.0 + 2.0·z + 3.0·z²'),
+ (poly.Chebyshev, '1.0 + 2.0·T₁(z) + 3.0·T₂(z)'),
+ (poly.Hermite, '1.0 + 2.0·H₁(z) + 3.0·H₂(z)'),
+ (poly.HermiteE, '1.0 + 2.0·He₁(z) + 3.0·He₂(z)'),
+ (poly.Laguerre, '1.0 + 2.0·L₁(z) + 3.0·L₂(z)'),
+ (poly.Legendre, '1.0 + 2.0·P₁(z) + 3.0·P₂(z)'),
+))
+def test_symbol(poly, tgt):
+ p = poly([1, 2, 3], symbol='z')
+ assert_equal(f"{p:unicode}", tgt)
+
+
+class TestRepr:
+ def test_polynomial_repr(self):
+ res = repr(poly.Polynomial([0, 1]))
+ tgt = (
+ "Polynomial([0., 1.], domain=[-1., 1.], window=[-1., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+ def test_chebyshev_repr(self):
+ res = repr(poly.Chebyshev([0, 1]))
+ tgt = (
+ "Chebyshev([0., 1.], domain=[-1., 1.], window=[-1., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+ def test_legendre_repr(self):
+ res = repr(poly.Legendre([0, 1]))
+ tgt = (
+ "Legendre([0., 1.], domain=[-1., 1.], window=[-1., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+ def test_hermite_repr(self):
+ res = repr(poly.Hermite([0, 1]))
+ tgt = (
+ "Hermite([0., 1.], domain=[-1., 1.], window=[-1., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+ def test_hermiteE_repr(self):
+ res = repr(poly.HermiteE([0, 1]))
+ tgt = (
+ "HermiteE([0., 1.], domain=[-1., 1.], window=[-1., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+ def test_laguerre_repr(self):
+ res = repr(poly.Laguerre([0, 1]))
+ tgt = (
+ "Laguerre([0., 1.], domain=[0., 1.], window=[0., 1.], "
+ "symbol='x')"
+ )
+ assert_equal(res, tgt)
+
+
+class TestLatexRepr:
+ """Test the latex repr used by Jupyter"""
+
+ @staticmethod
+ def as_latex(obj):
+ # right now we ignore the formatting of scalars in our tests, since
+ # it makes them too verbose. Ideally, the formatting of scalars will
+ # be fixed such that tests below continue to pass
+ obj._repr_latex_scalar = lambda x, parens=False: str(x)
+ try:
+ return obj._repr_latex_()
+ finally:
+ del obj._repr_latex_scalar
+
+ def test_simple_polynomial(self):
+ # default input
+ p = poly.Polynomial([1, 2, 3])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0 + 2.0\,x + 3.0\,x^{2}$')
+
+ # translated input
+ p = poly.Polynomial([1, 2, 3], domain=[-2, 0])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0 + 2.0\,\left(1.0 + x\right) + 3.0\,\left(1.0 + x\right)^{2}$')
+
+ # scaled input
+ p = poly.Polynomial([1, 2, 3], domain=[-0.5, 0.5])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0 + 2.0\,\left(2.0x\right) + 3.0\,\left(2.0x\right)^{2}$')
+
+ # affine input
+ p = poly.Polynomial([1, 2, 3], domain=[-1, 0])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0 + 2.0\,\left(1.0 + 2.0x\right) + 3.0\,\left(1.0 + 2.0x\right)^{2}$')
+
+ def test_basis_func(self):
+ p = poly.Chebyshev([1, 2, 3])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0\,{T}_{0}(x) + 2.0\,{T}_{1}(x) + 3.0\,{T}_{2}(x)$')
+ # affine input - check no surplus parens are added
+ p = poly.Chebyshev([1, 2, 3], domain=[-1, 0])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0\,{T}_{0}(1.0 + 2.0x) + 2.0\,{T}_{1}(1.0 + 2.0x) + 3.0\,{T}_{2}(1.0 + 2.0x)$')
+
+ def test_multichar_basis_func(self):
+ p = poly.HermiteE([1, 2, 3])
+ assert_equal(self.as_latex(p),
+ r'$x \mapsto 1.0\,{He}_{0}(x) + 2.0\,{He}_{1}(x) + 3.0\,{He}_{2}(x)$')
+
+ def test_symbol_basic(self):
+ # default input
+ p = poly.Polynomial([1, 2, 3], symbol='z')
+ assert_equal(self.as_latex(p),
+ r'$z \mapsto 1.0 + 2.0\,z + 3.0\,z^{2}$')
+
+ # translated input
+ p = poly.Polynomial([1, 2, 3], domain=[-2, 0], symbol='z')
+ assert_equal(
+ self.as_latex(p),
+ (
+ r'$z \mapsto 1.0 + 2.0\,\left(1.0 + z\right) + 3.0\,'
+ r'\left(1.0 + z\right)^{2}$'
+ ),
+ )
+
+ # scaled input
+ p = poly.Polynomial([1, 2, 3], domain=[-0.5, 0.5], symbol='z')
+ assert_equal(
+ self.as_latex(p),
+ (
+ r'$z \mapsto 1.0 + 2.0\,\left(2.0z\right) + 3.0\,'
+ r'\left(2.0z\right)^{2}$'
+ ),
+ )
+
+ # affine input
+ p = poly.Polynomial([1, 2, 3], domain=[-1, 0], symbol='z')
+ assert_equal(
+ self.as_latex(p),
+ (
+ r'$z \mapsto 1.0 + 2.0\,\left(1.0 + 2.0z\right) + 3.0\,'
+ r'\left(1.0 + 2.0z\right)^{2}$'
+ ),
+ )
+
+ def test_numeric_object_coefficients(self):
+ coefs = array([Fraction(1, 2), Fraction(1)])
+ p = poly.Polynomial(coefs)
+ assert_equal(self.as_latex(p), '$x \\mapsto 1/2 + 1\\,x$')
+
+SWITCH_TO_EXP = (
+ '1.0 + (1.0e-01) x + (1.0e-02) x**2',
+ '1.2 + (1.2e-01) x + (1.2e-02) x**2',
+ '1.23 + 0.12 x + (1.23e-02) x**2 + (1.23e-03) x**3',
+ '1.235 + 0.123 x + (1.235e-02) x**2 + (1.235e-03) x**3',
+ '1.2346 + 0.1235 x + 0.0123 x**2 + (1.2346e-03) x**3 + (1.2346e-04) x**4',
+ '1.23457 + 0.12346 x + 0.01235 x**2 + (1.23457e-03) x**3 + '
+ '(1.23457e-04) x**4',
+ '1.234568 + 0.123457 x + 0.012346 x**2 + 0.001235 x**3 + '
+ '(1.234568e-04) x**4 + (1.234568e-05) x**5',
+ '1.2345679 + 0.1234568 x + 0.0123457 x**2 + 0.0012346 x**3 + '
+ '(1.2345679e-04) x**4 + (1.2345679e-05) x**5')
+
+class TestPrintOptions:
+ """
+ Test the output is properly configured via printoptions.
+ The exponential notation is enabled automatically when the values
+ are too small or too large.
+ """
+
+ @pytest.fixture(scope='class', autouse=True)
+ def use_ascii(self):
+ poly.set_default_printstyle('ascii')
+
+ def test_str(self):
+ p = poly.Polynomial([1/2, 1/7, 1/7*10**8, 1/7*10**9])
+ assert_equal(str(p), '0.5 + 0.14285714 x + 14285714.28571429 x**2 '
+ '+ (1.42857143e+08) x**3')
+
+ with printoptions(precision=3):
+ assert_equal(str(p), '0.5 + 0.143 x + 14285714.286 x**2 '
+ '+ (1.429e+08) x**3')
+
+ def test_latex(self):
+ p = poly.Polynomial([1/2, 1/7, 1/7*10**8, 1/7*10**9])
+ assert_equal(p._repr_latex_(),
+ r'$x \mapsto \text{0.5} + \text{0.14285714}\,x + '
+ r'\text{14285714.28571429}\,x^{2} + '
+ r'\text{(1.42857143e+08)}\,x^{3}$')
+
+ with printoptions(precision=3):
+ assert_equal(p._repr_latex_(),
+ r'$x \mapsto \text{0.5} + \text{0.143}\,x + '
+ r'\text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$')
+
+ def test_fixed(self):
+ p = poly.Polynomial([1/2])
+ assert_equal(str(p), '0.5')
+
+ with printoptions(floatmode='fixed'):
+ assert_equal(str(p), '0.50000000')
+
+ with printoptions(floatmode='fixed', precision=4):
+ assert_equal(str(p), '0.5000')
+
+ def test_switch_to_exp(self):
+ for i, s in enumerate(SWITCH_TO_EXP):
+ with printoptions(precision=i):
+ p = poly.Polynomial([1.23456789*10**-i
+ for i in range(i//2+3)])
+ assert str(p).replace('\n', ' ') == s
+
+ def test_non_finite(self):
+ p = poly.Polynomial([nan, inf])
+ assert str(p) == 'nan + inf x'
+ assert p._repr_latex_() == r'$x \mapsto \text{nan} + \text{inf}\,x$'
+ with printoptions(nanstr='NAN', infstr='INF'):
+ assert str(p) == 'NAN + INF x'
+ assert p._repr_latex_() == \
+ r'$x \mapsto \text{NAN} + \text{INF}\,x$'
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_symbol.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_symbol.py
new file mode 100644
index 0000000000000000000000000000000000000000..f985533f9fe8c639f224daead98e31dc6f798cc4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/polynomial/tests/test_symbol.py
@@ -0,0 +1,216 @@
+"""
+Tests related to the ``symbol`` attribute of the ABCPolyBase class.
+"""
+
+import pytest
+import numpy.polynomial as poly
+from numpy._core import array
+from numpy.testing import assert_equal, assert_raises, assert_
+
+
+class TestInit:
+ """
+ Test polynomial creation with symbol kwarg.
+ """
+ c = [1, 2, 3]
+
+ def test_default_symbol(self):
+ p = poly.Polynomial(self.c)
+ assert_equal(p.symbol, 'x')
+
+ @pytest.mark.parametrize(('bad_input', 'exception'), (
+ ('', ValueError),
+ ('3', ValueError),
+ (None, TypeError),
+ (1, TypeError),
+ ))
+ def test_symbol_bad_input(self, bad_input, exception):
+ with pytest.raises(exception):
+ p = poly.Polynomial(self.c, symbol=bad_input)
+
+ @pytest.mark.parametrize('symbol', (
+ 'x',
+ 'x_1',
+ 'A',
+ 'xyz',
+ 'β',
+ ))
+ def test_valid_symbols(self, symbol):
+ """
+ Values for symbol that should pass input validation.
+ """
+ p = poly.Polynomial(self.c, symbol=symbol)
+ assert_equal(p.symbol, symbol)
+
+ def test_property(self):
+ """
+ 'symbol' attribute is read only.
+ """
+ p = poly.Polynomial(self.c, symbol='x')
+ with pytest.raises(AttributeError):
+ p.symbol = 'z'
+
+ def test_change_symbol(self):
+ p = poly.Polynomial(self.c, symbol='y')
+ # Create new polynomial from p with different symbol
+ pt = poly.Polynomial(p.coef, symbol='t')
+ assert_equal(pt.symbol, 't')
+
+
+class TestUnaryOperators:
+ p = poly.Polynomial([1, 2, 3], symbol='z')
+
+ def test_neg(self):
+ n = -self.p
+ assert_equal(n.symbol, 'z')
+
+ def test_scalarmul(self):
+ out = self.p * 10
+ assert_equal(out.symbol, 'z')
+
+ def test_rscalarmul(self):
+ out = 10 * self.p
+ assert_equal(out.symbol, 'z')
+
+ def test_pow(self):
+ out = self.p ** 3
+ assert_equal(out.symbol, 'z')
+
+
+@pytest.mark.parametrize(
+ 'rhs',
+ (
+ poly.Polynomial([4, 5, 6], symbol='z'),
+ array([4, 5, 6]),
+ ),
+)
+class TestBinaryOperatorsSameSymbol:
+ """
+ Ensure symbol is preserved for numeric operations on polynomials with
+ the same symbol
+ """
+ p = poly.Polynomial([1, 2, 3], symbol='z')
+
+ def test_add(self, rhs):
+ out = self.p + rhs
+ assert_equal(out.symbol, 'z')
+
+ def test_sub(self, rhs):
+ out = self.p - rhs
+ assert_equal(out.symbol, 'z')
+
+ def test_polymul(self, rhs):
+ out = self.p * rhs
+ assert_equal(out.symbol, 'z')
+
+ def test_divmod(self, rhs):
+ for out in divmod(self.p, rhs):
+ assert_equal(out.symbol, 'z')
+
+ def test_radd(self, rhs):
+ out = rhs + self.p
+ assert_equal(out.symbol, 'z')
+
+ def test_rsub(self, rhs):
+ out = rhs - self.p
+ assert_equal(out.symbol, 'z')
+
+ def test_rmul(self, rhs):
+ out = rhs * self.p
+ assert_equal(out.symbol, 'z')
+
+ def test_rdivmod(self, rhs):
+ for out in divmod(rhs, self.p):
+ assert_equal(out.symbol, 'z')
+
+
+class TestBinaryOperatorsDifferentSymbol:
+ p = poly.Polynomial([1, 2, 3], symbol='x')
+ other = poly.Polynomial([4, 5, 6], symbol='y')
+ ops = (p.__add__, p.__sub__, p.__mul__, p.__floordiv__, p.__mod__)
+
+ @pytest.mark.parametrize('f', ops)
+ def test_binops_fails(self, f):
+ assert_raises(ValueError, f, self.other)
+
+
+class TestEquality:
+ p = poly.Polynomial([1, 2, 3], symbol='x')
+
+ def test_eq(self):
+ other = poly.Polynomial([1, 2, 3], symbol='x')
+ assert_(self.p == other)
+
+ def test_neq(self):
+ other = poly.Polynomial([1, 2, 3], symbol='y')
+ assert_(not self.p == other)
+
+
+class TestExtraMethods:
+ """
+ Test other methods for manipulating/creating polynomial objects.
+ """
+ p = poly.Polynomial([1, 2, 3, 0], symbol='z')
+
+ def test_copy(self):
+ other = self.p.copy()
+ assert_equal(other.symbol, 'z')
+
+ def test_trim(self):
+ other = self.p.trim()
+ assert_equal(other.symbol, 'z')
+
+ def test_truncate(self):
+ other = self.p.truncate(2)
+ assert_equal(other.symbol, 'z')
+
+ @pytest.mark.parametrize('kwarg', (
+ {'domain': [-10, 10]},
+ {'window': [-10, 10]},
+ {'kind': poly.Chebyshev},
+ ))
+ def test_convert(self, kwarg):
+ other = self.p.convert(**kwarg)
+ assert_equal(other.symbol, 'z')
+
+ def test_integ(self):
+ other = self.p.integ()
+ assert_equal(other.symbol, 'z')
+
+ def test_deriv(self):
+ other = self.p.deriv()
+ assert_equal(other.symbol, 'z')
+
+
+def test_composition():
+ p = poly.Polynomial([3, 2, 1], symbol="t")
+ q = poly.Polynomial([5, 1, 0, -1], symbol="λ_1")
+ r = p(q)
+ assert r.symbol == "λ_1"
+
+
+#
+# Class methods that result in new polynomial class instances
+#
+
+
+def test_fit():
+ x, y = (range(10),)*2
+ p = poly.Polynomial.fit(x, y, deg=1, symbol='z')
+ assert_equal(p.symbol, 'z')
+
+
+def test_froomroots():
+ roots = [-2, 2]
+ p = poly.Polynomial.fromroots(roots, symbol='z')
+ assert_equal(p.symbol, 'z')
+
+
+def test_identity():
+ p = poly.Polynomial.identity(domain=[-1, 1], window=[5, 20], symbol='z')
+ assert_equal(p.symbol, 'z')
+
+
+def test_basis():
+ p = poly.Polynomial.basis(3, symbol='z')
+ assert_equal(p.symbol, 'z')
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/LICENSE.md b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/LICENSE.md
new file mode 100644
index 0000000000000000000000000000000000000000..a6cf1b17e99725556ac56ce3661498df1ee2276a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/LICENSE.md
@@ -0,0 +1,71 @@
+**This software is dual-licensed under the The University of Illinois/NCSA
+Open Source License (NCSA) and The 3-Clause BSD License**
+
+# NCSA Open Source License
+**Copyright (c) 2019 Kevin Sheppard. All rights reserved.**
+
+Developed by: Kevin Sheppard (,
+)
+[http://www.kevinsheppard.com](http://www.kevinsheppard.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal with
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimers.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimers in the documentation and/or
+other materials provided with the distribution.
+
+Neither the names of Kevin Sheppard, nor the names of any contributors may be
+used to endorse or promote products derived from this Software without specific
+prior written permission.
+
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
+THE SOFTWARE.**
+
+
+# 3-Clause BSD License
+**Copyright (c) 2019 Kevin Sheppard. All rights reserved.**
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+**THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.**
+
+# Components
+
+Many parts of this module have been derived from original sources,
+often the algorithm's designer. Component licenses are located with
+the component code.
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pxd b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..1f9057296ba9475574a191cf231dc04ace3f910c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pxd
@@ -0,0 +1,14 @@
+cimport numpy as np
+from libc.stdint cimport uint32_t, uint64_t
+
+cdef extern from "numpy/random/bitgen.h":
+ struct bitgen:
+ void *state
+ uint64_t (*next_uint64)(void *st) nogil
+ uint32_t (*next_uint32)(void *st) nogil
+ double (*next_double)(void *st) nogil
+ uint64_t (*next_raw)(void *st) nogil
+
+ ctypedef bitgen bitgen_t
+
+from numpy.random.bit_generator cimport BitGenerator, SeedSequence
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..2e8f99fe3045b9c2b691a8ece67d0f06d9d73b08
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.py
@@ -0,0 +1,215 @@
+"""
+========================
+Random Number Generation
+========================
+
+Use ``default_rng()`` to create a `Generator` and call its methods.
+
+=============== =========================================================
+Generator
+--------------- ---------------------------------------------------------
+Generator Class implementing all of the random number distributions
+default_rng Default constructor for ``Generator``
+=============== =========================================================
+
+============================================= ===
+BitGenerator Streams that work with Generator
+--------------------------------------------- ---
+MT19937
+PCG64
+PCG64DXSM
+Philox
+SFC64
+============================================= ===
+
+============================================= ===
+Getting entropy to initialize a BitGenerator
+--------------------------------------------- ---
+SeedSequence
+============================================= ===
+
+
+Legacy
+------
+
+For backwards compatibility with previous versions of numpy before 1.17, the
+various aliases to the global `RandomState` methods are left alone and do not
+use the new `Generator` API.
+
+==================== =========================================================
+Utility functions
+-------------------- ---------------------------------------------------------
+random Uniformly distributed floats over ``[0, 1)``
+bytes Uniformly distributed random bytes.
+permutation Randomly permute a sequence / generate a random sequence.
+shuffle Randomly permute a sequence in place.
+choice Random sample from 1-D array.
+==================== =========================================================
+
+==================== =========================================================
+Compatibility
+functions - removed
+in the new API
+-------------------- ---------------------------------------------------------
+rand Uniformly distributed values.
+randn Normally distributed values.
+ranf Uniformly distributed floating point numbers.
+random_integers Uniformly distributed integers in a given range.
+ (deprecated, use ``integers(..., closed=True)`` instead)
+random_sample Alias for `random_sample`
+randint Uniformly distributed integers in a given range
+seed Seed the legacy random number generator.
+==================== =========================================================
+
+==================== =========================================================
+Univariate
+distributions
+-------------------- ---------------------------------------------------------
+beta Beta distribution over ``[0, 1]``.
+binomial Binomial distribution.
+chisquare :math:`\\chi^2` distribution.
+exponential Exponential distribution.
+f F (Fisher-Snedecor) distribution.
+gamma Gamma distribution.
+geometric Geometric distribution.
+gumbel Gumbel distribution.
+hypergeometric Hypergeometric distribution.
+laplace Laplace distribution.
+logistic Logistic distribution.
+lognormal Log-normal distribution.
+logseries Logarithmic series distribution.
+negative_binomial Negative binomial distribution.
+noncentral_chisquare Non-central chi-square distribution.
+noncentral_f Non-central F distribution.
+normal Normal / Gaussian distribution.
+pareto Pareto distribution.
+poisson Poisson distribution.
+power Power distribution.
+rayleigh Rayleigh distribution.
+triangular Triangular distribution.
+uniform Uniform distribution.
+vonmises Von Mises circular distribution.
+wald Wald (inverse Gaussian) distribution.
+weibull Weibull distribution.
+zipf Zipf's distribution over ranked data.
+==================== =========================================================
+
+==================== ==========================================================
+Multivariate
+distributions
+-------------------- ----------------------------------------------------------
+dirichlet Multivariate generalization of Beta distribution.
+multinomial Multivariate generalization of the binomial distribution.
+multivariate_normal Multivariate generalization of the normal distribution.
+==================== ==========================================================
+
+==================== =========================================================
+Standard
+distributions
+-------------------- ---------------------------------------------------------
+standard_cauchy Standard Cauchy-Lorentz distribution.
+standard_exponential Standard exponential distribution.
+standard_gamma Standard Gamma distribution.
+standard_normal Standard normal distribution.
+standard_t Standard Student's t-distribution.
+==================== =========================================================
+
+==================== =========================================================
+Internal functions
+-------------------- ---------------------------------------------------------
+get_state Get tuple representing internal state of generator.
+set_state Set state of generator.
+==================== =========================================================
+
+
+"""
+__all__ = [
+ 'beta',
+ 'binomial',
+ 'bytes',
+ 'chisquare',
+ 'choice',
+ 'dirichlet',
+ 'exponential',
+ 'f',
+ 'gamma',
+ 'geometric',
+ 'get_state',
+ 'gumbel',
+ 'hypergeometric',
+ 'laplace',
+ 'logistic',
+ 'lognormal',
+ 'logseries',
+ 'multinomial',
+ 'multivariate_normal',
+ 'negative_binomial',
+ 'noncentral_chisquare',
+ 'noncentral_f',
+ 'normal',
+ 'pareto',
+ 'permutation',
+ 'poisson',
+ 'power',
+ 'rand',
+ 'randint',
+ 'randn',
+ 'random',
+ 'random_integers',
+ 'random_sample',
+ 'ranf',
+ 'rayleigh',
+ 'sample',
+ 'seed',
+ 'set_state',
+ 'shuffle',
+ 'standard_cauchy',
+ 'standard_exponential',
+ 'standard_gamma',
+ 'standard_normal',
+ 'standard_t',
+ 'triangular',
+ 'uniform',
+ 'vonmises',
+ 'wald',
+ 'weibull',
+ 'zipf',
+]
+
+# add these for module-freeze analysis (like PyInstaller)
+from . import _pickle
+from . import _common
+from . import _bounded_integers
+
+from ._generator import Generator, default_rng
+from .bit_generator import SeedSequence, BitGenerator
+from ._mt19937 import MT19937
+from ._pcg64 import PCG64, PCG64DXSM
+from ._philox import Philox
+from ._sfc64 import SFC64
+from .mtrand import *
+
+__all__ += ['Generator', 'RandomState', 'SeedSequence', 'MT19937',
+ 'Philox', 'PCG64', 'PCG64DXSM', 'SFC64', 'default_rng',
+ 'BitGenerator']
+
+
+def __RandomState_ctor():
+ """Return a RandomState instance.
+
+ This function exists solely to assist (un)pickling.
+
+ Note that the state of the RandomState returned here is irrelevant, as this
+ function's entire purpose is to return a newly allocated RandomState whose
+ state pickle can set. Consequently the RandomState returned by this function
+ is a freshly allocated copy with a seed=0.
+
+ See https://github.com/numpy/numpy/issues/4763 for a detailed discussion
+
+ """
+ return RandomState(seed=0)
+
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8cfa9c0e1369812c5afe6e353d29e39793358715
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/__init__.pyi
@@ -0,0 +1,126 @@
+from ._generator import Generator
+from ._generator import default_rng
+from ._mt19937 import MT19937
+from ._pcg64 import PCG64, PCG64DXSM
+from ._philox import Philox
+from ._sfc64 import SFC64
+from .bit_generator import BitGenerator
+from .bit_generator import SeedSequence
+from .mtrand import (
+ RandomState,
+ beta,
+ binomial,
+ bytes,
+ chisquare,
+ choice,
+ dirichlet,
+ exponential,
+ f,
+ gamma,
+ geometric,
+ get_bit_generator, # noqa: F401
+ get_state,
+ gumbel,
+ hypergeometric,
+ laplace,
+ logistic,
+ lognormal,
+ logseries,
+ multinomial,
+ multivariate_normal,
+ negative_binomial,
+ noncentral_chisquare,
+ noncentral_f,
+ normal,
+ pareto,
+ permutation,
+ poisson,
+ power,
+ rand,
+ randint,
+ randn,
+ random,
+ random_integers,
+ random_sample,
+ ranf,
+ rayleigh,
+ sample,
+ seed,
+ set_bit_generator, # noqa: F401
+ set_state,
+ shuffle,
+ standard_cauchy,
+ standard_exponential,
+ standard_gamma,
+ standard_normal,
+ standard_t,
+ triangular,
+ uniform,
+ vonmises,
+ wald,
+ weibull,
+ zipf,
+)
+
+__all__ = [
+ "beta",
+ "binomial",
+ "bytes",
+ "chisquare",
+ "choice",
+ "dirichlet",
+ "exponential",
+ "f",
+ "gamma",
+ "geometric",
+ "get_state",
+ "gumbel",
+ "hypergeometric",
+ "laplace",
+ "logistic",
+ "lognormal",
+ "logseries",
+ "multinomial",
+ "multivariate_normal",
+ "negative_binomial",
+ "noncentral_chisquare",
+ "noncentral_f",
+ "normal",
+ "pareto",
+ "permutation",
+ "poisson",
+ "power",
+ "rand",
+ "randint",
+ "randn",
+ "random",
+ "random_integers",
+ "random_sample",
+ "ranf",
+ "rayleigh",
+ "sample",
+ "seed",
+ "set_state",
+ "shuffle",
+ "standard_cauchy",
+ "standard_exponential",
+ "standard_gamma",
+ "standard_normal",
+ "standard_t",
+ "triangular",
+ "uniform",
+ "vonmises",
+ "wald",
+ "weibull",
+ "zipf",
+ "Generator",
+ "RandomState",
+ "SeedSequence",
+ "MT19937",
+ "Philox",
+ "PCG64",
+ "PCG64DXSM",
+ "SFC64",
+ "default_rng",
+ "BitGenerator",
+]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..98ac82392b1ec1ac48cb760c4de2c92e89fc483e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b4ff98f2bb0f7db24091b7996dd4d5c6ba5ae584f3683fcfa72ad8bce926ef1
+size 362560
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.pxd b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..607014cbf5b42737669f699471082ab5642910d1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_bounded_integers.pxd
@@ -0,0 +1,29 @@
+from libc.stdint cimport (uint8_t, uint16_t, uint32_t, uint64_t,
+ int8_t, int16_t, int32_t, int64_t, intptr_t)
+import numpy as np
+cimport numpy as np
+ctypedef np.npy_bool bool_t
+
+from numpy.random cimport bitgen_t
+
+cdef inline uint64_t _gen_mask(uint64_t max_val) noexcept nogil:
+ """Mask generator for use in bounded random numbers"""
+ # Smallest bit mask >= max
+ cdef uint64_t mask = max_val
+ mask |= mask >> 1
+ mask |= mask >> 2
+ mask |= mask >> 4
+ mask |= mask >> 8
+ mask |= mask >> 16
+ mask |= mask >> 32
+ return mask
+
+cdef object _rand_uint64(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint32(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint16(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_uint8(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_bool(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int64(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int32(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int16(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
+cdef object _rand_int8(object low, object high, object size, bint use_masked, bint closed, bitgen_t *state, object lock)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..79aa4b6c20c7584869791de7ac092ea3d2fa9d0e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:209653a11ba1914f706e972fd071be37c3207e182918c81fc7fab43cd66c5c28
+size 251664
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.pxd b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..0de4456d778f409f63d237d53eb083bf2c9949ae
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_common.pxd
@@ -0,0 +1,107 @@
+#cython: language_level=3
+
+from libc.stdint cimport uint32_t, uint64_t, int32_t, int64_t
+
+import numpy as np
+cimport numpy as np
+
+from numpy.random cimport bitgen_t
+
+cdef double POISSON_LAM_MAX
+cdef double LEGACY_POISSON_LAM_MAX
+cdef uint64_t MAXSIZE
+
+cdef enum ConstraintType:
+ CONS_NONE
+ CONS_NON_NEGATIVE
+ CONS_POSITIVE
+ CONS_POSITIVE_NOT_NAN
+ CONS_BOUNDED_0_1
+ CONS_BOUNDED_GT_0_1
+ CONS_BOUNDED_LT_0_1
+ CONS_GT_1
+ CONS_GTE_1
+ CONS_POISSON
+ LEGACY_CONS_POISSON
+ LEGACY_CONS_NON_NEGATIVE_INBOUNDS_LONG
+
+ctypedef ConstraintType constraint_type
+
+cdef object benchmark(bitgen_t *bitgen, object lock, Py_ssize_t cnt, object method)
+cdef object random_raw(bitgen_t *bitgen, object lock, object size, object output)
+cdef object prepare_cffi(bitgen_t *bitgen)
+cdef object prepare_ctypes(bitgen_t *bitgen)
+cdef int check_constraint(double val, object name, constraint_type cons) except -1
+cdef int check_array_constraint(np.ndarray val, object name, constraint_type cons) except -1
+
+cdef extern from "include/aligned_malloc.h":
+ cdef void *PyArray_realloc_aligned(void *p, size_t n)
+ cdef void *PyArray_malloc_aligned(size_t n)
+ cdef void *PyArray_calloc_aligned(size_t n, size_t s)
+ cdef void PyArray_free_aligned(void *p)
+
+ctypedef void (*random_double_fill)(bitgen_t *state, np.npy_intp count, double* out) noexcept nogil
+ctypedef double (*random_double_0)(void *state) noexcept nogil
+ctypedef double (*random_double_1)(void *state, double a) noexcept nogil
+ctypedef double (*random_double_2)(void *state, double a, double b) noexcept nogil
+ctypedef double (*random_double_3)(void *state, double a, double b, double c) noexcept nogil
+
+ctypedef void (*random_float_fill)(bitgen_t *state, np.npy_intp count, float* out) noexcept nogil
+ctypedef float (*random_float_0)(bitgen_t *state) noexcept nogil
+ctypedef float (*random_float_1)(bitgen_t *state, float a) noexcept nogil
+
+ctypedef int64_t (*random_uint_0)(void *state) noexcept nogil
+ctypedef int64_t (*random_uint_d)(void *state, double a) noexcept nogil
+ctypedef int64_t (*random_uint_dd)(void *state, double a, double b) noexcept nogil
+ctypedef int64_t (*random_uint_di)(void *state, double a, uint64_t b) noexcept nogil
+ctypedef int64_t (*random_uint_i)(void *state, int64_t a) noexcept nogil
+ctypedef int64_t (*random_uint_iii)(void *state, int64_t a, int64_t b, int64_t c) noexcept nogil
+
+ctypedef uint32_t (*random_uint_0_32)(bitgen_t *state) noexcept nogil
+ctypedef uint32_t (*random_uint_1_i_32)(bitgen_t *state, uint32_t a) noexcept nogil
+
+ctypedef int32_t (*random_int_2_i_32)(bitgen_t *state, int32_t a, int32_t b) noexcept nogil
+ctypedef int64_t (*random_int_2_i)(bitgen_t *state, int64_t a, int64_t b) noexcept nogil
+
+cdef double kahan_sum(double *darr, np.npy_intp n) noexcept
+
+cdef inline double uint64_to_double(uint64_t rnd) noexcept nogil:
+ return (rnd >> 11) * (1.0 / 9007199254740992.0)
+
+cdef object double_fill(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object float_fill(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object float_fill_from_double(void *func, bitgen_t *state, object size, object lock, object out)
+
+cdef object wrap_int(object val, object bits)
+
+cdef np.ndarray int_to_array(object value, object name, object bits, object uint_size)
+
+cdef validate_output_shape(iter_shape, np.ndarray output)
+
+cdef object cont(void *func, void *state, object size, object lock, int narg,
+ object a, object a_name, constraint_type a_constraint,
+ object b, object b_name, constraint_type b_constraint,
+ object c, object c_name, constraint_type c_constraint,
+ object out)
+
+cdef object disc(void *func, void *state, object size, object lock,
+ int narg_double, int narg_int64,
+ object a, object a_name, constraint_type a_constraint,
+ object b, object b_name, constraint_type b_constraint,
+ object c, object c_name, constraint_type c_constraint)
+
+cdef object cont_f(void *func, bitgen_t *state, object size, object lock,
+ object a, object a_name, constraint_type a_constraint,
+ object out)
+
+cdef object cont_broadcast_3(void *func, void *state, object size, object lock,
+ np.ndarray a_arr, object a_name, constraint_type a_constraint,
+ np.ndarray b_arr, object b_name, constraint_type b_constraint,
+ np.ndarray c_arr, object c_name, constraint_type c_constraint)
+
+cdef object discrete_broadcast_iii(void *func, void *state, object size, object lock,
+ np.ndarray a_arr, object a_name, constraint_type a_constraint,
+ np.ndarray b_arr, object b_name, constraint_type b_constraint,
+ np.ndarray c_arr, object c_name, constraint_type c_constraint)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/extending.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..8440d400ea9178bb17efc68fde1f8cca1f66c189
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/extending.py
@@ -0,0 +1,40 @@
+"""
+Use cffi to access any of the underlying C functions from distributions.h
+"""
+import os
+import numpy as np
+import cffi
+from .parse import parse_distributions_h
+ffi = cffi.FFI()
+
+inc_dir = os.path.join(np.get_include(), 'numpy')
+
+# Basic numpy types
+ffi.cdef('''
+ typedef intptr_t npy_intp;
+ typedef unsigned char npy_bool;
+
+''')
+
+parse_distributions_h(ffi, inc_dir)
+
+lib = ffi.dlopen(np.random._generator.__file__)
+
+# Compare the distributions.h random_standard_normal_fill to
+# Generator.standard_random
+bit_gen = np.random.PCG64()
+rng = np.random.Generator(bit_gen)
+state = bit_gen.state
+
+interface = rng.bit_generator.cffi
+n = 100
+vals_cffi = ffi.new('double[%d]' % n)
+lib.random_standard_normal_fill(interface.bit_generator, n, vals_cffi)
+
+# reset the state
+bit_gen.state = state
+
+vals = rng.standard_normal(n)
+
+for i in range(n):
+ assert vals[i] == vals_cffi[i]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/parse.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/parse.py
new file mode 100644
index 0000000000000000000000000000000000000000..993cedee05eb0219e3748c41efb575b87a0c56a7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cffi/parse.py
@@ -0,0 +1,54 @@
+import os
+
+
+def parse_distributions_h(ffi, inc_dir):
+ """
+ Parse distributions.h located in inc_dir for CFFI, filling in the ffi.cdef
+
+ Read the function declarations without the "#define ..." macros that will
+ be filled in when loading the library.
+ """
+
+ with open(os.path.join(inc_dir, 'random', 'bitgen.h')) as fid:
+ s = []
+ for line in fid:
+ # massage the include file
+ if line.strip().startswith('#'):
+ continue
+ s.append(line)
+ ffi.cdef('\n'.join(s))
+
+ with open(os.path.join(inc_dir, 'random', 'distributions.h')) as fid:
+ s = []
+ in_skip = 0
+ ignoring = False
+ for line in fid:
+ # check for and remove extern "C" guards
+ if ignoring:
+ if line.strip().startswith('#endif'):
+ ignoring = False
+ continue
+ if line.strip().startswith('#ifdef __cplusplus'):
+ ignoring = True
+
+ # massage the include file
+ if line.strip().startswith('#'):
+ continue
+
+ # skip any inlined function definition
+ # which starts with 'static inline xxx(...) {'
+ # and ends with a closing '}'
+ if line.strip().startswith('static inline'):
+ in_skip += line.count('{')
+ continue
+ elif in_skip > 0:
+ in_skip += line.count('{')
+ in_skip -= line.count('}')
+ continue
+
+ # replace defines with their value or remove them
+ line = line.replace('DECLDIR', '')
+ line = line.replace('RAND_INT_TYPE', 'int64_t')
+ s.append(line)
+ ffi.cdef('\n'.join(s))
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending.pyx b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..6a0f45e1be9e6f32ac9ac39952cd01597b93a2e9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending.pyx
@@ -0,0 +1,77 @@
+#cython: language_level=3
+
+from libc.stdint cimport uint32_t
+from cpython.pycapsule cimport PyCapsule_IsValid, PyCapsule_GetPointer
+
+import numpy as np
+cimport numpy as np
+cimport cython
+
+from numpy.random cimport bitgen_t
+from numpy.random import PCG64
+
+np.import_array()
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uniform_mean(Py_ssize_t n):
+ cdef Py_ssize_t i
+ cdef bitgen_t *rng
+ cdef const char *capsule_name = "BitGenerator"
+ cdef double[::1] random_values
+ cdef np.ndarray randoms
+
+ x = PCG64()
+ capsule = x.capsule
+ if not PyCapsule_IsValid(capsule, capsule_name):
+ raise ValueError("Invalid pointer to anon_func_state")
+ rng = PyCapsule_GetPointer(capsule, capsule_name)
+ random_values = np.empty(n)
+ # Best practice is to acquire the lock whenever generating random values.
+ # This prevents other threads from modifying the state. Acquiring the lock
+ # is only necessary if the GIL is also released, as in this example.
+ with x.lock, nogil:
+ for i in range(n):
+ random_values[i] = rng.next_double(rng.state)
+ randoms = np.asarray(random_values)
+ return randoms.mean()
+
+
+# This function is declared nogil so it can be used without the GIL below
+cdef uint32_t bounded_uint(uint32_t lb, uint32_t ub, bitgen_t *rng) nogil:
+ cdef uint32_t mask, delta, val
+ mask = delta = ub - lb
+ mask |= mask >> 1
+ mask |= mask >> 2
+ mask |= mask >> 4
+ mask |= mask >> 8
+ mask |= mask >> 16
+
+ val = rng.next_uint32(rng.state) & mask
+ while val > delta:
+ val = rng.next_uint32(rng.state) & mask
+
+ return lb + val
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def bounded_uints(uint32_t lb, uint32_t ub, Py_ssize_t n):
+ cdef Py_ssize_t i
+ cdef bitgen_t *rng
+ cdef uint32_t[::1] out
+ cdef const char *capsule_name = "BitGenerator"
+
+ x = PCG64()
+ out = np.empty(n, dtype=np.uint32)
+ capsule = x.capsule
+
+ if not PyCapsule_IsValid(capsule, capsule_name):
+ raise ValueError("Invalid pointer to anon_func_state")
+ rng = PyCapsule_GetPointer(capsule, capsule_name)
+
+ with x.lock, nogil:
+ for i in range(n):
+ out[i] = bounded_uint(lb, ub, rng)
+ return np.asarray(out)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending_distributions.pyx b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending_distributions.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..59ecc4b36366f76d21289286d5c8780b3852e660
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/extending_distributions.pyx
@@ -0,0 +1,116 @@
+#cython: language_level=3
+"""
+This file shows how the to use a BitGenerator to create a distribution.
+"""
+import numpy as np
+cimport numpy as np
+cimport cython
+from cpython.pycapsule cimport PyCapsule_IsValid, PyCapsule_GetPointer
+from libc.stdint cimport uint16_t, uint64_t
+from numpy.random cimport bitgen_t
+from numpy.random import PCG64
+from numpy.random.c_distributions cimport (
+ random_standard_uniform_fill, random_standard_uniform_fill_f)
+
+
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uniforms(Py_ssize_t n):
+ """
+ Create an array of `n` uniformly distributed doubles.
+ A 'real' distribution would want to process the values into
+ some non-uniform distribution
+ """
+ cdef Py_ssize_t i
+ cdef bitgen_t *rng
+ cdef const char *capsule_name = "BitGenerator"
+ cdef double[::1] random_values
+
+ x = PCG64()
+ capsule = x.capsule
+ # Optional check that the capsule if from a BitGenerator
+ if not PyCapsule_IsValid(capsule, capsule_name):
+ raise ValueError("Invalid pointer to anon_func_state")
+ # Cast the pointer
+ rng = PyCapsule_GetPointer(capsule, capsule_name)
+ random_values = np.empty(n, dtype='float64')
+ with x.lock, nogil:
+ for i in range(n):
+ # Call the function
+ random_values[i] = rng.next_double(rng.state)
+ randoms = np.asarray(random_values)
+
+ return randoms
+
+# cython example 2
+@cython.boundscheck(False)
+@cython.wraparound(False)
+def uint10_uniforms(Py_ssize_t n):
+ """Uniform 10 bit integers stored as 16-bit unsigned integers"""
+ cdef Py_ssize_t i
+ cdef bitgen_t *rng
+ cdef const char *capsule_name = "BitGenerator"
+ cdef uint16_t[::1] random_values
+ cdef int bits_remaining
+ cdef int width = 10
+ cdef uint64_t buff, mask = 0x3FF
+
+ x = PCG64()
+ capsule = x.capsule
+ if not PyCapsule_IsValid(capsule, capsule_name):
+ raise ValueError("Invalid pointer to anon_func_state")
+ rng = PyCapsule_GetPointer(capsule, capsule_name)
+ random_values = np.empty(n, dtype='uint16')
+ # Best practice is to release GIL and acquire the lock
+ bits_remaining = 0
+ with x.lock, nogil:
+ for i in range(n):
+ if bits_remaining < width:
+ buff = rng.next_uint64(rng.state)
+ random_values[i] = buff & mask
+ buff >>= width
+
+ randoms = np.asarray(random_values)
+ return randoms
+
+# cython example 3
+def uniforms_ex(bit_generator, Py_ssize_t n, dtype=np.float64):
+ """
+ Create an array of `n` uniformly distributed doubles via a "fill" function.
+
+ A 'real' distribution would want to process the values into
+ some non-uniform distribution
+
+ Parameters
+ ----------
+ bit_generator: BitGenerator instance
+ n: int
+ Output vector length
+ dtype: {str, dtype}, optional
+ Desired dtype, either 'd' (or 'float64') or 'f' (or 'float32'). The
+ default dtype value is 'd'
+ """
+ cdef Py_ssize_t i
+ cdef bitgen_t *rng
+ cdef const char *capsule_name = "BitGenerator"
+ cdef np.ndarray randoms
+
+ capsule = bit_generator.capsule
+ # Optional check that the capsule if from a BitGenerator
+ if not PyCapsule_IsValid(capsule, capsule_name):
+ raise ValueError("Invalid pointer to anon_func_state")
+ # Cast the pointer
+ rng = PyCapsule_GetPointer(capsule, capsule_name)
+
+ _dtype = np.dtype(dtype)
+ randoms = np.empty(n, dtype=_dtype)
+ if _dtype == np.float32:
+ with bit_generator.lock:
+ random_standard_uniform_fill_f(rng, n, np.PyArray_DATA(randoms))
+ elif _dtype == np.float64:
+ with bit_generator.lock:
+ random_standard_uniform_fill(rng, n, np.PyArray_DATA(randoms))
+ else:
+ raise TypeError('Unsupported dtype %r for random' % _dtype)
+ return randoms
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/meson.build b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..7aa367d13787c4f7ad5c2910bb044670b07eb012
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/cython/meson.build
@@ -0,0 +1,53 @@
+project('random-build-examples', 'c', 'cpp', 'cython')
+
+py_mod = import('python')
+py3 = py_mod.find_installation(pure: false)
+
+cc = meson.get_compiler('c')
+cy = meson.get_compiler('cython')
+
+# Keep synced with pyproject.toml
+if not cy.version().version_compare('>=3.0.6')
+ error('tests requires Cython >= 3.0.6')
+endif
+
+base_cython_args = []
+if cy.version().version_compare('>=3.1.0')
+ base_cython_args += ['-Xfreethreading_compatible=True']
+endif
+
+_numpy_abs = run_command(py3, ['-c',
+ 'import os; os.chdir(".."); import numpy; print(os.path.abspath(numpy.get_include() + "../../.."))'],
+ check: true).stdout().strip()
+
+npymath_path = _numpy_abs / '_core' / 'lib'
+npy_include_path = _numpy_abs / '_core' / 'include'
+npyrandom_path = _numpy_abs / 'random' / 'lib'
+npymath_lib = cc.find_library('npymath', dirs: npymath_path)
+npyrandom_lib = cc.find_library('npyrandom', dirs: npyrandom_path)
+
+py3.extension_module(
+ 'extending_distributions',
+ 'extending_distributions.pyx',
+ install: false,
+ include_directories: [npy_include_path],
+ dependencies: [npyrandom_lib, npymath_lib],
+ cython_args: base_cython_args,
+)
+py3.extension_module(
+ 'extending',
+ 'extending.pyx',
+ install: false,
+ include_directories: [npy_include_path],
+ dependencies: [npyrandom_lib, npymath_lib],
+ cython_args: base_cython_args,
+)
+py3.extension_module(
+ 'extending_cpp',
+ 'extending_distributions.pyx',
+ install: false,
+ override_options : ['cython_language=cpp'],
+ cython_args: base_cython_args + ['--module-name', 'extending_cpp'],
+ include_directories: [npy_include_path],
+ dependencies: [npyrandom_lib, npymath_lib],
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..f387db69502a4bfe8731d540a7a741b062fea861
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending.py
@@ -0,0 +1,84 @@
+import numpy as np
+import numba as nb
+
+from numpy.random import PCG64
+from timeit import timeit
+
+bit_gen = PCG64()
+next_d = bit_gen.cffi.next_double
+state_addr = bit_gen.cffi.state_address
+
+def normals(n, state):
+ out = np.empty(n)
+ for i in range((n + 1) // 2):
+ x1 = 2.0 * next_d(state) - 1.0
+ x2 = 2.0 * next_d(state) - 1.0
+ r2 = x1 * x1 + x2 * x2
+ while r2 >= 1.0 or r2 == 0.0:
+ x1 = 2.0 * next_d(state) - 1.0
+ x2 = 2.0 * next_d(state) - 1.0
+ r2 = x1 * x1 + x2 * x2
+ f = np.sqrt(-2.0 * np.log(r2) / r2)
+ out[2 * i] = f * x1
+ if 2 * i + 1 < n:
+ out[2 * i + 1] = f * x2
+ return out
+
+# Compile using Numba
+normalsj = nb.jit(normals, nopython=True)
+# Must use state address not state with numba
+n = 10000
+
+def numbacall():
+ return normalsj(n, state_addr)
+
+rg = np.random.Generator(PCG64())
+
+def numpycall():
+ return rg.normal(size=n)
+
+# Check that the functions work
+r1 = numbacall()
+r2 = numpycall()
+assert r1.shape == (n,)
+assert r1.shape == r2.shape
+
+t1 = timeit(numbacall, number=1000)
+print(f'{t1:.2f} secs for {n} PCG64 (Numba/PCG64) gaussian randoms')
+t2 = timeit(numpycall, number=1000)
+print(f'{t2:.2f} secs for {n} PCG64 (NumPy/PCG64) gaussian randoms')
+
+# example 2
+
+next_u32 = bit_gen.ctypes.next_uint32
+ctypes_state = bit_gen.ctypes.state
+
+@nb.jit(nopython=True)
+def bounded_uint(lb, ub, state):
+ mask = delta = ub - lb
+ mask |= mask >> 1
+ mask |= mask >> 2
+ mask |= mask >> 4
+ mask |= mask >> 8
+ mask |= mask >> 16
+
+ val = next_u32(state) & mask
+ while val > delta:
+ val = next_u32(state) & mask
+
+ return lb + val
+
+
+print(bounded_uint(323, 2394691, ctypes_state.value))
+
+
+@nb.jit(nopython=True)
+def bounded_uints(lb, ub, n, state):
+ out = np.empty(n, dtype=np.uint32)
+ for i in range(n):
+ out[i] = bounded_uint(lb, ub, state)
+
+
+bounded_uints(323, 2394691, 10000000, ctypes_state.value)
+
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending_distributions.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending_distributions.py
new file mode 100644
index 0000000000000000000000000000000000000000..7ef0753d71d1a1033c0225f332bf1b75d832a598
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_examples/numba/extending_distributions.py
@@ -0,0 +1,67 @@
+r"""
+Building the required library in this example requires a source distribution
+of NumPy or clone of the NumPy git repository since distributions.c is not
+included in binary distributions.
+
+On *nix, execute in numpy/random/src/distributions
+
+export ${PYTHON_VERSION}=3.8 # Python version
+export PYTHON_INCLUDE=#path to Python's include folder, usually \
+ ${PYTHON_HOME}/include/python${PYTHON_VERSION}m
+export NUMPY_INCLUDE=#path to numpy's include folder, usually \
+ ${PYTHON_HOME}/lib/python${PYTHON_VERSION}/site-packages/numpy/_core/include
+gcc -shared -o libdistributions.so -fPIC distributions.c \
+ -I${NUMPY_INCLUDE} -I${PYTHON_INCLUDE}
+mv libdistributions.so ../../_examples/numba/
+
+On Windows
+
+rem PYTHON_HOME and PYTHON_VERSION are setup dependent, this is an example
+set PYTHON_HOME=c:\Anaconda
+set PYTHON_VERSION=38
+cl.exe /LD .\distributions.c -DDLL_EXPORT \
+ -I%PYTHON_HOME%\lib\site-packages\numpy\_core\include \
+ -I%PYTHON_HOME%\include %PYTHON_HOME%\libs\python%PYTHON_VERSION%.lib
+move distributions.dll ../../_examples/numba/
+"""
+import os
+
+import numba as nb
+import numpy as np
+from cffi import FFI
+
+from numpy.random import PCG64
+
+ffi = FFI()
+if os.path.exists('./distributions.dll'):
+ lib = ffi.dlopen('./distributions.dll')
+elif os.path.exists('./libdistributions.so'):
+ lib = ffi.dlopen('./libdistributions.so')
+else:
+ raise RuntimeError('Required DLL/so file was not found.')
+
+ffi.cdef("""
+double random_standard_normal(void *bitgen_state);
+""")
+x = PCG64()
+xffi = x.cffi
+bit_generator = xffi.bit_generator
+
+random_standard_normal = lib.random_standard_normal
+
+
+def normals(n, bit_generator):
+ out = np.empty(n)
+ for i in range(n):
+ out[i] = random_standard_normal(bit_generator)
+ return out
+
+
+normalsj = nb.jit(normals, nopython=True)
+
+# Numba requires a memory address for void *
+# Can also get address from x.ctypes.bit_generator.value
+bit_generator_address = int(ffi.cast('uintptr_t', bit_generator))
+
+norm = normalsj(1000, bit_generator_address)
+print(norm[:12])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..20c6df41d36c781659fba215561c28c358db1165
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b71b3b7481e842a207aa2b06ac7547721ed56366c5bccb7943616591e6075fb9
+size 996144
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7ed4a959625f92b19ec6e56bab54403706b6604f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_generator.pyi
@@ -0,0 +1,856 @@
+from collections.abc import Callable
+from typing import Any, Literal, TypeAlias, TypeVar, overload
+
+import numpy as np
+from numpy import dtype, float32, float64, int64
+from numpy._typing import (
+ ArrayLike,
+ DTypeLike,
+ NDArray,
+ _ArrayLikeFloat_co,
+ _ArrayLikeInt_co,
+ _BoolCodes,
+ _DoubleCodes,
+ _DTypeLike,
+ _DTypeLikeBool,
+ _Float32Codes,
+ _Float64Codes,
+ _FloatLike_co,
+ _Int8Codes,
+ _Int16Codes,
+ _Int32Codes,
+ _Int64Codes,
+ _IntPCodes,
+ _ShapeLike,
+ _SingleCodes,
+ _SupportsDType,
+ _UInt8Codes,
+ _UInt16Codes,
+ _UInt32Codes,
+ _UInt64Codes,
+ _UIntPCodes,
+)
+from numpy.random import BitGenerator, RandomState, SeedSequence
+
+_IntegerT = TypeVar("_IntegerT", bound=np.integer)
+
+_DTypeLikeFloat32: TypeAlias = (
+ dtype[float32]
+ | _SupportsDType[dtype[float32]]
+ | type[float32]
+ | _Float32Codes
+ | _SingleCodes
+)
+
+_DTypeLikeFloat64: TypeAlias = (
+ dtype[float64]
+ | _SupportsDType[dtype[float64]]
+ | type[float]
+ | type[float64]
+ | _Float64Codes
+ | _DoubleCodes
+)
+
+class Generator:
+ def __init__(self, bit_generator: BitGenerator) -> None: ...
+ def __repr__(self) -> str: ...
+ def __str__(self) -> str: ...
+ def __getstate__(self) -> None: ...
+ def __setstate__(self, state: dict[str, Any] | None) -> None: ...
+ def __reduce__(self) -> tuple[
+ Callable[[BitGenerator], Generator],
+ tuple[BitGenerator],
+ None]: ...
+ @property
+ def bit_generator(self) -> BitGenerator: ...
+ def spawn(self, n_children: int) -> list[Generator]: ...
+ def bytes(self, length: int) -> bytes: ...
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self,
+ size: None = ...,
+ dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+ out: None = ...,
+ ) -> float: ...
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self,
+ size: _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self,
+ *,
+ out: NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat32 = ...,
+ out: None | NDArray[float32] = ...,
+ ) -> NDArray[float32]: ...
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat64 = ...,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def permutation(self, x: int, axis: int = ...) -> NDArray[int64]: ...
+ @overload
+ def permutation(self, x: ArrayLike, axis: int = ...) -> NDArray[Any]: ...
+ @overload
+ def standard_exponential( # type: ignore[misc]
+ self,
+ size: None = ...,
+ dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+ method: Literal["zig", "inv"] = ...,
+ out: None = ...,
+ ) -> float: ...
+ @overload
+ def standard_exponential(
+ self,
+ size: _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_exponential(
+ self,
+ *,
+ out: NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_exponential(
+ self,
+ size: _ShapeLike = ...,
+ *,
+ method: Literal["zig", "inv"] = ...,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_exponential(
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat32 = ...,
+ method: Literal["zig", "inv"] = ...,
+ out: None | NDArray[float32] = ...,
+ ) -> NDArray[float32]: ...
+ @overload
+ def standard_exponential(
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat64 = ...,
+ method: Literal["zig", "inv"] = ...,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def random( # type: ignore[misc]
+ self,
+ size: None = ...,
+ dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+ out: None = ...,
+ ) -> float: ...
+ @overload
+ def random(
+ self,
+ *,
+ out: NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def random(
+ self,
+ size: _ShapeLike = ...,
+ *,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def random(
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat32 = ...,
+ out: None | NDArray[float32] = ...,
+ ) -> NDArray[float32]: ...
+ @overload
+ def random(
+ self,
+ size: _ShapeLike = ...,
+ dtype: _DTypeLikeFloat64 = ...,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def beta(
+ self,
+ a: _FloatLike_co,
+ b: _FloatLike_co,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def beta(
+ self,
+ a: _ArrayLikeFloat_co,
+ b: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def exponential(self, scale: _FloatLike_co = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def exponential(self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...) -> NDArray[float64]: ...
+
+ #
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ dtype: _DTypeLike[np.int64] | _Int64Codes = ...,
+ endpoint: bool = False,
+ ) -> np.int64: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: type[bool],
+ endpoint: bool = False,
+ ) -> bool: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: type[int],
+ endpoint: bool = False,
+ ) -> int: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _DTypeLike[np.bool] | _BoolCodes,
+ endpoint: bool = False,
+ ) -> np.bool: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _DTypeLike[_IntegerT],
+ endpoint: bool = False,
+ ) -> _IntegerT: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ dtype: _DTypeLike[np.int64] | _Int64Codes = ...,
+ endpoint: bool = False,
+ ) -> NDArray[np.int64]: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _DTypeLikeBool,
+ endpoint: bool = False,
+ ) -> NDArray[np.bool]: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _DTypeLike[_IntegerT],
+ endpoint: bool = False,
+ ) -> NDArray[_IntegerT]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _Int8Codes,
+ endpoint: bool = False,
+ ) -> np.int8: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _Int8Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.int8]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _UInt8Codes,
+ endpoint: bool = False,
+ ) -> np.uint8: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _UInt8Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.uint8]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _Int16Codes,
+ endpoint: bool = False,
+ ) -> np.int16: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _Int16Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.int16]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _UInt16Codes,
+ endpoint: bool = False,
+ ) -> np.uint16: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _UInt16Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.uint16]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _Int32Codes,
+ endpoint: bool = False,
+ ) -> np.int32: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _Int32Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.int32]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _UInt32Codes,
+ endpoint: bool = False,
+ ) -> np.uint32: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _UInt32Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.uint32]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _UInt64Codes,
+ endpoint: bool = False,
+ ) -> np.uint64: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _UInt64Codes,
+ endpoint: bool = False,
+ ) -> NDArray[np.uint64]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _IntPCodes,
+ endpoint: bool = False,
+ ) -> np.intp: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _IntPCodes,
+ endpoint: bool = False,
+ ) -> NDArray[np.intp]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ *,
+ dtype: _UIntPCodes,
+ endpoint: bool = False,
+ ) -> np.uintp: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ *,
+ dtype: _UIntPCodes,
+ endpoint: bool = False,
+ ) -> NDArray[np.uintp]: ...
+ @overload
+ def integers(
+ self,
+ low: int,
+ high: int | None = None,
+ size: None = None,
+ dtype: DTypeLike = ...,
+ endpoint: bool = False,
+ ) -> Any: ...
+ @overload
+ def integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: _ArrayLikeInt_co | None = None,
+ size: _ShapeLike | None = None,
+ dtype: DTypeLike = ...,
+ endpoint: bool = False,
+ ) -> NDArray[Any]: ...
+
+ # TODO: Use a TypeVar _T here to get away from Any output?
+ # Should be int->NDArray[int64], ArrayLike[_T] -> _T | NDArray[Any]
+ @overload
+ def choice(
+ self,
+ a: int,
+ size: None = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ axis: int = ...,
+ shuffle: bool = ...,
+ ) -> int: ...
+ @overload
+ def choice(
+ self,
+ a: int,
+ size: _ShapeLike = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ axis: int = ...,
+ shuffle: bool = ...,
+ ) -> NDArray[int64]: ...
+ @overload
+ def choice(
+ self,
+ a: ArrayLike,
+ size: None = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ axis: int = ...,
+ shuffle: bool = ...,
+ ) -> Any: ...
+ @overload
+ def choice(
+ self,
+ a: ArrayLike,
+ size: _ShapeLike = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ axis: int = ...,
+ shuffle: bool = ...,
+ ) -> NDArray[Any]: ...
+ @overload
+ def uniform(
+ self,
+ low: _FloatLike_co = ...,
+ high: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def uniform(
+ self,
+ low: _ArrayLikeFloat_co = ...,
+ high: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def normal(
+ self,
+ loc: _FloatLike_co = ...,
+ scale: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def normal(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_gamma( # type: ignore[misc]
+ self,
+ shape: _FloatLike_co,
+ size: None = ...,
+ dtype: _DTypeLikeFloat32 | _DTypeLikeFloat64 = ...,
+ out: None = ...,
+ ) -> float: ...
+ @overload
+ def standard_gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ *,
+ out: NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ dtype: _DTypeLikeFloat32 = ...,
+ out: None | NDArray[float32] = ...,
+ ) -> NDArray[float32]: ...
+ @overload
+ def standard_gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ dtype: _DTypeLikeFloat64 = ...,
+ out: None | NDArray[float64] = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def gamma(
+ self, shape: _FloatLike_co, scale: _FloatLike_co = ..., size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def f(
+ self, dfnum: _FloatLike_co, dfden: _FloatLike_co, size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def f(
+ self,
+ dfnum: _ArrayLikeFloat_co,
+ dfden: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def noncentral_f(
+ self,
+ dfnum: _FloatLike_co,
+ dfden: _FloatLike_co,
+ nonc: _FloatLike_co, size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def noncentral_f(
+ self,
+ dfnum: _ArrayLikeFloat_co,
+ dfden: _ArrayLikeFloat_co,
+ nonc: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def chisquare(self, df: _FloatLike_co, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def chisquare(
+ self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def noncentral_chisquare(
+ self, df: _FloatLike_co, nonc: _FloatLike_co, size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def noncentral_chisquare(
+ self,
+ df: _ArrayLikeFloat_co,
+ nonc: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_t(self, df: _FloatLike_co, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_t(
+ self, df: _ArrayLikeFloat_co, size: None = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_t(
+ self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def vonmises(
+ self, mu: _FloatLike_co, kappa: _FloatLike_co, size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def vonmises(
+ self,
+ mu: _ArrayLikeFloat_co,
+ kappa: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def pareto(self, a: _FloatLike_co, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def pareto(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def weibull(self, a: _FloatLike_co, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def weibull(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def power(self, a: _FloatLike_co, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def power(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_cauchy(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_cauchy(self, size: _ShapeLike = ...) -> NDArray[float64]: ...
+ @overload
+ def laplace(
+ self,
+ loc: _FloatLike_co = ...,
+ scale: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def laplace(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def gumbel(
+ self,
+ loc: _FloatLike_co = ...,
+ scale: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def gumbel(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def logistic(
+ self,
+ loc: _FloatLike_co = ...,
+ scale: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def logistic(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def lognormal(
+ self,
+ mean: _FloatLike_co = ...,
+ sigma: _FloatLike_co = ...,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def lognormal(
+ self,
+ mean: _ArrayLikeFloat_co = ...,
+ sigma: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def rayleigh(self, scale: _FloatLike_co = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def rayleigh(
+ self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def wald(
+ self, mean: _FloatLike_co, scale: _FloatLike_co, size: None = ...
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def wald(
+ self,
+ mean: _ArrayLikeFloat_co,
+ scale: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def triangular(
+ self,
+ left: _FloatLike_co,
+ mode: _FloatLike_co,
+ right: _FloatLike_co,
+ size: None = ...,
+ ) -> float: ... # type: ignore[misc]
+ @overload
+ def triangular(
+ self,
+ left: _ArrayLikeFloat_co,
+ mode: _ArrayLikeFloat_co,
+ right: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def binomial(self, n: int, p: _FloatLike_co, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def binomial(
+ self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ @overload
+ def negative_binomial(
+ self, n: _FloatLike_co, p: _FloatLike_co, size: None = ...
+ ) -> int: ... # type: ignore[misc]
+ @overload
+ def negative_binomial(
+ self,
+ n: _ArrayLikeFloat_co,
+ p: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ @overload
+ def poisson(self, lam: _FloatLike_co = ..., size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def poisson(
+ self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ @overload
+ def zipf(self, a: _FloatLike_co, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def zipf(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ @overload
+ def geometric(self, p: _FloatLike_co, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def geometric(
+ self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ @overload
+ def hypergeometric(
+ self, ngood: int, nbad: int, nsample: int, size: None = ...
+ ) -> int: ... # type: ignore[misc]
+ @overload
+ def hypergeometric(
+ self,
+ ngood: _ArrayLikeInt_co,
+ nbad: _ArrayLikeInt_co,
+ nsample: _ArrayLikeInt_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[int64]: ...
+ @overload
+ def logseries(self, p: _FloatLike_co, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def logseries(
+ self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ def multivariate_normal(
+ self,
+ mean: _ArrayLikeFloat_co,
+ cov: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ check_valid: Literal["warn", "raise", "ignore"] = ...,
+ tol: float = ...,
+ *,
+ method: Literal["svd", "eigh", "cholesky"] = ...,
+ ) -> NDArray[float64]: ...
+ def multinomial(
+ self, n: _ArrayLikeInt_co,
+ pvals: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...
+ ) -> NDArray[int64]: ...
+ def multivariate_hypergeometric(
+ self,
+ colors: _ArrayLikeInt_co,
+ nsample: int,
+ size: None | _ShapeLike = ...,
+ method: Literal["marginals", "count"] = ...,
+ ) -> NDArray[int64]: ...
+ def dirichlet(
+ self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ def permuted(
+ self, x: ArrayLike, *, axis: None | int = ..., out: None | NDArray[Any] = ...
+ ) -> NDArray[Any]: ...
+ def shuffle(self, x: ArrayLike, axis: int = ...) -> None: ...
+
+def default_rng(
+ seed: None | _ArrayLikeInt_co | SeedSequence | BitGenerator | Generator | RandomState = ...
+) -> Generator: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..a883f37a51b6356f5cd065a6799e984e1bfd4f1c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6245585dae2024446b9cc6f86f8f5d7ffb90054f2c50be0ede4b05663392f527
+size 129912
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..430dd8041f50221c92b297a3ee5e9fe767a8d176
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_mt19937.pyi
@@ -0,0 +1,25 @@
+from typing import TypedDict, type_check_only
+
+from numpy import uint32
+from numpy.typing import NDArray
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+@type_check_only
+class _MT19937Internal(TypedDict):
+ key: NDArray[uint32]
+ pos: int
+
+@type_check_only
+class _MT19937State(TypedDict):
+ bit_generator: str
+ state: _MT19937Internal
+
+class MT19937(BitGenerator):
+ def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+ def _legacy_seeding(self, seed: _ArrayLikeInt_co) -> None: ...
+ def jumped(self, jumps: int = ...) -> MT19937: ...
+ @property
+ def state(self) -> _MT19937State: ...
+ @state.setter
+ def state(self, value: _MT19937State) -> None: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..24800bfb6e03ebd0582eda5c650499f1fee163ad
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:839bd03aa79e83d3aa67733423ca65fd47e4af535145c0f7384d7c88642d3ef8
+size 136480
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..15bb0525c9a532af49715242b0b2da6a5e7dbdbc
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pcg64.pyi
@@ -0,0 +1,44 @@
+from typing import TypedDict, type_check_only
+
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+@type_check_only
+class _PCG64Internal(TypedDict):
+ state: int
+ inc: int
+
+@type_check_only
+class _PCG64State(TypedDict):
+ bit_generator: str
+ state: _PCG64Internal
+ has_uint32: int
+ uinteger: int
+
+class PCG64(BitGenerator):
+ def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+ def jumped(self, jumps: int = ...) -> PCG64: ...
+ @property
+ def state(
+ self,
+ ) -> _PCG64State: ...
+ @state.setter
+ def state(
+ self,
+ value: _PCG64State,
+ ) -> None: ...
+ def advance(self, delta: int) -> PCG64: ...
+
+class PCG64DXSM(BitGenerator):
+ def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+ def jumped(self, jumps: int = ...) -> PCG64DXSM: ...
+ @property
+ def state(
+ self,
+ ) -> _PCG64State: ...
+ @state.setter
+ def state(
+ self,
+ value: _PCG64State,
+ ) -> None: ...
+ def advance(self, delta: int) -> PCG64DXSM: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..9d312ddefd4d6b331b95b75353a48f32402ea619
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b166c0672edb46c1c9cbf720867d95aea2e9a323bc069157c9f0c15884ea5882
+size 116832
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7206ae9702c002a7f893bbee3d485eef4c6ca240
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_philox.pyi
@@ -0,0 +1,39 @@
+from typing import TypedDict, type_check_only
+
+from numpy import uint64
+from numpy.typing import NDArray
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import _ArrayLikeInt_co
+
+@type_check_only
+class _PhiloxInternal(TypedDict):
+ counter: NDArray[uint64]
+ key: NDArray[uint64]
+
+@type_check_only
+class _PhiloxState(TypedDict):
+ bit_generator: str
+ state: _PhiloxInternal
+ buffer: NDArray[uint64]
+ buffer_pos: int
+ has_uint32: int
+ uinteger: int
+
+class Philox(BitGenerator):
+ def __init__(
+ self,
+ seed: None | _ArrayLikeInt_co | SeedSequence = ...,
+ counter: None | _ArrayLikeInt_co = ...,
+ key: None | _ArrayLikeInt_co = ...,
+ ) -> None: ...
+ @property
+ def state(
+ self,
+ ) -> _PhiloxState: ...
+ @state.setter
+ def state(
+ self,
+ value: _PhiloxState,
+ ) -> None: ...
+ def jumped(self, jumps: int = ...) -> Philox: ...
+ def advance(self, delta: int) -> Philox: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.py
new file mode 100644
index 0000000000000000000000000000000000000000..842bd441a50237765a543a13c878ce1ece828892
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.py
@@ -0,0 +1,89 @@
+from .bit_generator import BitGenerator
+from .mtrand import RandomState
+from ._philox import Philox
+from ._pcg64 import PCG64, PCG64DXSM
+from ._sfc64 import SFC64
+
+from ._generator import Generator
+from ._mt19937 import MT19937
+
+BitGenerators = {'MT19937': MT19937,
+ 'PCG64': PCG64,
+ 'PCG64DXSM': PCG64DXSM,
+ 'Philox': Philox,
+ 'SFC64': SFC64,
+ }
+
+
+def __bit_generator_ctor(bit_generator: str | type[BitGenerator] = 'MT19937'):
+ """
+ Pickling helper function that returns a bit generator object
+
+ Parameters
+ ----------
+ bit_generator : type[BitGenerator] or str
+ BitGenerator class or string containing the name of the BitGenerator
+
+ Returns
+ -------
+ BitGenerator
+ BitGenerator instance
+ """
+ if isinstance(bit_generator, type):
+ bit_gen_class = bit_generator
+ elif bit_generator in BitGenerators:
+ bit_gen_class = BitGenerators[bit_generator]
+ else:
+ raise ValueError(
+ str(bit_generator) + ' is not a known BitGenerator module.'
+ )
+
+ return bit_gen_class()
+
+
+def __generator_ctor(bit_generator_name="MT19937",
+ bit_generator_ctor=__bit_generator_ctor):
+ """
+ Pickling helper function that returns a Generator object
+
+ Parameters
+ ----------
+ bit_generator_name : str or BitGenerator
+ String containing the core BitGenerator's name or a
+ BitGenerator instance
+ bit_generator_ctor : callable, optional
+ Callable function that takes bit_generator_name as its only argument
+ and returns an instantized bit generator.
+
+ Returns
+ -------
+ rg : Generator
+ Generator using the named core BitGenerator
+ """
+ if isinstance(bit_generator_name, BitGenerator):
+ return Generator(bit_generator_name)
+ # Legacy path that uses a bit generator name and ctor
+ return Generator(bit_generator_ctor(bit_generator_name))
+
+
+def __randomstate_ctor(bit_generator_name="MT19937",
+ bit_generator_ctor=__bit_generator_ctor):
+ """
+ Pickling helper function that returns a legacy RandomState-like object
+
+ Parameters
+ ----------
+ bit_generator_name : str
+ String containing the core BitGenerator's name
+ bit_generator_ctor : callable, optional
+ Callable function that takes bit_generator_name as its only argument
+ and returns an instantized bit generator.
+
+ Returns
+ -------
+ rs : RandomState
+ Legacy RandomState using the named core BitGenerator
+ """
+ if isinstance(bit_generator_name, BitGenerator):
+ return RandomState(bit_generator_name)
+ return RandomState(bit_generator_ctor(bit_generator_name))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d4c6e8155ae9a800d3b0e3b320e6e552ce85f177
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_pickle.pyi
@@ -0,0 +1,43 @@
+from collections.abc import Callable
+from typing import Final, Literal, TypeVar, TypedDict, overload, type_check_only
+
+from numpy.random._generator import Generator
+from numpy.random._mt19937 import MT19937
+from numpy.random._pcg64 import PCG64, PCG64DXSM
+from numpy.random._philox import Philox
+from numpy.random._sfc64 import SFC64
+from numpy.random.bit_generator import BitGenerator
+from numpy.random.mtrand import RandomState
+
+_T = TypeVar("_T", bound=BitGenerator)
+
+@type_check_only
+class _BitGenerators(TypedDict):
+ MT19937: type[MT19937]
+ PCG64: type[PCG64]
+ PCG64DXSM: type[PCG64DXSM]
+ Philox: type[Philox]
+ SFC64: type[SFC64]
+
+BitGenerators: Final[_BitGenerators] = ...
+
+@overload
+def __bit_generator_ctor(bit_generator: Literal["MT19937"] = "MT19937") -> MT19937: ...
+@overload
+def __bit_generator_ctor(bit_generator: Literal["PCG64"]) -> PCG64: ...
+@overload
+def __bit_generator_ctor(bit_generator: Literal["PCG64DXSM"]) -> PCG64DXSM: ...
+@overload
+def __bit_generator_ctor(bit_generator: Literal["Philox"]) -> Philox: ...
+@overload
+def __bit_generator_ctor(bit_generator: Literal["SFC64"]) -> SFC64: ...
+@overload
+def __bit_generator_ctor(bit_generator: type[_T]) -> _T: ...
+def __generator_ctor(
+ bit_generator_name: str | type[BitGenerator] | BitGenerator = "MT19937",
+ bit_generator_ctor: Callable[[str | type[BitGenerator]], BitGenerator] = ...,
+) -> Generator: ...
+def __randomstate_ctor(
+ bit_generator_name: str | type[BitGenerator] | BitGenerator = "MT19937",
+ bit_generator_ctor: Callable[[str | type[BitGenerator]], BitGenerator] = ...,
+) -> RandomState: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..56bd3a7a29e025a6aaed9bd36b6df48b2483e583
Binary files /dev/null and b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.cpython-310-x86_64-linux-gnu.so differ
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..baaae7c668fb61f950489f4486c1880ae7cd44e1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/_sfc64.pyi
@@ -0,0 +1,28 @@
+from typing import TypedDict, type_check_only
+
+from numpy import uint64
+from numpy.random.bit_generator import BitGenerator, SeedSequence
+from numpy._typing import NDArray, _ArrayLikeInt_co
+
+@type_check_only
+class _SFC64Internal(TypedDict):
+ state: NDArray[uint64]
+
+@type_check_only
+class _SFC64State(TypedDict):
+ bit_generator: str
+ state: _SFC64Internal
+ has_uint32: int
+ uinteger: int
+
+class SFC64(BitGenerator):
+ def __init__(self, seed: None | _ArrayLikeInt_co | SeedSequence = ...) -> None: ...
+ @property
+ def state(
+ self,
+ ) -> _SFC64State: ...
+ @state.setter
+ def state(
+ self,
+ value: _SFC64State,
+ ) -> None: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..2856b1ac335d919dfe83131635f6f94ea616163d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fa02602384f668d5551761a14c616893a01ac02965092cdaf52b86fd2584d9c3
+size 242528
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pxd b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..dfa7d0a71c085dfa3dfb2819f47493cb8501d198
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pxd
@@ -0,0 +1,35 @@
+cimport numpy as np
+from libc.stdint cimport uint32_t, uint64_t
+
+cdef extern from "numpy/random/bitgen.h":
+ struct bitgen:
+ void *state
+ uint64_t (*next_uint64)(void *st) nogil
+ uint32_t (*next_uint32)(void *st) nogil
+ double (*next_double)(void *st) nogil
+ uint64_t (*next_raw)(void *st) nogil
+
+ ctypedef bitgen bitgen_t
+
+cdef class BitGenerator():
+ cdef readonly object _seed_seq
+ cdef readonly object lock
+ cdef bitgen_t _bitgen
+ cdef readonly object _ctypes
+ cdef readonly object _cffi
+ cdef readonly object capsule
+
+
+cdef class SeedSequence():
+ cdef readonly object entropy
+ cdef readonly tuple spawn_key
+ cdef readonly Py_ssize_t pool_size
+ cdef readonly object pool
+ cdef readonly uint32_t n_children_spawned
+
+ cdef mix_entropy(self, np.ndarray[np.npy_uint32, ndim=1] mixer,
+ np.ndarray[np.npy_uint32, ndim=1] entropy_array)
+ cdef get_assembled_entropy(self)
+
+cdef class SeedlessSequence():
+ pass
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..78fb769683d32f0ae2c1c663ff76d79429b2e6e7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/bit_generator.pyi
@@ -0,0 +1,107 @@
+import abc
+from collections.abc import Callable, Mapping, Sequence
+from threading import Lock
+from typing import Any, ClassVar, Literal, NamedTuple, TypeAlias, TypedDict, overload, type_check_only
+
+from _typeshed import Incomplete
+from typing_extensions import CapsuleType, Self
+
+import numpy as np
+from numpy._typing import NDArray, _ArrayLikeInt_co, _DTypeLike, _ShapeLike, _UInt32Codes, _UInt64Codes
+
+__all__ = ["BitGenerator", "SeedSequence"]
+
+###
+
+_DTypeLikeUint_: TypeAlias = _DTypeLike[np.uint32 | np.uint64] | _UInt32Codes | _UInt64Codes
+
+@type_check_only
+class _SeedSeqState(TypedDict):
+ entropy: int | Sequence[int] | None
+ spawn_key: tuple[int, ...]
+ pool_size: int
+ n_children_spawned: int
+
+@type_check_only
+class _Interface(NamedTuple):
+ state_address: Incomplete
+ state: Incomplete
+ next_uint64: Incomplete
+ next_uint32: Incomplete
+ next_double: Incomplete
+ bit_generator: Incomplete
+
+@type_check_only
+class _CythonMixin:
+ def __setstate_cython__(self, pyx_state: object, /) -> None: ...
+ def __reduce_cython__(self) -> Any: ... # noqa: ANN401
+
+@type_check_only
+class _GenerateStateMixin(_CythonMixin):
+ def generate_state(self, /, n_words: int, dtype: _DTypeLikeUint_ = ...) -> NDArray[np.uint32 | np.uint64]: ...
+
+###
+
+class ISeedSequence(abc.ABC):
+ @abc.abstractmethod
+ def generate_state(self, /, n_words: int, dtype: _DTypeLikeUint_ = ...) -> NDArray[np.uint32 | np.uint64]: ...
+
+class ISpawnableSeedSequence(ISeedSequence, abc.ABC):
+ @abc.abstractmethod
+ def spawn(self, /, n_children: int) -> list[Self]: ...
+
+class SeedlessSeedSequence(_GenerateStateMixin, ISpawnableSeedSequence):
+ def spawn(self, /, n_children: int) -> list[Self]: ...
+
+class SeedSequence(_GenerateStateMixin, ISpawnableSeedSequence):
+ __pyx_vtable__: ClassVar[CapsuleType] = ...
+
+ entropy: int | Sequence[int] | None
+ spawn_key: tuple[int, ...]
+ pool_size: int
+ n_children_spawned: int
+ pool: NDArray[np.uint32]
+
+ def __init__(
+ self,
+ /,
+ entropy: _ArrayLikeInt_co | None = None,
+ *,
+ spawn_key: Sequence[int] = (),
+ pool_size: int = 4,
+ n_children_spawned: int = ...,
+ ) -> None: ...
+ def spawn(self, /, n_children: int) -> list[Self]: ...
+ @property
+ def state(self) -> _SeedSeqState: ...
+
+class BitGenerator(_CythonMixin, abc.ABC):
+ lock: Lock
+ @property
+ def state(self) -> Mapping[str, Any]: ...
+ @state.setter
+ def state(self, value: Mapping[str, Any], /) -> None: ...
+ @property
+ def seed_seq(self) -> ISeedSequence: ...
+ @property
+ def ctypes(self) -> _Interface: ...
+ @property
+ def cffi(self) -> _Interface: ...
+ @property
+ def capsule(self) -> CapsuleType: ...
+
+ #
+ def __init__(self, /, seed: _ArrayLikeInt_co | SeedSequence | None = None) -> None: ...
+ def __reduce__(self) -> tuple[Callable[[str], Self], tuple[str], tuple[Mapping[str, Any], ISeedSequence]]: ...
+ def spawn(self, /, n_children: int) -> list[Self]: ...
+ def _benchmark(self, /, cnt: int, method: str = "uint64") -> None: ...
+
+ #
+ @overload
+ def random_raw(self, /, size: None = None, output: Literal[True] = True) -> int: ...
+ @overload
+ def random_raw(self, /, size: _ShapeLike, output: Literal[True] = True) -> NDArray[np.uint64]: ...
+ @overload
+ def random_raw(self, /, size: _ShapeLike | None, output: Literal[False]) -> None: ...
+ @overload
+ def random_raw(self, /, size: _ShapeLike | None = None, *, output: Literal[False]) -> None: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/c_distributions.pxd b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/c_distributions.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..da790ca499df2aadb503d6a98182575fb0de67ed
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/c_distributions.pxd
@@ -0,0 +1,119 @@
+#cython: wraparound=False, nonecheck=False, boundscheck=False, cdivision=True, language_level=3
+from numpy cimport npy_intp
+
+from libc.stdint cimport (uint64_t, int32_t, int64_t)
+from numpy.random cimport bitgen_t
+
+cdef extern from "numpy/random/distributions.h":
+
+ struct s_binomial_t:
+ int has_binomial
+ double psave
+ int64_t nsave
+ double r
+ double q
+ double fm
+ int64_t m
+ double p1
+ double xm
+ double xl
+ double xr
+ double c
+ double laml
+ double lamr
+ double p2
+ double p3
+ double p4
+
+ ctypedef s_binomial_t binomial_t
+
+ float random_standard_uniform_f(bitgen_t *bitgen_state) nogil
+ double random_standard_uniform(bitgen_t *bitgen_state) nogil
+ void random_standard_uniform_fill(bitgen_t* bitgen_state, npy_intp cnt, double *out) nogil
+ void random_standard_uniform_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+
+ double random_standard_exponential(bitgen_t *bitgen_state) nogil
+ float random_standard_exponential_f(bitgen_t *bitgen_state) nogil
+ void random_standard_exponential_fill(bitgen_t *bitgen_state, npy_intp cnt, double *out) nogil
+ void random_standard_exponential_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+ void random_standard_exponential_inv_fill(bitgen_t *bitgen_state, npy_intp cnt, double *out) nogil
+ void random_standard_exponential_inv_fill_f(bitgen_t *bitgen_state, npy_intp cnt, float *out) nogil
+
+ double random_standard_normal(bitgen_t* bitgen_state) nogil
+ float random_standard_normal_f(bitgen_t *bitgen_state) nogil
+ void random_standard_normal_fill(bitgen_t *bitgen_state, npy_intp count, double *out) nogil
+ void random_standard_normal_fill_f(bitgen_t *bitgen_state, npy_intp count, float *out) nogil
+ double random_standard_gamma(bitgen_t *bitgen_state, double shape) nogil
+ float random_standard_gamma_f(bitgen_t *bitgen_state, float shape) nogil
+
+ float random_standard_uniform_f(bitgen_t *bitgen_state) nogil
+ void random_standard_uniform_fill_f(bitgen_t* bitgen_state, npy_intp cnt, float *out) nogil
+ float random_standard_normal_f(bitgen_t* bitgen_state) nogil
+ float random_standard_gamma_f(bitgen_t *bitgen_state, float shape) nogil
+
+ int64_t random_positive_int64(bitgen_t *bitgen_state) nogil
+ int32_t random_positive_int32(bitgen_t *bitgen_state) nogil
+ int64_t random_positive_int(bitgen_t *bitgen_state) nogil
+ uint64_t random_uint(bitgen_t *bitgen_state) nogil
+
+ double random_normal(bitgen_t *bitgen_state, double loc, double scale) nogil
+
+ double random_gamma(bitgen_t *bitgen_state, double shape, double scale) nogil
+ float random_gamma_f(bitgen_t *bitgen_state, float shape, float scale) nogil
+
+ double random_exponential(bitgen_t *bitgen_state, double scale) nogil
+ double random_uniform(bitgen_t *bitgen_state, double lower, double range) nogil
+ double random_beta(bitgen_t *bitgen_state, double a, double b) nogil
+ double random_chisquare(bitgen_t *bitgen_state, double df) nogil
+ double random_f(bitgen_t *bitgen_state, double dfnum, double dfden) nogil
+ double random_standard_cauchy(bitgen_t *bitgen_state) nogil
+ double random_pareto(bitgen_t *bitgen_state, double a) nogil
+ double random_weibull(bitgen_t *bitgen_state, double a) nogil
+ double random_power(bitgen_t *bitgen_state, double a) nogil
+ double random_laplace(bitgen_t *bitgen_state, double loc, double scale) nogil
+ double random_gumbel(bitgen_t *bitgen_state, double loc, double scale) nogil
+ double random_logistic(bitgen_t *bitgen_state, double loc, double scale) nogil
+ double random_lognormal(bitgen_t *bitgen_state, double mean, double sigma) nogil
+ double random_rayleigh(bitgen_t *bitgen_state, double mode) nogil
+ double random_standard_t(bitgen_t *bitgen_state, double df) nogil
+ double random_noncentral_chisquare(bitgen_t *bitgen_state, double df,
+ double nonc) nogil
+ double random_noncentral_f(bitgen_t *bitgen_state, double dfnum,
+ double dfden, double nonc) nogil
+ double random_wald(bitgen_t *bitgen_state, double mean, double scale) nogil
+ double random_vonmises(bitgen_t *bitgen_state, double mu, double kappa) nogil
+ double random_triangular(bitgen_t *bitgen_state, double left, double mode,
+ double right) nogil
+
+ int64_t random_poisson(bitgen_t *bitgen_state, double lam) nogil
+ int64_t random_negative_binomial(bitgen_t *bitgen_state, double n, double p) nogil
+ int64_t random_binomial(bitgen_t *bitgen_state, double p, int64_t n, binomial_t *binomial) nogil
+ int64_t random_logseries(bitgen_t *bitgen_state, double p) nogil
+ int64_t random_geometric_search(bitgen_t *bitgen_state, double p) nogil
+ int64_t random_geometric_inversion(bitgen_t *bitgen_state, double p) nogil
+ int64_t random_geometric(bitgen_t *bitgen_state, double p) nogil
+ int64_t random_zipf(bitgen_t *bitgen_state, double a) nogil
+ int64_t random_hypergeometric(bitgen_t *bitgen_state, int64_t good, int64_t bad,
+ int64_t sample) nogil
+
+ uint64_t random_interval(bitgen_t *bitgen_state, uint64_t max) nogil
+
+ # Generate random uint64 numbers in closed interval [off, off + rng].
+ uint64_t random_bounded_uint64(bitgen_t *bitgen_state,
+ uint64_t off, uint64_t rng,
+ uint64_t mask, bint use_masked) nogil
+
+ void random_multinomial(bitgen_t *bitgen_state, int64_t n, int64_t *mnix,
+ double *pix, npy_intp d, binomial_t *binomial) nogil
+
+ int random_multivariate_hypergeometric_count(bitgen_t *bitgen_state,
+ int64_t total,
+ size_t num_colors, int64_t *colors,
+ int64_t nsample,
+ size_t num_variates, int64_t *variates) nogil
+ void random_multivariate_hypergeometric_marginals(bitgen_t *bitgen_state,
+ int64_t total,
+ size_t num_colors, int64_t *colors,
+ int64_t nsample,
+ size_t num_variates, int64_t *variates) nogil
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/lib/libnpyrandom.a b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/lib/libnpyrandom.a
new file mode 100644
index 0000000000000000000000000000000000000000..946b059f1c5740b06d124641d66276cfc32ebccc
Binary files /dev/null and b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/lib/libnpyrandom.a differ
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.cpython-310-x86_64-linux-gnu.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..bb5b6d958527d0d58bab1cd215f5643631d9566f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.cpython-310-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0ef34372d188edcd794777a72a2eb86010f17736d3d7195b4bd6bf848ea7906c
+size 797808
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..16a722c0038e4180cc68d4e528ef806a629fc3f5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/mtrand.pyi
@@ -0,0 +1,658 @@
+import builtins
+from collections.abc import Callable
+from typing import Any, overload, Literal
+
+import numpy as np
+from numpy import (
+ dtype,
+ float64,
+ int8,
+ int16,
+ int32,
+ int64,
+ int_,
+ long,
+ uint8,
+ uint16,
+ uint32,
+ uint64,
+ uint,
+ ulong,
+)
+from numpy.random.bit_generator import BitGenerator
+from numpy._typing import (
+ ArrayLike,
+ NDArray,
+ _ArrayLikeFloat_co,
+ _ArrayLikeInt_co,
+ _DTypeLikeBool,
+ _Int8Codes,
+ _Int16Codes,
+ _Int32Codes,
+ _Int64Codes,
+ _IntCodes,
+ _LongCodes,
+ _ShapeLike,
+ _SupportsDType,
+ _UInt8Codes,
+ _UInt16Codes,
+ _UInt32Codes,
+ _UInt64Codes,
+ _UIntCodes,
+ _ULongCodes,
+)
+
+
+class RandomState:
+ _bit_generator: BitGenerator
+ def __init__(self, seed: None | _ArrayLikeInt_co | BitGenerator = ...) -> None: ...
+ def __repr__(self) -> str: ...
+ def __str__(self) -> str: ...
+ def __getstate__(self) -> dict[str, Any]: ...
+ def __setstate__(self, state: dict[str, Any]) -> None: ...
+ def __reduce__(self) -> tuple[Callable[[BitGenerator], RandomState], tuple[BitGenerator], dict[str, Any]]: ...
+ def seed(self, seed: None | _ArrayLikeFloat_co = ...) -> None: ...
+ @overload
+ def get_state(self, legacy: Literal[False] = ...) -> dict[str, Any]: ...
+ @overload
+ def get_state(
+ self, legacy: Literal[True] = ...
+ ) -> dict[str, Any] | tuple[str, NDArray[uint32], int, int, float]: ...
+ def set_state(
+ self, state: dict[str, Any] | tuple[str, NDArray[uint32], int, int, float]
+ ) -> None: ...
+ @overload
+ def random_sample(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def random_sample(self, size: _ShapeLike) -> NDArray[float64]: ...
+ @overload
+ def random(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def random(self, size: _ShapeLike) -> NDArray[float64]: ...
+ @overload
+ def beta(self, a: float, b: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def beta(
+ self, a: _ArrayLikeFloat_co, b: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def exponential(self, scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def exponential(
+ self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_exponential(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_exponential(self, size: _ShapeLike) -> NDArray[float64]: ...
+ @overload
+ def tomaxint(self, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ # Generates long values, but stores it in a 64bit int:
+ def tomaxint(self, size: _ShapeLike) -> NDArray[int64]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ ) -> int: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: type[bool] = ...,
+ ) -> bool: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: type[np.bool] = ...,
+ ) -> np.bool: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: type[int] = ...,
+ ) -> int: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ...,
+ ) -> uint8: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ...,
+ ) -> uint16: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ...,
+ ) -> uint32: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[uint] | type[uint] | _UIntCodes | _SupportsDType[dtype[uint]] = ...,
+ ) -> uint: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[ulong] | type[ulong] | _ULongCodes | _SupportsDType[dtype[ulong]] = ...,
+ ) -> ulong: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ...,
+ ) -> uint64: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ...,
+ ) -> int8: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ...,
+ ) -> int16: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ...,
+ ) -> int32: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[int_] | type[int_] | _IntCodes | _SupportsDType[dtype[int_]] = ...,
+ ) -> int_: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[long] | type[long] | _LongCodes | _SupportsDType[dtype[long]] = ...,
+ ) -> long: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: int,
+ high: None | int = ...,
+ size: None = ...,
+ dtype: dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ...,
+ ) -> int64: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[long]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: _DTypeLikeBool = ...,
+ ) -> NDArray[np.bool]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[int8] | type[int8] | _Int8Codes | _SupportsDType[dtype[int8]] = ...,
+ ) -> NDArray[int8]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[int16] | type[int16] | _Int16Codes | _SupportsDType[dtype[int16]] = ...,
+ ) -> NDArray[int16]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[int32] | type[int32] | _Int32Codes | _SupportsDType[dtype[int32]] = ...,
+ ) -> NDArray[int32]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: None | dtype[int64] | type[int64] | _Int64Codes | _SupportsDType[dtype[int64]] = ...,
+ ) -> NDArray[int64]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[uint8] | type[uint8] | _UInt8Codes | _SupportsDType[dtype[uint8]] = ...,
+ ) -> NDArray[uint8]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[uint16] | type[uint16] | _UInt16Codes | _SupportsDType[dtype[uint16]] = ...,
+ ) -> NDArray[uint16]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[uint32] | type[uint32] | _UInt32Codes | _SupportsDType[dtype[uint32]] = ...,
+ ) -> NDArray[uint32]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[uint64] | type[uint64] | _UInt64Codes | _SupportsDType[dtype[uint64]] = ...,
+ ) -> NDArray[uint64]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[long] | type[int] | type[long] | _LongCodes | _SupportsDType[dtype[long]] = ...,
+ ) -> NDArray[long]: ...
+ @overload
+ def randint( # type: ignore[misc]
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ dtype: dtype[ulong] | type[ulong] | _ULongCodes | _SupportsDType[dtype[ulong]] = ...,
+ ) -> NDArray[ulong]: ...
+ def bytes(self, length: int) -> builtins.bytes: ...
+ @overload
+ def choice(
+ self,
+ a: int,
+ size: None = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ ) -> int: ...
+ @overload
+ def choice(
+ self,
+ a: int,
+ size: _ShapeLike = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ ) -> NDArray[long]: ...
+ @overload
+ def choice(
+ self,
+ a: ArrayLike,
+ size: None = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ ) -> Any: ...
+ @overload
+ def choice(
+ self,
+ a: ArrayLike,
+ size: _ShapeLike = ...,
+ replace: bool = ...,
+ p: None | _ArrayLikeFloat_co = ...,
+ ) -> NDArray[Any]: ...
+ @overload
+ def uniform(self, low: float = ..., high: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def uniform(
+ self,
+ low: _ArrayLikeFloat_co = ...,
+ high: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def rand(self) -> float: ...
+ @overload
+ def rand(self, *args: int) -> NDArray[float64]: ...
+ @overload
+ def randn(self) -> float: ...
+ @overload
+ def randn(self, *args: int) -> NDArray[float64]: ...
+ @overload
+ def random_integers(self, low: int, high: None | int = ..., size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def random_integers(
+ self,
+ low: _ArrayLikeInt_co,
+ high: None | _ArrayLikeInt_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[long]: ...
+ @overload
+ def standard_normal(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_normal( # type: ignore[misc]
+ self, size: _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def normal(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def normal(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_gamma( # type: ignore[misc]
+ self,
+ shape: float,
+ size: None = ...,
+ ) -> float: ...
+ @overload
+ def standard_gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def gamma(self, shape: float, scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def gamma(
+ self,
+ shape: _ArrayLikeFloat_co,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def f(self, dfnum: float, dfden: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def f(
+ self, dfnum: _ArrayLikeFloat_co, dfden: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def noncentral_f(self, dfnum: float, dfden: float, nonc: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def noncentral_f(
+ self,
+ dfnum: _ArrayLikeFloat_co,
+ dfden: _ArrayLikeFloat_co,
+ nonc: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def chisquare(self, df: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def chisquare(
+ self, df: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def noncentral_chisquare(self, df: float, nonc: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def noncentral_chisquare(
+ self, df: _ArrayLikeFloat_co, nonc: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_t(self, df: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_t(
+ self, df: _ArrayLikeFloat_co, size: None = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_t(
+ self, df: _ArrayLikeFloat_co, size: _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def vonmises(self, mu: float, kappa: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def vonmises(
+ self, mu: _ArrayLikeFloat_co, kappa: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def pareto(self, a: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def pareto(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def weibull(self, a: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def weibull(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def power(self, a: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def power(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def standard_cauchy(self, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def standard_cauchy(self, size: _ShapeLike = ...) -> NDArray[float64]: ...
+ @overload
+ def laplace(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def laplace(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def gumbel(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def gumbel(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def logistic(self, loc: float = ..., scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def logistic(
+ self,
+ loc: _ArrayLikeFloat_co = ...,
+ scale: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def lognormal(self, mean: float = ..., sigma: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def lognormal(
+ self,
+ mean: _ArrayLikeFloat_co = ...,
+ sigma: _ArrayLikeFloat_co = ...,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def rayleigh(self, scale: float = ..., size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def rayleigh(
+ self, scale: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def wald(self, mean: float, scale: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def wald(
+ self, mean: _ArrayLikeFloat_co, scale: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ @overload
+ def triangular(self, left: float, mode: float, right: float, size: None = ...) -> float: ... # type: ignore[misc]
+ @overload
+ def triangular(
+ self,
+ left: _ArrayLikeFloat_co,
+ mode: _ArrayLikeFloat_co,
+ right: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[float64]: ...
+ @overload
+ def binomial(self, n: int, p: float, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def binomial(
+ self, n: _ArrayLikeInt_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ @overload
+ def negative_binomial(self, n: float, p: float, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def negative_binomial(
+ self, n: _ArrayLikeFloat_co, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ @overload
+ def poisson(self, lam: float = ..., size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def poisson(
+ self, lam: _ArrayLikeFloat_co = ..., size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ @overload
+ def zipf(self, a: float, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def zipf(
+ self, a: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ @overload
+ def geometric(self, p: float, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def geometric(
+ self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ @overload
+ def hypergeometric(self, ngood: int, nbad: int, nsample: int, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def hypergeometric(
+ self,
+ ngood: _ArrayLikeInt_co,
+ nbad: _ArrayLikeInt_co,
+ nsample: _ArrayLikeInt_co,
+ size: None | _ShapeLike = ...,
+ ) -> NDArray[long]: ...
+ @overload
+ def logseries(self, p: float, size: None = ...) -> int: ... # type: ignore[misc]
+ @overload
+ def logseries(
+ self, p: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ def multivariate_normal(
+ self,
+ mean: _ArrayLikeFloat_co,
+ cov: _ArrayLikeFloat_co,
+ size: None | _ShapeLike = ...,
+ check_valid: Literal["warn", "raise", "ignore"] = ...,
+ tol: float = ...,
+ ) -> NDArray[float64]: ...
+ def multinomial(
+ self, n: _ArrayLikeInt_co, pvals: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[long]: ...
+ def dirichlet(
+ self, alpha: _ArrayLikeFloat_co, size: None | _ShapeLike = ...
+ ) -> NDArray[float64]: ...
+ def shuffle(self, x: ArrayLike) -> None: ...
+ @overload
+ def permutation(self, x: int) -> NDArray[long]: ...
+ @overload
+ def permutation(self, x: ArrayLike) -> NDArray[Any]: ...
+
+_rand: RandomState
+
+beta = _rand.beta
+binomial = _rand.binomial
+bytes = _rand.bytes
+chisquare = _rand.chisquare
+choice = _rand.choice
+dirichlet = _rand.dirichlet
+exponential = _rand.exponential
+f = _rand.f
+gamma = _rand.gamma
+get_state = _rand.get_state
+geometric = _rand.geometric
+gumbel = _rand.gumbel
+hypergeometric = _rand.hypergeometric
+laplace = _rand.laplace
+logistic = _rand.logistic
+lognormal = _rand.lognormal
+logseries = _rand.logseries
+multinomial = _rand.multinomial
+multivariate_normal = _rand.multivariate_normal
+negative_binomial = _rand.negative_binomial
+noncentral_chisquare = _rand.noncentral_chisquare
+noncentral_f = _rand.noncentral_f
+normal = _rand.normal
+pareto = _rand.pareto
+permutation = _rand.permutation
+poisson = _rand.poisson
+power = _rand.power
+rand = _rand.rand
+randint = _rand.randint
+randn = _rand.randn
+random = _rand.random
+random_integers = _rand.random_integers
+random_sample = _rand.random_sample
+rayleigh = _rand.rayleigh
+seed = _rand.seed
+set_state = _rand.set_state
+shuffle = _rand.shuffle
+standard_cauchy = _rand.standard_cauchy
+standard_exponential = _rand.standard_exponential
+standard_gamma = _rand.standard_gamma
+standard_normal = _rand.standard_normal
+standard_t = _rand.standard_t
+triangular = _rand.triangular
+uniform = _rand.uniform
+vonmises = _rand.vonmises
+wald = _rand.wald
+weibull = _rand.weibull
+zipf = _rand.zipf
+# Two legacy that are trivial wrappers around random_sample
+sample = _rand.random_sample
+ranf = _rand.random_sample
+
+def set_bit_generator(bitgen: BitGenerator) -> None:
+ ...
+
+def get_bit_generator() -> BitGenerator:
+ ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np121.pkl.gz b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np121.pkl.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c553433249c7ff23400c61a294f52591da508c5e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np121.pkl.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:11f43e5fbd0a9078010055f6a483dc09497830d3f564d44e697394ef9bdd8aa3
+size 203
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np126.pkl.gz b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np126.pkl.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c097e45919299171caefeff4a800cafad9f903e4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/generator_pcg64_np126.pkl.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7cdf1d78d5715fe1c42c0d5e219df691db58bdce21c0ac9aeb0bf4d0625e1f46
+size 208
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-1.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..b97bfa66f72f1be31cdb32317905d805fe90f4d5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xc816921f
+1, 0xb3623c6d
+2, 0x5fa391bb
+3, 0x40178d9
+4, 0x7dcc9811
+5, 0x548eb8e6
+6, 0x92ba3125
+7, 0x65fde68d
+8, 0x2f81ec95
+9, 0xbd94f7a2
+10, 0xdc4d9bcc
+11, 0xa672bf13
+12, 0xb41113e
+13, 0xec7e0066
+14, 0x50239372
+15, 0xd9d66b1d
+16, 0xab72a161
+17, 0xddc2e29f
+18, 0x7ea29ab4
+19, 0x80d141ba
+20, 0xb1c7edf1
+21, 0x44d29203
+22, 0xe224d98
+23, 0x5b3e9d26
+24, 0x14fd567c
+25, 0x27d98c96
+26, 0x838779fc
+27, 0x92a138a
+28, 0x5d08965b
+29, 0x531e0ad6
+30, 0x984ee8f4
+31, 0x1ed78539
+32, 0x32bd6d8d
+33, 0xc37c8516
+34, 0x9aef5c6b
+35, 0x3aacd139
+36, 0xd96ed154
+37, 0x489cd1ed
+38, 0x2cba4b3b
+39, 0x76c6ae72
+40, 0x2dae02b9
+41, 0x52ac5fd6
+42, 0xc2b5e265
+43, 0x630e6a28
+44, 0x3f560d5d
+45, 0x9315bdf3
+46, 0xf1055aba
+47, 0x840e42c6
+48, 0xf2099c6b
+49, 0x15ff7696
+50, 0x7948d146
+51, 0x97342961
+52, 0x7a7a21c
+53, 0xc66f4fb1
+54, 0x23c4103e
+55, 0xd7321f98
+56, 0xeb7efb75
+57, 0xe02490b5
+58, 0x2aa02de
+59, 0x8bee0bf7
+60, 0xfc2da059
+61, 0xae835034
+62, 0x678f2075
+63, 0x6d03094b
+64, 0x56455e05
+65, 0x18b32373
+66, 0x8ff0356b
+67, 0x1fe442fb
+68, 0x3f1ab6c3
+69, 0xb6fd21b
+70, 0xfc310eb2
+71, 0xb19e9a4d
+72, 0x17ddee72
+73, 0xfd534251
+74, 0x9e500564
+75, 0x9013a036
+76, 0xcf08f118
+77, 0x6b6d5969
+78, 0x3ccf1977
+79, 0x7cc11497
+80, 0x651c6ac9
+81, 0x4d6b104b
+82, 0x9a28314e
+83, 0x14c237be
+84, 0x9cfc8d52
+85, 0x2947fad5
+86, 0xd71eff49
+87, 0x5188730e
+88, 0x4b894614
+89, 0xf4fa2a34
+90, 0x42f7cc69
+91, 0x4089c9e8
+92, 0xbf0bbfe4
+93, 0x3cea65c
+94, 0xc6221207
+95, 0x1bb71a8f
+96, 0x54843fe7
+97, 0xbc59de4c
+98, 0x79c6ee64
+99, 0x14e57a26
+100, 0x68d88fe
+101, 0x2b86ef64
+102, 0x8ffff3c1
+103, 0x5bdd573f
+104, 0x85671813
+105, 0xefe32ca2
+106, 0x105ded1e
+107, 0x90ca2769
+108, 0xb33963ac
+109, 0x363fbbc3
+110, 0x3b3763ae
+111, 0x1d50ab88
+112, 0xc9ec01eb
+113, 0xc8bbeada
+114, 0x5d704692
+115, 0x5fd9e40
+116, 0xe61c125
+117, 0x2fe05792
+118, 0xda8afb72
+119, 0x4cbaa653
+120, 0xdd2243df
+121, 0x896fd3f5
+122, 0x5bc23db
+123, 0xa1c4e807
+124, 0x57d1a24d
+125, 0x66503ddc
+126, 0xcf7c0838
+127, 0x19e034fc
+128, 0x66807450
+129, 0xfc219b3b
+130, 0xe8a843e7
+131, 0x9ce61f08
+132, 0x92b950d6
+133, 0xce955ec4
+134, 0xda0d1f0d
+135, 0x960c6250
+136, 0x39552432
+137, 0xde845e84
+138, 0xff3b4b11
+139, 0x5d918e6f
+140, 0xbb930df2
+141, 0x7cfb0993
+142, 0x5400e1e9
+143, 0x3bfa0954
+144, 0x7e2605fb
+145, 0x11941591
+146, 0x887e6994
+147, 0xdc8bed45
+148, 0x45b3fb50
+149, 0xfbdf8358
+150, 0x41507468
+151, 0x34c87166
+152, 0x17f64d77
+153, 0x3bbaf4f8
+154, 0x4f26f37e
+155, 0x4a56ebf2
+156, 0x81100f1
+157, 0x96d94eae
+158, 0xca88fda5
+159, 0x2eef3a60
+160, 0x952afbd3
+161, 0x2bec88c7
+162, 0x52335c4b
+163, 0x8296db8e
+164, 0x4da7d00a
+165, 0xc00ac899
+166, 0xadff8c72
+167, 0xbecf26cf
+168, 0x8835c83c
+169, 0x1d13c804
+170, 0xaa940ddc
+171, 0x68222cfe
+172, 0x4569c0e1
+173, 0x29077976
+174, 0x32d4a5af
+175, 0xd31fcdef
+176, 0xdc60682b
+177, 0x7c95c368
+178, 0x75a70213
+179, 0x43021751
+180, 0x5e52e0a6
+181, 0xf7e190b5
+182, 0xee3e4bb
+183, 0x2fe3b150
+184, 0xcf419c07
+185, 0x478a4570
+186, 0xe5c3ea50
+187, 0x417f30a8
+188, 0xf0cfdaa0
+189, 0xd1f7f738
+190, 0x2c70fc23
+191, 0x54fc89f9
+192, 0x444dcf01
+193, 0xec2a002d
+194, 0xef0c3a88
+195, 0xde21be9
+196, 0x88ab3296
+197, 0x3028897c
+198, 0x264b200b
+199, 0xd8ae0706
+200, 0x9eef901a
+201, 0xbd1b96e0
+202, 0xea71366c
+203, 0x1465b694
+204, 0x5a794650
+205, 0x83df52d4
+206, 0x8262413d
+207, 0x5bc148c0
+208, 0xe0ecd80c
+209, 0x40649571
+210, 0xb4d2ee5f
+211, 0xedfd7d09
+212, 0xa082e25f
+213, 0xc62992d1
+214, 0xbc7e65ee
+215, 0x5499cf8a
+216, 0xac28f775
+217, 0x649840fb
+218, 0xd4c54805
+219, 0x1d166ba6
+220, 0xbeb1171f
+221, 0x45b66703
+222, 0x78c03349
+223, 0x38d2a6ff
+224, 0x935cae8b
+225, 0x1d07dc3f
+226, 0x6c1ed365
+227, 0x579fc585
+228, 0x1320c0ec
+229, 0x632757eb
+230, 0xd265a397
+231, 0x70e9b6c2
+232, 0xc81e322c
+233, 0xa27153cf
+234, 0x2118ba19
+235, 0x514ec400
+236, 0x2bd0ecd6
+237, 0xc3e7dae3
+238, 0xfa39355e
+239, 0x48f23cc1
+240, 0xbcf75948
+241, 0x53ccc70c
+242, 0x75346423
+243, 0x951181e0
+244, 0x348e90df
+245, 0x14365d7f
+246, 0xfbc95d7a
+247, 0xdc98a9e6
+248, 0xed202df7
+249, 0xa59ec913
+250, 0x6b6e9ae2
+251, 0x1697f265
+252, 0x15d322d0
+253, 0xa2e7ee0a
+254, 0x88860b7e
+255, 0x455d8b9d
+256, 0x2f5c59cb
+257, 0xac49c9f1
+258, 0xa6a6a039
+259, 0xc057f56b
+260, 0xf1ff1208
+261, 0x5eb8dc9d
+262, 0xe6702509
+263, 0xe238b0ed
+264, 0x5ae32e3d
+265, 0xa88ebbdf
+266, 0xef885ae7
+267, 0xafa6d49b
+268, 0xc94499e0
+269, 0x1a196325
+270, 0x88938da3
+271, 0x14f4345
+272, 0xd8e33637
+273, 0xa3551bd5
+274, 0x73fe35c7
+275, 0x9561e94b
+276, 0xd673bf68
+277, 0x16134872
+278, 0x68c42f9f
+279, 0xdf7574c8
+280, 0x8809bab9
+281, 0x1432cf69
+282, 0xafb66bf1
+283, 0xc184aa7b
+284, 0xedbf2007
+285, 0xbd420ce1
+286, 0x761033a0
+287, 0xff7e351f
+288, 0xd6c3780e
+289, 0x5844416f
+290, 0xc6c0ee1c
+291, 0xd2e147db
+292, 0x92ac601a
+293, 0x393e846b
+294, 0x18196cca
+295, 0x54a22be
+296, 0x32bab1c4
+297, 0x60365183
+298, 0x64fa342
+299, 0xca24a493
+300, 0xd8cc8b83
+301, 0x3faf102b
+302, 0x6e09bb58
+303, 0x812f0ea
+304, 0x592c95d8
+305, 0xe45ea4c5
+306, 0x23aebf83
+307, 0xbd9691d4
+308, 0xf47b4baa
+309, 0x4ac7b487
+310, 0xcce18803
+311, 0x3377556e
+312, 0x3ff8e6b6
+313, 0x99d22063
+314, 0x23250bec
+315, 0x4e1f9861
+316, 0x8554249b
+317, 0x8635c2fc
+318, 0xe8426e8a
+319, 0x966c29d8
+320, 0x270b6082
+321, 0x3180a8a1
+322, 0xe7e1668b
+323, 0x7f868dc
+324, 0xcf4c17cf
+325, 0xe31de4d1
+326, 0xc8c8aff4
+327, 0xae8db704
+328, 0x3c928cc2
+329, 0xe12cd48
+330, 0xb33ecd04
+331, 0xb93d7cbe
+332, 0x49c69d6a
+333, 0x7d3bce64
+334, 0x86bc219
+335, 0x8408233b
+336, 0x44dc7479
+337, 0xdf80d538
+338, 0xf3db02c3
+339, 0xbbbd31d7
+340, 0x121281f
+341, 0x7521e9a3
+342, 0x8859675a
+343, 0x75aa6502
+344, 0x430ed15b
+345, 0xecf0a28d
+346, 0x659774fd
+347, 0xd58a2311
+348, 0x512389a9
+349, 0xff65e1ff
+350, 0xb6ddf222
+351, 0xe3458895
+352, 0x8b13cd6e
+353, 0xd4a22870
+354, 0xe604c50c
+355, 0x27f54f26
+356, 0x8f7f422f
+357, 0x9735b4cf
+358, 0x414072b0
+359, 0x76a1c6d5
+360, 0xa2208c06
+361, 0x83cd0f61
+362, 0x6c4f7ead
+363, 0x6553cf76
+364, 0xeffcf44
+365, 0x7f434a3f
+366, 0x9dc364bd
+367, 0x3cdf52ed
+368, 0xad597594
+369, 0x9c3e211b
+370, 0x6c04a33f
+371, 0x885dafa6
+372, 0xbbdaca71
+373, 0x7ae5dd5c
+374, 0x37675644
+375, 0x251853c6
+376, 0x130b086b
+377, 0x143fa54b
+378, 0x54cdc282
+379, 0x9faff5b3
+380, 0x502a5c8b
+381, 0xd9524550
+382, 0xae221aa6
+383, 0x55cf759b
+384, 0x24782da4
+385, 0xd715d815
+386, 0x250ea09a
+387, 0x4e0744ac
+388, 0x11e15814
+389, 0xabe5f9df
+390, 0xc8146350
+391, 0xfba67d9b
+392, 0x2b82e42f
+393, 0xd4ea96fc
+394, 0x5ffc179e
+395, 0x1598bafe
+396, 0x7fb6d662
+397, 0x1a12a0db
+398, 0x450cee4a
+399, 0x85f8e12
+400, 0xce71b594
+401, 0xd4bb1d19
+402, 0x968f379d
+403, 0x54cc1d52
+404, 0x467e6066
+405, 0x7da5f9a9
+406, 0x70977034
+407, 0x49e65c4b
+408, 0xd08570d1
+409, 0x7acdf60b
+410, 0xdffa038b
+411, 0x9ce14e4c
+412, 0x107cbbf8
+413, 0xdd746ca0
+414, 0xc6370a46
+415, 0xe7f83312
+416, 0x373fa9ce
+417, 0xd822a2c6
+418, 0x1d4efea6
+419, 0xc53dcadb
+420, 0x9b4e898f
+421, 0x71daa6bf
+422, 0x7a0bc78b
+423, 0xd7b86f50
+424, 0x1b8b3286
+425, 0xcf9425dd
+426, 0xd5263220
+427, 0x4ea0b647
+428, 0xc767fe64
+429, 0xcfc5e67
+430, 0xcc6a2942
+431, 0xa51eff00
+432, 0x76092e1b
+433, 0xf606e80f
+434, 0x824b5e20
+435, 0xebb55e14
+436, 0x783d96a6
+437, 0x10696512
+438, 0x17ee510a
+439, 0x3ab70a1f
+440, 0xcce6b210
+441, 0x8f72f0fb
+442, 0xf0610b41
+443, 0x83d01fb5
+444, 0x6b3de36
+445, 0xe4c2e84f
+446, 0x9c43bb15
+447, 0xddf2905
+448, 0x7dd63556
+449, 0x3662ca09
+450, 0xfb81f35b
+451, 0xc2c8a72a
+452, 0x8e93c37
+453, 0xa93da2d4
+454, 0xa03af8f1
+455, 0x8d75159a
+456, 0x15f010b0
+457, 0xa296ab06
+458, 0xe55962ba
+459, 0xeae700a9
+460, 0xe388964a
+461, 0x917f2bec
+462, 0x1c203fea
+463, 0x792a01ba
+464, 0xa93a80ac
+465, 0x9eb8a197
+466, 0x56c0bc73
+467, 0xb8f05799
+468, 0xf429a8c8
+469, 0xb92cee42
+470, 0xf8864ec
+471, 0x62f2518a
+472, 0x3a7bfa3e
+473, 0x12e56e6d
+474, 0xd7a18313
+475, 0x41fa3899
+476, 0xa09c4956
+477, 0xebcfd94a
+478, 0xc485f90b
+479, 0x4391ce40
+480, 0x742a3333
+481, 0xc932f9e5
+482, 0x75c6c263
+483, 0x80937f0
+484, 0xcf21833c
+485, 0x16027520
+486, 0xd42e669f
+487, 0xb0f01fb7
+488, 0xb35896f1
+489, 0x763737a9
+490, 0x1bb20209
+491, 0x3551f189
+492, 0x56bc2602
+493, 0xb6eacf4
+494, 0x42ec4d11
+495, 0x245cc68
+496, 0xc27ac43b
+497, 0x9d903466
+498, 0xce3f0c05
+499, 0xb708c31c
+500, 0xc0fd37eb
+501, 0x95938b2c
+502, 0xf20175a7
+503, 0x4a86ee9b
+504, 0xbe039a58
+505, 0xd41cabe7
+506, 0x83bc99ba
+507, 0x761d60e1
+508, 0x7737cc2e
+509, 0x2b82fc4b
+510, 0x375aa401
+511, 0xfe9597a0
+512, 0x5543806a
+513, 0x44f31238
+514, 0x7df31538
+515, 0x74cfa770
+516, 0x8755d881
+517, 0x1fde665a
+518, 0xda8bf315
+519, 0x973d8e95
+520, 0x72205228
+521, 0x8fe59717
+522, 0x7bb90b34
+523, 0xef6ed945
+524, 0x16fd4a38
+525, 0x5db44de1
+526, 0xf09f93b3
+527, 0xe84824cc
+528, 0x945bb50e
+529, 0xd0be4aa5
+530, 0x47c277c2
+531, 0xd3800c28
+532, 0xac1c33ec
+533, 0xd3dacce
+534, 0x811c8387
+535, 0x6761b36
+536, 0x70d3882f
+537, 0xd6e62e3a
+538, 0xea25daa2
+539, 0xb07f39d1
+540, 0x391d89d7
+541, 0x84b6fb5e
+542, 0x3dda3fca
+543, 0x229e80a4
+544, 0x3d94a4b7
+545, 0x5d3d576a
+546, 0xad7818a0
+547, 0xce23b03a
+548, 0x7aa2079c
+549, 0x9a6be555
+550, 0x83f3b34a
+551, 0x1848f9d9
+552, 0xd8fefc1c
+553, 0x48e6ce48
+554, 0x52e55750
+555, 0xf41a71cf
+556, 0xba08e259
+557, 0xfaf06a15
+558, 0xeaaac0fb
+559, 0x34f90098
+560, 0xb1dfffbb
+561, 0x718daec2
+562, 0xab4dda21
+563, 0xd27cc1ee
+564, 0x4aafbc4c
+565, 0x356dfb4f
+566, 0x83fcdfd6
+567, 0x8f0bcde0
+568, 0x4363f844
+569, 0xadc0f4d5
+570, 0x3bde994e
+571, 0x3884d452
+572, 0x21876b4a
+573, 0x9c985398
+574, 0xca55a226
+575, 0x3a88c583
+576, 0x916dc33c
+577, 0x8f67d1d7
+578, 0x3b26a667
+579, 0xe4ddeb4b
+580, 0x1a9d8c33
+581, 0x81c9b74f
+582, 0x9ed1e9df
+583, 0x6e61aecf
+584, 0x95e95a5d
+585, 0x68864ff5
+586, 0xb8fa5b9
+587, 0x72b1b3de
+588, 0x5e18a86b
+589, 0xd7f2337d
+590, 0xd70e0925
+591, 0xb573a4c1
+592, 0xc77b3f8a
+593, 0x389b20de
+594, 0x16cf6afb
+595, 0xa39bd275
+596, 0xf491cf01
+597, 0x6f88a802
+598, 0x8510af05
+599, 0xe7cd549a
+600, 0x8603179a
+601, 0xef43f191
+602, 0xf9b64c60
+603, 0xb00254a7
+604, 0xd7c06a2d
+605, 0x17e9380b
+606, 0x529e727b
+607, 0xaaa8fe0a
+608, 0xfb64ff4c
+609, 0xcd75af26
+610, 0xfb717c87
+611, 0xa0789899
+612, 0x10391ec9
+613, 0x7e9b40b3
+614, 0x18536554
+615, 0x728c05f7
+616, 0x787dca98
+617, 0xad948d1
+618, 0x44c18def
+619, 0x3303f2ec
+620, 0xa15acb5
+621, 0xb58d38f4
+622, 0xfe041ef8
+623, 0xd151a956
+624, 0x7b9168e8
+625, 0x5ebeca06
+626, 0x90fe95df
+627, 0xf76875aa
+628, 0xb2e0d664
+629, 0x2e3253b7
+630, 0x68e34469
+631, 0x1f0c2d89
+632, 0x13a34ac2
+633, 0x5ffeb841
+634, 0xe381e91c
+635, 0xb8549a92
+636, 0x3f35cf1
+637, 0xda0f9dcb
+638, 0xdd9828a6
+639, 0xe1428f29
+640, 0xf4db80b5
+641, 0xdac30af5
+642, 0x1af1dd17
+643, 0x9a540254
+644, 0xcab68a38
+645, 0x33560361
+646, 0x2fbf3886
+647, 0xbc785923
+648, 0xe081cd10
+649, 0x8e473356
+650, 0xd102c357
+651, 0xeea4fe48
+652, 0x248d3453
+653, 0x1da79ac
+654, 0x815a65ff
+655, 0x27693e76
+656, 0xb7d5af40
+657, 0x6d245d30
+658, 0x9e06fa8f
+659, 0xb0570dcb
+660, 0x469f0005
+661, 0x3e0ca132
+662, 0xd89bbf3
+663, 0xd61ccd47
+664, 0x6383878
+665, 0x62b5956
+666, 0x4dc83675
+667, 0x93fd8492
+668, 0x5a0091f5
+669, 0xc9f9bc3
+670, 0xa26e7778
+671, 0xeabf2d01
+672, 0xe612dc06
+673, 0x85d89ff9
+674, 0xd1763179
+675, 0xcb88947b
+676, 0x9e8757a5
+677, 0xe100e85c
+678, 0x904166eb
+679, 0x4996243d
+680, 0x4038e1cb
+681, 0x2be2c63d
+682, 0x77017e81
+683, 0x3b1f556b
+684, 0x1c785c77
+685, 0x6869b8bd
+686, 0xe1217ed4
+687, 0x4012ab2f
+688, 0xc06c0d8e
+689, 0x2122eb68
+690, 0xad1783fd
+691, 0x5f0c80e3
+692, 0x828f7efa
+693, 0x29328399
+694, 0xeadf1087
+695, 0x85dc0037
+696, 0x9691ef26
+697, 0xc0947a53
+698, 0x2a178d2a
+699, 0x2a2c7e8f
+700, 0x90378380
+701, 0xaad8d326
+702, 0x9cf1c3c8
+703, 0x84eccd44
+704, 0x79e61808
+705, 0x8b3f454e
+706, 0x209e6e1
+707, 0x51f88378
+708, 0xc210226f
+709, 0xd982adb5
+710, 0x55d44a31
+711, 0x9817d443
+712, 0xa328c626
+713, 0x13455966
+714, 0xb8f681d3
+715, 0x2a3c713b
+716, 0xc186959b
+717, 0x814a74b0
+718, 0xed7bc90
+719, 0xa88d3d6d
+720, 0x88a9f561
+721, 0x73aa1c0a
+722, 0xdfeff404
+723, 0xec037e4b
+724, 0xa5c209f0
+725, 0xb3a223b4
+726, 0x24ce3709
+727, 0x3184c790
+728, 0xa1398c62
+729, 0x2f92034e
+730, 0xbb37a79a
+731, 0x605287b4
+732, 0x8faa772c
+733, 0x6ce56c1d
+734, 0xc035fb4c
+735, 0x7cf5b316
+736, 0x6502645
+737, 0xa283d810
+738, 0x778bc2f1
+739, 0xfdf99313
+740, 0x1f513265
+741, 0xbd3837e2
+742, 0x9b84a9a
+743, 0x2139ce91
+744, 0x61a8e890
+745, 0xf9ff12db
+746, 0xb43d2ea7
+747, 0x88532e61
+748, 0x175a6655
+749, 0x7a6c4f72
+750, 0x6dafc1b7
+751, 0x449b1459
+752, 0x514f654f
+753, 0x9a6731e2
+754, 0x8632da43
+755, 0xc81b0422
+756, 0x81fe9005
+757, 0x15b79618
+758, 0xb5fa629f
+759, 0x987a474f
+760, 0x1c74f54e
+761, 0xf9743232
+762, 0xec4b55f
+763, 0x87d761e5
+764, 0xd1ad78b7
+765, 0x453d9350
+766, 0xc7a7d85
+767, 0xb2576ff5
+768, 0xcdde49b7
+769, 0x8e1f763e
+770, 0x1338583e
+771, 0xfd65b9dc
+772, 0x4f19c4f4
+773, 0x3a52d73d
+774, 0xd3509c4c
+775, 0xda24fe31
+776, 0xe2de56ba
+777, 0x2db5e540
+778, 0x23172734
+779, 0x4db572f
+780, 0xeb941718
+781, 0x84c2649a
+782, 0x3b1e5b6a
+783, 0x4c9c61b9
+784, 0x3bccd11
+785, 0xb4d7b78e
+786, 0x48580ae5
+787, 0xd273ab68
+788, 0x25c11615
+789, 0x470b53f6
+790, 0x329c2068
+791, 0x1693721b
+792, 0xf8c9aacf
+793, 0x4c3d5693
+794, 0xd778284e
+795, 0xae1cb24f
+796, 0x3c11d1b3
+797, 0xddd2b0c0
+798, 0x90269fa7
+799, 0x5666e0a2
+800, 0xf9f195a4
+801, 0x61d78eb2
+802, 0xada5a7c0
+803, 0xaa272fbe
+804, 0xba3bae2f
+805, 0xd0b70fc2
+806, 0x529f32b
+807, 0xda7a3e21
+808, 0x9a776a20
+809, 0xb21f9635
+810, 0xb3acc14e
+811, 0xac55f56
+812, 0x29dccf41
+813, 0x32dabdb3
+814, 0xaa032f58
+815, 0xfa406af4
+816, 0xce3c415d
+817, 0xb44fb4d9
+818, 0x32248d1c
+819, 0x680c6440
+820, 0xae2337b
+821, 0x294cb597
+822, 0x5bca48fe
+823, 0xaef19f40
+824, 0xad60406
+825, 0x4781f090
+826, 0xfd691ffc
+827, 0xb6568268
+828, 0xa56c72cb
+829, 0xf8a9e0fc
+830, 0x9af4fd02
+831, 0x2cd30932
+832, 0x776cefd7
+833, 0xe31f476e
+834, 0x6d94a437
+835, 0xb3cab598
+836, 0xf582d13f
+837, 0x3bf8759d
+838, 0xc3777dc
+839, 0x5e425ea8
+840, 0x1c7ff4ed
+841, 0x1c2e97d1
+842, 0xc062d2b4
+843, 0x46dc80e0
+844, 0xbcdb47e6
+845, 0x32282fe0
+846, 0xaba89063
+847, 0x5e94e9bb
+848, 0x3e667f78
+849, 0xea6eb21a
+850, 0xe56e54e8
+851, 0xa0383510
+852, 0x6768fe2b
+853, 0xb53ac3e0
+854, 0x779569a0
+855, 0xeca83c6a
+856, 0x24db4d2d
+857, 0x4585f696
+858, 0xf84748b2
+859, 0xf6a4dd5b
+860, 0x31fb524d
+861, 0x67ab39fe
+862, 0x5882a899
+863, 0x9a05fcf6
+864, 0x712b5674
+865, 0xe8c6958f
+866, 0x4b448bb3
+867, 0x530b9abf
+868, 0xb491f491
+869, 0x98352c62
+870, 0x2d0a50e3
+871, 0xeb4384da
+872, 0x36246f07
+873, 0xcbc5c1a
+874, 0xae24031d
+875, 0x44d11ed6
+876, 0xf07f1608
+877, 0xf296aadd
+878, 0x3bcfe3be
+879, 0x8fa1e7df
+880, 0xfd317a6e
+881, 0xe4975c44
+882, 0x15205892
+883, 0xa762d4df
+884, 0xf1167365
+885, 0x6811cc00
+886, 0x8315f23
+887, 0xe045b4b1
+888, 0xa8496414
+889, 0xbed313ae
+890, 0xcdae3ddb
+891, 0xa9c22c9
+892, 0x275fab1a
+893, 0xedd65fa
+894, 0x4c188229
+895, 0x63a83e58
+896, 0x18aa9207
+897, 0xa41f2e78
+898, 0xd9f63653
+899, 0xbe2be73b
+900, 0xa3364d39
+901, 0x896d5428
+902, 0xc737539e
+903, 0x745a78c6
+904, 0xf0b2b042
+905, 0x510773b4
+906, 0x92ad8e37
+907, 0x27f2f8c4
+908, 0x23704cc8
+909, 0x3d95a77f
+910, 0xf08587a4
+911, 0xbd696a25
+912, 0x948924f3
+913, 0x8cddb634
+914, 0xcd2a4910
+915, 0x8e0e300e
+916, 0x83815a9b
+917, 0x67383510
+918, 0x3c18f0d0
+919, 0xc7a7bccc
+920, 0x7cc2d3a2
+921, 0x52eb2eeb
+922, 0xe4a257e5
+923, 0xec76160e
+924, 0x63f9ad68
+925, 0x36d0bbbf
+926, 0x957bc4e4
+927, 0xc9ed90ff
+928, 0x4cb6059d
+929, 0x2f86eca1
+930, 0x3e3665a3
+931, 0x9b7eb6f4
+932, 0x492e7e18
+933, 0xa098aa51
+934, 0x7eb568b2
+935, 0x3fd639ba
+936, 0x7bebcf1
+937, 0x99c844ad
+938, 0x43cb5ec7
+939, 0x8dfbbef5
+940, 0x5be413ff
+941, 0xd93b976d
+942, 0xc1c7a86d
+943, 0x1f0e93d0
+944, 0x498204a2
+945, 0xe8fe832a
+946, 0x2236bd7
+947, 0x89953769
+948, 0x2acc3491
+949, 0x2c4f22c6
+950, 0xd7996277
+951, 0x3bcdc349
+952, 0xfc286630
+953, 0x5f8909fd
+954, 0x242677c0
+955, 0x4cb34104
+956, 0xa6ff8100
+957, 0x39ea47ec
+958, 0x9bd54140
+959, 0x7502ffe8
+960, 0x7ebef8ae
+961, 0x1ed8abe4
+962, 0xfaba8450
+963, 0xc197b65f
+964, 0x19431455
+965, 0xe229c176
+966, 0xeb2967da
+967, 0xe0c5dc05
+968, 0xa84e3227
+969, 0x10dd9e0f
+970, 0xbdb70b02
+971, 0xce24808a
+972, 0x423edab8
+973, 0x194caf71
+974, 0x144f150d
+975, 0xf811c2d2
+976, 0xc224ee85
+977, 0x2b217a5b
+978, 0xf78a5a79
+979, 0x6554a4b1
+980, 0x769582df
+981, 0xf4b2cf93
+982, 0x89648483
+983, 0xb3283a3e
+984, 0x82b895db
+985, 0x79388ef0
+986, 0x54bc42a6
+987, 0xc4dd39d9
+988, 0x45b33b7d
+989, 0x8703b2c1
+990, 0x1cc94806
+991, 0xe0f43e49
+992, 0xcaa7b6bc
+993, 0x4f88e9af
+994, 0x1477cce5
+995, 0x347dd115
+996, 0x36e335fa
+997, 0xb93c9a31
+998, 0xaac3a175
+999, 0x68a19647
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-2.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..cdb8e4794ccdb30fa4fea3045b30a188f6ff5357
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/mt19937-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x7ab4ea94
+1, 0x9b561119
+2, 0x4957d02e
+3, 0x7dd3fdc2
+4, 0x5affe54
+5, 0x5a01741c
+6, 0x8b9e8c1f
+7, 0xda5bf11a
+8, 0x509226
+9, 0x64e2ea17
+10, 0x82c6dab5
+11, 0xe4302515
+12, 0x8198b873
+13, 0xc3ec9a82
+14, 0x829dff28
+15, 0x5278e44f
+16, 0x994a7d2c
+17, 0xf1c89398
+18, 0xaf2fddec
+19, 0x22abc6ee
+20, 0x963dbd43
+21, 0xc29edffb
+22, 0x41c1ce07
+23, 0x9c90034d
+24, 0x1f17a796
+25, 0x3833caa8
+26, 0xb8795528
+27, 0xebc595a2
+28, 0xf8f5b5dd
+29, 0xc2881f72
+30, 0x18e5d3f0
+31, 0x9b19ac7a
+32, 0xb9992436
+33, 0xc00052b3
+34, 0xb63f4475
+35, 0x962642d9
+36, 0x63506c10
+37, 0x2be6b127
+38, 0x569bdbc6
+39, 0x7f185e01
+40, 0xebb55f53
+41, 0x1c30198c
+42, 0x7c8d75c6
+43, 0xd3f2186b
+44, 0xaca5b9b1
+45, 0xbc49ff45
+46, 0xc4a802af
+47, 0x2cecd86f
+48, 0x8e0da529
+49, 0x1f22b00e
+50, 0x4559ea80
+51, 0x60f587d8
+52, 0x7c7460e9
+53, 0x67be0a4a
+54, 0x987a0183
+55, 0x7bd30f1
+56, 0xab18c4ac
+57, 0xffdbfb64
+58, 0x9ea917f9
+59, 0x1239dab7
+60, 0x38efabeb
+61, 0x5da91888
+62, 0x8f49ed62
+63, 0x83f60b1e
+64, 0x5950a3fc
+65, 0xd8911104
+66, 0x19e8859e
+67, 0x1a4d89ec
+68, 0x968ca180
+69, 0x9e1b6da3
+70, 0x3d99c2c
+71, 0x55f76289
+72, 0x8fa28b9e
+73, 0x9fe01d33
+74, 0xdade4e38
+75, 0x1ea04290
+76, 0xa7263313
+77, 0xaafc762e
+78, 0x460476d6
+79, 0x31226e12
+80, 0x451d3f05
+81, 0xd0d2764b
+82, 0xd06e1ab3
+83, 0x1394e3f4
+84, 0x2fc04ea3
+85, 0x5b8401c
+86, 0xebd6c929
+87, 0xe881687c
+88, 0x94bdd66a
+89, 0xabf85983
+90, 0x223ad12d
+91, 0x2aaeeaa3
+92, 0x1f704934
+93, 0x2db2efb6
+94, 0xf49b8dfb
+95, 0x5bdbbb9d
+96, 0xba0cd0db
+97, 0x4ec4674e
+98, 0xad0129e
+99, 0x7a66129b
+100, 0x50d12c5e
+101, 0x85b1d335
+102, 0x3efda58a
+103, 0xecd886fb
+104, 0x8ecadd3d
+105, 0x60ebac0f
+106, 0x5e10fe79
+107, 0xa84f7e5d
+108, 0x43931288
+109, 0xfacf448
+110, 0x4ee01997
+111, 0xcdc0a651
+112, 0x33c87037
+113, 0x8b50fc03
+114, 0xf52aad34
+115, 0xda6cd856
+116, 0x7585bea0
+117, 0xe947c762
+118, 0x4ddff5d8
+119, 0xe0e79b3b
+120, 0xb804cf09
+121, 0x84765c44
+122, 0x3ff666b4
+123, 0xe31621ad
+124, 0x816f2236
+125, 0x228176bc
+126, 0xfdc14904
+127, 0x635f5077
+128, 0x6981a817
+129, 0xfd9a0300
+130, 0xd3fa8a24
+131, 0xd67c1a77
+132, 0x903fe97a
+133, 0xf7c4a4d5
+134, 0x109f2058
+135, 0x48ab87fe
+136, 0xfd6f1928
+137, 0x707e9452
+138, 0xf327db9e
+139, 0x7b80d76d
+140, 0xfb6ba193
+141, 0x454a1ad0
+142, 0xe20b51e
+143, 0xb774d085
+144, 0x6b1ed574
+145, 0xb1e77de4
+146, 0xe2a83b37
+147, 0x33d3176f
+148, 0x2f0ca0fc
+149, 0x17f51e2
+150, 0x7c1fbf55
+151, 0xf09e9cd0
+152, 0xe3d9bacd
+153, 0x4244db0a
+154, 0x876c09fc
+155, 0x9db4fc2f
+156, 0xd3771d60
+157, 0x25fc6a75
+158, 0xb309915c
+159, 0xc50ee027
+160, 0xaa5b7b38
+161, 0x4c650ded
+162, 0x1acb2879
+163, 0x50db5887
+164, 0x90054847
+165, 0xfef23e5b
+166, 0x2dd7b7d5
+167, 0x990b8c2e
+168, 0x6001a601
+169, 0xb5d314c4
+170, 0xfbfb7bf9
+171, 0x1aba997d
+172, 0x814e7304
+173, 0x989d956a
+174, 0x86d5a29c
+175, 0x70a9fa08
+176, 0xc4ccba87
+177, 0x7e9cb366
+178, 0xee18eb0a
+179, 0x44f5be58
+180, 0x91d4af2d
+181, 0x5ab6e593
+182, 0x9fd6bb4d
+183, 0x85894ce
+184, 0x728a2401
+185, 0xf006f6d4
+186, 0xd782741e
+187, 0x842cd5bd
+188, 0xfb5883aa
+189, 0x7e5a471
+190, 0x83ff6965
+191, 0xc9675c6b
+192, 0xb6ced3c7
+193, 0x3de6425b
+194, 0x25e14db4
+195, 0x69ca3dec
+196, 0x81342d13
+197, 0xd7cd8417
+198, 0x88d15e69
+199, 0xefba17c9
+200, 0x43d595e6
+201, 0x89d4cf25
+202, 0x7cae9b9b
+203, 0x2242c621
+204, 0x27fc3598
+205, 0x467b1d84
+206, 0xe84d4622
+207, 0xa26bf980
+208, 0x80411010
+209, 0xe2c2bfea
+210, 0xbc6ca25a
+211, 0x3ddb592a
+212, 0xdd46eb9e
+213, 0xdfe8f657
+214, 0x2cedc974
+215, 0xf0dc546b
+216, 0xd46be68f
+217, 0x26d8a5aa
+218, 0x76e96ba3
+219, 0x7d5b5353
+220, 0xf532237c
+221, 0x6478b79
+222, 0x9b81a5e5
+223, 0x5fc68e5c
+224, 0x68436e70
+225, 0x2a0043f9
+226, 0x108d523c
+227, 0x7a4c32a3
+228, 0x9c84c742
+229, 0x6f813dae
+230, 0xfcc5bbcc
+231, 0x215b6f3a
+232, 0x84cb321d
+233, 0x7913a248
+234, 0xb1e6b585
+235, 0x49376b31
+236, 0x1dc896b0
+237, 0x347051ad
+238, 0x5524c042
+239, 0xda0eef9d
+240, 0xf2e73342
+241, 0xbeee2f9d
+242, 0x7c702874
+243, 0x9eb3bd34
+244, 0x97b09700
+245, 0xcdbab1d4
+246, 0x4a2f6ed1
+247, 0x2047bda5
+248, 0x3ecc7005
+249, 0x8d0d5e67
+250, 0x40876fb5
+251, 0xb5fd2187
+252, 0xe915d8af
+253, 0x9a2351c7
+254, 0xccc658ae
+255, 0xebb1eddc
+256, 0xc4a83671
+257, 0xffb2548f
+258, 0xe4fe387a
+259, 0x477aaab4
+260, 0x8475a4e4
+261, 0xf8823e46
+262, 0xe4130f71
+263, 0xbdb54482
+264, 0x98fe0462
+265, 0xf36b27b8
+266, 0xed7733da
+267, 0x5f428afc
+268, 0x43a3a21a
+269, 0xf8370b55
+270, 0xfade1de1
+271, 0xd9a038ea
+272, 0x3c69af23
+273, 0x24df7dd0
+274, 0xf66d9353
+275, 0x71d811be
+276, 0xcc4d024b
+277, 0xb8c30bf0
+278, 0x4198509d
+279, 0x8b37ba36
+280, 0xa41ae29a
+281, 0x8cf7799e
+282, 0x5cd0136a
+283, 0xa11324ef
+284, 0x2f8b6d4b
+285, 0x3657cf17
+286, 0x35b6873f
+287, 0xee6e5bd7
+288, 0xbeeaa98
+289, 0x9ad3c581
+290, 0xe2376c3f
+291, 0x738027cc
+292, 0x536ac839
+293, 0xf066227
+294, 0x6c9cb0f9
+295, 0x84082ae6
+296, 0xab38ae9d
+297, 0x493eade9
+298, 0xcb630b3a
+299, 0x64d44250
+300, 0xe5efb557
+301, 0xea2424d9
+302, 0x11a690ba
+303, 0x30a48ae4
+304, 0x58987e53
+305, 0x94ec6076
+306, 0x5d3308fa
+307, 0xf1635ebb
+308, 0x56a5ab90
+309, 0x2b2f2ee4
+310, 0x6f9e6483
+311, 0x8b93e327
+312, 0xa7ce140b
+313, 0x4c8aa42
+314, 0x7657bb3f
+315, 0xf250fd75
+316, 0x1edfcb0f
+317, 0xdb42ace3
+318, 0xf8147e16
+319, 0xd1992bd
+320, 0x64bb14d1
+321, 0x423e724d
+322, 0x7b172f7c
+323, 0x17171696
+324, 0x4acaf83b
+325, 0x7a83527e
+326, 0xfc980c60
+327, 0xc8b56bb
+328, 0x2453f77f
+329, 0x85ad1bf9
+330, 0x62a85dfe
+331, 0x48238c4d
+332, 0xbb3ec1eb
+333, 0x4c1c039c
+334, 0x1f37f571
+335, 0x98aecb63
+336, 0xc3b3ddd6
+337, 0xd22dad4
+338, 0xe49671a3
+339, 0xe3baf945
+340, 0xb9e21680
+341, 0xda562856
+342, 0xe8b88ce4
+343, 0x86f88de2
+344, 0x986faf76
+345, 0x6f0025c3
+346, 0x3fe21234
+347, 0xd8d3f729
+348, 0xc2d11c6f
+349, 0xd4f9e8f
+350, 0xf61a0aa
+351, 0xc48bb313
+352, 0xe944e940
+353, 0xf1801b2e
+354, 0x253590be
+355, 0x981f069d
+356, 0x891454d8
+357, 0xa4f824ad
+358, 0x6dd2cc48
+359, 0x3018827e
+360, 0x3fb329e6
+361, 0x65276517
+362, 0x8d2c0dd2
+363, 0xc965b48e
+364, 0x85d14d90
+365, 0x5a51623c
+366, 0xa9573d6a
+367, 0x82d00edf
+368, 0x5ed7ce07
+369, 0x1d946abc
+370, 0x24fa567b
+371, 0x83ef5ecc
+372, 0x9001724a
+373, 0xc4fe48f3
+374, 0x1e07c25c
+375, 0xf4d5e65e
+376, 0xb734f6e9
+377, 0x327a2df8
+378, 0x766d59b7
+379, 0x625e6b61
+380, 0xe82f32d7
+381, 0x1566c638
+382, 0x2e815871
+383, 0x606514aa
+384, 0x36b7386e
+385, 0xcaa8ce08
+386, 0xb453fe9c
+387, 0x48574e23
+388, 0x71f0da06
+389, 0xa8a79463
+390, 0x6b590210
+391, 0x86e989db
+392, 0x42899f4f
+393, 0x7a654ef9
+394, 0x4c4fe932
+395, 0x77b2fd10
+396, 0xb6b4565c
+397, 0xa2e537a3
+398, 0xef5a3dca
+399, 0x41235ea8
+400, 0x95c90541
+401, 0x50ad32c4
+402, 0xc1b8e0a4
+403, 0x498e9aab
+404, 0xffc965f1
+405, 0x72633485
+406, 0x3a731aef
+407, 0x7cfddd0b
+408, 0xb04d4129
+409, 0x184fc28e
+410, 0x424369b0
+411, 0xf9ae13a1
+412, 0xaf357c8d
+413, 0x7a19228e
+414, 0xb46de2a8
+415, 0xeff2ac76
+416, 0xa6c9357b
+417, 0x614f19c1
+418, 0x8ee1a53f
+419, 0xbe1257b1
+420, 0xf72651fe
+421, 0xd347c298
+422, 0x96dd2f23
+423, 0x5bb1d63e
+424, 0x32e10887
+425, 0x36a144da
+426, 0x9d70e791
+427, 0x5e535a25
+428, 0x214253da
+429, 0x2e43dd40
+430, 0xfc0413f4
+431, 0x1f5ea409
+432, 0x1754c126
+433, 0xcdbeebbe
+434, 0x1fb44a14
+435, 0xaec7926
+436, 0xb9d9a1e
+437, 0x9e4a6577
+438, 0x8b1f04c5
+439, 0x19854e8a
+440, 0x531080cd
+441, 0xc0cbd73
+442, 0x20399d77
+443, 0x7d8e9ed5
+444, 0x66177598
+445, 0x4d18a5c2
+446, 0xe08ebf58
+447, 0xb1f9c87b
+448, 0x66bedb10
+449, 0x26670d21
+450, 0x7a7892da
+451, 0x69b69d86
+452, 0xd04f1d1c
+453, 0xaf469625
+454, 0x7946b813
+455, 0x1ee596bd
+456, 0x7f365d85
+457, 0x795b662b
+458, 0x194ad02d
+459, 0x5a9649b5
+460, 0x6085e278
+461, 0x2cf54550
+462, 0x9c77ea0b
+463, 0x3c6ff8b
+464, 0x2141cd34
+465, 0xb90bc671
+466, 0x35037c4b
+467, 0xd04c0d76
+468, 0xc75bff8
+469, 0x8f52003b
+470, 0xfad3d031
+471, 0x667024bc
+472, 0xcb04ea36
+473, 0x3e03d587
+474, 0x2644d3a0
+475, 0xa8fe99ba
+476, 0x2b9a55fc
+477, 0x45c4d44a
+478, 0xd059881
+479, 0xe07fcd20
+480, 0x4e22046c
+481, 0x7c2cbf81
+482, 0xbf7f23de
+483, 0x69d924c3
+484, 0xe53cd01
+485, 0x3879017c
+486, 0xa590e558
+487, 0x263bc076
+488, 0x245465b1
+489, 0x449212c6
+490, 0x249dcb29
+491, 0x703d42d7
+492, 0x140eb9ec
+493, 0xc86c5741
+494, 0x7992aa5b
+495, 0xb8b76a91
+496, 0x771dac3d
+497, 0x4ecd81e3
+498, 0xe5ac30b3
+499, 0xf4d7a5a6
+500, 0xac24b97
+501, 0x63494d78
+502, 0x627ffa89
+503, 0xfa4f330
+504, 0x8098a1aa
+505, 0xcc0c61dc
+506, 0x34749fa0
+507, 0x7f217822
+508, 0x418d6f15
+509, 0xa4b6e51e
+510, 0x1036de68
+511, 0x1436986e
+512, 0x44df961d
+513, 0x368e4651
+514, 0x6a9e5d8c
+515, 0x27d1597e
+516, 0xa1926c62
+517, 0x8d1f2b55
+518, 0x5797eb42
+519, 0xa90f9e81
+520, 0x57547b10
+521, 0xdbbcca8e
+522, 0x9edd2d86
+523, 0xbb0a7527
+524, 0x7662380c
+525, 0xe7c98590
+526, 0x950fbf3f
+527, 0xdc2b76b3
+528, 0x8a945102
+529, 0x3f0a1a85
+530, 0xeb215834
+531, 0xc59f2802
+532, 0xe2a4610
+533, 0x8b5a8665
+534, 0x8b2d9933
+535, 0x40a4f0bc
+536, 0xaab5bc67
+537, 0x1442a69e
+538, 0xdf531193
+539, 0x698d3db4
+540, 0x2d40324e
+541, 0x1a25feb2
+542, 0xe8cc898f
+543, 0xf12e98f5
+544, 0xc03ad34c
+545, 0xf62fceff
+546, 0xdd827e1e
+547, 0x7d8ccb3b
+548, 0xab2d6bc1
+549, 0xc323a124
+550, 0x8184a19a
+551, 0xc3c4e934
+552, 0x5487424d
+553, 0xd6a81a44
+554, 0x90a8689d
+555, 0xe69c4c67
+556, 0xbdae02dd
+557, 0x72a18a79
+558, 0x2a88e907
+559, 0x31cf4b5d
+560, 0xb157772f
+561, 0x206ba601
+562, 0x18529232
+563, 0x7dac90d8
+564, 0x3a5f8a09
+565, 0x9f4b64a3
+566, 0xae373af9
+567, 0x1d79447c
+568, 0x2a23684b
+569, 0x41fb7ba4
+570, 0x55e4bb9e
+571, 0xd7619d3e
+572, 0xc04e4dd8
+573, 0x8418d516
+574, 0x2b2ca585
+575, 0xfa8eedf
+576, 0x5bafd977
+577, 0x31974fb0
+578, 0x9eb6697b
+579, 0xc8be22f5
+580, 0x173b126a
+581, 0x8809becf
+582, 0x3e41efe1
+583, 0x3d6cbbb8
+584, 0x278c81d8
+585, 0xa6f08434
+586, 0xa0e6601d
+587, 0x2fccd88d
+588, 0x3cbc8beb
+589, 0x5f65d864
+590, 0xa1ff8ddf
+591, 0x609dcb7c
+592, 0x4a4e1663
+593, 0xeae5531
+594, 0x962a7c85
+595, 0x1e110607
+596, 0x8c5db5d0
+597, 0xc7f2337e
+598, 0xc94fcc9c
+599, 0xe7f62629
+600, 0x6c9aa9f8
+601, 0x2e27fe0e
+602, 0x4d0dae12
+603, 0x9eecf588
+604, 0x977ba3f2
+605, 0xed0a51af
+606, 0x3f3ec633
+607, 0xc174b2ec
+608, 0x590be8a9
+609, 0x4f630d18
+610, 0xf579e989
+611, 0xe2a55584
+612, 0xee11edcd
+613, 0x150a4833
+614, 0xc0a0535c
+615, 0xb5e00993
+616, 0xb6435700
+617, 0xa98dbff
+618, 0x315716af
+619, 0x94395776
+620, 0x6cbd48d9
+621, 0xab17f8fc
+622, 0xa794ffb7
+623, 0x6b55e231
+624, 0x89ff5783
+625, 0x431dcb26
+626, 0x270f9bf8
+627, 0x2af1b8d0
+628, 0x881745ed
+629, 0x17e1be4e
+630, 0x132a0ec4
+631, 0x5712df17
+632, 0x2dfb3334
+633, 0xf5a35519
+634, 0xcafbdac6
+635, 0x73b6189d
+636, 0x10107cac
+637, 0x18c1045e
+638, 0xbc19bbad
+639, 0x8b4f05ac
+640, 0x5830d038
+641, 0x468cd98a
+642, 0x5b83a201
+643, 0xf0ccdd9c
+644, 0xcb20c4bd
+645, 0x1ff186c9
+646, 0xcdddb47f
+647, 0x5c65ce6
+648, 0xb748c580
+649, 0x23b6f262
+650, 0xe2ba8e5c
+651, 0x9a164a03
+652, 0x62d3322e
+653, 0x918d8b43
+654, 0x45c8b49d
+655, 0xce172c6e
+656, 0x23febc6
+657, 0x84fdc5b7
+658, 0xe7d1fd82
+659, 0xf0ddf3a6
+660, 0x87050436
+661, 0x13d46375
+662, 0x5b191c78
+663, 0x2cbd99c0
+664, 0x7686c7f
+665, 0xcff56c84
+666, 0x7f9b4486
+667, 0xefc997fe
+668, 0x984d4588
+669, 0xfa44f36a
+670, 0x7a5276c1
+671, 0xcfde6176
+672, 0xcacf7b1d
+673, 0xcffae9a7
+674, 0xe98848d5
+675, 0xd4346001
+676, 0xa2196cac
+677, 0x217f07dc
+678, 0x42d5bef
+679, 0x6f2e8838
+680, 0x4677a24
+681, 0x4ad9cd54
+682, 0x43df42af
+683, 0x2dde417
+684, 0xaef5acb1
+685, 0xf377f4b3
+686, 0x7d870d40
+687, 0xe53df1c2
+688, 0xaeb5be50
+689, 0x7c92eac0
+690, 0x4f00838c
+691, 0x91e05e84
+692, 0x23856c80
+693, 0xc4266fa6
+694, 0x912fddb
+695, 0x34d42d22
+696, 0x6c02ffa
+697, 0xe47d093
+698, 0x183c55b3
+699, 0xc161d142
+700, 0x3d43ff5f
+701, 0xc944a36
+702, 0x27bb9fc6
+703, 0x75c91080
+704, 0x2460d0dc
+705, 0xd2174558
+706, 0x68062dbf
+707, 0x778e5c6e
+708, 0xa4dc9a
+709, 0x7a191e69
+710, 0xc084b2ba
+711, 0xbb391d2
+712, 0x88849be
+713, 0x69c02714
+714, 0x69d4a389
+715, 0x8f51854d
+716, 0xaf10bb82
+717, 0x4d5d1c77
+718, 0x53b53109
+719, 0xa0a92aa0
+720, 0x83ecb757
+721, 0x5325752a
+722, 0x114e466e
+723, 0x4b3f2780
+724, 0xa7a6a39c
+725, 0x5e723357
+726, 0xa6b8be9b
+727, 0x157c32ff
+728, 0x8b898012
+729, 0xd7ff2b1e
+730, 0x69cd8444
+731, 0x6ad8030c
+732, 0xa08a49ec
+733, 0xfbc055d3
+734, 0xedf17e46
+735, 0xc9526200
+736, 0x3849b88a
+737, 0x2746860b
+738, 0xae13d0c1
+739, 0x4f15154f
+740, 0xd65c3975
+741, 0x6a377278
+742, 0x54d501f7
+743, 0x81a054ea
+744, 0x143592ba
+745, 0x97714ad6
+746, 0x4f9926d9
+747, 0x4f7ac56d
+748, 0xe87ca939
+749, 0x58b76f6f
+750, 0x60901ad8
+751, 0x3e401bb6
+752, 0xa058468e
+753, 0xc0bb14f6
+754, 0x2cb8f02a
+755, 0x7c2cf756
+756, 0x34c31de5
+757, 0x9b243e83
+758, 0xa5c85ab4
+759, 0x2741e3b3
+760, 0x1249000e
+761, 0x3fc4e72b
+762, 0xa3e038a2
+763, 0x952dd92c
+764, 0x2b821966
+765, 0xfa81b365
+766, 0x530919b9
+767, 0x4486d66f
+768, 0xccf4f3c1
+769, 0xa8bddd1d
+770, 0xcc295eb9
+771, 0xfccbe42f
+772, 0x38bacd8d
+773, 0x2261854f
+774, 0x56068c62
+775, 0x9bdaeb8
+776, 0x555fa5b6
+777, 0x20fe615e
+778, 0x49fb23d3
+779, 0xd093bad6
+780, 0x54919e86
+781, 0x7373eb24
+782, 0xfbaa7a98
+783, 0x5f62fb39
+784, 0xe03bc9ec
+785, 0xa5074d41
+786, 0xa1cefb1
+787, 0x13912d74
+788, 0xf6421b8
+789, 0xfcb48812
+790, 0x8f1db50b
+791, 0xc1654b87
+792, 0x948b43c2
+793, 0xf503ef77
+794, 0x117d891d
+795, 0x5493ffa
+796, 0x171313b1
+797, 0xa4b62e1e
+798, 0x77454ea6
+799, 0xbea0aff0
+800, 0x13c36389
+801, 0xe3b60bac
+802, 0xa176bed3
+803, 0x2863d428
+804, 0xe2314f46
+805, 0xa85cd3d4
+806, 0x7866e57
+807, 0x8f03f5bc
+808, 0x239ae
+809, 0x46f279fb
+810, 0xcca00559
+811, 0xaa07a104
+812, 0x89123d08
+813, 0x2e6856ba
+814, 0x43a9780d
+815, 0x676cff25
+816, 0x6744b87d
+817, 0xee260d4f
+818, 0xb98d8b77
+819, 0x9b0ca455
+820, 0x659f6fe
+821, 0x28d20d1c
+822, 0x601f2657
+823, 0xdec3073e
+824, 0x61263863
+825, 0x1a13435a
+826, 0x27497d1e
+827, 0x17a8458e
+828, 0xdddc407d
+829, 0x4bb2e8ac
+830, 0x16b2aedb
+831, 0x77ccd696
+832, 0x9d108fcd
+833, 0x25ad233e
+834, 0xaa9bc370
+835, 0xa873ab50
+836, 0xaf19c9d9
+837, 0x696e1e6b
+838, 0x1fdc4bf4
+839, 0x4c2ebc81
+840, 0xde4929ed
+841, 0xf4d0c10c
+842, 0xb6595b76
+843, 0x75cbb1b3
+844, 0xbcb6de49
+845, 0xe23157fd
+846, 0x5e596078
+847, 0xa69b0d29
+848, 0x2118a41
+849, 0x7088c16
+850, 0xc75e1e1
+851, 0x6a4af2d6
+852, 0xf19c6521
+853, 0xaff7b3b1
+854, 0x615295c7
+855, 0xbda3a8d7
+856, 0x5b5ca72e
+857, 0xdad9d80f
+858, 0xfa81c084
+859, 0xf4703fa
+860, 0x3ca54540
+861, 0xa8961d51
+862, 0x53d1ecc2
+863, 0x808d83b6
+864, 0x68e8c48e
+865, 0x89be2039
+866, 0x9088ea11
+867, 0xb8665d12
+868, 0x91272f9
+869, 0x53dddff2
+870, 0xb7a54ab
+871, 0xd2b645ca
+872, 0x99fb8590
+873, 0x5315c8e
+874, 0x2a913806
+875, 0x7f15eb2b
+876, 0xa7f1cc5d
+877, 0xbb2ee836
+878, 0xd9fafd60
+879, 0x17448d6f
+880, 0x999ec436
+881, 0x482ec606
+882, 0x9b403c0e
+883, 0x569eb51b
+884, 0xb275d1a6
+885, 0xadd29c31
+886, 0xb7ebdb15
+887, 0xdfef3662
+888, 0x51aba6db
+889, 0x6d41946d
+890, 0x77bf8896
+891, 0xcafa6fab
+892, 0x976ab40f
+893, 0x49a6d86b
+894, 0x56639e55
+895, 0x9945b996
+896, 0x81459b50
+897, 0xbce97542
+898, 0xe397c9c9
+899, 0x247a5955
+900, 0xb72b1573
+901, 0x86306f86
+902, 0x34f65dc5
+903, 0x909360c0
+904, 0xf3f696ef
+905, 0xcb9faae5
+906, 0x93daecd9
+907, 0xde1af7af
+908, 0x43a1f2d
+909, 0x6d75cde5
+910, 0x9e412b6
+911, 0x5673fed
+912, 0x16bb511a
+913, 0x35ef4cca
+914, 0x4e615aca
+915, 0x5cdaf47a
+916, 0x26676047
+917, 0x8c199325
+918, 0x2adf0cb9
+919, 0x84f2e6fd
+920, 0x5e627f64
+921, 0xb7cee354
+922, 0x542ab4a6
+923, 0xe59cd83b
+924, 0x89cc3f10
+925, 0x92b0f5f
+926, 0xc1328370
+927, 0x8208d9f7
+928, 0x68eb00cf
+929, 0xfadd4ac4
+930, 0x2517784f
+931, 0x4042b99
+932, 0x75ce0230
+933, 0x97c5a1b4
+934, 0x1a97f709
+935, 0x4c62781e
+936, 0xf530a83
+937, 0x75776413
+938, 0x321c7240
+939, 0x6afe4e36
+940, 0xad00a2b4
+941, 0xbc05477d
+942, 0xb0911e80
+943, 0x9935b87d
+944, 0xd535eec5
+945, 0x149af45e
+946, 0x786934b0
+947, 0xbc13cdac
+948, 0x208bfa2e
+949, 0xcf4b39cc
+950, 0x6ac6c172
+951, 0xbfa9a37
+952, 0x42d28db6
+953, 0x2bf1ea63
+954, 0xbed6e677
+955, 0x50325d27
+956, 0xa79d3b8b
+957, 0x52448bb1
+958, 0xefaad1bd
+959, 0x833a2e54
+960, 0xd9de549a
+961, 0x9f59672f
+962, 0x9d5f5f16
+963, 0x1c914489
+964, 0xc08fa058
+965, 0xb188698b
+966, 0xdc4672b5
+967, 0x594f720e
+968, 0x56ed428f
+969, 0x9b0898af
+970, 0x8a64d3d5
+971, 0x773308d6
+972, 0x84d62098
+973, 0x46da7cf9
+974, 0x1114eae7
+975, 0xf9f2a092
+976, 0x5363a28
+977, 0xf2db7b3a
+978, 0x102c71a9
+979, 0xe8e76aaf
+980, 0x77a97b3b
+981, 0x77b090d
+982, 0x1099620e
+983, 0xa6daaae6
+984, 0x86ff4713
+985, 0xc0ef85b8
+986, 0xf621d409
+987, 0xfd1561e2
+988, 0x4bcc687d
+989, 0x596f760
+990, 0x7c8819f9
+991, 0x8cb865b8
+992, 0xadea115a
+993, 0x56609348
+994, 0xb321ac14
+995, 0x1bac7db2
+996, 0x5fe6ee2
+997, 0xe9bfe072
+998, 0x15549e74
+999, 0xad8c191b
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-1.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..0c8271fab6dff757e0b94443be8bc0e8b5f1e047
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0x60d24054e17a0698
+1, 0xd5e79d89856e4f12
+2, 0xd254972fe64bd782
+3, 0xf1e3072a53c72571
+4, 0xd7c1d7393d4115c9
+5, 0x77b75928b763e1e2
+6, 0xee6dee05190f7909
+7, 0x15f7b1c51d7fa319
+8, 0x27e44105f26ac2d7
+9, 0xcc0d88b29e5b415
+10, 0xe07b1a90c685e361
+11, 0xd2e430240de95e38
+12, 0x3260bca9a24ca9da
+13, 0x9b3cf2e92385adb7
+14, 0x30b5514548271976
+15, 0xa3a1fa16c124faf9
+16, 0xf53e17e918e45bb6
+17, 0x26f19faaeb833bfc
+18, 0x95e1d605730cce1b
+19, 0xa7b520c5c093c1aa
+20, 0x4b68c010c9b106a3
+21, 0x25e19fe91df703f0
+22, 0x898364bb0bf593cb
+23, 0x5bd6ab7dbaa125db
+24, 0xd1fe47f25152045c
+25, 0x3bb11919addf2409
+26, 0x26a8cb7b3f54af8
+27, 0xe6a27ee11200aa24
+28, 0x7cb585ab01e22000
+29, 0x78e60028676d2ef3
+30, 0x5c32535e5a899528
+31, 0x83e8b6f8c4a46fb3
+32, 0xe56ef7668a161246
+33, 0x36dcbc15aeb73055
+34, 0x5ea247f0bd188acb
+35, 0x438b547b84601a80
+36, 0x8acda2a1273e9e3d
+37, 0x2b05e30a4b40c24c
+38, 0xfd87236bd13af032
+39, 0x471df211d8d985ef
+40, 0x18e8a5609a793292
+41, 0x46f0951fab6dc4e3
+42, 0x6c199c4e700f6795
+43, 0xf04aa16bfb7d22cb
+44, 0xd763d269fbaffc89
+45, 0x9991930cefbe5c2b
+46, 0xb2a11b953f824c96
+47, 0x63fd9f52172c44b0
+48, 0x183bdad907b1d848
+49, 0xe17953cddb931c52
+50, 0x515cf16726ec205a
+51, 0x88c327605150711a
+52, 0xc7090dd79cbc8dc3
+53, 0xcb487cedeb00a350
+54, 0xc8abf254d87b657
+55, 0xd43cc4cbfb493d1a
+56, 0x8705452e5d9ed1e
+57, 0xcecd11446769cf43
+58, 0xde72156c8d65bc69
+59, 0x796a8f0f47d52ee8
+60, 0xb4c0da443917d6c3
+61, 0xe07ad7568a8e3dc3
+62, 0xc24a8da39ce6dc21
+63, 0x92b21ea80a8556eb
+64, 0x572f21e531edf3af
+65, 0x9b917ed56bbed198
+66, 0xe65fd8ddc5ab3d7d
+67, 0xf55a80a8ec84fa18
+68, 0x18fc22e1a5227b61
+69, 0x72305dc7eeaa79d3
+70, 0x47ce58a36e7592cf
+71, 0x14c6374340c0f7cc
+72, 0x6f98273d4eb5a2c
+73, 0x59a8702c46fe8f8a
+74, 0xb67cbd8113cfe57f
+75, 0xaa03c5db5f5b7690
+76, 0x3fb0f77ea4568013
+77, 0x756530990398b26e
+78, 0x4c1952b2a3a6a343
+79, 0x1da15c5383074582
+80, 0xb405b21c81c274f7
+81, 0xbe664677a16788b
+82, 0x9d2e37550bcee656
+83, 0x8b4589f0d9defe02
+84, 0x2935f018ee06a59
+85, 0x3834bf88be97ed11
+86, 0xa610d049cea79b6d
+87, 0xd49ffc0d09a59ea9
+88, 0x4073365b76567adf
+89, 0x499eefb9bb7513e2
+90, 0x74a743ee6b0138a9
+91, 0x3bf0880f2d947594
+92, 0x555d1c0498600a99
+93, 0x923b32a88ef2ffa4
+94, 0x7325411065fbedea
+95, 0x9f4129ff8b79d300
+96, 0xab2b0a9b8a3785dc
+97, 0x11734bdfba3a1713
+98, 0xc8333398841ba585
+99, 0xee2409cc234e6742
+100, 0xf6638e700872ecd2
+101, 0x10875300c13cd284
+102, 0x27a9bbed7c15b2d3
+103, 0x3c87f8fef31ce9bd
+104, 0x92be263cd0914a95
+105, 0xa7b0f11bc742307e
+106, 0x4a56f788cc1c1a3c
+107, 0x4a130fa32257a48b
+108, 0x5d4d9eda16e90286
+109, 0x7cc2af564844bedc
+110, 0x2532867bfe7cda1a
+111, 0xb1c504676611fd17
+112, 0xce8e86cfb4189aee
+113, 0x99685898980d1970
+114, 0x8c3b67db23bcf1e
+115, 0x73e14c93905b135f
+116, 0xf0271b64ac2bd4d3
+117, 0xf4beba82f3ec1b2d
+118, 0x1cdbf3ee9f210af
+119, 0x2e938557c09c3ea6
+120, 0x2d314ccfa6ffd81d
+121, 0x31ad47079950ade4
+122, 0x342b27547b900872
+123, 0x171b0e20b9ef1a76
+124, 0xdf10ce6318b03654
+125, 0x1d625df4aa718897
+126, 0x8712715a9f6e02ec
+127, 0xb4a072da725bca3b
+128, 0x19d346cb7734bd42
+129, 0xfd4281d311cb2958
+130, 0x58274c9519fc8789
+131, 0x4cacf29d885fd544
+132, 0x784b14d1c2523b80
+133, 0x2d25242131bb2373
+134, 0xcd2a5e43a7d9abf9
+135, 0x15eda3806e650ecb
+136, 0xdaac5e277d764d96
+137, 0xdc5a5dd59aaa94e0
+138, 0x40d00237a46d5999
+139, 0x6205dd35a692743f
+140, 0xbbd8236740361f09
+141, 0x1625c9f4e7288bf9
+142, 0xb74f12df1479e3ce
+143, 0xb2d72a51b43d7131
+144, 0xf006a324b3707c83
+145, 0x28e8ab4abe7655b8
+146, 0xfb480093ad7ab55
+147, 0x3f8abd0d6ff8d272
+148, 0xc81a94177ac26bb7
+149, 0x3cdc178307751b14
+150, 0x9de84cc2b10ba025
+151, 0x3f8ab5aefcd046e2
+152, 0x43bdb894e1ee83b2
+153, 0xe288a40f3f06ac9d
+154, 0xdab62a7d04b4f30f
+155, 0x49f4e20295e1a805
+156, 0x3643764805e0edef
+157, 0x9449954618b6b
+158, 0x6c87e0d4508e0ce0
+159, 0x3a334be688a9dd7b
+160, 0xb35c39228776e499
+161, 0xc4118bfff938490e
+162, 0x88cbde3dcbb034b2
+163, 0xf91b287793c417c3
+164, 0x42b15f731a59f5b3
+165, 0xffa27104bbe4814d
+166, 0x1b6789d138beccde
+167, 0x542c2c1440d0ceb9
+168, 0x367294504d18fa0d
+169, 0xf918b60e804a1b58
+170, 0xd390964e33a9d0e3
+171, 0x23bb1be7c4030fe8
+172, 0x9731054d039a8afb
+173, 0x1a6205026b9d139b
+174, 0x2fa13b318254a07e
+175, 0x69571de7d8520626
+176, 0x641a13d7c03332b7
+177, 0x76a6237818f7a441
+178, 0x4e77860d0c660d81
+179, 0x4441448a1c1cbdb2
+180, 0xccd7783a042046e5
+181, 0xf620d8e0805e3200
+182, 0x7de02971367fdd0c
+183, 0x539c263c5914cab1
+184, 0x9c3b9ba1a87bbf08
+185, 0x6d95baa34cda215f
+186, 0x2db3f83ace0bac5f
+187, 0x7f5af1da2dc670a4
+188, 0xfcc098d16c891bfb
+189, 0x81a33df1d7a5ab12
+190, 0x767b0f863c8e9882
+191, 0x7a92983830de483d
+192, 0xfa7598c37a79ac25
+193, 0xb89b3ca42ce03053
+194, 0x457a542b8efed4f7
+195, 0x571b7737fd0eeda7
+196, 0xa0f59e524485c0a
+197, 0x82dca766b7901efd
+198, 0xa68243caf6a3bd5d
+199, 0x1bac981c6c740e5e
+200, 0xbcd51bedf9103e44
+201, 0x4e197efd3ae5a7bf
+202, 0x523568efd782268b
+203, 0x5ec4ef1191fef09
+204, 0xed751ed5e31c9ab
+205, 0x44eac24de03e1b29
+206, 0x9237d57c011d3fb3
+207, 0xa8c6da0f7692f235
+208, 0x9f9eb6bc15d6cac7
+209, 0x34bb8e0c93427aad
+210, 0x115febd738eaac4a
+211, 0xa439991ed139d27a
+212, 0x45c7c2633d8710a2
+213, 0x48b7475f3405a3ce
+214, 0x80158497c77bd00b
+215, 0x935c316a5b1657cb
+216, 0x59c5d54440e9695e
+217, 0x337c78c5b3d0ede2
+218, 0x8c46bb956b93790d
+219, 0xbf1dd03e471d71c5
+220, 0x2d375e90a4bef583
+221, 0xd0365428331b3790
+222, 0xfcd3969ac827ecd4
+223, 0x392fb6c580498410
+224, 0x6d6db4ceab5ea6c0
+225, 0x9bf84f1972e24786
+226, 0x798dfd820959dcc5
+227, 0x2e425095e65e8bfb
+228, 0x8c1aa11536b1c9c3
+229, 0xd28e2ef9b12f6f74
+230, 0x86583bc98c8f78d2
+231, 0x489877530e3f93e7
+232, 0xb1d9430631104a15
+233, 0x1814f6098e6263bd
+234, 0x8e2658a4e0d4cd53
+235, 0x5afe20e2531cdb2a
+236, 0x30d02f7c4755c9bf
+237, 0xe1e217cda16ed2d2
+238, 0xccb4913a42e3b791
+239, 0xfff21363ac183226
+240, 0xe788690bbda147a7
+241, 0x76905cf5917bfc6a
+242, 0x2a8fa58f7916f52c
+243, 0xf903c0cc0357815a
+244, 0x15d20f243a4998d2
+245, 0x5b7decee5a86ea44
+246, 0x114f7fc421211185
+247, 0x328eb21715764c50
+248, 0xaffaa3f45c0678fd
+249, 0x2579e6ef50378393
+250, 0x7610ab7743c19795
+251, 0xf9923d2bd101b197
+252, 0x57e42e7a62ba7e53
+253, 0x9f1dc217b4f02901
+254, 0x88a9ebd86509b234
+255, 0x867fc926aecc8591
+256, 0xaf22c1bfef04c718
+257, 0x39f701f0313f4288
+258, 0x6171ad397e6faab2
+259, 0x239bb5b9abdec4fc
+260, 0xd9a591e25dd01c6e
+261, 0x826dc4a75b628e49
+262, 0xf112b152c408f47
+263, 0x6843a06110f86c0
+264, 0x965e56a7185c1332
+265, 0x8d84492edbc71710
+266, 0xeee8ec111cfd1319
+267, 0xf2858e94ad98e458
+268, 0xbc9589fdf5f3a97e
+269, 0xaf0ceef3bc375130
+270, 0x48f4aaf13fa75c1e
+271, 0x111e9db47bee758f
+272, 0xea3171df130164ba
+273, 0x2a7bbe30bf827ab6
+274, 0xc516c3fdbf758c35
+275, 0xec55097754b04be5
+276, 0x374a997d52b6d3e6
+277, 0x487df5456085ffbc
+278, 0x528883b84df8eafe
+279, 0x805f77ab5ba26f86
+280, 0x8eb81477dc04f213
+281, 0x471ea08ec6794d72
+282, 0x69d3667ecc4d2176
+283, 0x98b7b6e295548a66
+284, 0x3877713c173f8f2
+285, 0xa00542570d0e8de3
+286, 0xf534b1bfa4033e50
+287, 0x7e1fedeac8bf6b26
+288, 0x8043f37c89628af4
+289, 0x1dd7039ec295e86d
+290, 0xce9c05b763a40cc4
+291, 0x246926481e61028f
+292, 0xb7cb0f1babf5893b
+293, 0xefe6b777f37fc63e
+294, 0xebbcabb4cb35cdcb
+295, 0x39fa63cd711eeea9
+296, 0xad5d3ba7aaf30c8d
+297, 0x8e9e78fe46021990
+298, 0xc7eaef6e7d5a3c62
+299, 0xefccdd5495d3f386
+300, 0x2179557ee8cfc76a
+301, 0x88a77f621f0885ce
+302, 0xafda62674543d90c
+303, 0xb8e6fbe2e13e56c0
+304, 0x8bfbbe26a14f9b1a
+305, 0x1404f59f5851f8c3
+306, 0x1140c53a0489566d
+307, 0x3edf2d138b5c3f1d
+308, 0x75d6bb275d817dc
+309, 0x8e660ae27107664e
+310, 0x7a8021038ee303e1
+311, 0x2042ef5eefa9079f
+312, 0xe3e7b90bbf6d457a
+313, 0xf3f819d2bb9405b
+314, 0x522e42155cae0c10
+315, 0xf5bfbb975b40e233
+316, 0x2cf82b614dd95cfa
+317, 0x183ef4a96bc40e55
+318, 0x9f6e351c5ba4e752
+319, 0x37c1110683c90846
+320, 0x1d89b7a996d8a977
+321, 0x18a444f77c7cb4d9
+322, 0xd0a8a971b78dc893
+323, 0x860232fb9e6543f1
+324, 0x60b6097f51002555
+325, 0xca1e5214123e3894
+326, 0xe03fe695c95f99bb
+327, 0x2c7c6779d5f03622
+328, 0xafeeee42f63055d1
+329, 0x670dde905515936a
+330, 0x9a922f42b59fb094
+331, 0xddb5ff49af5a651a
+332, 0xe61b04c9e58ebbf8
+333, 0x4e459dcf272e7fc4
+334, 0xd549e92c16adceeb
+335, 0x7a17dba1299d4a9c
+336, 0x825d756109f2b585
+337, 0xba142e61a9cb203e
+338, 0xc2a19f00e9c04a30
+339, 0x2d0f8140d23d0652
+340, 0x8b866d4d4d6caaf4
+341, 0x4f11d90dd91f8217
+342, 0xf6efc37373b9e0d
+343, 0x248493d6cd6a4736
+344, 0xd12b6ae74a951a3e
+345, 0x56e34722070b70a7
+346, 0x22d3f201cc9fa0eb
+347, 0xbfdcc320008291b7
+348, 0x1a7a6922e9204fbd
+349, 0x831421e0c4945ae4
+350, 0x66316feddddf0e11
+351, 0xa8c86a1517456554
+352, 0x14a9049ad989e335
+353, 0x837022259f141ecd
+354, 0xcb71793a06c261f7
+355, 0x4aeefc07ebe09a79
+356, 0x8982f15aa3b6594b
+357, 0x67bccfa7ed9b0d5b
+358, 0xb377463b523e9dec
+359, 0x53d3d594870fecb7
+360, 0xa5274b1caec5a60a
+361, 0xd6316d0cb643db39
+362, 0xabc1a9b536de88ce
+363, 0xed2fdb1383d2a077
+364, 0x12319c6feb97221b
+365, 0x7e0f6cd40ef47403
+366, 0x86135c84fe26dbf8
+367, 0xc96622d3fbbee19b
+368, 0xe3989d8d8511573f
+369, 0x42cc365554d1fdc7
+370, 0x4c1a1eb8bbce8b4f
+371, 0xfc4e30e7ef2034c1
+372, 0xc490444317a91e76
+373, 0x7ccdf469ff5dc81c
+374, 0xf5a0da4110cc09d7
+375, 0x505227baf34c0fb5
+376, 0xbe58737e8a35cc88
+377, 0xd449bee91b3e8c41
+378, 0x3e590e23299d0e6
+379, 0x291a7d9e0a64caf7
+380, 0xdc6fafbdfebd2293
+381, 0x8223f1e259fe8a65
+382, 0x6186fbc9efd9e3df
+383, 0xfda39b07e4007ffb
+384, 0xfc19aea98574dc02
+385, 0xd0e10d354fcacd8c
+386, 0xc9619916544a55a5
+387, 0xd454d50a8c8558cd
+388, 0xcd94a246712d91e
+389, 0x76a771f5d1231cce
+390, 0xdd20cb2b7b370ee5
+391, 0xa6f4f50feca57c49
+392, 0x78c8fb431f17ab9c
+393, 0x1b692b79a59b43cc
+394, 0x4c45045d287da7e6
+395, 0x522132e18bf43928
+396, 0x25c458983138b41c
+397, 0x2a1fb426ef229796
+398, 0x74dc324c74e5dd3d
+399, 0x6df75e3eb6eb5374
+400, 0xb63f2f4f9ca25b61
+401, 0xac72286112ee54d6
+402, 0x5a966f3d0a6863c4
+403, 0x8d7046bc64a46fc2
+404, 0xa7b740fd6e3087eb
+405, 0xcdbcbe0340cfcdf5
+406, 0xcb632613bf312b65
+407, 0xa91b3f2c2aac238b
+408, 0xa06deb3f5ae555a3
+409, 0x29d72e1f8db69
+410, 0x2d004bae09728ea6
+411, 0xc6eee5dce0736cc1
+412, 0xa7493145500ff60f
+413, 0xc4d68c4aa18ab93c
+414, 0x8210c29e79d48d7f
+415, 0xd0999d7889ecbef6
+416, 0x6e3bd61e66e93566
+417, 0xe6cc13d47d7d7b1f
+418, 0x3d6f181f42e03979
+419, 0xbed4e14fd867604a
+420, 0xbe511c84067bd86d
+421, 0x49a876d89e697d38
+422, 0xc04c3dde8f889c98
+423, 0xaf293eeab0f53e3f
+424, 0x9f6291dd65732cd6
+425, 0xd7811ac01de78c01
+426, 0xe385cf0261d50ec2
+427, 0x5a64134b3542bbf
+428, 0xf9d1302bc6f13a68
+429, 0x5d2aabbea37d8c31
+430, 0xd9842e99a5192970
+431, 0x713eadc4cd30e837
+432, 0xb7b002fc72abb413
+433, 0x276cfeea526af1cf
+434, 0x8519fe79b633a0ce
+435, 0x2f0e87363705a3e2
+436, 0x9adbac0be3c371e7
+437, 0xf3f44ba899a6173c
+438, 0x782d6c29618fde2b
+439, 0x7f61062acec408f
+440, 0x6e79cd836359258f
+441, 0x5c8e9b138df5785a
+442, 0xa54359c9f39a9a84
+443, 0xeec3f033135084b0
+444, 0x883ee717787a535c
+445, 0x9a2422b513a73b00
+446, 0x2dd4beddcdd64a58
+447, 0x90c8a13202239c7b
+448, 0x85b352ab759646d9
+449, 0x139f5cb2e46c53aa
+450, 0xe1d3ba6c721c66d1
+451, 0xaa66e0edc4b60a98
+452, 0x3521275c75be29b6
+453, 0x490a5190b3edfa5d
+454, 0xd2abcdd2ccb2f14e
+455, 0x9d9be8bef4a5857d
+456, 0xde19676f13ef7755
+457, 0xdac2fee2e42615f3
+458, 0xf4239801cb02f2ab
+459, 0xaa8bf923ed91875c
+460, 0x61d18a1940e4c7c0
+461, 0x1eb6aa3d5f077a6d
+462, 0xee7374c063bf29d8
+463, 0x2f0a59e34d76268d
+464, 0xc92e80e17d1eb3e9
+465, 0xafd05b3ec3d2ca72
+466, 0x28a61ad8d6c497b8
+467, 0xa7094d6834ad7d47
+468, 0x57d80ea9eccbb4f
+469, 0xb047e0fee6cdaf16
+470, 0x44f41b5eb48c00bb
+471, 0xd6dc8e1eb9c8c9ba
+472, 0x47adfd2c638c7849
+473, 0x365d63db7d526c68
+474, 0xc21cda439016135d
+475, 0x14d10c3f0f98863c
+476, 0xa93e56f74e037602
+477, 0x3b4e9c8915bdc9
+478, 0xb46f5ae155e54aa2
+479, 0x8e470d21ce1943e1
+480, 0x60b96301b5ba2e8d
+481, 0x1b473a41d381f9ff
+482, 0xabcf5a8e3269e73f
+483, 0xd410f6e94fb21fa1
+484, 0x65d1a47eebf87e5e
+485, 0x48eaa201c61cb843
+486, 0x212c1abc2499bfc5
+487, 0x4255ad8377d2d8d
+488, 0x44caeef472010612
+489, 0xffae764524f572f2
+490, 0x78d374d20c9ee550
+491, 0x6e003206c0511cee
+492, 0x7998a159145bfb82
+493, 0x921239650bda1d4d
+494, 0xae05025509bcfdc5
+495, 0xc6430c980be407b4
+496, 0x78524f1744b153f1
+497, 0x84089e6f468181fe
+498, 0x8d0d21d7dfb6c254
+499, 0x90bad90502a33603
+500, 0x3072a403cbd16315
+501, 0xdfadddf3f1c040c2
+502, 0x22f0b0639d9ff975
+503, 0xb49e48a4cad0765b
+504, 0x95a0a04f8239709d
+505, 0x56e147a24a4c481f
+506, 0xacf16ef61dea4c7e
+507, 0x424040afd2700de6
+508, 0xc67e8096a3c717a9
+509, 0x39f164181dd0a399
+510, 0x2449cedc1d62198c
+511, 0x7a53df11a1f1a61c
+512, 0x5596f1d4a3badae3
+513, 0x38ed4c822072b3d0
+514, 0xf07ef346b3fd730a
+515, 0xfd349c35c3ed51fd
+516, 0x2f15c9c7890f8f32
+517, 0x3b470df52b173c29
+518, 0xd31bfc8981281af7
+519, 0xbbcc9bdf561215bb
+520, 0x5782fffea326574f
+521, 0xb0ebdcfcc5e03290
+522, 0x7fd89d93d2b3fbef
+523, 0x280ea1865d9ba2
+524, 0xe726959845b2c100
+525, 0xd0361f032cd7dbb1
+526, 0x3c65ec2028b81a22
+527, 0x5221e9b2188920bf
+528, 0xeb5ab27c4125ec20
+529, 0x80a32dd48b54f0a4
+530, 0x369b5ced1012bebb
+531, 0x582d35d76530bc6f
+532, 0x7b50dc9b48e1e37d
+533, 0x37fdfe8bbacf8dad
+534, 0x7a0cb7e6e93840ea
+535, 0xa1132c870be0b2ce
+536, 0x9d8ac2c68267cd1a
+537, 0x470969b647fa7df4
+538, 0xabcb7d8adf7e2d24
+539, 0xacdebec9bdf9eb1c
+540, 0xe30f4cbf7eb6a59
+541, 0x746673836c4df41d
+542, 0x75120a6b647bb326
+543, 0x2f4eab556c3f6878
+544, 0xd84651ab05405b7a
+545, 0x9e695808b9622284
+546, 0xc93b71e56aa6e1a5
+547, 0x2be7f3be4a7b7050
+548, 0x6497e910b6733241
+549, 0xcf7050dfd08076fc
+550, 0x4e3cc156eca183f7
+551, 0xf801a33d9326c265
+552, 0x6aa293c8a47d40e6
+553, 0x28c429755faa6230
+554, 0x82b818651f54e7bb
+555, 0xa84d726d7acdbead
+556, 0x5cfa535d5774965d
+557, 0x4a34b7b1cb48d53
+558, 0x86a7b5bce426de84
+559, 0xfcd2307cecdb7318
+560, 0x16dbaaa71181a038
+561, 0x88e7e8cd261c2547
+562, 0x3c09ba6d1d5ea913
+563, 0x5dd3d643734ee5b6
+564, 0x326d725fe8cbb33
+565, 0x7bcca9ca2da8e784
+566, 0x482dcf6b11d7f9a4
+567, 0x1291b605b4cd3e04
+568, 0x6988181b50e2f4a8
+569, 0x649e3c37131fc292
+570, 0x4eeb67b9e21eba54
+571, 0xc051d39073dec45f
+572, 0xc99c52e110270d67
+573, 0xcb813d5d77868add
+574, 0x423a5f13573e7ac0
+575, 0x231ac4cc4fe73616
+576, 0x4c22b888a6e600ea
+577, 0x8059a6dc7c9e25c6
+578, 0x49f498a5b8ad22de
+579, 0xf1e812cc6d1826c8
+580, 0xbbaf60abe8b11e00
+581, 0x1d31d7f4d8be9a6a
+582, 0xfeadce70a9a10c14
+583, 0xb47c635bc136996a
+584, 0xd88e694c8da030cb
+585, 0xc41bbe132aff1364
+586, 0x34249ab18a4b0800
+587, 0xf14b5c825aa736cc
+588, 0x2710be6b08df78e
+589, 0x2ab56bcc9bf9e740
+590, 0x9b7f6e591b5f648
+591, 0xfb665c3772f34135
+592, 0x628a0a5d2db5d8d5
+593, 0xb3e3f251e61b5259
+594, 0x82310ae33faf1b23
+595, 0x24af8723a65cbd0b
+596, 0x671c93282fc4ad97
+597, 0x6cabeaac77270cad
+598, 0xef4643fe38b02b7f
+599, 0x7b011549d1ac6653
+600, 0xe2af87b9fccfe89
+601, 0x36b71ad67197ac8a
+602, 0xdbba55d06f2fd93b
+603, 0xf571dbd764b7f7e5
+604, 0x38ea402501cdbd45
+605, 0xb8ab5b5b1bab2913
+606, 0xfab973c4d45f32bd
+607, 0x9364f1717c2636b9
+608, 0xfad00f4d983e00fe
+609, 0xc90c532a11aef75a
+610, 0x64a6eda96e44783c
+611, 0x35891f2eb84520be
+612, 0x28d216080caed43
+613, 0x129629cc5bd206f6
+614, 0x22c3d39822cbb4b3
+615, 0xf1efbf4cce1eaa2b
+616, 0x7070cba12524ed08
+617, 0xa7ed0be9deabf20d
+618, 0x8ddb4cd6b454f76b
+619, 0xb82814b1db37b63
+620, 0x418e83b36de01876
+621, 0x9a538c7f39c6413
+622, 0xee0cd7abf8a2ecb9
+623, 0xa9222b07e95590f3
+624, 0x6296a415d68341e6
+625, 0x981e0a5a8f811929
+626, 0x4bb372d3b0de283d
+627, 0xa9805b5971866e16
+628, 0xaf3b5f5183497657
+629, 0x2152b0fd23c3d9f
+630, 0xb730c325b7173180
+631, 0x1e3439d231608c19
+632, 0x1c5ba6031379823c
+633, 0x87f5d12d6d365cbc
+634, 0xd3bc7f29614bc594
+635, 0x63102214bb391268
+636, 0x482bbd5bba648a44
+637, 0x6a23604690759dc4
+638, 0x4091d41408d3a39e
+639, 0x7cd017f922101b15
+640, 0x7ce9004ac5f9231
+641, 0x978bc3d8ec7f7fdf
+642, 0x5bd0c4d780580c11
+643, 0x4313c068bb040153
+644, 0x3ab7dab7bc38bf80
+645, 0x3aaf9c187728deea
+646, 0x6633a4ce8efb88d9
+647, 0x7263b089878f00fc
+648, 0xd0d767e96fe00eb8
+649, 0x184a7c0c01908028
+650, 0x1ebdf41e6f76e186
+651, 0xeb740ee1d0402083
+652, 0xfccf4974edb1c339
+653, 0x16e2707aa28306d
+654, 0x1684f0bdb018c3a5
+655, 0x887b6b67b88aa862
+656, 0x923d7810a2bea33a
+657, 0x56b3560babef5d6b
+658, 0xb39a14614c54b8c6
+659, 0x33e4dc545a509fc8
+660, 0x26e21f84142da9b
+661, 0xdd07598125756855
+662, 0x572d49a071d7ae0a
+663, 0xba3c7e3baea28760
+664, 0x7ecdb2d714db4b61
+665, 0x1c62b4920e1b2fe2
+666, 0x71bfafb70092834a
+667, 0xd710a4228f60d56a
+668, 0xeb16277d4ce4e95b
+669, 0x968168c90b16d3a1
+670, 0xac3439dfe8ad0062
+671, 0x5a8226f9dd5876ad
+672, 0xb843affe917291b0
+673, 0xd76d1e67051f8259
+674, 0xb73a6638cce8ccde
+675, 0xa0e6afd3c7295f9
+676, 0xff8857b4bbb5f4c6
+677, 0x99becf78938f0426
+678, 0xfcd17edc1e70f004
+679, 0x6223b8b23f2f50
+680, 0xca875f3e84587b4c
+681, 0x7d1e81e589f87fb9
+682, 0x9eb621586aa826fc
+683, 0xf46fb9ef5b9c2086
+684, 0x2882c9b7092725f3
+685, 0x5493f099bbedcd02
+686, 0x90c1ec979ffa811d
+687, 0x963f765025bcc53
+688, 0x56194e3ec3d9d4e9
+689, 0x7ec4720954cac1f0
+690, 0xfab3145171af7f90
+691, 0x52a0b4e41a13b593
+692, 0x740e2d4d5909d126
+693, 0x98f5339c09c94a28
+694, 0x1700e462fe8dec76
+695, 0x3dbffc2aa4695ac3
+696, 0x5763edacabdfe2a1
+697, 0x7b5b623ce49ef21d
+698, 0x30addc66f49860df
+699, 0xcc7511a6c31bceda
+700, 0x1b25b61ca75db43b
+701, 0x416bc4c298e59046
+702, 0x4cd11fe2d74e4649
+703, 0xb54458a9229fc978
+704, 0x8c21a27882b6ca35
+705, 0x57887c8b5e01639b
+706, 0xf4e893da996680bb
+707, 0x8d601297702c9c0d
+708, 0x2a27904a30aa53af
+709, 0x497800f6917ea8d0
+710, 0xe96db3340ada9c00
+711, 0xcc23166f14c010ee
+712, 0x782690d78fa65ec9
+713, 0xf3e00d74a0878eda
+714, 0xa7cbb683decca0a3
+715, 0xdd2e038e683a94aa
+716, 0xe2096ff8da896ca5
+717, 0xf7c83400afdabe11
+718, 0x395b8c6f6a4086a4
+719, 0x4a164ec05bee71d4
+720, 0xe87aa5d1ca0462fe
+721, 0x8dbc5aed6dff9ceb
+722, 0x12120d1e9552707b
+723, 0x877dca6889b3e6cd
+724, 0xbd65605c01e900fb
+725, 0xbd6b82c4157c3115
+726, 0x8b60282732caf78a
+727, 0x279fcf5e5de9e57f
+728, 0x34b34ebfb6a37eae
+729, 0xd258cc1a14e03b7b
+730, 0x9a528ba3db4a13fb
+731, 0xffa0aea59d057746
+732, 0x27fa7f456cd37c4e
+733, 0xe1117a57a6fdce63
+734, 0xdc8fc903970a1551
+735, 0x492dd104f30faf29
+736, 0x110def0959e5652b
+737, 0x7f8d1997636fdd15
+738, 0xfb77b05e538a9b59
+739, 0x2e41fa35b4b01fc6
+740, 0xbc35ae69a3374085
+741, 0x192c2a681c2d9b4b
+742, 0x12566b8866c189d6
+743, 0x9d88ea785c5185c8
+744, 0x30a621ad5f983c4
+745, 0x8b875efe1206f587
+746, 0x224d25c3af6e3423
+747, 0x7503e976a1ac7bcc
+748, 0x3c98aa869e823859
+749, 0x3d8835304b646892
+750, 0xf6353330ff970bc2
+751, 0x8a673f5e2edb8acb
+752, 0xf2fdcc53493838b9
+753, 0x85ddcd526236af16
+754, 0x60afb99814c676c5
+755, 0x32a1c2749e281ca8
+756, 0x2367a92ae3bee9ca
+757, 0x219fe082703743cc
+758, 0x34d8b74dc85182a9
+759, 0xdd04164c72db23f
+760, 0xe293ac28fe2671a9
+761, 0x9ca7d169cbda6f45
+762, 0x705c47972b4240ed
+763, 0xc10eda9eeb536209
+764, 0xc36ddacd0c94e85d
+765, 0x8eb592c27e8cd0d2
+766, 0x3e815991c76e7cc4
+767, 0xac9cfce31acf7580
+768, 0xbf7a4cb31c7aee94
+769, 0x663077444aceecf6
+770, 0xe7f614ff386eb568
+771, 0x79d7a229c66912c0
+772, 0x161ed4311f63e1f3
+773, 0x308a5faeb9982ede
+774, 0x7b38ddb9b7efd10
+775, 0x1e103a2589b27ecf
+776, 0x67b02baf4259f27e
+777, 0x868921c115ea2eee
+778, 0x959791912200f71e
+779, 0x4dd55f36dec10557
+780, 0xe3464d90080cb99d
+781, 0xfb2d4f6accce652f
+782, 0x109900a9257d77ba
+783, 0x3c4bda8e2c83684c
+784, 0xc9ae040fb7f868c6
+785, 0x78098ffe994f4905
+786, 0x7a94c33eca77f0b4
+787, 0xbe6a2a95e9b5c0e8
+788, 0x797d39cf963f4837
+789, 0x8d2e249e4425d06d
+790, 0x6ae2c30cd5da06f4
+791, 0x904489de762b179f
+792, 0x84713e2dfb591e3b
+793, 0x6405a40da3f6f51b
+794, 0x976b560d663a2df1
+795, 0xed1c544784ba1e22
+796, 0xca658e995ed9344c
+797, 0x2b1c6b8e4db49025
+798, 0x52b1513da528bad
+799, 0x3c63406d256d9968
+800, 0x63a31ca3d423f85e
+801, 0xb05a81f55789a720
+802, 0xd04412992c476c8e
+803, 0x828ec2f77a150a3d
+804, 0xee50926671bb60c6
+805, 0x5aa70f93e2df61b4
+806, 0x94d60fa2e8655858
+807, 0x3f5e5b770703cc7d
+808, 0xc62dfb2688ca7784
+809, 0xaaf02e1e8ba89fe4
+810, 0x4ab74e0d8c047405
+811, 0x31ee04fbac6fcead
+812, 0x1203b78b8228f5af
+813, 0x412a70836f9aa71a
+814, 0xab51cf98c03f1819
+815, 0x783a3ce9ce137f65
+816, 0x8897085b0a072cf2
+817, 0x685dd9bde8798cb
+818, 0x9a1fac7b1705e2c1
+819, 0xf3e9ff98de48e9cb
+820, 0x5c2d3eb1a1fbe917
+821, 0x3bda718b6b54d82e
+822, 0x29f2dd18f22f0821
+823, 0xb992da1572ac3597
+824, 0xacb69e7aa14b34f7
+825, 0xcd36e3ad14f088d1
+826, 0x6aaacc96a1ec55e8
+827, 0xf8ac593f154fe68f
+828, 0x18fc9cbff012339f
+829, 0x2f3368ccbbb99899
+830, 0x7cec7d17f37031f7
+831, 0x96e86bfaadcb8fc2
+832, 0x74f9e7ee3d42a752
+833, 0xbd52f6c7d9b0733
+834, 0xa48e6d96bb6ce1c9
+835, 0xaefa058254b82133
+836, 0xb7a19edfd0929107
+837, 0x6160ce9125b26e26
+838, 0x6537dbbde1d2aed
+839, 0xc567f9a6bec52dde
+840, 0xca29fd3f22443342
+841, 0x7732aa6db6a1c476
+842, 0x8f5a4d7df6b11b3
+843, 0x76649262aa7e31e1
+844, 0x60a13eb125fbc829
+845, 0xc81e4d123dd21ac1
+846, 0x643cbb09bb72f86b
+847, 0xf971a98fb25555a6
+848, 0xffa2774c66692d56
+849, 0xcb33c16c50b13ea9
+850, 0xfabf388dffda0e9b
+851, 0x55d41ec12ca24b9f
+852, 0x91cf693a3467e807
+853, 0x6be2c00b2c31d6dd
+854, 0xc5cf513b5251ae28
+855, 0xffc4384212403dec
+856, 0x45d4e1865255a69d
+857, 0xfb1dcf956972086a
+858, 0xcae946a55c4c55b8
+859, 0x7351ac7720e385c1
+860, 0x19aa8ffd86240254
+861, 0x8f515ae78f4040da
+862, 0x1e1ed2058de50fce
+863, 0x22d006dcdb374243
+864, 0x6e0f0ede7c95b441
+865, 0x70e8aa81b53b4d25
+866, 0x998f309ea41e3814
+867, 0x89ed6598fb66f390
+868, 0xb5997dc3278060df
+869, 0xb2a021eac4f7e046
+870, 0x3705b60aa2fd0768
+871, 0xfc415079ab9200e
+872, 0xf2871ac4cf45ecc9
+873, 0x24bf758d2246175f
+874, 0xac503dd6f8141b3
+875, 0x4e879d12d9f03b3
+876, 0x82034af8cf93b644
+877, 0x59899dd7e478a6c7
+878, 0xae90addb6eb11507
+879, 0x1524ddf76730cdef
+880, 0x6fd4afd5456b1c9d
+881, 0xcddb9221ea001cbc
+882, 0x64ff400bbf2e8604
+883, 0x6dda10549b06ed9b
+884, 0xed2c85104c261527
+885, 0xc7e09217d29929a8
+886, 0x56284df611a428b1
+887, 0x1a7608289c0a61
+888, 0x7cb63db15166ff66
+889, 0xc6013c76fcdcdc72
+890, 0x8e5dd566c7a5a676
+891, 0x5a8e8565f40d133b
+892, 0xe465973455848c44
+893, 0xf92eecbfe0f3c2c0
+894, 0x7d64155d4dcc5cac
+895, 0xf17595706f988dad
+896, 0xd590a001a6a19c5c
+897, 0x82a164475758db3d
+898, 0x6b144993ea1bbe32
+899, 0x22a81a7a6e453779
+900, 0x8e8c298df1a68a73
+901, 0x78056afd6d936b4c
+902, 0xaaceef0325faaf62
+903, 0xe78bb7699f82266f
+904, 0x523a2d283c5a5166
+905, 0x7076d87088f6c6db
+906, 0x6087dd54cff5aeb2
+907, 0x7ef82e62cb851680
+908, 0x4e8bcc8ed84d03d8
+909, 0xd12fa0361df3cfd3
+910, 0xefb89c79f8127297
+911, 0xa9af4e2fbce0b1f8
+912, 0x462136685b70331e
+913, 0xe9e74c93da699b77
+914, 0x9ec69215fb11d0c3
+915, 0xc10f229939e3e111
+916, 0x3f67fa79e41d2374
+917, 0xd5e7c1a9a7185162
+918, 0xa1dcce9ec91492fe
+919, 0xd4e61f0727b5d21b
+920, 0xdf6cdce46551800a
+921, 0xa3f256ce906982d3
+922, 0x209742a6b9ffc27
+923, 0x4006c96958526a57
+924, 0x9606aebc75a1967e
+925, 0x91b9f42fb64189df
+926, 0xb27119defcb938bc
+927, 0x128cc7a84ba05597
+928, 0x6c3df613c62d0d30
+929, 0x3adf69d48b629ec7
+930, 0xda42ee493837b128
+931, 0xb8e770480e760bb5
+932, 0x9feb55d57c99c626
+933, 0x29812d80afdae3ed
+934, 0xae4222a64276a8c7
+935, 0xe3897212a5b4ed53
+936, 0x98bedfd13886e669
+937, 0xca858675d7fc0d0e
+938, 0x28a359f665354234
+939, 0xfac2ccabe4128b35
+940, 0x61373cc5d11ca180
+941, 0x7007605a4512a87a
+942, 0xe71f8eade7b30b3d
+943, 0x3a9e77f9b99bd04d
+944, 0x70d3e42488098866
+945, 0xd30fc159c7cd4d99
+946, 0xe4d3f6600d2e2d6f
+947, 0x1088324dfa955c25
+948, 0x516437acd4764623
+949, 0x38a31abe50d0aa03
+950, 0x72e1054e9dc02ba
+951, 0xe6971dd664d1a2e2
+952, 0xf6698cb095d3b702
+953, 0xad995a5a8c19bd92
+954, 0x34e53c6936f656e6
+955, 0x10de240bc07c757a
+956, 0x3e3b9a6861c2bd1c
+957, 0x9c0b0b97d3712ec9
+958, 0xabf1505a75043aed
+959, 0xbdf93d3de3274179
+960, 0x28fa5904d3f62c28
+961, 0xc3b97b39ef6c5133
+962, 0xf2b2219225b8679d
+963, 0x8be4ec0f930c0aaa
+964, 0x47de5a56aa590643
+965, 0xb6f871b304129856
+966, 0x80a61c06233ab0f9
+967, 0x3ce6c3af8101b055
+968, 0x85b911708274e7d1
+969, 0x4cab65d093a488b7
+970, 0xaabc4b10661fe28e
+971, 0x35b16dea64474a68
+972, 0x1d6eb5b093361223
+973, 0xc39107b92f0fe1fb
+974, 0x1d09e048073c4841
+975, 0xc6a02f43aca8cb2f
+976, 0xaf6613dbc7da909c
+977, 0x5ac2a40c230aa756
+978, 0x33afb5e7c01c39a5
+979, 0xc7b0b20ea8b7d0ef
+980, 0xdf7306c8ccb1bbea
+981, 0x9710efc0c188b2a0
+982, 0xd6303eadb72c873e
+983, 0xa38ca609b118f35a
+984, 0x8390613065c6e535
+985, 0xdf9a0106757e431f
+986, 0x8bcf77039788e143
+987, 0x6026806a986b378e
+988, 0x482ff3b1394cb1dc
+989, 0x2a27d0ccac9ede9c
+990, 0x53c77f26e271b3ab
+991, 0x1ba004cf276cf3f
+992, 0xc135b0517dc81f7c
+993, 0x5d137838db75e442
+994, 0x3fe505f93d1dbdd7
+995, 0x351654ae7d598294
+996, 0x173f8d182af9d84d
+997, 0xf97dfcd164fe11c5
+998, 0xcda423e5ad43b290
+999, 0xa5cb380b8de10d10
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-2.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..7c13e3172d0e7798200f58cde9362ad0bd4a22e1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0xa30febcfd9c2825f
+1, 0x4510bdf882d9d721
+2, 0xa7d3da94ecde8b8
+3, 0x43b27b61342f01d
+4, 0xd0327a782cde513b
+5, 0xe9aa5979a6401c4e
+6, 0x9b4c7b7180edb27f
+7, 0xbac0495ff8829a45
+8, 0x8b2b01e7a1dc7fbf
+9, 0xef60e8078f56bfed
+10, 0xd0dbc74d4700374c
+11, 0xb37868abbe90b0
+12, 0xdb7ed8bf64e6f5f0
+13, 0x89910738de7951f
+14, 0xbacab307c3cfd379
+15, 0x2cf7c449d8b927a6
+16, 0xdcf94b3a16db7f0e
+17, 0x8a9d33d905a8792e
+18, 0x4cb9eb2014951238
+19, 0x6c353acf7b26d6f1
+20, 0x73ff53d673aa30c
+21, 0x1fd10760015eca68
+22, 0xabae0aa9021eeba8
+23, 0xa5ae363a868ee2bb
+24, 0x9d89e0f041de6631
+25, 0x6238b133c3991a65
+26, 0xff49267d75fef51a
+27, 0xfb180656ce13c53f
+28, 0xaf7fadf36128712d
+29, 0xa6847fc6f339c63e
+30, 0xb03e0b80d71ea5bc
+31, 0x63905abcb43969af
+32, 0x2295af3ee00a3bba
+33, 0xb8b375b994330415
+34, 0x867d9ef1d8716a3b
+35, 0x4f6c02f5601b4e18
+36, 0x7c5fb4c16c470d18
+37, 0xe3b57986b804b343
+38, 0xef1d79d212aca692
+39, 0x5b98774c8806209c
+40, 0x924fc76bac38a5d1
+41, 0x5266084c412ddeed
+42, 0x98240bf9b831d6a3
+43, 0x5681599e81219442
+44, 0x6441248fc2ba92bc
+45, 0xe3e9051a540349ea
+46, 0x3a2700034390baa3
+47, 0x9f893155b6d402bc
+48, 0x158207910c6d8aef
+49, 0xd5282ab7608c2cbc
+50, 0xc97f4651669dee4f
+51, 0x3d4750d95103ed60
+52, 0xe0614542caac1f04
+53, 0xefe5092144cfc6c
+54, 0x560bc486abd7e9ae
+55, 0x2678b71392daa4b8
+56, 0x734970d3dc2ba416
+57, 0xcbdbe849e51e4aaf
+58, 0x3b0b5e28b491556c
+59, 0xd51449ac45abd88
+60, 0x6790b59991f1b7ab
+61, 0x32d1c039ff2415bc
+62, 0x173b9772f24f72e0
+63, 0x9490a9ca9f883b1b
+64, 0x4c775989e6214222
+65, 0xac07db37e6ee6114
+66, 0x331371b2e3f10aee
+67, 0xf12e5326c21c28e4
+68, 0x5d77dc280c70d614
+69, 0x1b01bd17a2f281ec
+70, 0xa10d3b5882938487
+71, 0xed5a0033c394ae8f
+72, 0x70bc8ea568ea44b4
+73, 0xf4600ae77965e730
+74, 0x7ff92c0b321ce233
+75, 0x6cdbc87d0cc1d670
+76, 0x9ec64f0cf2000eb1
+77, 0xfebea50259800f68
+78, 0xf2edf9019a8fd343
+79, 0x75c584ac042e5468
+80, 0xc1fa8481d5bf9a1d
+81, 0x7f57180168514ac2
+82, 0x878100716b94f81e
+83, 0xc929406e3af17fd2
+84, 0x6a26e2c013e4bf4d
+85, 0xbc071d8848280955
+86, 0xb60d75abbfd1bdac
+87, 0xee9b76afeca9fa69
+88, 0x1d6c399d2f452810
+89, 0xbaa0bc1621e25c83
+90, 0xed6ba792f8671ba5
+91, 0xf7ca02c2ab11d8d7
+92, 0x3c3cadadf0b21e3
+93, 0xdd1784571e864e9c
+94, 0xfb2f992015157509
+95, 0xf50bb9f0d3ced743
+96, 0x261565f75c3e185f
+97, 0xf8fe33b284513e60
+98, 0xe3d2d10b5e024664
+99, 0xd28717566242cf35
+100, 0x7ae07d133ac5b789
+101, 0x3b7ccaaa53ac338e
+102, 0xcd480bace4871650
+103, 0xec6c78f923c080e9
+104, 0x44211d0ff8919d59
+105, 0x89f79af76d2a45fe
+106, 0x71583fd8a837548b
+107, 0xee57269c261511f5
+108, 0xa5ee8f3b128c5d1
+109, 0xbb64c20ed0765a17
+110, 0x9d4790ab2eeaf7e4
+111, 0x742f3db806d9e98
+112, 0xb81ec97aed6a0d1b
+113, 0x41808b34f6a8a23
+114, 0xc20913af175dfd4d
+115, 0x834427db263b22bb
+116, 0xedd9c632e611828a
+117, 0x10eac8524496f571
+118, 0xd76091b97eb00ab7
+119, 0x111298ae9fe95666
+120, 0x5824b2e2a6719c43
+121, 0x6e280ec539e934ed
+122, 0xf74fd832df90083e
+123, 0x8fee6d0f241c2e97
+124, 0x4244f331c2f19c3c
+125, 0x3dde75a845cce97f
+126, 0xe35bb8e635a9915b
+127, 0x39d2943037f7932e
+128, 0x1fe2d134201d0970
+129, 0x49d00b63c749b804
+130, 0x960c2942cd4e4e04
+131, 0x8dd8e009dbc0435f
+132, 0xcf493495c3a055cd
+133, 0x8f7b5a1c0f9fe9cd
+134, 0x49d5f90374641a25
+135, 0x69b3932073d3524c
+136, 0xd170603e7de84ee2
+137, 0xa062ba3ed3539948
+138, 0xf5861cc5b5d56c82
+139, 0x5e914998a30c7e76
+140, 0x8d77f2ad1503c0f1
+141, 0x980b6a9e3b4181fb
+142, 0xd9299cd50694c084
+143, 0x253dc0f8f1cec4c5
+144, 0x68110fb9d1b3e695
+145, 0xe8f3120d0aabc461
+146, 0xb066e7df0dfb042
+147, 0xd29ce0f797e6b60b
+148, 0x6a569bb7ca33bd42
+149, 0xd46e08b2dc2385f8
+150, 0x28c61d11d055767
+151, 0x5d73aa3d1a2bb725
+152, 0x1421191e1c14829a
+153, 0xa711bfb6423df35e
+154, 0x461af97a86308006
+155, 0xb3e1018ff3519367
+156, 0xf19cf866a268ef2b
+157, 0x207715eac9199d1d
+158, 0xdd621c410975b78c
+159, 0xf390aea68683610
+160, 0x617a2d107a0047d9
+161, 0x6e05ac416e5bebf0
+162, 0x7d253e70506c1bed
+163, 0xf9f96f4a7dd53810
+164, 0xc693b29cb1573f73
+165, 0x4f1146b0020ea544
+166, 0x45140608fbd40579
+167, 0xdcf57219828ce6be
+168, 0xe19d58cca37b5b32
+169, 0x82bda95b2a161235
+170, 0x5823c3d8a2b6c9ba
+171, 0xfeb2e74092fdf89a
+172, 0x50e1ad1abc8f869d
+173, 0x2ec63d0c105eb8da
+174, 0xe14e1c4845a3264a
+175, 0xcff53670455eb6aa
+176, 0xaafaccd24619fa3e
+177, 0xf55a988486e2422a
+178, 0xecfba16a90ff4d04
+179, 0xbf8d36c2f644757a
+180, 0xdc56ed75a0dd6249
+181, 0x3f45023eff17c3bb
+182, 0x2428bbfe90023fab
+183, 0xab892c611adcb70c
+184, 0xb6f13d8c0c2b9d74
+185, 0x2ac3fb11d224f2a8
+186, 0x65433dcfae2d9351
+187, 0xe906859ae4b45f82
+188, 0x8fb7f5f093d76a3b
+189, 0x940dd290b5e88d1a
+190, 0x31b27d21bef116e7
+191, 0x86a964e2c83b5296
+192, 0x85ffd17bc079a9e8
+193, 0x16c47c724e7ab7f1
+194, 0xfb6098a9867e7d7f
+195, 0x9246fb69092c6cb2
+196, 0x1a4033572760f32
+197, 0xc5cc568a8b273b84
+198, 0xfa6f9f2fbdd44abc
+199, 0x9701b8e087718ba3
+200, 0x51d6a7dcf73f8f3a
+201, 0x30008172cc6a972d
+202, 0xac2ab49a5ca6ac81
+203, 0x31f28ef79461e54c
+204, 0x93e35a8da8cc6132
+205, 0x9a2c58beeba3d5b9
+206, 0xf6615c1de266ac39
+207, 0x127ff9f8166b766b
+208, 0x7ffe380e80a69556
+209, 0xbe7d2c228e1542f7
+210, 0x2d5ebb4e50ba1746
+211, 0x63585761ae1bf684
+212, 0x1019eb5cee022fea
+213, 0xb9d3540ab58da30d
+214, 0x1677f4cb45620eb9
+215, 0x6524baee51783822
+216, 0xdf9f2ddcfabb0adc
+217, 0x78e8acc43b287935
+218, 0xe9a1974e999222b5
+219, 0xc41324ec2291e780
+220, 0xea52abc9ecdcbc9f
+221, 0x209d7bcd46ec6b04
+222, 0x12d504c09803db2e
+223, 0x1200e6bf21475d81
+224, 0xde6d3c2b35fd2cfc
+225, 0xa2526900ac33bd3c
+226, 0x7f1f5290fc432bc5
+227, 0x29ddfb380a3d69c8
+228, 0xac79cb6942a2909d
+229, 0x516996685b67a92a
+230, 0xb5fc39041cb828bb
+231, 0x75d9d8ca0644a276
+232, 0x81e98b76be92a3e9
+233, 0xca27888fafe12179
+234, 0x17be2ae039925765
+235, 0x9429846c0e6d0342
+236, 0x327dfd50439815e9
+237, 0xcee20cd7bc254aeb
+238, 0x7d250389f453f29e
+239, 0xfd1b232a85c95569
+240, 0x2ed55fac80f3e9e9
+241, 0xf6886c20417a1be7
+242, 0xcd08e61f0b0fdfde
+243, 0x7b33e34da5c27bff
+244, 0xd043c4b7d5603dd5
+245, 0x9a544e4c70a3b686
+246, 0xa7b60398c381f771
+247, 0xe9e7a3487c4bd4f2
+248, 0x10b58fdfe1ff112c
+249, 0xd5c1c9748c0f4ceb
+250, 0x61be9d09159d54ff
+251, 0x5356f51e8239f510
+252, 0xfe7889d9b202ecef
+253, 0xc7fc19ca5d263d5d
+254, 0x7c4c07e61dfd9f69
+255, 0x6c315fe5015f300a
+256, 0xe0a5bc00039747b4
+257, 0x16397fdcf829ee80
+258, 0xb55aee80d16a5169
+259, 0xca0609944d007eea
+260, 0xcc982249f65a02ce
+261, 0x528161feb149c148
+262, 0xcbf08ba49b41c006
+263, 0x39af1ff0b6f14138
+264, 0x5cc036be69799aec
+265, 0x6adde125b1db21c5
+266, 0x8a99d83d6b613b67
+267, 0x1cd43fca9451f74c
+268, 0x682dbb26ecc96365
+269, 0x13b4be2ceb43e3
+270, 0xbe8fbc3b6f4f581e
+271, 0xda148a2f4bda5719
+272, 0x239106ca3319f393
+273, 0xb42b4dde641f0dd5
+274, 0xd233cfdf4cb0af74
+275, 0xfb5919d905589afc
+276, 0xd802a8860c10b66a
+277, 0x6c923e1d00e7b5bc
+278, 0xfacce1134f383b89
+279, 0xf9570abda7a6d553
+280, 0x80f0f9796a208f18
+281, 0xc0e1df5280951c57
+282, 0xe9f143f08257bbe0
+283, 0x79e4c6463123d588
+284, 0xdd2118583f2b1684
+285, 0xb399ff5f2329fa18
+286, 0x4b3e9ebae96f813c
+287, 0xc484dbf247787384
+288, 0x921865eb97603f2c
+289, 0x18063c68e257d300
+290, 0x643181f345e7fc26
+291, 0x12e0b0e8eadf9fa7
+292, 0x79e613fe73dfa354
+293, 0x6db4c59203b7217a
+294, 0x6c7a0e9ba6139eaf
+295, 0x9617c7ac4e3f6d97
+296, 0x1f68a7b4fb1b4b75
+297, 0xef0b7ab24944f466
+298, 0xaf1dee1f4be1bc89
+299, 0xd2e355c959f5fd8d
+300, 0xe594c3fb95d96efc
+301, 0x9554766ca3342906
+302, 0xa4bbdc77d12842c
+303, 0xb62400211ee489a8
+304, 0x91abadaaa3bbe67c
+305, 0xd371eeb91deb42bb
+306, 0x883bab35cbd2b6e5
+307, 0xd030c3d9411a9041
+308, 0xff3c110a858ff000
+309, 0x59bdf5ca47d0bde7
+310, 0x2bc80fa3cdba1853
+311, 0x6444ccb652662cb8
+312, 0xc0c7e256b9e90339
+313, 0x70714ea9c9d72302
+314, 0x96a0142f9d897d27
+315, 0x209a9097c5a91ef7
+316, 0xb9e33afc5171e009
+317, 0x47b37af433a58d40
+318, 0x30cc4ffbfa831d26
+319, 0xdcea4a85ff815466
+320, 0x907d5bd027f2e5cc
+321, 0x7c081f6852e04a4b
+322, 0xe61950749c1d502b
+323, 0x1604e937ee69834a
+324, 0xb2372d952dd25309
+325, 0x53f6a5b834c72577
+326, 0x2ce7a74395e0b694
+327, 0xacbf9ab4fe91f225
+328, 0x5ce1e63d3a2bb90f
+329, 0x54740da3a5ed139b
+330, 0xf194ddb39f29880b
+331, 0x3305374f5d8ec08b
+332, 0x831dd0164927ff4a
+333, 0x625baa78e4458cf
+334, 0x29d27dc0a4a71152
+335, 0xe227bae9a1401034
+336, 0xca0c209831846b2b
+337, 0x8e8cc54b08b5a411
+338, 0x38f2b4acaac27db6
+339, 0x8ec88baac814e86b
+340, 0x31c08e46b007bde
+341, 0xb686c02722794c09
+342, 0xb77cf8fc682e3907
+343, 0xa56334e7f606f4b2
+344, 0x9c80b127bddd5f4f
+345, 0x12df14834cd858bf
+346, 0x3f14762a9cf5fb9f
+347, 0x930a70941ef5779e
+348, 0x64e96c849c30c080
+349, 0xfdf53bfba1300484
+350, 0xec7a9363c21bc616
+351, 0x26e9fd6a115ecb47
+352, 0x9707a84b5bc77fbb
+353, 0xb23b2737b20d5903
+354, 0x22f4825ae80f6501
+355, 0x500644b12be6a01b
+356, 0xb746645b2af082db
+357, 0xe6af051f697892f8
+358, 0x577c724248a1cfc6
+359, 0x3d2b6a434c84eed3
+360, 0xd260f5efd7328314
+361, 0x95c16cc84bb3f55c
+362, 0x7a01b2e4e0e80ca7
+363, 0x41930c3ce70a0935
+364, 0x1299bccf39d4e110
+365, 0x494883ba1a8a87f
+366, 0x9478ecfe2d918e60
+367, 0x30ec9a5670cda8af
+368, 0xf9bc877e833e2b99
+369, 0x1b83a0acfbb4a8db
+370, 0x73bc1740c0d18880
+371, 0x65086ca9773cb3e1
+372, 0x3b78c3ccd63cff2e
+373, 0xbfae748795acfb31
+374, 0xa4c9d5d56a15ba20
+375, 0xb9cb41721e52b71e
+376, 0x1532f15d4dc47748
+377, 0x5a4d647a4b9ee632
+378, 0x8513c7c5a50898d9
+379, 0x6d3d98ccd5461b2e
+380, 0xa65e99be2fe98d6
+381, 0x31abc8855334a0e5
+382, 0xf1ed22a661dca5b8
+383, 0x299e2b63229e03be
+384, 0xda201a06687bce48
+385, 0xd27794b302142c55
+386, 0x642bd3e1c7898a9d
+387, 0x777f1ff00afa1a87
+388, 0xd2f1c84fb3877baa
+389, 0xae417583289191fd
+390, 0xd641f1d88e0e2d55
+391, 0xc1f1d98fb5d18ebf
+392, 0xb0f72aecdadce97b
+393, 0xe9b8abc764f6018a
+394, 0xd2a37cff8e890594
+395, 0x2dd70d631a528771
+396, 0xbf8ba0478c18e336
+397, 0x1630bf47f372ce0a
+398, 0x6d04ea20dc3f46b8
+399, 0x6591881bf34337f2
+400, 0x33c149c7eb5b4103
+401, 0xf01a8c9857c86748
+402, 0x184348cdfc16d215
+403, 0x141168b253d2ed7
+404, 0x52aaf012ef50a6f1
+405, 0xfda1722387e16f4c
+406, 0x43c30f57d6c038fa
+407, 0xd4a8611f5f96d214
+408, 0x2c512ce17e987f2c
+409, 0x961ce450f0fa2822
+410, 0xf55a506ec6cea9cd
+411, 0xb76d694d9c7f5ef6
+412, 0xfb029216dbd8e988
+413, 0x93162501896a0081
+414, 0xfbbbd2c5ab300f5c
+415, 0xd648b6da7387d491
+416, 0xc73b4697471d9d98
+417, 0xe37412bf1c93ee76
+418, 0xa1a96d96570e6637
+419, 0x5b3ab4f82428f65c
+420, 0x873d849b188aa36f
+421, 0x39fbee0ffc9fa9ff
+422, 0xc70d21b744d677fe
+423, 0x2b8a43c23043d209
+424, 0x93c33eaa37370d16
+425, 0x8930ac1880f2b0ef
+426, 0xac01d27707036af0
+427, 0xc2af3fee504343a0
+428, 0x1c1dae2ad5535d97
+429, 0x9ffc21804b76a480
+430, 0x69f903412cc13563
+431, 0x9d3c4e2759a0c47d
+432, 0xb1a8f894be6302b9
+433, 0x95e1fd7951479506
+434, 0xbb9e6c03cd4ae8e3
+435, 0x85206010c9b737cf
+436, 0x767e813694d6238c
+437, 0x4969af329ccbb30a
+438, 0x3aa9af1075aaea5c
+439, 0xb1ff519e8118a993
+440, 0xb21a23a3c91180fe
+441, 0x320b24582ca3fd88
+442, 0xf8ca56415fb4e453
+443, 0xabd0899c07205e77
+444, 0x87fdc7a44b4ad50f
+445, 0xd75744911641a278
+446, 0x7c8c9a65df6fcb95
+447, 0x79d785e3c7a5b695
+448, 0x421e4565ba1f592f
+449, 0x27f87eb2517835cf
+450, 0xb62cc4297441c83e
+451, 0xd817a80ac815ca6d
+452, 0xad84388130df2aa8
+453, 0x5e6b1640452d6ac8
+454, 0x936285e15edce2a3
+455, 0x903bccc4969768e8
+456, 0xefc2cb7b109d3140
+457, 0x633e9dfdda2d903a
+458, 0x2a2f3225925678a1
+459, 0xe07eac91a27f8547
+460, 0xe50ced40eda78cb3
+461, 0xc5b22500e1c7441
+462, 0x32becf61bca3aa72
+463, 0xa2e37c4b30671344
+464, 0xc9f1c1910f45d544
+465, 0x9b50333b2dcdf730
+466, 0x310bfd53a1684b94
+467, 0x1e1dc21e66ac6455
+468, 0x81876c2bfb1ed5a1
+469, 0xd0c54a3e25eadc7b
+470, 0x3791b6fbbd5c7ba0
+471, 0x133be57356c599fc
+472, 0x8d1148eb8e83fdea
+473, 0x311aedba0d8b42cc
+474, 0x1142ae52745f94bb
+475, 0xc5f4ab2fbde8c4a3
+476, 0xd23be827b5b24f6d
+477, 0x65f95194cd122715
+478, 0x4b48969d73125922
+479, 0x46f165052b8ff988
+480, 0x5c689f94b9275ff4
+481, 0x93b03823ff2d536b
+482, 0x871f3775aa4e3523
+483, 0x5af829f7cc0f66a5
+484, 0xa32e05739cbeac8c
+485, 0xacff1856ddace0fe
+486, 0x8eeb5e7f991a5322
+487, 0x6325c2720e0dbdea
+488, 0x9fb817bc4fdf5200
+489, 0x9786f0d850e43d78
+490, 0x571f76dd7f9fb77a
+491, 0x4d9e94e181cbc63f
+492, 0x8bb632d3376c547a
+493, 0x9cc26d9efd1c88b9
+494, 0x9c5d49579df52b0b
+495, 0x6201abf7e1cda07b
+496, 0x90d68f0c6c884963
+497, 0xfc5b66188ef7f561
+498, 0x6d9303cf2e0e0f95
+499, 0xd7cfcff535f5ed07
+500, 0x14d1a1228daa4ac6
+501, 0xe00ef5762f66ae50
+502, 0xf113a79471582978
+503, 0x430985281785dc7a
+504, 0x31914108c206ed5
+505, 0x7ba6707b6419971c
+506, 0x2ec63b033ce112e5
+507, 0xf8bcd36ced3b41e3
+508, 0xe5cf908c8010414b
+509, 0xf5ee224b7c703e30
+510, 0x9a9733af0b12338b
+511, 0x83e18cc00ace34f8
+512, 0xd52cff39e23008b8
+513, 0xa700578136b9c0c5
+514, 0x3fa179d32ac51f99
+515, 0xef2d5eab6d4ad380
+516, 0x709024a5abd032df
+517, 0xc607c7ee349ede87
+518, 0x803d784e9731eb5f
+519, 0x2ef06f4ba769282d
+520, 0x4bc1dca1e9f07eb9
+521, 0x930c958a7a72f94d
+522, 0x249bc8db2cc7a3bf
+523, 0x3845305798f9a5d
+524, 0x6f137eca9ab6f948
+525, 0xc31f5a963d31bd67
+526, 0x9d39693d5383626f
+527, 0x52fb41c335a8b98e
+528, 0xb79d1a29a06006ec
+529, 0x7c0926a7a3eda2cc
+530, 0xffdf5214406fd53e
+531, 0xc6aa02a7e94282b9
+532, 0xd4a4431b4aa301ee
+533, 0x4271cc0f9420d3ab
+534, 0x26fccd7cc7fc2485
+535, 0x330594bb945b8d5a
+536, 0x6ea8eaad12e5cb8c
+537, 0x831c3467726bede3
+538, 0x31d1eb10017eaa61
+539, 0xc7aa75e41508f5cb
+540, 0xde51810f0cadd0b5
+541, 0x50e5b3e73692f80b
+542, 0x82107ec55636e188
+543, 0x9828ef175d843ab4
+544, 0xb8edc6a860dd421e
+545, 0x25c0c138fd537ac3
+546, 0x47e72a771e8eb563
+547, 0xbb0f8c5333f4a2cc
+548, 0x91750d2fb9b2d479
+549, 0xe662d8f6fe38df36
+550, 0x72a6d879fb5619f0
+551, 0x6817c7878dcbf077
+552, 0x4e7741cb484661e8
+553, 0x3b3b3ba0be5711bf
+554, 0xa6989f5d25868765
+555, 0x43c276398997e4e0
+556, 0xdcbe16a94da28870
+557, 0x454936980a699c99
+558, 0xac614bfa8f0266c6
+559, 0x9174841392e213d5
+560, 0xa0e2acffc5fc9d1f
+561, 0xe53a08a7a0e6521a
+562, 0x2b845cf7c24172e0
+563, 0x265a4fc5f7adec0d
+564, 0x1f34fbe5f1e49420
+565, 0x139181f6fb647f20
+566, 0x88c35d46e2fcd05e
+567, 0x2a6d5b55903c0459
+568, 0xcea28eb621ad7bf1
+569, 0x5c9cdc13e7aaa30
+570, 0x5fe63e14746e7103
+571, 0x7923e53d73835db9
+572, 0x376e661210bf1b06
+573, 0x5b1cab85450efdd5
+574, 0x3908dc096c70b452
+575, 0x4825e303cd1f396f
+576, 0xed476bfd702957c3
+577, 0x6acc013aff5db743
+578, 0x62c80b776343d488
+579, 0x9c75edcd5b012697
+580, 0xaa053362a3b9770a
+581, 0xa907e236c7c07e94
+582, 0x15b2c380451692c0
+583, 0x94f79142697bd61f
+584, 0xbc657d31ea98d44f
+585, 0xcbaa5e52517a1f5e
+586, 0x96aa2e44a7c4a03f
+587, 0x216d3c66db2b515d
+588, 0x157001807e3ca88a
+589, 0x52b3a596bdd3859a
+590, 0xed747e7fc5e3adac
+591, 0x78fd765ddb2c448d
+592, 0xe53dc7299ed8614e
+593, 0x75ad41fb1d7a790a
+594, 0xc14f6b944b0e6cb1
+595, 0x7c314b69fce3df1c
+596, 0xb56d82eb740d7abc
+597, 0x5132a93c41251fdb
+598, 0xe3ce35bd2a82f958
+599, 0x440571a981c722f2
+600, 0x194cdfd9f186bc9
+601, 0xb89e522a5db00939
+602, 0xad35f339f68df3c8
+603, 0xa82ab18420322293
+604, 0xaffa6df9b72b27c4
+605, 0x9615694d23beaa2c
+606, 0x1d82ebe563abad91
+607, 0xab50ef65fbd94385
+608, 0x1b070dbd70a9a14
+609, 0x2ececa796abbadf0
+610, 0x6bbeafe9e81ab2a2
+611, 0x60dcd0d2a9b76914
+612, 0x1e748039ef05c33f
+613, 0x6d4d17f2213ccdff
+614, 0x9fa56132957bc987
+615, 0x60a17185de2428eb
+616, 0xb56038ddf306479c
+617, 0x3b1db5df92d06d8b
+618, 0x24d1bba8bdedf580
+619, 0xbfb7e6740ebaa4d9
+620, 0xab31c4473e46f61d
+621, 0x6deb3cdd8fd5869f
+622, 0x23032e47746d72d6
+623, 0xa9e72d734e10f2e8
+624, 0xbffd199b6157bc23
+625, 0x29f8254df273fb62
+626, 0xb076142130ee55ec
+627, 0x5b0b08374126c309
+628, 0xea4536aae979521f
+629, 0xc064e7abec91a174
+630, 0x46133ef80c59d935
+631, 0xf0227e2da1b14160
+632, 0x675a76641e1af5a
+633, 0x2f50a069b33d198c
+634, 0x3ded5a65e1d657eb
+635, 0xbb6999b020694f6b
+636, 0x86b2f2b33487aed7
+637, 0x76e14e85f8bfb4cf
+638, 0x38f7f1e44bd4e0db
+639, 0xc1a7d41b7e80d4ae
+640, 0x1dfaaf80bbceb42e
+641, 0x3f51c11497720c2b
+642, 0xce6da1415ddb8b80
+643, 0x7377d8bcd359b5f3
+644, 0xe077208f3f810aca
+645, 0x9a06a8a2dacbffce
+646, 0xca1f99156b09b735
+647, 0x2ff9a93064d91451
+648, 0x50f3ea93f351a7ef
+649, 0x606fceccb07054de
+650, 0x7e83d6d2f8f6685d
+651, 0x78f3995291c5d407
+652, 0xd28d2460e22d0228
+653, 0x2c5636f68a0054dd
+654, 0xd9fafb1c56c8f6cb
+655, 0xe39889b5f9d74464
+656, 0x1355372bf5db2cc1
+657, 0x26768426b9ac323
+658, 0x4af1dbdc1111fd89
+659, 0x66973587943b927f
+660, 0xf86f5f50684dfb1d
+661, 0x1247d574ff79b534
+662, 0xc8039f3259210fe2
+663, 0x79b573235c92a9f5
+664, 0x213f642d8450e2f0
+665, 0x5db7706973376566
+666, 0x6182c12e69b373d7
+667, 0x3e5ac47300aec07f
+668, 0x4b5b6c57b1574376
+669, 0x6b7fcceefd56b17c
+670, 0xf656c3455cb9d4b8
+671, 0x7577e2e13329721f
+672, 0xf33c0c53ce956e8d
+673, 0x7d0f328ee356174
+674, 0x10ec9a168088686e
+675, 0x71ef1776d062dfa
+676, 0xaa7b590a488a6bc4
+677, 0x38612b6dd8049a1c
+678, 0x939045e36874f731
+679, 0xcb9d1d74c56d5ac9
+680, 0x54f1c1c8fef1d8ff
+681, 0x3ee4b85c8c7e939e
+682, 0xb9b4608e019f352c
+683, 0x79d4701275d12e6a
+684, 0x2632a2d9835c7f19
+685, 0x1662cd9fba293692
+686, 0xbcb70265115ee944
+687, 0xdc43fb9761468604
+688, 0xe3eec4e7d3871352
+689, 0x829531753226989d
+690, 0x2748cc67f540e074
+691, 0x39c4af25d607837d
+692, 0x741a243f4cb5df99
+693, 0xda1353287e18b49a
+694, 0xa6735689d751ea74
+695, 0x46326d587340ce0b
+696, 0xc18531df4550012b
+697, 0x6f7901e05dd4b818
+698, 0xfb966afc4c001d63
+699, 0x6dc10fca67a9cfdb
+700, 0xd6527ffadf0feaae
+701, 0x3b900172045e25d
+702, 0xb7dd594cdded6a46
+703, 0x6602aee7ec1599fc
+704, 0x7fbf12f23747546a
+705, 0x32e63f662bd2de0d
+706, 0xedf47770b67ed641
+707, 0x331bef83481c5c2a
+708, 0x8fc4256fdf05158c
+709, 0x98eba48dabccf5e0
+710, 0xdbc2f2cdb7b1c154
+711, 0x7777755616517ad3
+712, 0xd473c147d2628ac1
+713, 0x861e15d1d760b5a7
+714, 0xf4d25926405ecb07
+715, 0xb7739c69effff86e
+716, 0xe97fbafa6f96830c
+717, 0xf13e8a334e8bede1
+718, 0xcd60010cba4ee4f9
+719, 0x1f537ac2b82e6008
+720, 0x1fda8d781a89140a
+721, 0x9dc204f3f4a463f0
+722, 0x456dcd18eb56a1ab
+723, 0x629957bc87bd16a1
+724, 0x2c8000ddb8c75253
+725, 0xc31dae9ec8449284
+726, 0xdac05c8baa2b691a
+727, 0x21ff7be9ffa3e7ac
+728, 0x844f4b5ed4ee08d0
+729, 0x651f913fd636c994
+730, 0xca3e71a2110b2d49
+731, 0x7709bc42253ed09d
+732, 0xbb164d45b6569d43
+733, 0x90ec2f040c20a112
+734, 0xfa6e77e9166f5be4
+735, 0x6b6d12c1842d587d
+736, 0xfcd7ff8466e25e2a
+737, 0x6a5a2ed8bd971297
+738, 0x2ec35f6bba5adcbc
+739, 0xc83676e16651249a
+740, 0x458f6064cefe10ba
+741, 0x90d54d527e6cd028
+742, 0xa5613e88db27c388
+743, 0x331e0c7d85aa1abc
+744, 0x8cee4977e210358
+745, 0xfcae379aa6cbff8e
+746, 0xd1407afc97a57e86
+747, 0x1fab25c864f094ae
+748, 0xd914864a63004552
+749, 0x4214d226a20f1384
+750, 0x3f4e0d80c488b715
+751, 0xc5ca2f654024b7c8
+752, 0xc1e27a124e7c821c
+753, 0xd890a915ffc7918c
+754, 0x22fba040ce51a9f8
+755, 0xbf61cebd8891617a
+756, 0x7846609ee228e319
+757, 0x536d1854375509b8
+758, 0xbbfb45fc6e666f50
+759, 0xd85b4c0527f9d7d6
+760, 0x528cc9c7fa2a84c8
+761, 0x27a1baece647f2cb
+762, 0xfddf0cb92fe09dc3
+763, 0xeb5008fe965d8d96
+764, 0x4a3307937eb2e5c8
+765, 0xd07d74c240c6c363
+766, 0x16f62290179d1bbf
+767, 0xe99c9bcc9cb1ece7
+768, 0xc64f9be03c8a93be
+769, 0x32659effaf666c1f
+770, 0x4bb228cfb30b6672
+771, 0x98764870842068a5
+772, 0x5b12ef2d2cd8bdcc
+773, 0xbc79d1c1b41f28b8
+774, 0x97a517cf3279fc9a
+775, 0x34ffd46c1d4d6025
+776, 0x9c302307ee25c8f0
+777, 0x399604eed1f18a8
+778, 0x1c9b813c2043142a
+779, 0x2944ea5e55267fe9
+780, 0x5a8a9f5e728ea667
+781, 0x30c8440adb804a0
+782, 0xee0e6b627099a937
+783, 0x3d50757ada3c52da
+784, 0x4548916b32c813ab
+785, 0x602a186fe5bf109b
+786, 0xf0d440a2227ba304
+787, 0x5a10d4e0ca9ea32b
+788, 0x6e5eb90da13ba64c
+789, 0x4c6af8fd04241ab2
+790, 0xf9eb31d26e093006
+791, 0x5d674878839fe3ea
+792, 0x1562b55b2484e47c
+793, 0xa87188c099c1cb61
+794, 0xb7736b8aa02a3392
+795, 0x5f4b301125abb20f
+796, 0x361d566984637f44
+797, 0x68c4b3feac8bd0c3
+798, 0x7066c634dd2503c1
+799, 0xfecbf7c9441eb6ea
+800, 0xdbc26ae0fc81436b
+801, 0x9ef3e2b48252e7a4
+802, 0x31a49b4c339b37c7
+803, 0xb01b2a83cf346cf4
+804, 0xc24dc2347f82fbe3
+805, 0x134cad272dcd410f
+806, 0x61260742823ba59c
+807, 0x53ac4c193a97c730
+808, 0x9207c9833af34b52
+809, 0xa72e7ee77078d1f5
+810, 0x2e6f6e1b05936885
+811, 0x783b99ce5dbf9464
+812, 0xfdfeb6f0d027bb44
+813, 0x40eeb27096f92b0
+814, 0x5ef96ff5d4a4521f
+815, 0x5595806ae873718a
+816, 0x67d449eecf4ca1c3
+817, 0xde837ab611364f3f
+818, 0x7034c24d2b139be9
+819, 0xe21166603e0a9c86
+820, 0x935694435c1f0d51
+821, 0x6cb3bec90c126088
+822, 0x4096ef662b7a9f89
+823, 0xd2d85b8d238d8c15
+824, 0xa4ea533ce3ec59b2
+825, 0x3654729d80a2db29
+826, 0x214c4cc3906d29d4
+827, 0x201c447e7588e373
+828, 0xe8b8f0ae25f683eb
+829, 0x6744aaf5754e38af
+830, 0xd1ffb10d6f27a061
+831, 0xe536733a7b3a6c30
+832, 0x39f0f66e47cbf2c9
+833, 0x856a9593526fde2
+834, 0x2e2a817a0098ea4b
+835, 0xc5e1eeb551a0e3d3
+836, 0x3f21e2f5e2d50b2
+837, 0x906af56c66dd9f8c
+838, 0x30f6dbd70329fac8
+839, 0xc443dfddf3c01a60
+840, 0x7ab85d9aa9675470
+841, 0x8c9080bd39717bfc
+842, 0x4b1ccdb3c3597f6f
+843, 0x74e2542d70ab5d67
+844, 0xbb3d236aad00f74
+845, 0xcf3cadf9a2804774
+846, 0xe851d9750e42bd07
+847, 0xc0ad82029b1c371f
+848, 0x7ee119eb552d6c07
+849, 0xd8024049bd1d784a
+850, 0xfa67a899760363
+851, 0xaa7c2f438b178197
+852, 0xc473674a47ffe064
+853, 0x539fbe3fc674c270
+854, 0xdb48484748a76f3b
+855, 0xc73b2b092060d
+856, 0xa1d2a15345016f5d
+857, 0x4d0fe8599f9bba47
+858, 0xa0edc275e6f8f1d1
+859, 0x40590a8655bc8d72
+860, 0x35b4223161f05f75
+861, 0xa04c0c0f616752dc
+862, 0x7f371ed2ca45432d
+863, 0x2ff1a08f75ac6438
+864, 0xe2dc5c3682282f48
+865, 0xe1e4179fa98d9013
+866, 0x8cb083d6843a73d5
+867, 0xb4c2b5921b706854
+868, 0x738e14c0e7352445
+869, 0xcd2b646f91afd8c7
+870, 0xd5779a5b57a264fd
+871, 0xc39ff855586c7d07
+872, 0x3e3f0098c631a859
+873, 0x644e02fae032110
+874, 0xa8834613c0a45278
+875, 0x69482f2c08e10657
+876, 0xe4ee475bdb87e69a
+877, 0xdc1ef7b25c0d0019
+878, 0x88a3fa2be18d8744
+879, 0x60a02e0b21c5bec7
+880, 0xb6867b88aa19bc1a
+881, 0xb599409affcf10eb
+882, 0xaeaa1778a5e59daa
+883, 0xd7a91a52c16663e3
+884, 0x93cb269affe07b1c
+885, 0x841b6ced3a4ba815
+886, 0x84541768e1540a5c
+887, 0xe3943c84f83b3020
+888, 0x5de366fbd7b45258
+889, 0xd787cc3bde91a661
+890, 0x814071446edecb57
+891, 0x15d8c602a1141514
+892, 0x72f07bc8002d1d0d
+893, 0x4a8bd8dc9a1f0f3e
+894, 0x8723796ae0f20d35
+895, 0xda7283c2051f73b2
+896, 0x2df0cc247f90bd3b
+897, 0x79a8522b968f990a
+898, 0x951ede190c8b9d02
+899, 0xc512f1a5b14b018a
+900, 0xf0e3ddc03b9a4259
+901, 0x8cf4a35ad312e15f
+902, 0xebef28926b11094b
+903, 0x5628ba687325921c
+904, 0xc3aa75e57edc49c3
+905, 0xc38382fa98e762ba
+906, 0x8d209e896285848e
+907, 0x2c7d6adf592b4a3e
+908, 0x62de48e36f8338f3
+909, 0x4a752741e00de30e
+910, 0xf7855b70f1f6ec2b
+911, 0xa505fa4428199e43
+912, 0xe8b6b423b826bbac
+913, 0x4bd1206cf8786d05
+914, 0x6dcf040391fe3bf4
+915, 0x913f500f87e1bba3
+916, 0x5acf775aa180a5d5
+917, 0x74dd28d9432ce739
+918, 0x996c2ff2f0dc2495
+919, 0x73dbfe6c56effe4
+920, 0x56fddd25196f5e40
+921, 0xe87810158f5b7
+922, 0x7b8795e996383f1f
+923, 0x9ba5ee7c777c4c82
+924, 0x17ce3908d270fe1c
+925, 0x3df9e613c1aedfae
+926, 0xcdd26871b32fc8e1
+927, 0xd71cb13afc633979
+928, 0x63427c8ea9b1c79e
+929, 0xd070f7664d3b405d
+930, 0x46f2a9e32d9fb769
+931, 0xb4c3822a45e9fe9b
+932, 0x8ba30b97fe6f5ec7
+933, 0x70aa554ee2fc11f9
+934, 0xa80c99dbe0cfcfaf
+935, 0x36d9250cb2d68ed
+936, 0x2995e4b9e1cd1db4
+937, 0x4b3803ba57fc570f
+938, 0xae3959e7d740eaa5
+939, 0xb4cbd6662adbae08
+940, 0xae46576446e8dbc4
+941, 0xc4828e008a9a8a54
+942, 0x145d7db8e6554b2f
+943, 0x1b1b8916a730c371
+944, 0xdaf84b2bebe31963
+945, 0x5b59b80ef23a2403
+946, 0x9180c7e89cab6fd3
+947, 0x80e58f5411babf34
+948, 0xa06cf55185b9b005
+949, 0x13b2c798424173ad
+950, 0xc510f8e706311d49
+951, 0x1f974b83b6046d3a
+952, 0xae6e8e85e822d1c3
+953, 0x66f2c8dc3274a31a
+954, 0x7e04dbcbf65bd377
+955, 0xabf41ede01ec20a4
+956, 0x5efa0948f6bbb2ea
+957, 0xbc91c99d8592255
+958, 0xf6d6917911d86d75
+959, 0x85ce273d54e9097a
+960, 0xbdfd30f2420fff92
+961, 0x8802f02f610b537c
+962, 0xd1d70037ed543229
+963, 0x908aaf97f9693a46
+964, 0x1f6cfeaa0834d53a
+965, 0xa453fd1648ce04d2
+966, 0x2c38bb85ebc64af9
+967, 0xd2daff551c90c4f8
+968, 0xae5a0d949797d784
+969, 0xf0974c8552ac9593
+970, 0xa10b70499f65c693
+971, 0x39a449ebd594ddff
+972, 0x8ea090f2b17b9b49
+973, 0xc592de318090fd83
+974, 0xb63e4fbc467b6912
+975, 0x57a0c1c5ce0e4dcc
+976, 0xa7c517cf3d436b35
+977, 0xef6dcb0f3fad038b
+978, 0xaf4fb60315b91287
+979, 0x5e0776f67304f331
+980, 0xe927753b8e6f7932
+981, 0xd3df2dd92559e304
+982, 0xdaed52aa6af44413
+983, 0x1b59f4dac1e181f8
+984, 0x4a73c2293877ef39
+985, 0xca45d0d015fe44de
+986, 0x4659c8b7853735a8
+987, 0x12de6466bdf8adeb
+988, 0xaeea857a09bfec15
+989, 0xcc9cf4b3c0b88a23
+990, 0xa44ae52396a5e1bf
+991, 0x5847a724305d137f
+992, 0x8f4d4de223956182
+993, 0x58254dfada867a8
+994, 0x900a98222c2f339e
+995, 0xdb575260935d51d5
+996, 0x13fb4bfbbc0d7b53
+997, 0x62213850186bb92b
+998, 0x2a34823312c00388
+999, 0x6148329042f743b0
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..39cef057f4490a70d7041bcfde4d3fec844732bb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xdf1ddcf1e22521fe
+1, 0xc71b2f9c706cf151
+2, 0x6922a8cc24ad96b2
+3, 0x82738c549beccc30
+4, 0x5e8415cdb1f17580
+5, 0x64c54ad0c09cb43
+6, 0x361a17a607dce278
+7, 0x4346f6afb7acad68
+8, 0x6e9f14d4f6398d6b
+9, 0xf818d4343f8ed822
+10, 0x6327647daf508ed6
+11, 0xe1d1dbe5496a262a
+12, 0xfc081e619076b2e0
+13, 0x37126563a956ab1
+14, 0x8bb46e155db16b9
+15, 0x56449f006c9f3fb4
+16, 0x34a9273550941803
+17, 0x5b4df62660f99462
+18, 0xb8665cad532e3018
+19, 0x72fc3e5f7f84216a
+20, 0x71d3c47f6fd59939
+21, 0xfd4218afa1de463b
+22, 0xc84054c78e0a9a71
+23, 0xae59034726be61a8
+24, 0xa6a5f21de983654d
+25, 0x3b633acf572009da
+26, 0x6a0884f347ab54c8
+27, 0x7a907ebe9adcab50
+28, 0xbe779be53d7b8d4a
+29, 0xf5976e8c69b9dcd1
+30, 0x1d8302f114699e11
+31, 0x7d37e43042c038a0
+32, 0x2cc1d4edc2a40f35
+33, 0x83e3347bb2d581f1
+34, 0x253f8698651a844d
+35, 0x4312dea0dd4e32f6
+36, 0x10f106439964ea3a
+37, 0x810eb374844868cc
+38, 0x366342a54b1978cc
+39, 0x9fb39b13aaddfb5e
+40, 0xdb91fd0d9482bed7
+41, 0x89f6ea4ca9c68204
+42, 0x146b31ccca461792
+43, 0x203fd9724deb2486
+44, 0x58a84f23748e25cb
+45, 0x2f20eb6aeb94e88
+46, 0x14d3581460e473c
+47, 0xad5bd0d25f37d047
+48, 0x1cf88fa16de258b2
+49, 0x3bcab6485b7a341
+50, 0xb2433b37f227d90c
+51, 0x2cffd7e0a8360cc8
+52, 0x5d2eeff7c9ebc847
+53, 0x6fd7c7ae23f9f64b
+54, 0x381650b2d00f175d
+55, 0x9d93edcedc873cae
+56, 0x56e369a033d4cb49
+57, 0x7547997116a3bac
+58, 0x11debaa897fd4665
+59, 0xdf799d2b73bd6fb8
+60, 0x3747d299c66624d
+61, 0xac9346701afd0cfa
+62, 0xac90e150fa13c7bf
+63, 0x85c56ad2248c2871
+64, 0xdea66bf35c45f195
+65, 0x59cf910ea079fb74
+66, 0x2f841bb782274586
+67, 0x9814df4384d92bd9
+68, 0x15bc70824be09925
+69, 0x16d4d0524c0503a3
+70, 0xf04ea249135c0cc7
+71, 0xa707ab509b7e3032
+72, 0x465459efa869e372
+73, 0x64cbf70a783fab67
+74, 0x36b3541a14ca8ed7
+75, 0x9a4dfae8f4c596bf
+76, 0x11d9a04224281be3
+77, 0xe09bbe6d5e98ec32
+78, 0xa6c60d908973aa0d
+79, 0x7c524c57dd5915c8
+80, 0xa810c170b27f1fdc
+81, 0xce5d409819621583
+82, 0xfe2ee3d5332a3525
+83, 0x162fb7c8b32045eb
+84, 0x4a3327156b0b2d83
+85, 0x808d0282f971064
+86, 0x2e6f04cf5ed27e60
+87, 0xaf6800699cca67a9
+88, 0xc7590aae7244c3bf
+89, 0x7824345f4713f5f9
+90, 0x8f713505f8fd059b
+91, 0x3d5b5b9bb6b1e80e
+92, 0x8674f45e5dc40d79
+93, 0xcb1e36846aa14773
+94, 0xe0ae45b2b9b778c1
+95, 0xd7254ce931eefcfb
+96, 0xef34e15e4f55ac0a
+97, 0xf17cc0ba15a99bc4
+98, 0x77bb0f7ffe7b31f1
+99, 0x6ee86438d2e71d38
+100, 0x584890f86829a455
+101, 0x7baf0d8d30ba70fe
+102, 0xb1ac8f326b8403ae
+103, 0xcc1963435c874ba7
+104, 0x9c483b953d1334ce
+105, 0xc0924bcbf3e10941
+106, 0x21bcc581558717b1
+107, 0x2c5ad1623f8d292b
+108, 0xa8ea110f6124557e
+109, 0x15f24a6c5c4c591
+110, 0x40fe0d9cd7629126
+111, 0xcfe8f2b3b081484d
+112, 0x891383f4b4cac284
+113, 0x76f2fcdef7fa845
+114, 0x4edd12133aed0584
+115, 0xd53c06d12308873d
+116, 0xf7f22882c17f86bf
+117, 0xfbaa4aad72f35e10
+118, 0x627610da2e3c0cc3
+119, 0x582b16a143634d9a
+120, 0x9b4a7f69ed38f4a0
+121, 0x2df694974d1e1cbe
+122, 0xe5be6eaafed5d4b
+123, 0xc48e2a288ad6605e
+124, 0xbcb088149ce27c2b
+125, 0x3cb6a7fb06ceecbe
+126, 0x516735fff3b9e3ac
+127, 0x5cbafc551ee5008d
+128, 0xee27d1ab855c5fd5
+129, 0xc99fb341f6baf846
+130, 0x7ad8891b92058e6d
+131, 0xf50310d03c1ac6c7
+132, 0x947e281d998cbd3e
+133, 0x1d4d94a93824fe80
+134, 0x5568b77289e7ee73
+135, 0x7d82d1b2b41e3c8b
+136, 0x1af462c7abc787b
+137, 0xcfd8dfe80bfae1ef
+138, 0xd314caeb723a63ea
+139, 0x1c63ddcfc1145429
+140, 0x3801b7cc6cbf2437
+141, 0xc327d5b9fdafddd3
+142, 0xe140278430ca3c78
+143, 0x4d0345a685cb6ef8
+144, 0x47640dc86e261ff9
+145, 0xab817f158523ebf4
+146, 0x37c51e35fbe65a6b
+147, 0xab090f475d30a178
+148, 0x4d3ec225bf599fc1
+149, 0xefd517b0041679b1
+150, 0x20ad50bca4da32c5
+151, 0x75e1f7cd07fad86d
+152, 0x348cf781ee655f4b
+153, 0x9375f0e5ffc2d2ec
+154, 0x7689082fd5f7279c
+155, 0x633e56f763561e77
+156, 0x9d1752d70861f9fd
+157, 0xa3c994b4e70b0b0f
+158, 0xabf7276a58701b88
+159, 0xbfa18d1a0540d000
+160, 0xc6a28a2475646d26
+161, 0x7cdf108583f65085
+162, 0x82dcefb9f32104be
+163, 0xc6baadd0adc6b446
+164, 0x7a63cff01075b1b4
+165, 0x67ac62e575c89919
+166, 0x96fa4320a0942035
+167, 0xc4658859385b325f
+168, 0xde22c17ff47808f6
+169, 0xbb952c4d89e2f2ec
+170, 0x638251fbc55bdc37
+171, 0x38918b307a03b3ea
+172, 0xccb60f2cedbb570b
+173, 0x3c06f4086a28f012
+174, 0x4e8d238388986e33
+175, 0x1760b7793514a143
+176, 0xa3f924efe49ee7d6
+177, 0xaf6be2dbaebc0bdf
+178, 0x6782682090dffe09
+179, 0xb63a4d90d848e8ef
+180, 0x5f649c7eaf4c54c5
+181, 0xbe57582426a085ba
+182, 0xb5dd825aa52fb76d
+183, 0x74cb4e6ca4039617
+184, 0x382e578bf0a49588
+185, 0xc043e8ea6e1dcdae
+186, 0xf902addd5c04fa7c
+187, 0xf3337994612528db
+188, 0x4e8fd48d6d15b4e6
+189, 0x7190a509927c07ab
+190, 0x864c2dee5b7108ae
+191, 0xbb9972ddc196f467
+192, 0x1ea02ab3ca10a448
+193, 0xe50a8ffde35ddef9
+194, 0x7bd2f59a67183541
+195, 0x5a940b30d8fcd27a
+196, 0x82b4cea62623d4d3
+197, 0x6fbda76d4afef445
+198, 0x8b1f6880f418328e
+199, 0x8b69a025c72c54b7
+200, 0xb71e0f3986a3835f
+201, 0xa4a7ddb8b9816825
+202, 0x945dcda28228b1d8
+203, 0xb471abf2f8044d72
+204, 0xf07d4af64742b1ba
+205, 0xfca5190bc4dd6a2a
+206, 0xd681497262e11bc5
+207, 0xbe95d5f00c577028
+208, 0x56313439fd8bde19
+209, 0x3f3d9ac9b5ee6522
+210, 0x7b8d457dd2b49bbe
+211, 0xe76b5747885d214b
+212, 0xa8a695b3deb493ea
+213, 0x5292446548c95d71
+214, 0xbf5cdf0d436412df
+215, 0x7936abaed779d28d
+216, 0x659c6e8073b3a06d
+217, 0x86c9ff28f5543b71
+218, 0x6faa748445a99146
+219, 0xdcc1e6ab57904fd7
+220, 0x770bd61233addc5f
+221, 0x16963e041e46d94f
+222, 0x158e6cb2934157ac
+223, 0xb65088a8fd246441
+224, 0x2b12ced6ce8a68c3
+225, 0x59a18d02cd6082b3
+226, 0x4ddbc318cb5488ee
+227, 0x3d4cf520b3ed20a1
+228, 0x7028b3a92e2b292d
+229, 0xf141da264a250e4d
+230, 0x9788d53e86041c37
+231, 0x1bb91238a7c97dbf
+232, 0x81953d0ddb634309
+233, 0xfa39ccfe14d2d46
+234, 0xf7c7861c9b7e8399
+235, 0x18d27ca50d9dc249
+236, 0x258dfdf38510d0d9
+237, 0x9e72d8af910ea76f
+238, 0x4f8ef24b96de50ad
+239, 0xb9d9c12297e03dc9
+240, 0x91994e41b4a1929c
+241, 0x8defa79b2ccc83b9
+242, 0x948566748706dac5
+243, 0x7b0454946e70e4cf
+244, 0x340b7cb298c70ed7
+245, 0x6602005330cebd95
+246, 0xf71cb803aa61f722
+247, 0x4683fb07fc70ae8a
+248, 0xc6db9f0c4de3ed88
+249, 0x3e8dfae2a593cef9
+250, 0x615f7c38e3862b33
+251, 0x676c7996550d857
+252, 0xc6d520d54a5c266a
+253, 0x202b1e8eef14aa2e
+254, 0xa3a84891a27a582
+255, 0x84dbee451658d47f
+256, 0x254c7cd97e777e3a
+257, 0xf50b6e977f0eba50
+258, 0x2898b1d3062a4798
+259, 0x4096f7cbbb019773
+260, 0x9fb8e75548062c50
+261, 0x4647071e5ca318ec
+262, 0x2b4750bdb3b3b01
+263, 0x88ac41cc69a39786
+264, 0x705e25476ef46fa3
+265, 0xc0c1db19884a48a6
+266, 0x1364c0afdbb465e5
+267, 0x58e98534701272a6
+268, 0x746a5ea9701517c0
+269, 0x523a70bc6b300b67
+270, 0x9b1c098eda8564ad
+271, 0xfbaeb28d3637067f
+272, 0xddd9a13551fdba65
+273, 0x56461a670559e832
+274, 0xab4fd79be85570ad
+275, 0xd4b691ecaff8ca55
+276, 0x11a4495939e7f004
+277, 0x40d069d19477eb47
+278, 0xe790783d285cd81e
+279, 0xde8218b16d935bc7
+280, 0x2635e8c65cd4182d
+281, 0xeae402623e3454
+282, 0x9f99c833184e0279
+283, 0x3d0f79a0d52d84e7
+284, 0xc1f8edb10c625b90
+285, 0x9b4546363d1f0489
+286, 0x98d86d0b1212a282
+287, 0x386b53863161200d
+288, 0xbe1165c7fe48a135
+289, 0xb9658b04dbbfdc8c
+290, 0xcea14eddfe84d71a
+291, 0x55d03298be74abe7
+292, 0x5be3b50d961ffd7e
+293, 0xc76b1045dc4b78e1
+294, 0x7830e3ff3f6c3d4c
+295, 0xb617adb36ca3729
+296, 0x4a51bdb194f14aa9
+297, 0x246024e54e6b682a
+298, 0x33d42fc9c6d33083
+299, 0xadccba149f31e1d
+300, 0x5183e66b9002f8b
+301, 0x70eb2416404d51b7
+302, 0x26c25eb225535351
+303, 0xbc2d5b0d23076561
+304, 0x5823019ddead1da
+305, 0x85cfa109fca69f62
+306, 0x26017933e7e1efd9
+307, 0x3ec7be9a32212753
+308, 0x697e8a0697cd6f60
+309, 0x44735f6cca03920f
+310, 0x8cc655eb94ee212e
+311, 0x8b8b74eba84929a0
+312, 0x7708ccedd0c98c80
+313, 0x1b6f21f19777cbe1
+314, 0x363e564bd5fadedb
+315, 0x5921543a641591fe
+316, 0xc390786d68ea8a1b
+317, 0x9b293138dc033fca
+318, 0x45447ca8dc843345
+319, 0xee6ef6755bc49c5e
+320, 0x70a3a1f5163c3be5
+321, 0xf05e25448b6343b0
+322, 0x4739f4f8717b7e69
+323, 0xb006141975bf957
+324, 0x31874a91b707f452
+325, 0x3a07f2c90bae2869
+326, 0xb73dae5499a55c5e
+327, 0x489070893bb51575
+328, 0x7129acf423940575
+329, 0x38c41f4b90130972
+330, 0xc5260ca65f5a84a1
+331, 0x6e76194f39563932
+332, 0x62ca1f9ca3de3ca6
+333, 0xb4a97874e640853f
+334, 0x38ed0f71e311cc02
+335, 0xde183b81099e8f47
+336, 0x9bb8bf8e6694346
+337, 0xd15497b6bf81e0f2
+338, 0xaaae52536c00111
+339, 0x4e4e60d1435aaafd
+340, 0x5a15512e5d6ea721
+341, 0xff0f1ffabfc6664f
+342, 0xba3ffcedc5f97fec
+343, 0xef87f391c0c6bfb6
+344, 0x4a888c5d31eb0f98
+345, 0x559a3fbfd7946e95
+346, 0xe45b44a0db5a9bad
+347, 0x9457898964190af1
+348, 0xd9357dfaab76cd9e
+349, 0xa60e907178d965a1
+350, 0x76b2dc3032dc2f4a
+351, 0x13549b9c2802120
+352, 0x8656b965a66a1800
+353, 0x16802e6e22456a23
+354, 0x23b62edc60efaa9
+355, 0x6832a366e1e4ea3b
+356, 0x46b1b41093ff2b1e
+357, 0x55c857128143f219
+358, 0x7fc35ddf5e138200
+359, 0x790abe78be67467e
+360, 0xa4446fc08babd466
+361, 0xc23d70327999b855
+362, 0x2e019d1597148196
+363, 0xfefd98e560403ab8
+364, 0xbe5f0a33da330d58
+365, 0x3078a4e9d43ca395
+366, 0x511bfedd6f12f2b3
+367, 0x8bc138e335be987c
+368, 0x24640f803465716d
+369, 0xf6530b04d0bd618f
+370, 0x9b7833e5aa782716
+371, 0x778cd35aea5841b1
+372, 0xecea3c458cefbc60
+373, 0x5107ae83fc527f46
+374, 0x278ad83d44bd2d1a
+375, 0x7014a382295aeb16
+376, 0xf326dd762048743f
+377, 0x858633d56279e553
+378, 0x76408154085f01bc
+379, 0x3e77d3364d02e746
+380, 0x2f26cea26cadd50b
+381, 0x6d6846a4ecb84273
+382, 0x4847e96f2df5f76
+383, 0x5a8610f46e13ff61
+384, 0x4e7a7cac403e10dd
+385, 0x754bdf2e20c7bc90
+386, 0x8bdd80e6c51bd0be
+387, 0x61c655fae2b4bc52
+388, 0x60873ef48e3d2f03
+389, 0x9d7d8d3698a0b4a4
+390, 0xdf48e9c355cd5d4b
+391, 0x69ecf03e20be99ac
+392, 0xc1a0c5a339bd1815
+393, 0x2e3263a6a3adccb
+394, 0x23557459719adbdc
+395, 0xd1b709a3b330e5a
+396, 0xade5ab00a5d88b9d
+397, 0x69a6bd644120cfad
+398, 0x40187ecceee92342
+399, 0x1c41964ba1ac78da
+400, 0x9ac5c51cbecabe67
+401, 0xbdc075781cf36d55
+402, 0xeaf5a32246ded56
+403, 0xcda0b67e39c0fb71
+404, 0x4839ee456ef7cc95
+405, 0xf17092fdd41d5658
+406, 0x2b5d422e60ae3253
+407, 0x3effe71102008551
+408, 0x20a47108e83934b7
+409, 0xd02da65fe768a88f
+410, 0xeb046bd56afa4026
+411, 0x70c0509c08e0fbe0
+412, 0x1d35c38d4f8bac6c
+413, 0x9aa8eb6466f392e0
+414, 0x587bd4a430740f30
+415, 0x82978fe4bad4195
+416, 0xdc4ebc4c0feb50ab
+417, 0xd3b7164d0240c06f
+418, 0x6e2ad6e5a5003a63
+419, 0xa24b430e2ee6b59c
+420, 0x2905f49fd5073094
+421, 0x5f209e4de03aa941
+422, 0x57b7da3e0bedb1dc
+423, 0x5e054018875b01f5
+424, 0xb2f2da6145658db3
+425, 0xbd9c94a69a8eb651
+426, 0x9c5f9a07cd6ac749
+427, 0x2296c4af4d529c38
+428, 0x522ed800fafdefab
+429, 0xe2a447ced0c66791
+430, 0x937f10d45e455fef
+431, 0xc882987d9e29a24
+432, 0x4610bfd6a247ee1a
+433, 0x562ba3e50870059
+434, 0x59d8d58793602189
+435, 0xfe9a606e3e34abe
+436, 0x6825f7932a5e9282
+437, 0xe77f7061bab476ad
+438, 0xbf42001da340ace3
+439, 0x9c3e9230f5e47960
+440, 0x2c0f700d96d5ad58
+441, 0x330048b7cd18f1f9
+442, 0xffc08785eca5cca9
+443, 0xb5879046915f07a5
+444, 0xef51fe26f83c988e
+445, 0xfa4c2968e7881a9a
+446, 0xc0a9744455a4aad
+447, 0xbd2ad686d6313928
+448, 0x6b9f0984c127682a
+449, 0xc9aaa00a5da59ed8
+450, 0x762a0c4b98980dbf
+451, 0x52d1a2393d3ca2d1
+452, 0x1e9308f2861db15c
+453, 0xe7b3c74fe4b4a844
+454, 0x485e15704a7fc594
+455, 0x9e7f67ea44c221f6
+456, 0xbab9ad47fde916e0
+457, 0x50e383912b7fc1f4
+458, 0xaad63db8abcef62d
+459, 0xc2f0c5699f47f013
+460, 0xee15b36ada826812
+461, 0x2a1b1cf1e1777142
+462, 0x8adb03ede79e937d
+463, 0xf14105ef65643bf3
+464, 0x752bbaefc374a3c7
+465, 0xa4980a08a5a21d23
+466, 0x418a1c05194b2db7
+467, 0xdd6ff32efe1c3cd6
+468, 0x272473ed1f0d3aa2
+469, 0x1e7fdebadabe6c06
+470, 0xd1baa90c17b3842f
+471, 0xd3d3a778e9c8404a
+472, 0x781ae7fda49fa1a0
+473, 0x61c44fdbdacc672d
+474, 0x6d447d0a1404f257
+475, 0x9303e8bdfbfb894d
+476, 0x3b3482cdec016244
+477, 0xb149bf245d062e7b
+478, 0x96f8d54b14cf992d
+479, 0x4741549a01f8c3d0
+480, 0x48270811b2992af
+481, 0x7b58f175cd25d147
+482, 0x8f19a840b56f4be9
+483, 0x84a77f43c0951a93
+484, 0x34e1a69381f0c374
+485, 0xb158383c9b4040f
+486, 0x372f1abc7cf3a9fa
+487, 0x5439819a84571763
+488, 0xabf8515e9084e2fa
+489, 0xb02312b9387ff99
+490, 0x238a85bb47a68b12
+491, 0x2068cb83857c49bb
+492, 0xc6170e743083664c
+493, 0x745cf8470bcb8467
+494, 0xe3a759a301670300
+495, 0x292c7686ad3e67da
+496, 0x359efedaff192a45
+497, 0x511f2c31a2d8c475
+498, 0x97fd041bf21c20b3
+499, 0x25ef1fe841b7b3f6
+500, 0xbb71739e656f262d
+501, 0x2729b0e989b6b7b8
+502, 0xd2142702ec7dbabf
+503, 0x7008decd2488ee3f
+504, 0x69daa95e303298d7
+505, 0xc35eca4efb8baa5a
+506, 0xf3f16d261cec3b6c
+507, 0x22371c1d75396bd3
+508, 0x7aefa08eccae857e
+509, 0x255b493c5e3c2a2f
+510, 0x779474a077d34241
+511, 0x5199c42686bea241
+512, 0x16c83931e293b8d3
+513, 0xa57fe8db8c0302c7
+514, 0xd7ace619e5312eb1
+515, 0x8740f013306d217c
+516, 0xb6a1ad5e29f4d453
+517, 0x31abf7c964688597
+518, 0xbc3d791daed71e7
+519, 0x31ee4ca67b7056ed
+520, 0x1ab5416bfe290ea3
+521, 0x93db416f6d3b843a
+522, 0xed83bbe5b1dd2fed
+523, 0xece38271470d9b6d
+524, 0x3a620f42663cd8ae
+525, 0x50c87e02acafee5d
+526, 0xcabeb8bedbc6dab5
+527, 0x2880a6d09970c729
+528, 0x4aba5dd3bfc81bc
+529, 0xaba54edf41080cec
+530, 0xb86bb916fc85a169
+531, 0x4c41de87bc79d8ca
+532, 0xcce2a202622945fe
+533, 0x513f086fad94c107
+534, 0x18b3960c11f8cc96
+535, 0x2f0d1cfd1896e236
+536, 0x1702ae3880d79b15
+537, 0x88923749029ae81
+538, 0x84810d4bdec668eb
+539, 0xf85b0a123f4fc68d
+540, 0x93efd68974b6e4d1
+541, 0x5d16d6d993a071c9
+542, 0x94436858f94ca43b
+543, 0xb3dbb9ed0cb180b6
+544, 0x6447030a010b8c99
+545, 0xd7224897c62925d8
+546, 0xb0c13c1d50605d3a
+547, 0xdff02c7cb9d45f30
+548, 0xe8103179f983570d
+549, 0xbc552037d6d0a24e
+550, 0x775e500b01486b0d
+551, 0x2050ac632c694dd6
+552, 0x218910387c4d7ae7
+553, 0xf83e8b68ff885d5d
+554, 0xe3374ec25fca51a3
+555, 0xfa750ffa3a60f3af
+556, 0x29ee40ba6df5592e
+557, 0x70e21a68f48260d2
+558, 0x3805ca72cd40886e
+559, 0x2f23e73f8eabf062
+560, 0x2296f80cdf6531ae
+561, 0x903099ed968db43a
+562, 0xf044445cf9f2929f
+563, 0xcd47fdc2de1b7a1
+564, 0xaab1cbd4f849da99
+565, 0x5fc990688da01acb
+566, 0xa9cee52ea7dab392
+567, 0xecefc3a4349283a8
+568, 0xdd6b572972e3fafc
+569, 0xc1f0b1a2ffb155da
+570, 0xc30d53fc17bd25c8
+571, 0x8afa89c77834db28
+572, 0x5569a596fb32896c
+573, 0x36f207fc8df3e3d4
+574, 0x57c2bd58517d81db
+575, 0xb524693e73d0061c
+576, 0xb69f6eb233f5c48b
+577, 0x4f0fb23cab8dc695
+578, 0x492c1ad0a48df8df
+579, 0xf6dcc348ec8dec1f
+580, 0xa4d8708d6eb2e262
+581, 0x4c2072c2c9766ff1
+582, 0xa9bf27c4304875f0
+583, 0xfc8fb8066d4f9ae2
+584, 0x188095f6235fec3c
+585, 0x1d8227a2938c2864
+586, 0x89ea50c599010378
+587, 0xcac86df0a7c6d56d
+588, 0x47a8c5df84c7d78
+589, 0xe607ae24ea228bfa
+590, 0x36624a7996efe104
+591, 0x5d72881c1227d810
+592, 0x78694a6750374c8
+593, 0x7b9a217d4ab5ff45
+594, 0xd53e5d6f7504becc
+595, 0x197a72d3f4889a0e
+596, 0xfdc70c4755a8df36
+597, 0xd0fda83748c77f74
+598, 0x7ddc919ac9d6dcc9
+599, 0x785c810a6a2dc08b
+600, 0xba4be83e7e36896c
+601, 0x379d6fe80cf2bffe
+602, 0x74cae2dabc429206
+603, 0x1efac32d5d34c917
+604, 0x3cb64e2f98d36e70
+605, 0xc0a7c3cdc3c60aa7
+606, 0x699dfadd38790ebe
+607, 0x4861e61b3ecfbeac
+608, 0x531744826c345baa
+609, 0x5ec26427ad450cba
+610, 0xf2c1741479abdcae
+611, 0xe9328a78b2595458
+612, 0x30cd1bdf087acd7f
+613, 0x7491ced4e009adbe
+614, 0xdcd942df1e2e7023
+615, 0xfe63f01689fee35
+616, 0x80282dfe5eaedc42
+617, 0x6ecdea86495f8427
+618, 0xe0adfdd5e9ed31c3
+619, 0xf32bd2a7418127e
+620, 0x8aabba078db6ee2
+621, 0xa8a8e60499145aca
+622, 0xf76b086ac4e8a0f2
+623, 0x6e55b3c452ff27f8
+624, 0xe18fa7cd025a71bf
+625, 0xeed7b685fde0fa25
+626, 0xba9b6c95867fa721
+627, 0x4c2603bc69de2df2
+628, 0xaac87eee1b58cd66
+629, 0x3c9af6656e01282c
+630, 0x2dfa05ce8ff476b6
+631, 0xeae9143fcf92f23d
+632, 0x3f0699f631be3bc8
+633, 0xa0f5f79f2492bd67
+634, 0x59c47722388131ed
+635, 0x5f6e9d2941cef1de
+636, 0xe9ad915c09788b7b
+637, 0x92c6d37e4f9482f5
+638, 0x57d301b7fdadd911
+639, 0x7e952d23d2a8443
+640, 0xbb2fa5e0704b3871
+641, 0xe5642199be36e2d5
+642, 0x5020b60d54358291
+643, 0xa0b6317ec3f60343
+644, 0xb57b08b99540bc5c
+645, 0x21f1890adc997a88
+646, 0xfcf824200dd9da2d
+647, 0x8146293d83d425d1
+648, 0xdadfbf5fbb99d420
+649, 0x1eb9bbc5e6482b7d
+650, 0xd40ff44f1bbd0f1c
+651, 0xa9f948ba2d08afa5
+652, 0x638cc07c5301e601
+653, 0x1f984baa606e14e8
+654, 0x44e153671081f398
+655, 0xb17882eeb1d77a5d
+656, 0x5fd8dbee995f14c
+657, 0xff3533e87f81b7fe
+658, 0x2f44124293c49795
+659, 0x3bf6b51e9360248
+660, 0x72d615edf1436371
+661, 0x8fc5cf4a38adab9d
+662, 0xfa517e9022078374
+663, 0xf356733f3e26f4d8
+664, 0x20ea099cdc6aad40
+665, 0xe15b977deb37637d
+666, 0xcc85601b89dae88d
+667, 0x5768c62f8dd4905c
+668, 0xa43cc632b4e56ea
+669, 0xc4240cf980e82458
+670, 0xb194e8ffb4b3eeb6
+671, 0xee753cf2219c5fa1
+672, 0xfe2500192181d44d
+673, 0x2d03d7d6493dd821
+674, 0xff0e787bb98e7f9b
+675, 0xa05cf8d3bd810ce7
+676, 0x718d5d6dcbbdcd65
+677, 0x8d0b5343a06931c
+678, 0xae3a00a932e7eaf9
+679, 0x7ed3d8f18f983e18
+680, 0x3bb778ee466dc143
+681, 0x711c685c4e9062c0
+682, 0x104c3af5d7ac9834
+683, 0x17bdbb671fb5d5cf
+684, 0xabf26caead4d2292
+685, 0xa45f02866467c005
+686, 0xf3769a32dc945d2d
+687, 0xe78d0007f6aabb66
+688, 0x34b60be4acbd8d4b
+689, 0x58c0b04b69359084
+690, 0x3a8bb354c212b1
+691, 0x6b82a8f3d70058d5
+692, 0x405bdef80a276a4a
+693, 0xe20ca40ee9195cad
+694, 0xf5dd96ba2446fefd
+695, 0xc1e180c55fe55e3c
+696, 0xa329caf6daa952b3
+697, 0xb4809dd0c84a6b0a
+698, 0xd27f82661070cee7
+699, 0xa7121f15ee2b0d8a
+700, 0x4bdaea70d6b34583
+701, 0xe821dc2f310f7a49
+702, 0x4c00a5a68e76f647
+703, 0x331065b064a2d5ea
+704, 0xac0c2ce3dc04fa37
+705, 0x56b32b37b8229008
+706, 0xe757cdb51534fcfa
+707, 0xd3ff183576b2fad7
+708, 0x179e1f4190f197a7
+709, 0xf874c626a7c9aae5
+710, 0xd58514ffc37c80e4
+711, 0xc65de31d33fa7fd3
+712, 0x6f6637052025769b
+713, 0xca1c6bdadb519cc0
+714, 0xd1f3534cde37828a
+715, 0xc858c339eee4830a
+716, 0x2371eacc215e02f4
+717, 0x84e5022db85bbbe9
+718, 0x5f71c50bba48610e
+719, 0xe420192dad9c323f
+720, 0x2889342721fca003
+721, 0x83e64f63334f501d
+722, 0xac2617172953f2c
+723, 0xfa1f78d8433938ff
+724, 0x5578382760051462
+725, 0x375d7a2e3b90af16
+726, 0xb93ff44e6c07552d
+727, 0xded1d5ad811e818c
+728, 0x7cf256b3b29e3a8c
+729, 0x78d581b8e7bf95e8
+730, 0x5b69192f2caa6ad3
+731, 0xa9e25855a52de3ce
+732, 0x69d8e8fc45cc188d
+733, 0x5dd012c139ad347d
+734, 0xfcb01c07b77db606
+735, 0x56253e36ab3d1cce
+736, 0x1181edbb3ea2192
+737, 0x325bef47ff19a08d
+738, 0xd3e231ceb27e5f7
+739, 0x8e819dd2de7956d2
+740, 0x34a9689fe6f84a51
+741, 0x3e4eeb719a9c2927
+742, 0x5c3b3440581d0aaf
+743, 0x57caf51897d7c920
+744, 0xec6a458130464b40
+745, 0xe98f044e0da40e9b
+746, 0xbe38662020eeb8e7
+747, 0x7b8c407c632724ae
+748, 0x16c7cfa97b33a544
+749, 0xd23359e2e978ae5a
+750, 0x4fdba458250933dd
+751, 0x3c9e0713cfe616ba
+752, 0x6f0df87b13163b42
+753, 0xc460902cb852cc97
+754, 0x289df8fefd6b0bce
+755, 0x4ac2a2a1c3fb8029
+756, 0x2fc3e24d8b68eef7
+757, 0x34564386a59aab9a
+758, 0x31047391ebd67ce4
+759, 0x6c23d070a0564d41
+760, 0xba6387b2b72545f7
+761, 0xcdcf1008058387af
+762, 0xc9308fa98db05192
+763, 0xdbdbb5abd01a9d84
+764, 0x937088275c7804ab
+765, 0x6f6accfefe34ee81
+766, 0x5c33c74c49cfdb2c
+767, 0x5e1a771edfb92bd3
+768, 0x6e89b009069ecae7
+769, 0x34d64e17ec0e8968
+770, 0x841203d0cde0c330
+771, 0x7642cc9d7eb9e9cb
+772, 0xca01d2e8c128b97e
+773, 0x5b8390617b3304ab
+774, 0x52ec4ed10de1eb2d
+775, 0xb90f288b9616f237
+776, 0x5bd43cd49617b2e2
+777, 0x1a53e21d25230596
+778, 0x36ccd15207a21cd6
+779, 0xc8263d780618fd3c
+780, 0x6eb520598c6ce1cb
+781, 0x493c99a3b341564f
+782, 0xab999e9c5aa8764f
+783, 0xab2fa4ceaba84b
+784, 0xbbd2f17e5cb2331b
+785, 0xc8b4d377c0cc4e81
+786, 0x31f71a6e165c4b1e
+787, 0xd1011e55fb3addaa
+788, 0x5f7ec34728dfa59
+789, 0x2aef59e60a84eb0f
+790, 0x5dde6f09aec9ad5f
+791, 0x968c6cdbc0ef0438
+792, 0x1957133afa15b13a
+793, 0xbaf28f27573a64c2
+794, 0xc6f6ddd543ebf862
+795, 0xdd7534315ec9ae1e
+796, 0xd2b80cd2758dd3b
+797, 0xa38c3da00cc81538
+798, 0x15c95b82d3f9b0f9
+799, 0x6704930287ce2571
+800, 0x9c40cc2f6f4ecb0c
+801, 0xc8de91f50b22e94e
+802, 0x39272e8fddbfdf0a
+803, 0x879e0aa810a117d
+804, 0xa312fff4e9e5f3bd
+805, 0x10dd747f2835dfec
+806, 0xeb8466db7171cdae
+807, 0xaa808d87b9ad040a
+808, 0xab4d2229a329243a
+809, 0x7c622f70d46f789c
+810, 0x5d41cef5965b2a8e
+811, 0xce97ec4702410d99
+812, 0x5beba2812c91211b
+813, 0xf134b46c93a3fec7
+814, 0x76401d5630127226
+815, 0xc55fc9d9eacd4ec1
+816, 0xaec8cefaa12f813f
+817, 0x2f845dcfd7b00722
+818, 0x3380ab4c20885921
+819, 0xdb68ad2597691b74
+820, 0x8a7e4951455f563f
+821, 0x2372d007ed761c53
+822, 0xcab691907714c4f1
+823, 0x16bc31d6f3abec1a
+824, 0x7dff639fbcf1824
+825, 0x6666985fbcff543d
+826, 0xb618948e3d8e6d0c
+827, 0x77b87837c794e068
+828, 0xcd48288d54fcb5a8
+829, 0x47a773ed6ae30dc3
+830, 0xba85ae44e203c942
+831, 0xa7a7b21791a25b2d
+832, 0x4029dd92e63f19e0
+833, 0xc2ad66ab85e7d5aa
+834, 0xa0f237c96fdab0db
+835, 0xffefb0ab1ca18ed
+836, 0x90cb4500785fd7d5
+837, 0xa7dd3120f4876435
+838, 0x53f7872624694300
+839, 0xea111326ff0040d9
+840, 0x5f83cb4cce40c83b
+841, 0x918e04936c3b504d
+842, 0x87a8db4c0e15e87c
+843, 0x7cff39da6a0dedd0
+844, 0x36f7de2037f85381
+845, 0xd1d8d94022a1e9a7
+846, 0x2c9930127dc33ec9
+847, 0x6cb4719dcd0101c6
+848, 0xc01868cde76935f7
+849, 0x6b86f2ec1ab50143
+850, 0x68af607d8d94ae61
+851, 0xe216c5b95feedf34
+852, 0x4b866bd91efe2e4b
+853, 0x4bff79df08f92c99
+854, 0x6ff664ea806acfd1
+855, 0x7fce0b3f9ece39bc
+856, 0x29bc90b59cb3db97
+857, 0x833c4b419198607d
+858, 0xf3573e36ca4d4768
+859, 0x50d71c0a3c2a3fa8
+860, 0xd754591aea2017e7
+861, 0x3f9126f1ee1ebf3
+862, 0xe775d7f4b1e43de8
+863, 0xe93d51628c263060
+864, 0x83e77f6fb32d6d82
+865, 0x43dd7eef823408e4
+866, 0x1c843c2c90180662
+867, 0xe924dafb9a16066b
+868, 0x6af3ee96e7b7fbd9
+869, 0x94d5c4f37befcd1f
+870, 0x40ffb04bedef4236
+871, 0x71c17bbc20e553e
+872, 0x101f7a0a6208729f
+873, 0x5ca34570cf923548
+874, 0x8e3139db2e96e814
+875, 0x3ab96d96263d048d
+876, 0x97f3c0bbc6755c3c
+877, 0x31fc72daedaef3dc
+878, 0x71f8d7855d10789b
+879, 0xce6dc97b4662333b
+880, 0xfddc2aabd342bc61
+881, 0xefbd4007ff8c7d2e
+882, 0xf72cd6c689ef8758
+883, 0x932c8b0c0e755137
+884, 0x94cc4dedd58ff69
+885, 0xde4dfd6890535979
+886, 0xdb00dcd2dcb4a50a
+887, 0xb0466240b4548107
+888, 0x9cb9264c7b90d1a3
+889, 0x357e378e9be5766b
+890, 0x6e0316ef03367bbf
+891, 0x201ea18839544ca
+892, 0x803ff3406be5f338
+893, 0xf9d5e82fd4144bb2
+894, 0x1b6b88ca701e9f47
+895, 0xd1fe5ab8e1f89cc0
+896, 0x14171fe176c4bece
+897, 0x887948bdef78beaa
+898, 0x80449ddc3eb9b977
+899, 0x5f4e1f900fb4bcf3
+900, 0xbe30f8701909f8e2
+901, 0xd1f2a2fb5503306d
+902, 0x6b1c77238dc23803
+903, 0x102156a6c9860f66
+904, 0x4cd446e099edf4c1
+905, 0xc79ac6cbc911f33b
+906, 0x3ee096ffe3384f1c
+907, 0xb58f83b18a306dc7
+908, 0x9f76582141de56b2
+909, 0x9ddfa85e02c13866
+910, 0x4d9a19d4ce90a543
+911, 0xbf81ab39fd17d376
+912, 0x5327e5054c6a74f1
+913, 0xd5062dd31db1a9b7
+914, 0x645853735527edc
+915, 0x485393967f91af08
+916, 0xeff9667dcf77ca68
+917, 0xd012313f5fbec464
+918, 0xbeae35bdfae55144
+919, 0x302c41ebac8444a0
+920, 0x9ccdb6c2fe58fba8
+921, 0x567753af68ed23f8
+922, 0xff90f790e43efec3
+923, 0x970cc756fb799696
+924, 0xe59239d1c44915
+925, 0x4d2d189fb3941f05
+926, 0x96f23085db165a9c
+927, 0xa1202dec7a37b1a5
+928, 0xc0c1ee74bcd7dc1a
+929, 0x9edcf2048b30333a
+930, 0xd848588ba7e865fb
+931, 0x8d9f0897317cab40
+932, 0x67b96f15e25924fb
+933, 0xefc8d8536619ee42
+934, 0xf3f621d22bdde0c2
+935, 0x68610a0de862ae32
+936, 0xa22ca5142de24cbd
+937, 0x8815452f4e6b4801
+938, 0x4e9c1b607b2750e5
+939, 0x19b3c09ba6fc9b25
+940, 0x9b2543c8836780ac
+941, 0xe702b8f950e56431
+942, 0xb357cc329cac3917
+943, 0x387bf86a17a31e08
+944, 0x9940b983d331b163
+945, 0xf5d89d7fe9095e18
+946, 0x4362682329e5c4d1
+947, 0xd2132573f6ae7b42
+948, 0xc0a5849e23a61606
+949, 0xdadbddf47265bc02
+950, 0x1b96f00339a705f7
+951, 0x94e6642329288913
+952, 0x825ab3f10e6d330b
+953, 0x1a1c31ac9d883ea0
+954, 0xb49076b7155c6f47
+955, 0x920cf3085dfe3ccb
+956, 0x9743407c9f28e825
+957, 0x6ce8a28622402719
+958, 0xce2fe67e06baf8a6
+959, 0x3a16b34784ecf5e6
+960, 0x140467cc1d162a0c
+961, 0x32d4772692ab625
+962, 0xa4f4b28562f43336
+963, 0x885b4335457bd84a
+964, 0x499d3ed26c87ad8a
+965, 0xc7328bcedb9a545e
+966, 0xc6dd76a6cbf5d2b2
+967, 0xba9c22be404ee1aa
+968, 0x70e6aee45f23521d
+969, 0x61e03a798593c177
+970, 0x171671f809c68213
+971, 0x28d54872fc1d914c
+972, 0x43c2fcd9bd098b53
+973, 0x172ad4c4a98b9d37
+974, 0x330860c9460f2516
+975, 0x49547f472df984f4
+976, 0x873b2436d3f0e114
+977, 0x6f99accf4ea050b6
+978, 0x5968ac874ed51613
+979, 0x4939d70d29a3c611
+980, 0x11f381ed28738d3d
+981, 0xa97430d36ab3a869
+982, 0xe6fa880801129e22
+983, 0xf84decbd8f48c913
+984, 0x4425c0ed1e9a82a5
+985, 0x7a1f9485e9929d5a
+986, 0xc7c51f155dfce1c6
+987, 0x9619a39501d74f2b
+988, 0x7c7035955dbf4c1b
+989, 0xc61ee569cf57c2c9
+990, 0x3eaf7c5b0df734e1
+991, 0xe71cb4064d1ede05
+992, 0x356e3cec80e418b2
+993, 0xca04306243a15be6
+994, 0x941cf3881fa18896
+995, 0x30dbb0e819d644e0
+996, 0xaae22c0bef02859a
+997, 0x7bd30917bbaa8a94
+998, 0x2672547bc8d7d329
+999, 0x4955c92aaa231578
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..878c5ea7c3a5173467a4f945947174149f3913e6
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/pcg64dxsm-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0xd97e4a147f788a70
+1, 0x8dfa7bce56e3a253
+2, 0x13556ed9f53d3c10
+3, 0x55dbf1c241341e98
+4, 0xa2cd98f722eb0e0a
+5, 0x83dfc407203ade8
+6, 0xeaa083df518f030d
+7, 0x44968c87e432852b
+8, 0x573107b9cb8d9ecc
+9, 0x9eedd1da50b9daca
+10, 0xb33a6735ca451e3c
+11, 0x72830d2b39677262
+12, 0x9da8c512fd0207e8
+13, 0x1fc5c91954a2672b
+14, 0xd33479437116e08
+15, 0x9ccdd9390cee46f3
+16, 0x1fd39bb01acd9e76
+17, 0xedc1869a42ff7fe5
+18, 0xbd68ca0b42a6e7e9
+19, 0x620b67df09621b1f
+20, 0xfa11d51bd6950221
+21, 0xc8c45b36e7d28d08
+22, 0xe9c91272fbaad777
+23, 0x2dc87a143f220e90
+24, 0x6376a7c82361f49d
+25, 0x552c5e434232fe75
+26, 0x468f7f872ac195bc
+27, 0x32bed6858125cf89
+28, 0xe4f06111494d09d3
+29, 0xa5c166ffea248b80
+30, 0x4e26605b97064a3f
+31, 0xceafd9f6fc5569d
+32, 0xb772f2f9eed9e106
+33, 0x672c65e6a93534e2
+34, 0xcdc5e1a28d1bd6a0
+35, 0x1ed9c96daeebd3e3
+36, 0x4d189dcfc0c93c3f
+37, 0x50df5a95c62f4b43
+38, 0xcccf4949fa65bbb8
+39, 0x19b8073d53cdc984
+40, 0x6fb40bba35483703
+41, 0xb02de4aef86b515a
+42, 0x4d90c63655350310
+43, 0xea44e4089825b16c
+44, 0x8d676958b1f9da2b
+45, 0x6d313940917ae195
+46, 0x1b1d35a4c1dd19f4
+47, 0x117720f8397337ef
+48, 0xcc073cf3ac11eeaa
+49, 0x8331ec58a9ff8acb
+50, 0xf3dc2a308b6b866f
+51, 0x7eba1202663382b6
+52, 0x8269839debeb4e5a
+53, 0x87fd3dc0f9181a8e
+54, 0xabe62ddd3c925f03
+55, 0x7f56f146944fe8d4
+56, 0xc535972150852068
+57, 0x60b252d453bd3a68
+58, 0x4251f0134634490a
+59, 0x338950da210dfeb2
+60, 0xcadfe932971c9471
+61, 0xfb7049457fab470e
+62, 0x9bfb8145a4459dff
+63, 0x4a89dda3898f9d8a
+64, 0x88cc560151483929
+65, 0x277dc820f4b6796e
+66, 0x3524bd07ea0afb88
+67, 0x92eb6ffb2bf14311
+68, 0xf6559be0783f3fe9
+69, 0xf0844f9af54af00d
+70, 0xdd5e0b59adcef8a
+71, 0x4ff7e4f2ab18554c
+72, 0x3fa22c8a02634587
+73, 0x1db8e1a9442fe300
+74, 0x40cf15953ad3d3e7
+75, 0x92af15fe1a9f6f0a
+76, 0xab4a0e466fb0cfd
+77, 0x944f1555a06cca82
+78, 0x10cf48412f1f6066
+79, 0x7f51f9a455f9e8e1
+80, 0x47ee93530f024c7e
+81, 0x36cf2f0413e0f6f2
+82, 0xa315e23731969407
+83, 0xd8e2796327cf5f87
+84, 0xa86072696a555c34
+85, 0xee3f0b8804feaab7
+86, 0x41e80dc858f8360b
+87, 0x31ec2e9b78f5b29
+88, 0xd397fb9b8561344c
+89, 0x28081e724e649b74
+90, 0x5c135fc3fc672348
+91, 0x9a276ca70ce9caa0
+92, 0x9216da059229050a
+93, 0xcf7d375ed68007b0
+94, 0xa68ad1963724a770
+95, 0xd4350de8d3b6787c
+96, 0xee7d2c2cc275b6d2
+97, 0x71645ec738749735
+98, 0x45abdf8c68d33dbb
+99, 0xe71cadb692c705ea
+100, 0x60af6f061fd90622
+101, 0x1eabe2072632c99d
+102, 0x947dda995a402cb6
+103, 0xbb19f49a3454f3b
+104, 0xe6e43e907407758c
+105, 0xfe2b67016bd6873a
+106, 0x7fdb4dd8ab30a722
+107, 0x39d3265b0ff1a45b
+108, 0xed24c0e4fce8d0c2
+109, 0xf6e074f86faf669d
+110, 0x9142040df8dc2a79
+111, 0x9682ab16bc939a9c
+112, 0x6a4e80c378d971c8
+113, 0x31309c2c7fc2d3d6
+114, 0xb7237ec682993339
+115, 0x6a30c06bb83dccd9
+116, 0x21c8e9b6d8e7c382
+117, 0x258a24ae6f086a19
+118, 0xb76edb5be7df5c35
+119, 0x3c11d7d5c16e7175
+120, 0xbdfc34c31eff66e1
+121, 0x8af66e44be8bf3a2
+122, 0x3053292e193dec28
+123, 0xd0cc44545b454995
+124, 0x408ac01a9289d56
+125, 0x4e02d34318ec2e85
+126, 0x9413ff3777c6eb6b
+127, 0xa3a301f8e37eb3df
+128, 0x14e6306bd8d8f9f9
+129, 0xd3ea06ce16c4a653
+130, 0x170abe5429122982
+131, 0x7f9e6fddc6cacb85
+132, 0xa41b93e10a10a4c8
+133, 0x239216f9d5b6d0b5
+134, 0x985fcb6cb4190d98
+135, 0xb45e3e7c68f480c6
+136, 0xc1b2fc2e0446211c
+137, 0x4596adb28858c498
+138, 0x2dd706f3458ddc75
+139, 0x29c988c86f75464
+140, 0xac33a65aa679a60
+141, 0xa28fef762d39d938
+142, 0x541e6fa48647f53
+143, 0x27838d56b2649735
+144, 0x8e143d318a796212
+145, 0xaea6097745f586b8
+146, 0x636143330f8ee2e6
+147, 0xc2d05fd8b945b172
+148, 0x6e355f9eb4353055
+149, 0xeb64ca42e8bf282e
+150, 0xe8202dfd9da0fe5
+151, 0x7305689c9d790cba
+152, 0xf122f8b1bef32970
+153, 0x9562887e38c32ba5
+154, 0xf9cd9be121b738d
+155, 0x6238e0c398307913
+156, 0x5f2e79bb07c30f47
+157, 0x8ce8e45c465006e
+158, 0x39281fe1e99e2441
+159, 0xafb10c2ca2874fea
+160, 0x6e52f91633f83cf
+161, 0x8ff12c1ac73c4494
+162, 0xe48608a09365af59
+163, 0xefd9bbc7e76e6a33
+164, 0xbe16a39d5c38ec92
+165, 0x6a6ffbcaf5a2330f
+166, 0xdd5d6ac7d998d43d
+167, 0x207bf978226d4f11
+168, 0xf8eec56bd2a0f62e
+169, 0xa5bccf05dce0d975
+170, 0x93cf3ec1afe457a6
+171, 0x38651466d201f736
+172, 0x3ad21473985c9184
+173, 0xc6407a3bd38c92a6
+174, 0xb1ec42c7afa90a25
+175, 0xbdeca984df8b7dd3
+176, 0xb6926b1d00aa6c55
+177, 0x86141d0022352d49
+178, 0x169316256135ee09
+179, 0xffb1c7767af02a5c
+180, 0x502af38ad19f5c91
+181, 0xfbf6cbc080086658
+182, 0x33cf9b219edae501
+183, 0x46e69bebd77b8862
+184, 0xf11e0cc91125d041
+185, 0xb4cd1649f85e078f
+186, 0xb49be408db4e952
+187, 0xb0b8db46140cce3c
+188, 0xba647f2174012be7
+189, 0x4f0a09e406970ac9
+190, 0xf868c7aec9890a5c
+191, 0xde4c8fa7498ea090
+192, 0x872ceb197978c1d4
+193, 0x1eb5cd9c3269b258
+194, 0x3ea189f91724f014
+195, 0x41379656f7746f2c
+196, 0x7bd18493aca60e51
+197, 0x5380c23b0cbbf15e
+198, 0x920b72835f88246b
+199, 0x24d7f734a4548b8e
+200, 0x9944edb57e5aa145
+201, 0x4628e136ebb8afe1
+202, 0xb4ee6a776356e2a7
+203, 0x481cbe9744ccf7d7
+204, 0x7e8d67e8b0b995d9
+205, 0xeeacde100af7b47e
+206, 0x103da08f2487dab7
+207, 0x6b9890a91d831459
+208, 0xd0c5beae37b572c7
+209, 0xfdccc371ee73fcc
+210, 0x65438f0a367a2003
+211, 0x5d23b2c818a7e943
+212, 0x9a8ed45ac04b58b3
+213, 0xdaf3c3f1695dce10
+214, 0x5960eec706fa2bc0
+215, 0x98ca652facb80d40
+216, 0x72970ae5e2194143
+217, 0x18c6374d878c5c94
+218, 0x20fa51f997381900
+219, 0x3af253dba26d6e1d
+220, 0x1b23d65db15c7f78
+221, 0x9f53ae976259b0e3
+222, 0x9a6addb28dc92d49
+223, 0x1e085c4accd0a7d7
+224, 0xe9d3f4cc9bad6ce5
+225, 0xe018fad78b5b1059
+226, 0x5ef7682232b4b95
+227, 0xb2242aa649f5de80
+228, 0x8f3e6d8dd99b9e4e
+229, 0xb9be6cc22949d62a
+230, 0xecbdc7beaa5ff1fe
+231, 0xd388db43a855bdf0
+232, 0xd71ee3238852568d
+233, 0x85ab3056304c04b5
+234, 0x2ed7ae7ad3cfc3cb
+235, 0x781d1b03d40b6c48
+236, 0x7d3c740886657e6d
+237, 0x982cfa6828daa6b0
+238, 0x278579599c529464
+239, 0x773adecfae9f0e08
+240, 0x63a243ea4b85c5d7
+241, 0x59940074fc3709e1
+242, 0xc914a2eed58a6363
+243, 0x2602b04274dd724c
+244, 0xdf636eb7636c2c42
+245, 0x891a334d0d26c547
+246, 0xde8cd586d499e22d
+247, 0x3ea1aa4d9b7035b6
+248, 0xd085cff6f9501523
+249, 0xe82a872f374959e
+250, 0x55cb495bbd42cc53
+251, 0x5f42b3226e56ca97
+252, 0xea463f6f203493a3
+253, 0xeef3718e57731737
+254, 0x1bd4f9d62b7f9f3c
+255, 0x19284f5e74817511
+256, 0xaf6e842c7450ca87
+257, 0x1d27d2b08a6b3600
+258, 0xfb4b912b396a52e3
+259, 0x30804d4c5c710121
+260, 0x4907e82564e36338
+261, 0x6441cf3b2900ddb7
+262, 0xd76de6f51988dc66
+263, 0x4f298ef96fd5e6d2
+264, 0x65432960c009f83d
+265, 0x65ebed07e1d2e3df
+266, 0xf83ee8078febca20
+267, 0x7bb18e9d74fc5b29
+268, 0x597b5fbc2261d91
+269, 0xea4f8ed0732b15b2
+270, 0xba2267f74f458268
+271, 0x3f304acabd746bbb
+272, 0x7bd187af85659a82
+273, 0x88e20dbdb7a08ea3
+274, 0x2a2dc948c772fcb4
+275, 0x87784fec2993c867
+276, 0x89163933cd362d4e
+277, 0xfd7b24f04302f957
+278, 0x9bdd544405dfb153
+279, 0xddee0fac58ffc611
+280, 0xa8e8993417e71ec1
+281, 0x55e0ab46ff7757af
+282, 0x53e7645f08d3d7df
+283, 0xbf78e563bc656ba2
+284, 0x1d162253b45ee2de
+285, 0x15e2bfefedf29eb4
+286, 0x4e2a4584aa394702
+287, 0xa89fb12b01525897
+288, 0x825bd98f0544e4df
+289, 0xfc6c50da6750700
+290, 0xc24aaabde7d28423
+291, 0x79d6f4660fcb19e5
+292, 0xee7d4fb40c8d659f
+293, 0x70bc281b462e811d
+294, 0x23ed4dc9636519a7
+295, 0xcb7c3f5a5711b935
+296, 0xe73090e0508c5d9d
+297, 0xb25a331f375952a6
+298, 0xa64c86e0c04740f6
+299, 0xb8f3ffc8d56ac124
+300, 0x2479266fc5ee6b15
+301, 0x8d5792d27f5ffbcb
+302, 0xb064298be946cd52
+303, 0xf0934a98912ffe26
+304, 0xbe805682c6634d98
+305, 0xe0e6e2c010012b4f
+306, 0x58c47d475f75976
+307, 0x358c9a6e646b2b4a
+308, 0x7e7c4ffca5b17ba7
+309, 0x43585c8c9a24a04c
+310, 0x5154ddbcd68d5c2c
+311, 0x4a2b062d3742a5e
+312, 0xca5691191da2b946
+313, 0x696a542109457466
+314, 0x9eb5d658a5022ba5
+315, 0x8158cf6b599ab8dc
+316, 0x1b95391eaa4af4a6
+317, 0x9953e79bd0fc3107
+318, 0x8639690086748123
+319, 0x2d35781c287c6842
+320, 0x393ef0001cd7bc8f
+321, 0xe3a61be8c5f2c22a
+322, 0x5e4ff21b847cc29b
+323, 0x4c9c9389a370eb84
+324, 0xd43a25a8fc3635fa
+325, 0xf6790e4a85385508
+326, 0x37edf0c81cb95e1d
+327, 0x52db00d6e6e79af8
+328, 0x3b202bceeb7f096
+329, 0x2a164a1c776136bb
+330, 0x73e03ee3fd80fd1b
+331, 0xd2c58c0746b8d858
+332, 0x2ed2cb0038153d22
+333, 0x98996d0fc8ceeacc
+334, 0xa4ed0589936b37f
+335, 0x5f61cf41a6d2c172
+336, 0xa6d4afb538c110d7
+337, 0xe85834541baadf1a
+338, 0x4c8967107fd49212
+339, 0x49bafb762ab1a8c1
+340, 0x45d540e2a834bf17
+341, 0x1c0ec8b4ed671dac
+342, 0x3d503ce2c83fe883
+343, 0x437bfffd95f42022
+344, 0xc82d1e3d5c2bc8d2
+345, 0x7a0a9cbfcb0d3f24
+346, 0xc0a4f00251b7a3be
+347, 0xb5be24e74bb6a1c6
+348, 0xa3104b94b57545b1
+349, 0x86de7d0c4b97b361
+350, 0x879c1483f26538a6
+351, 0xd74c87557f6accfb
+352, 0x2f9be40dbf0fe8a1
+353, 0x445a93398f608d89
+354, 0x7b3cb8a7211d7fdc
+355, 0xe86cc51290d031e7
+356, 0x33ef3594052ad79f
+357, 0xc61911d241dbb590
+358, 0x37cccb0c0e3de461
+359, 0xb75259124080b48b
+360, 0xd81e8961beb4abe5
+361, 0xf4542deb84a754e
+362, 0x6ea036d00385f02e
+363, 0xa7b60b0ac3b88681
+364, 0x108a6c36ca30baf5
+365, 0x4a2adc5bbfe2bf07
+366, 0x4079501f892a5342
+367, 0x55e113963c5448f0
+368, 0x8019ff4903b37242
+369, 0x109c6dcdb7ec6618
+370, 0x1239ac50944da450
+371, 0xe1399c7f94c651c1
+372, 0x5a6bbbae388d365a
+373, 0x4d72be57b8810929
+374, 0x3f067df24384e1fb
+375, 0x4f8b9e0f7f6c7be
+376, 0x202492c342a3b08
+377, 0x250753192af93a3
+378, 0xfba1159d9de2cb8e
+379, 0xba964497ab05505c
+380, 0x1329ec5d8a709dca
+381, 0x32927cacb6cd22bb
+382, 0x6b4d7db904187d56
+383, 0xe76adccf8e841e02
+384, 0x8c4bf4b6a788202
+385, 0x3013a3b409831651
+386, 0x7427d125c475412f
+387, 0x84dcc4bb2bf43202
+388, 0x117526f1101372a5
+389, 0xfe95d64b8984bd72
+390, 0x524e129934cc55c1
+391, 0xc3db4b0418c36d30
+392, 0xe1cb2047e9c19f7a
+393, 0xea43d6c8d8982795
+394, 0xe80ac8a37df89ed
+395, 0xfecc2104329ed306
+396, 0xa5c38aac9c1d51ea
+397, 0x3abe5d1c01e4fe17
+398, 0x717a805d97fcc7ac
+399, 0x94441f8207a1fb78
+400, 0x22d7869c5f002607
+401, 0x349e899f28c3a1b9
+402, 0x5639950cdea92b75
+403, 0x7e08450497c375b
+404, 0x94bf898b475d211d
+405, 0x75c761a402375104
+406, 0x1930920ec9d2a1e7
+407, 0xb774ba1bc6f6e4e2
+408, 0xf715602412e5d900
+409, 0x87bb995f4a13f0ba
+410, 0xa3c787868dfa9c8d
+411, 0xa17fd42a5a4f0987
+412, 0x4a9f7d435242b86
+413, 0x240364aff88f8aef
+414, 0xe7cd4cf4bf39f144
+415, 0xd030f313ca4c2692
+416, 0xc46696f4e03ec1e9
+417, 0x22c60f1ec21060b3
+418, 0x16c88058fd68986f
+419, 0x69ca448e8e6bde3f
+420, 0x3466c2cdec218abd
+421, 0x837ac4d05e6b117d
+422, 0x911210e154690191
+423, 0x9ece851d6fa358b7
+424, 0x42f79cb0c45e7897
+425, 0xbf7583babd7c499b
+426, 0x2059fe8031c6e0b9
+427, 0xabbec8fc00f7e51d
+428, 0x88809d86a3a256e1
+429, 0xd36056df829fdcb5
+430, 0x515632b6cb914c64
+431, 0xba76d06c2558874
+432, 0x632c54ca4214d253
+433, 0xadec487adf2cb215
+434, 0x521e663e1940513d
+435, 0xb1b638b548806694
+436, 0xbe2d5bfbe57d2c72
+437, 0x8b89e7719db02f7
+438, 0x90ba5281c1d56e63
+439, 0x899e1b92fceea102
+440, 0xf90d918e15182fa6
+441, 0x94a489ce96c948c4
+442, 0xad34db453517fcd4
+443, 0xc5264eb2de15930f
+444, 0x101b4e6603a21cee
+445, 0xef9b6258d6e85fff
+446, 0x6075c7d6c048bd7a
+447, 0x6f03232c64e438aa
+448, 0x18c983d7105ee469
+449, 0x3ffc23f5c1375879
+450, 0xbc1b4a00afb1f9f
+451, 0x5afa6b2bb8c6b46e
+452, 0xe7fce4af2f2c152a
+453, 0x5b00ab5c4b3982c7
+454, 0x2d4b0c9c0eb4bd0c
+455, 0x61d926270642f1f2
+456, 0x7219c485c23a2377
+457, 0x7e471c752fecd895
+458, 0x23c4d30a4d17ba1f
+459, 0x65cb277fe565ca22
+460, 0xcbb56ed9c701363b
+461, 0xfd04ab3a6eba8282
+462, 0x19c9e5c8bab38500
+463, 0xea4c15227676b65b
+464, 0x20f3412606c8da6f
+465, 0xb06782d3bf61a239
+466, 0xf96e02d5276a9a31
+467, 0x835d256b42aa52a6
+468, 0x25b09151747f39c1
+469, 0x64507386e1103eda
+470, 0x51cbc05716ef88e4
+471, 0x998cd9b7989e81cc
+472, 0x9d7115416bec28d1
+473, 0xc992ca39de97906b
+474, 0xd571e6f7ca598214
+475, 0xafc7fb6ccd9abbf8
+476, 0x88ef456febff7bf4
+477, 0xdbe87ccc55b157d2
+478, 0xaab95e405f8a4f6d
+479, 0xad586a385e74af4f
+480, 0x23cd15225c8485aa
+481, 0x370940bf47900ac7
+482, 0xefd6afda1a4b0ead
+483, 0x9cb1a4c90993dd7a
+484, 0xff7893e8b2f70b11
+485, 0xb09e1807c0638e8e
+486, 0xb10915dcb4978f74
+487, 0x88212ab0051a85eb
+488, 0x7af41b76e1ec793f
+489, 0x2e5c486406d3fefd
+490, 0xebe54eff67f513cc
+491, 0xab6c90d0876a79b8
+492, 0x224df82f93fe9089
+493, 0xc51c1ce053dc9cd2
+494, 0x5ef35a4d8a633ee7
+495, 0x4aca033459c2585f
+496, 0xd066932c6eefb23d
+497, 0x5309768aab9a7591
+498, 0xa2a3e33823df37f9
+499, 0xcec77ff6a359ee9
+500, 0x784dc62d999d3483
+501, 0x84e789fb8acc985d
+502, 0xd590237e86aa60f
+503, 0x737e2ffe1c8ad600
+504, 0xc019c3a39a99eab8
+505, 0x6a39e9836964c516
+506, 0xe0fe43129535d9da
+507, 0xdfc5f603d639d4de
+508, 0x7b9a7d048a9c03b6
+509, 0xbb5aa520faa27fdd
+510, 0x2a09b4200f398fa2
+511, 0x38cc88107904064e
+512, 0xa9a90d0b2d92bb25
+513, 0x9419762f87e987e3
+514, 0x1a52c525153dedcd
+515, 0xc26d9973dd65ae99
+516, 0x8e89bd9d0dc6e6a1
+517, 0x2f30868dc01bfb53
+518, 0x20f09d99b46501c4
+519, 0x78b468a563b8f1e9
+520, 0xcccf34b0b6c380c7
+521, 0xf554e7dc815297e6
+522, 0x332a585cfb4a50ef
+523, 0xa9fb64a2b6da41d7
+524, 0xdcd2a5a337391ce0
+525, 0x8a9bd3e324c6463d
+526, 0x9f4487d725503bdd
+527, 0xf72282d82f1d0ff
+528, 0x308f4160abb72d42
+529, 0x648de1db3a601b08
+530, 0x36cab5192e7ebd39
+531, 0x7975fbe4ab6a1c66
+532, 0xd515b4d72243864e
+533, 0x43a568f8b915e895
+534, 0x15fa9f2057bdb91d
+535, 0x7a43858ef7a222dc
+536, 0x17b4a9175ac074fe
+537, 0xa932c833b8d0f8f8
+538, 0x1d2db93a9a587678
+539, 0x98abd1d146124d27
+540, 0xf0ab0431671740aa
+541, 0xa9d182467540ad33
+542, 0x41c8a6cfc331b7fc
+543, 0xa52c6bd0fcd1d228
+544, 0x2773c29a34dc6fa3
+545, 0x3098230746fc1f37
+546, 0xd63311bb4f23fabe
+547, 0x6712bf530cd2faec
+548, 0x342e8f342e42c4dd
+549, 0xfbd83331851cdcad
+550, 0xe903be1361bbc34d
+551, 0xd94372e5077e3ef9
+552, 0x95aaa234f194bd8
+553, 0x20c0c8fb11e27538
+554, 0xfaf47dc90462b30b
+555, 0x8ddc6d144147682a
+556, 0xf626833fd926af55
+557, 0x5df93c34290d1793
+558, 0xb06a903e6e9fca5e
+559, 0x10c792dc851d77ca
+560, 0xd9b1b817b18e56cb
+561, 0x3a81730c408eb408
+562, 0x65052c04a8d4b63c
+563, 0x3328546598e33742
+564, 0xeca44a13f62d156d
+565, 0x69f83d1d86b20170
+566, 0x937764200412027d
+567, 0xc57eb1b58df0f191
+568, 0xa1c7d67dce81bc41
+569, 0x8e709c59a6a579ce
+570, 0x776a2f5155d46c70
+571, 0xd92906fbbc373aa5
+572, 0xe97ad478a2a98bf6
+573, 0xc296c8819ac815f
+574, 0x613ede67ba70e93e
+575, 0xe145222498f99cde
+576, 0xafcdfa7a3c1cf9bf
+577, 0x1c89252176db670d
+578, 0xad245eda5c0865ff
+579, 0x249463d3053eb917
+580, 0xc9be16d337517c0b
+581, 0xefcc82bf67b8f731
+582, 0x1e01577d029e0d00
+583, 0xad9c24b2a4f3d418
+584, 0xed2cceb510db4d0f
+585, 0xbddadcdb92400c70
+586, 0x67d6b0476ef82186
+587, 0xbc7662ff7bf19f73
+588, 0x9d94452a729e6e92
+589, 0x6b278d8594f55428
+590, 0x6c4b31cceb1b2109
+591, 0xccc6c3a726701e9
+592, 0x6bc28ece07df8925
+593, 0xc0422b7bf150ccc4
+594, 0xab7158f044e73479
+595, 0xdf3347546d9ed83f
+596, 0x3b3235a02c70dff4
+597, 0x2551c49c14ea8d77
+598, 0xee2f7f5bb3cc228e
+599, 0x39b87bfe8c882d39
+600, 0x7dd420fad380b51c
+601, 0xffe64976af093f96
+602, 0x4a4f48dc6e7eaa5f
+603, 0x85f2514d32fdc8cc
+604, 0x1ab1215fd7f94801
+605, 0x4cd1200fc795b774
+606, 0xcf8af463a38942ee
+607, 0x319caa7ce3022721
+608, 0x8cd9798a76d1aea4
+609, 0x2bd3933ac7afd34e
+610, 0x85d4c323403cf811
+611, 0xd7b956d3064efa30
+612, 0x67a078dbf1f13068
+613, 0x665fa6c83e87c290
+614, 0x9333ac2416d2469b
+615, 0xdfb1fd21a0094977
+616, 0xa1962a6e2c25f8ff
+617, 0x1f3b10a7ed5287cf
+618, 0x70641efb3d362713
+619, 0xe527a2cf85d00918
+620, 0x9741e45d3f9890a3
+621, 0x6cb74b5d4d36db4b
+622, 0xf24734d622bd2209
+623, 0xadd6d94f78e9d378
+624, 0xc3bbdb59225cca7f
+625, 0x5ad36614275b30cd
+626, 0x495568dd74eea434
+627, 0xf35de47e0ffe1f2d
+628, 0xefa209dca719ab18
+629, 0x844ddcaeb5b99ae8
+630, 0x37449670a1dc7b19
+631, 0x5a4612c166f845c1
+632, 0xe70f7782f2087947
+633, 0x98d484deac365721
+634, 0x705302198cf52457
+635, 0x7135ae0f5b77df41
+636, 0x342ac6e44a9b6fc3
+637, 0x2713fd2a59af5826
+638, 0x6e1a3f90f84efa75
+639, 0x9fb3b4dd446ca040
+640, 0x530044ae91e6bd49
+641, 0xe984c4183974dc3e
+642, 0x40c1fa961997d066
+643, 0xb7868250d8c21559
+644, 0x8bc929fa085fd1de
+645, 0x7bdb63288dc8733e
+646, 0xac4faad24326a468
+647, 0x1c6e799833aea0b1
+648, 0xcc8a749e94f20f36
+649, 0x4e7abfd0443547c5
+650, 0xb661c73bb8caa358
+651, 0x4a800f5728ff2351
+652, 0x8c15e15189b9f7ed
+653, 0xab367846b811362c
+654, 0x4ba7508f0851ca2a
+655, 0xe9af891acbafc356
+656, 0xbdebe183989601f8
+657, 0x4c665ea496afc061
+658, 0x3ca1d14a5f2ed7c
+659, 0xfbdff10a1027dd21
+660, 0xdfd28f77c8cff968
+661, 0xc4fbaadf8a3e9c77
+662, 0xdac7e448b218c589
+663, 0xb26390b5befd19e2
+664, 0xd2ef14916c66dba9
+665, 0xfab600284b0ff86b
+666, 0xf04a1c229b58dabb
+667, 0xc21c45637e452476
+668, 0xd1435966f75e0791
+669, 0xc1f28522eda4a2d0
+670, 0x52332ae8f1222185
+671, 0x81c6c0790c0bf47e
+672, 0xfebd215e7d8ffb86
+673, 0x68c5dce55dbe962b
+674, 0x231d09cb0d2531d1
+675, 0x3218fba199dbbc6b
+676, 0x8f23c535f8ea0bf6
+677, 0x6c228963e1df8bd9
+678, 0x9843c7722ed153e3
+679, 0xd032d99e419bddec
+680, 0xe2dca88aa7814cab
+681, 0x4d53fb8c6a59cdc2
+682, 0x8fb3abc46157b68b
+683, 0xa3e733087e09b8e
+684, 0x6bdc1aee029d6b96
+685, 0x4089667a8906d65b
+686, 0x8f3026a52d39dd03
+687, 0x6d2e0ccb567bae84
+688, 0x74bad450199e464
+689, 0xf114fb68a8f300d5
+690, 0xc7a5cc7b374c7d10
+691, 0xf0e93da639b279d1
+692, 0xb9943841ad493166
+693, 0x77a69290455a3664
+694, 0x41530da2ebea054b
+695, 0xe8f9fab03ea24abf
+696, 0xaa931f0c9f55a57a
+697, 0xb4d68a75d56f97ae
+698, 0x3d58ff898b6ba297
+699, 0x49d81e08faf5a3f5
+700, 0xfc5207b9f3697f3b
+701, 0xa25911abb3cf19b7
+702, 0x6b8908eb67c3a41
+703, 0xd63ef402e2e3fa33
+704, 0x728e75d3f33b14c5
+705, 0x248cb1b8bc6f379a
+706, 0x3aa3d6d2b8c72996
+707, 0x49cc50bd2d3d2860
+708, 0xb4e1387647c72075
+709, 0x435a1630a4a81ed3
+710, 0xa5ea13005d2460cf
+711, 0xc7a613df37d159ec
+712, 0x95721ccc218b857e
+713, 0xd4b70d8c86b124d3
+714, 0x2b82bcc4b612d494
+715, 0xaf13062885276050
+716, 0xcbd8fcf571a33d9c
+717, 0x3f7f67ca1125fc15
+718, 0xddf4bb45aac81b4c
+719, 0x23606da62de9c040
+720, 0xa3a172375666b636
+721, 0x292f87387a6c6c3c
+722, 0xd1d10d00c5496fe1
+723, 0x86b0411ce8a25550
+724, 0x38e0487872e33976
+725, 0x363e49f88ddfd42c
+726, 0x45bdf1e9f6b66b0a
+727, 0x8a6fff3de394f9b5
+728, 0x8502158bb03f6209
+729, 0x22e24d16dba42907
+730, 0x3fe3ba427cc2b779
+731, 0x77144793f66b3d7e
+732, 0xcf8912ccb29b8af9
+733, 0xdc856caff2abd670
+734, 0xe6d3ae0b0d9d4c8b
+735, 0xb8f5d40e454c539f
+736, 0x79ca953114fbc6b7
+737, 0x478d6f4bbfa38837
+738, 0x9babae1a3ffdc340
+739, 0x40edd56802bae613
+740, 0x97a56c2dcccf0641
+741, 0xafc250257f027f8e
+742, 0x8da41ef1edf69125
+743, 0x6574b0280ff9d309
+744, 0x197c776151b8f820
+745, 0x6b03e077c9dac3b6
+746, 0x24a40ebbc5c341c5
+747, 0x50e585169a6a1c4b
+748, 0x37783a5a6a3e4e02
+749, 0xb3de81ee6fbad647
+750, 0xf4f292f57ca4591e
+751, 0x6214e9e7d44d30a
+752, 0x5920190c56d21c12
+753, 0x9ac163419b5e0c9b
+754, 0xfc2328761ae8ed93
+755, 0xc68f945b545508c6
+756, 0x687c49a17ce0a5e2
+757, 0x276d8f53d30d4ab4
+758, 0x8201804970343ce1
+759, 0x1b5d323cc2e7fb7e
+760, 0x6f351ef04fd904b
+761, 0x6c793a7d455d5198
+762, 0x46f5d108430ae91f
+763, 0xac16a15b2a0cf77f
+764, 0xa0d479d9e4122b9d
+765, 0x3afd94604307f19
+766, 0x2573ed6d39d38dbf
+767, 0xa58e14ba60b4294b
+768, 0xe69c1aed5840d156
+769, 0x4cf6fda7f04855c2
+770, 0x2fb65a56ef5f22da
+771, 0xf95819434d5dc220
+772, 0x29c65133623dafba
+773, 0x8e997bd018467523
+774, 0xfd08ba9d498461a7
+775, 0xdd52243bc78a5592
+776, 0x39c30108f6db88b3
+777, 0x38af8e1894f259b9
+778, 0x97eedf3b4ae5f6de
+779, 0x757825add80c5ece
+780, 0xf0fdd90ac14edb14
+781, 0xbbb19d4cc8cac6d4
+782, 0x9a82234edfae05e3
+783, 0x704401c61d1edf1c
+784, 0x8b0eb481fb3a1fb2
+785, 0xef6f36e7cc06c002
+786, 0x7a208b17e04b8cd7
+787, 0xf20e33d498838fe9
+788, 0xc2bdb22117058326
+789, 0x6ec31939eb4ca543
+790, 0x6f1654838f507a21
+791, 0xc65ab81a955d2b93
+792, 0x40b1420fdd9531b8
+793, 0xe31f221cab9f4f40
+794, 0x798cdd414c1deb7a
+795, 0x9c84e9c7d41cd983
+796, 0x63d6b1ae3b60b7fa
+797, 0xb42bfdd1a2f78ffa
+798, 0x37e431eaccaaa8e9
+799, 0x7508142a0f73eac9
+800, 0x91662a023df5893a
+801, 0x59782070e2fe3031
+802, 0xb2acd589a8ce7961
+803, 0xa224743fa877b292
+804, 0xaa5362aa27e6ed9e
+805, 0xa394a4e520c0c1c7
+806, 0xe49b16d2018ffb6f
+807, 0xb8074b9f2f1e762b
+808, 0xcf5f86143d5c23a7
+809, 0xfd838785db987087
+810, 0x31b1889df389aff8
+811, 0x30aaca876a4383b
+812, 0x1731bb71c4c38d4f
+813, 0x9a83a65395e05458
+814, 0x99cd0c8d67c8f4fc
+815, 0xfbd9fdc849b761a5
+816, 0x82c04834fc466889
+817, 0xdeef9d6e715e8c97
+818, 0x549c281c16da6078
+819, 0x2d70661254ad599d
+820, 0x57995793a72acac
+821, 0xf1727005116183ba
+822, 0xa22bb38945285de3
+823, 0x4f2d687fe45131ff
+824, 0x5666c87ddbbc981f
+825, 0xbcb4b2d4e7a517d0
+826, 0x5e794dd2e20b785d
+827, 0x449ad020149e093c
+828, 0x7704ee0412d106f5
+829, 0x83cbdf257b072ac1
+830, 0xae5c4fc9f638b0da
+831, 0x7b9e5a64e372ed47
+832, 0x7eddbbb22c2cdf57
+833, 0x3f19ebfa155b08e
+834, 0x91d991154dfd7177
+835, 0x611ae74b952d387f
+836, 0x3fdf7a335bda36ee
+837, 0xdf182433fc7a7c05
+838, 0x62c78598d1f8db0a
+839, 0xc3750c69d2c5c1f0
+840, 0xf1318024709efdee
+841, 0xaa3fd360d224dc29
+842, 0x62af53b2f307c19
+843, 0xdf527683c58120c2
+844, 0x3281deecc496f93d
+845, 0x4f704ad31527ef08
+846, 0x127a14a5e07cfdfc
+847, 0x90d0b1f549255c92
+848, 0xbc3406b212c5e1fc
+849, 0x4e89f39379dba91d
+850, 0x1290ef43c4998e6e
+851, 0xecfeb1a1cb1c6e1b
+852, 0x2067e90403003bf1
+853, 0x38ae04be30bdbeba
+854, 0x8a3537f298baedda
+855, 0xd07f3b825cdb2936
+856, 0xea020b5aebae8b45
+857, 0xfcd614ab031132b0
+858, 0x5fb682a4ff2268f5
+859, 0xd1c4662ce65596f4
+860, 0x7026b8270dd0b8dc
+861, 0x8101ec4b4beae45a
+862, 0xa0e9dc87940610a6
+863, 0x83ec33679d83165b
+864, 0x981847ca82e86d41
+865, 0xda84c188a304a0b7
+866, 0x3c37529c5a5bbbb8
+867, 0x34a8491ce3e19a5a
+868, 0xd36ad716a2fa6cb8
+869, 0xfd1d1d6a5189a15c
+870, 0x9716eb47851e8d8d
+871, 0x7dfb13ea3b15c5aa
+872, 0xbdf6e707f45113a5
+873, 0xb8118261b04bd097
+874, 0x6191f9895881bec6
+875, 0x7aac257ae11acf9b
+876, 0x35a491e1537ff120
+877, 0xe078943432efa71c
+878, 0xb3338485dd3dc2b9
+879, 0x456060975d2bb3b5
+880, 0xaddc4c451bdfc44c
+881, 0x18bfa7beacf96430
+882, 0x8802ebcaf0f67498
+883, 0xad922a5a825bd780
+884, 0x9fb4587d748f4efa
+885, 0xdb2a445136cd5e7
+886, 0xb98b3676ea8e96ac
+887, 0xb02d8d244d784878
+888, 0xa1a8442b18860abb
+889, 0x6a3029ba1361e5d1
+890, 0xf426d5fac161eb1
+891, 0xfa5ac2b87acecb23
+892, 0xaa659896e50535df
+893, 0xf40dd7a3d3c5c8ed
+894, 0x3f8367abecb705bc
+895, 0x2d60e7525873358f
+896, 0xc4a9d3948a0c3937
+897, 0x5ecc04fef6003909
+898, 0x7a865004918cba2
+899, 0x47ae110a678ec10b
+900, 0xa0f02f629d91aa67
+901, 0x4848b99e7fac9347
+902, 0xaa858346d63b80ac
+903, 0xeb5bf42ee161eeef
+904, 0x4d35d723d3c6ba37
+905, 0xdf22ca6ca93b64a7
+906, 0x9d198520f97b25b1
+907, 0x3068415350778efe
+908, 0xf3709f2e8793c2fe
+909, 0xd1517bac8dd9f16f
+910, 0xfb99bccaa15861dc
+911, 0xa9ad607d796a2521
+912, 0x55d3793d36bd22e4
+913, 0xf99270d891ff7401
+914, 0x401750a5c4aa8238
+915, 0xd84b3003e6f28309
+916, 0x8a23798b5fa7c98b
+917, 0xadd58bbc8f43e399
+918, 0xbd8c741ada62c6a8
+919, 0xbdc6937bc55b49fa
+920, 0x4aefa82201b8502
+921, 0x17adf29a717b303
+922, 0xa6ed2197be168f6c
+923, 0x1ba47543f4359a95
+924, 0xe34299949ac01ae9
+925, 0x711c76cffc9b62f3
+926, 0xbac259895508a4b7
+927, 0x3c8b3b3626b0d900
+928, 0x1a8d23fbe2ae71bf
+929, 0xca984fa3b5a5c3a1
+930, 0xb1986ab7521a9c93
+931, 0xd6b5b2c8d47a75b5
+932, 0xc7f1c4a88afb4957
+933, 0xdeb58033a3acd6cc
+934, 0xabe49ddfe1167e67
+935, 0x8d559c10205c06e3
+936, 0xea07a1a7de67a651
+937, 0xcbef60db15b6fef8
+938, 0xbfca142cff280e7
+939, 0x362693eba0732221
+940, 0x7463237e134db103
+941, 0x45574ddb5035e17a
+942, 0xfc65e0cb9b94a1aa
+943, 0x3154c55f1d86b36d
+944, 0x2d93a96dd6ab2d8b
+945, 0xbe3bc1d1f2542a25
+946, 0xdd4b541f7385bdaa
+947, 0x3b56b919d914e3f8
+948, 0x82fd51468a21895f
+949, 0x8988cf120731b916
+950, 0xa06a61db5fb93e32
+951, 0x6ed66c1b36f68623
+952, 0x875ae844d2f01c59
+953, 0x17ccd7ac912e5925
+954, 0x12fe2a66b8e40cb1
+955, 0xf843e5e3923ad791
+956, 0xa17560f2fd4ef48
+957, 0x27a2968191a8ee07
+958, 0xa9aab4d22ff44a3c
+959, 0x63cd0dcc3bb083ae
+960, 0x7a30b48c6160bf85
+961, 0x956160fb572503b3
+962, 0xc47f6b7546640257
+963, 0xaf4b625f7f49153
+964, 0x2f5c86a790e0c7e8
+965, 0xb52e0610ae07f0b8
+966, 0x38a589292c3d849e
+967, 0xc3e9ef655d30b4ef
+968, 0xb5695f765cda998a
+969, 0xde5d5e692a028e91
+970, 0x839476721555f72e
+971, 0x48b20679b17d9ebf
+972, 0xe3d4c6b2c26fb0df
+973, 0xce5a9834f0b4e71f
+974, 0x533abb253d5d420e
+975, 0x9eac5ad9aed34627
+976, 0xc0f2a01ab3c90dbb
+977, 0x6528eda93f6a066c
+978, 0xc16a1b625e467ade
+979, 0x1a4a320fb5e8b098
+980, 0x8819cccd8b4ab32f
+981, 0x42daa88531fd0bfd
+982, 0xcf732226409be17c
+983, 0xfddcdb25ccbf378c
+984, 0x9b15b603bf589fc1
+985, 0x2436066b95d366fe
+986, 0x8d42eff2e9cbda90
+987, 0x694b2fc8a4e8303c
+988, 0x8e207f98aaea3ccd
+989, 0x4730d7a620f822d9
+990, 0x468dc9ca30fe2fd4
+991, 0x74b36d8a1c0f031b
+992, 0x3c1aac1c488c1a94
+993, 0x19d0101042444585
+994, 0x8ec50c56d0c8adf4
+995, 0x721ec629e4d66394
+996, 0x3ca5ad93abeac4a4
+997, 0xaaebc76e71592623
+998, 0x969cc319e3ed6058
+999, 0xc0a277e3b2bfc3de
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-1.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e448cbf73cc0774eca74df0d3d8866d8bd35bab3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xedc95200e2bd66a5
+1, 0x581d4e43b7682352
+2, 0x4be7278f5e373eab
+3, 0xee47f17991a9e7ea
+4, 0x38a7d2ae422f2e2c
+5, 0xe2a6730a3b4a8a15
+6, 0x1588b7a841486442
+7, 0x13ad777246700504
+8, 0x14d157e0f5e18204
+9, 0xd87c22a7ee8c13f1
+10, 0x30cc389ce3542ba1
+11, 0xb8a53348955bb2e9
+12, 0xc08802e3c454f74f
+13, 0xb444f627671a5780
+14, 0x4b6dd42b29cbf567
+15, 0x6109c7dc0bc5f7d5
+16, 0x85c954715d6b5b1e
+17, 0x646178d3d9a3a5d5
+18, 0xebbde42b1cd83465
+19, 0x3d015102f6bc9c1a
+20, 0x720fe2ec3798d5fd
+21, 0x93120961289ceb2e
+22, 0xc9207e960a56fae2
+23, 0xa7f042f31d991b98
+24, 0x5fac117415fae74b
+25, 0xd0a970ba8dddc287
+26, 0x84b4e7e51b43106
+27, 0x6ad02bf525ea265f
+28, 0xcdc7e5992b36ef8f
+29, 0x44d4985209261d60
+30, 0x628c02d50f4b902e
+31, 0xc7b1914922d1e76d
+32, 0xfde99ff895cba51d
+33, 0x175a0be050fa985f
+34, 0x47297d3699e03228
+35, 0xccf1e9aeaa3339cd
+36, 0x9fdd18ebeeaf15b1
+37, 0x7c94c9ab68747011
+38, 0x612d8ef22c1fa80f
+39, 0x13f52b860de89ab5
+40, 0x81f264b8c139c43b
+41, 0x8d017ba4ef1e85ba
+42, 0x6d0556f46219951e
+43, 0x8ee7b85663cf67b6
+44, 0x2432fc707645fe67
+45, 0xaf814046051e5941
+46, 0x4d432a83739ac76f
+47, 0x59e5060d0983ccdd
+48, 0xdd20e828b83d9b53
+49, 0x1b891800d7385f4c
+50, 0x10e86a026c52ff5e
+51, 0xb932f11723f7b90c
+52, 0xb2413d0a1f3582d0
+53, 0xe7cd4edda65fc6b5
+54, 0x6d3808848d56593b
+55, 0x192a727c3c7f47d9
+56, 0x9659d8aea5db8c16
+57, 0x4242c79fe2c77c16
+58, 0x605f90c913827cea
+59, 0x53e153c8bfc2138a
+60, 0xed2158fbdef5910e
+61, 0xae9e6e29d4cb5060
+62, 0x7dd51afaad3b11ce
+63, 0x2b9ba533d01a5453
+64, 0x7e0e9cf2b6c72c8
+65, 0x1cc8b3c7747ed147
+66, 0x9b102651e2e11b48
+67, 0x30b0b53cbaac33ea
+68, 0x70c28aec39b99b85
+69, 0x5f1417ff536fdb75
+70, 0x3a1d91abd53acf58
+71, 0xba116a1772168259
+72, 0xf5369bc9bd284151
+73, 0x67bf11373bf183ca
+74, 0xef0b2d44dbd33dc7
+75, 0xbfd567ee1a2953ed
+76, 0x7d373f2579b5e5c6
+77, 0x756eeae7bcdd99be
+78, 0x75f16eb9faa56f3b
+79, 0x96d55ded2b54b9a5
+80, 0x94495191db692c24
+81, 0x32358bdd56bab38c
+82, 0x3f6b64078576579
+83, 0x7177e7948bc064c9
+84, 0x2cbf23f09ba9bc91
+85, 0x9b97cc31c26645f5
+86, 0x5af2d239ff9028b1
+87, 0x316fa920e0332abe
+88, 0x46535b7d1cae10a0
+89, 0x21f0a6869298022c
+90, 0xf395c623b12deb14
+91, 0x8573995180675aa7
+92, 0xc3076509f4dc42d5
+93, 0x15e11e49760c6066
+94, 0xe8a6d311e67a021d
+95, 0x7482f389c883339b
+96, 0xda6f881573cba403
+97, 0xb110ffb847e42f07
+98, 0x2c3393140605ccf9
+99, 0xba1c8ba37d8bdc33
+100, 0x59adf43db7a86fe0
+101, 0xb4fcbf6aa585ca85
+102, 0xd794a93c18033fa6
+103, 0x6e839c01985f9d4
+104, 0x64065bf28222b2c7
+105, 0x6a6359b293fa0640
+106, 0x5ff610969e383e44
+107, 0xa8172c263f05c7f7
+108, 0x62a0172e8bd75d07
+109, 0x7be66e3c453b65ac
+110, 0x6a3b8d5a14014292
+111, 0xa2583e6087450020
+112, 0xd5d3ecc480c627d2
+113, 0xa24e83f1eec8a27c
+114, 0xa23febd2a99ee75a
+115, 0x9a5fbf91c7310366
+116, 0x5b63156932e039b
+117, 0x942af3c569908505
+118, 0x89a850f71ab6a912
+119, 0xfeadc803ac132fe9
+120, 0x67bf60e758250f3
+121, 0x533c25103466a697
+122, 0xb7deede3482f9769
+123, 0x325e043b53bba915
+124, 0x9e8d9e7fde132006
+125, 0x6bacc6860bbc436e
+126, 0xb3ea0534c42b1c53
+127, 0xb2389334db583172
+128, 0xa74b1bfbf5242ee4
+129, 0x53a487e2dc51d15c
+130, 0xe5a3b538d2c7a82e
+131, 0x7b6c70bb0c4cadaf
+132, 0xae20791b2081df1
+133, 0xc685c12e3c61d32c
+134, 0x60110e6b0286e882
+135, 0x49682119c774045c
+136, 0x53dc11a3bbd072e
+137, 0xbdc87c6e732d9c2d
+138, 0xcc4620861ebac8fd
+139, 0x7e9c3558759350cc
+140, 0x157408dee34891ba
+141, 0x9bcad1855b80651b
+142, 0xd81b29141d636908
+143, 0x1ed041a9f319c69d
+144, 0x805b2f541208b490
+145, 0x484ef3bba2eb7c66
+146, 0xb6b5e37d50a99691
+147, 0xabc26a7d9e97e85f
+148, 0xcba2a3cce0417c2f
+149, 0xa030dfffd701993c
+150, 0x2bf2dc50582ebf33
+151, 0xd9df13dd3eb9993e
+152, 0x31ca28b757232ae5
+153, 0x614562a0ccf37263
+154, 0x44d635b01725afbb
+155, 0x5ae230bc9ca9cd
+156, 0xb23a124eb98705c6
+157, 0x6395675444981b11
+158, 0xd97314c34119f9ca
+159, 0x9de61048327dd980
+160, 0x16bac6bded819707
+161, 0xcea3700e3e84b8c7
+162, 0xaa96955e2ee9c408
+163, 0x95361dcc93b5bc99
+164, 0x306921aed3713287
+165, 0x4df87f3130cd302a
+166, 0x37c451daeb6a4af5
+167, 0x8dbbe35f911d5cc1
+168, 0x518157ce61cb10f9
+169, 0x669f577aebc7b35b
+170, 0x4b0a5824a8786040
+171, 0x519bc3528de379f5
+172, 0x6128012516b54e02
+173, 0x98e4f165e5e6a6dd
+174, 0x6404d03618a9b882
+175, 0x15b6aeb3d9cd8dc5
+176, 0x87ed2c1bae83c35b
+177, 0x8377fc0252d41278
+178, 0x843f89d257a9ba02
+179, 0xcdda696ea95d0180
+180, 0xcfc4b23a50a89def
+181, 0xf37fd270d5e29902
+182, 0xafe14418f76b7efa
+183, 0xf984b81577076842
+184, 0xe8c60649ccb5458d
+185, 0x3b7be8e50f8ff27b
+186, 0xaa7506f25cef1464
+187, 0x5e513da59f106688
+188, 0x3c585e1f21a90d91
+189, 0x1df0e2075af292a
+190, 0x29fdd36d4f72795f
+191, 0xb162fe6c24cb4741
+192, 0x45073a8c02bd12c4
+193, 0xcbaaa395c2106f34
+194, 0x5db3c4c6011bc21c
+195, 0x1b02aac4f752e377
+196, 0xa2dfb583eb7bec5
+197, 0xfe1d728805d34bb1
+198, 0xf647fb78bb4601ec
+199, 0xd17be06f0d1f51ef
+200, 0x39ec97c26e3d18a0
+201, 0xb7117c6037e142c8
+202, 0xe3a6ce6e6c71a028
+203, 0xe70a265e5db90bb2
+204, 0x24da4480530def1e
+205, 0xfd82b28ce11d9a90
+206, 0x5bf61ead55074a1d
+207, 0xbe9899c61dec480d
+208, 0xae7d66d21e51ec9e
+209, 0x384ee62c26a08419
+210, 0x6648dccb7c2f4abf
+211, 0xc72aa0c2c708bdc9
+212, 0x205c5946b2b5ba71
+213, 0xd4d8d0b01890a812
+214, 0x56f185493625378d
+215, 0x92f8072c81d39bd0
+216, 0xa60b3ceecb3e4979
+217, 0xfcf41d88b63b5896
+218, 0xf5a49aa845c14003
+219, 0xffcc7e99eee1e705
+220, 0xdd98312a7a43b32d
+221, 0xa6339bd7730b004
+222, 0xdac7874ba7e30386
+223, 0xadf6f0b0d321c8
+224, 0x126a173ae4ffa39f
+225, 0x5c854b137385c1e7
+226, 0x8173d471b1e69c00
+227, 0x23fa34de43581e27
+228, 0x343b373aef4507b1
+229, 0xa482d262b4ea919c
+230, 0xf7fbef1b6f7fbba
+231, 0xd8ce559487976613
+232, 0xbf3c8dd1e6ebc654
+233, 0xda41ed375451e988
+234, 0xf54906371fd4b9b3
+235, 0x5b6bb41231a04230
+236, 0x866d816482b29c17
+237, 0x11315b96941f27dc
+238, 0xff95c79205c47d50
+239, 0x19c4fff96fbdac98
+240, 0xbfb1ae6e4131d0f4
+241, 0x9d20923f3cdb82c9
+242, 0x282175507c865dff
+243, 0xdfd5e58a40fe29be
+244, 0xedbd906ff40c8e4f
+245, 0x11b04fc82614ccb3
+246, 0xeceb8afda76ae49f
+247, 0xa4856913847c2cdf
+248, 0x6f1425f15a627f2a
+249, 0xdf144ffedf60349e
+250, 0x392d7ecfd77cc65f
+251, 0x72b8e2531049b2c6
+252, 0x5a7eb2bdb0ec9529
+253, 0xdcfd4306443e78c1
+254, 0x89ad67ed86cd7583
+255, 0x276b06c0779a6c8f
+256, 0xb2dbb723196a0ac3
+257, 0x66c86a3b65906016
+258, 0x938348768a730b47
+259, 0x5f5282de938d1a96
+260, 0xa4d4588c4b473b1f
+261, 0x8daed5962be4796f
+262, 0x9dde8d796985a56e
+263, 0x46be06dbd9ed9543
+264, 0xdf98286ceb9c5955
+265, 0xa1da1f52d7a7ca2b
+266, 0x5a7f1449f24bbd62
+267, 0x3aedc4e324e525fd
+268, 0xced62464cd0154e1
+269, 0x148fc035e7d88ce3
+270, 0x82f8878948f40d4c
+271, 0x4c04d9cdd6135c17
+272, 0xdf046948d86b3b93
+273, 0x2f0dec84f403fe40
+274, 0xa61954fb71e63c0d
+275, 0x616d8496f00382e8
+276, 0x162c622472746e27
+277, 0x43bcfe48731d2ceb
+278, 0xff22432f9ff16d85
+279, 0xc033ed32bb0ad5a4
+280, 0x5d3717cc91c0ce09
+281, 0x7a39a4852d251075
+282, 0x61cd73d71d6e6a6
+283, 0xe37e2ea4783ab1a5
+284, 0x60e1882162579ea8
+285, 0x9258ec33f1a88e00
+286, 0x24b32acf029f0407
+287, 0x1410fc9aea6d3fac
+288, 0x6054cf2a3c71d8f7
+289, 0x82f7605157a66183
+290, 0x3b34c1c0dff9eac5
+291, 0xfebe01b6d5c61819
+292, 0x7372187c68b777f2
+293, 0xc6923812cda479f0
+294, 0x386613be41b45156
+295, 0x92cfebe8cc4014b
+296, 0x8e13c4595849828b
+297, 0x90e47390d412291f
+298, 0x6b21a1d93d285138
+299, 0xbf5b1f5922f04b12
+300, 0x21e65d1643b3cb69
+301, 0xf7683b131948ac3c
+302, 0xe5d99fc926196ed2
+303, 0x7b138debbec90116
+304, 0x8a2650a75c2c2a5c
+305, 0x20689a768f9b347b
+306, 0xdfa2900cfb72dc6e
+307, 0x98959c3855611cc2
+308, 0x5fdb71b89596cc7c
+309, 0x1c14ac5c49568c7b
+310, 0x958c4293016091fe
+311, 0x7484522eb0087243
+312, 0xc4018dfb34fc190f
+313, 0xca638567e9888860
+314, 0x102cd4805f0c0e89
+315, 0xcc3bc438e04548f8
+316, 0xb808944bb56ea5be
+317, 0xffd4778dbf945c57
+318, 0xfe42617784c0233b
+319, 0x3eccbfeae9b42d3c
+320, 0xd9f1b585fd0bfa60
+321, 0x5c063d1b2705d5dd
+322, 0x8e8bec3519941b64
+323, 0x9e94c36cbec2a42
+324, 0x1cd19f5b64ffd3ad
+325, 0x9632e3aebfc68e66
+326, 0x98960c2d9da4ae45
+327, 0xb76994b1f2bbfc1f
+328, 0xca184a737d3971cc
+329, 0x964d31b07183adfb
+330, 0xe9e0ff351cd276d4
+331, 0xb5747c860b05bbe4
+332, 0x5549ddc3bd3862e2
+333, 0x495496677b27873b
+334, 0x53910baa26e3ea18
+335, 0xaa07a07ad0a688d3
+336, 0xbb43bd1f09ecdb1e
+337, 0xe2ebc105699dd84
+338, 0x6e815a2729584035
+339, 0x2caab1713b17948a
+340, 0x43d39d209fa41c90
+341, 0xfe3e71089d5d1c3a
+342, 0xa778646c32f81177
+343, 0x8d42bfb86e6e92d5
+344, 0x175571f70b4fcfbe
+345, 0x2a66a6fe10dc3b5b
+346, 0xd9545e85235ca709
+347, 0x5642781c77ced48a
+348, 0x24facc40b72ccd09
+349, 0xa800fbacce33f6f8
+350, 0x675f58a0ff19fba
+351, 0x35aedf57bb5cde1b
+352, 0xe5535a6b63f6d068
+353, 0x84dffd0102aaa85d
+354, 0x621faad65467aaa7
+355, 0x596ad85b556b112f
+356, 0x837545fff8894c7a
+357, 0x3d9a4ae1356bc6a6
+358, 0xcd8b7153205d4ad0
+359, 0x98afdd40f1ed09a6
+360, 0xa38b2dc55a5cf87f
+361, 0x484aecce2b6838bc
+362, 0x6af05c26bdab18d9
+363, 0xf418b7399dcf2e4b
+364, 0x1cfa38789b0d2445
+365, 0xfbed23c34166ee67
+366, 0x38e6820039e4912a
+367, 0x1fe94911e963591e
+368, 0x1291c79aee29ad70
+369, 0x65eccfc89506f963
+370, 0x7d14de3b2f55b1f6
+371, 0x82eb79c36cd2a739
+372, 0x41ffe3b75ea0def5
+373, 0x9eba9156470a51d9
+374, 0xd17c00b981db37d1
+375, 0xf688769a75601aa7
+376, 0xbcf738e9e03d571e
+377, 0x14712e56df8f919b
+378, 0xab14e227d156e310
+379, 0xf53d193e993e351e
+380, 0x857fae46bd312141
+381, 0xc2dd71e41b639966
+382, 0x74f8b987a3d00ad1
+383, 0x5bce8526dc527981
+384, 0x94910926c172a379
+385, 0x503c45557688a9d5
+386, 0x244d03834e05807f
+387, 0x6e014cbab9c7a31f
+388, 0xae544c638530facf
+389, 0x9b853aaaf9cbc22d
+390, 0xfb42ab7024d060ed
+391, 0x74cc3fba0dfd7ff2
+392, 0x24ec9e8f62144ad5
+393, 0x72f082954307bbe7
+394, 0x36feda21bbf67577
+395, 0x3222191611b832f1
+396, 0xd0584e81bcac8b0b
+397, 0xdce8d793ef75e771
+398, 0x978824c6c2578fc
+399, 0x6e8f77503b3c2ee4
+400, 0xc85d2d86fecf5d03
+401, 0x3d35b4a5d4d723c4
+402, 0xd3987dfd4727fff3
+403, 0xd3cde63fb6a31add
+404, 0xf6699e86165bdaeb
+405, 0x9d60ba158ec364c4
+406, 0x920c3c18b346bfc9
+407, 0x770fd1fdfbc236ca
+408, 0x45998cfc5fc12ddd
+409, 0xd74a3454e888834b
+410, 0xbf2aa68081a4a28f
+411, 0xea41b26a6f1da1b3
+412, 0x5560a2d24b9d5903
+413, 0xe3791f652a228d8b
+414, 0x365116d3b5a8520c
+415, 0xb1b2bd46528f8969
+416, 0xfcfe14943ef16ae7
+417, 0xf4d43425e8a535dc
+418, 0xe6cf10a78782a7e0
+419, 0x9c7ac0de46556e3e
+420, 0xc667ae0856eed9ef
+421, 0x47dbb532e16f9c7e
+422, 0xdf4785a5d89ee82e
+423, 0xbd014925ce79dbcf
+424, 0xea0d663fb58fa5be
+425, 0x51af07d5cc3821fb
+426, 0x27a1bdcdc4159a9d
+427, 0x520c986c59b1e140
+428, 0x50b73fd9bacd5b39
+429, 0xae5240641f51e4f3
+430, 0x71faecc164ed9681
+431, 0xda95aa35529a7ee
+432, 0xe25ba29b853c1c6d
+433, 0x9871a925cda53735
+434, 0xde481ad8540e114d
+435, 0xa2997f540e8abca0
+436, 0xc9683c5035e28185
+437, 0x1082471b57182bac
+438, 0xbd3ecf0f0b788988
+439, 0xf479760776fbb342
+440, 0x3730929200d91f44
+441, 0xc1762d79ae72809c
+442, 0xfaa0a4c7b1686cb3
+443, 0xd581e6d55afdafcd
+444, 0x6cf57bdfba2dcf6d
+445, 0xdef79d9fe6a5bcef
+446, 0x13ed376e18132bd3
+447, 0xbe67efd72defa2a
+448, 0x5acc176c468966ea
+449, 0x8b35b626af139187
+450, 0x446de3fac0d973ac
+451, 0xe1d49e06dc890317
+452, 0x817bc3fd21fc09b7
+453, 0xb71c3958a13d5579
+454, 0x8746e010f73d7148
+455, 0x1b61c06009922e83
+456, 0xba17e62e6b092316
+457, 0x1375fa23c4db8290
+458, 0x3f071230f51245a6
+459, 0x51c99a086a61cd13
+460, 0x5f0f2ae78589e1fd
+461, 0x604834e114bbbc27
+462, 0x5eb2a7a34814e9a9
+463, 0x77a6907f386bf11e
+464, 0x99525de2bd407eeb
+465, 0xb818348c57b3b98f
+466, 0x25f5f9e702fbe78d
+467, 0x8f66669e6f884473
+468, 0x1e47d46e2af4f919
+469, 0xf6a19df846476833
+470, 0xff00c67bcd06621f
+471, 0xe3dfe069795d72d8
+472, 0x8affc88b2fea4d73
+473, 0x66df747e5f827168
+474, 0xf368ec338d898a0e
+475, 0x9e1f1a739c5984a2
+476, 0x46a1c90e1ca32cbc
+477, 0xc261bc305ed8d762
+478, 0x754d7949f7da9e72
+479, 0x4c8fbbb14ef47b17
+480, 0xccbdc67a3848d80d
+481, 0x3c25e6f58bae751d
+482, 0x7078b163b936d9b6
+483, 0x440e27463c134ecf
+484, 0x6c83ee39f324db0f
+485, 0x27cf901b22aea535
+486, 0x57262dec79a3f366
+487, 0x91db09f1dbb524fb
+488, 0xd7436eefba865df2
+489, 0x16c86b0a275a3f43
+490, 0x689493e6681deaa9
+491, 0x7e1dc536c1a9ac42
+492, 0x1145beac3ac7f5cc
+493, 0x3d05e211a104b2b0
+494, 0x4f9e77ced3c52f44
+495, 0x53de1369354add72
+496, 0x1fb60f835f47cdeb
+497, 0x6ab36f089e40c106
+498, 0xaabffcb0d3d04c7
+499, 0xaa399686d921bd25
+500, 0x2bf8dd8b6d6fa7f0
+501, 0x1ddbf4e124329613
+502, 0x466a740241466a72
+503, 0x98d7381eb68a761
+504, 0x817691510bc4857a
+505, 0x8837622c0171fe33
+506, 0xcba078873179ee16
+507, 0x13adad1ab7b75af4
+508, 0x3bac3f502428840c
+509, 0xbeb3cce138de9a91
+510, 0x30ef556e40b5f0b4
+511, 0x19c22abdf3bbb108
+512, 0x977e66ea4ddc7cf
+513, 0x9f4a505f223d3bf3
+514, 0x6bc3f42ac79ec87b
+515, 0x31e77712158d6c23
+516, 0x6d8de4295a28af0d
+517, 0xee1807dbda72adb7
+518, 0xda54140179cd038f
+519, 0x715aa5cdac38e062
+520, 0x5a7e55e99a22fa16
+521, 0xf190c36aa8edbe4f
+522, 0xccadd93a82c1d044
+523, 0x7070e6d5012c3f15
+524, 0x50a83341a26c1ba5
+525, 0x11bca7cc634142e5
+526, 0x623a0d27867d8b04
+527, 0x75c18acff54fbf6e
+528, 0x455ae7d933497a6f
+529, 0xf624cf27d030c3d3
+530, 0x7a852716f8758bac
+531, 0xe7a497ac1fa2b5b4
+532, 0xf84f097498f57562
+533, 0xc4bb392f87f65943
+534, 0x618e79a5d499fbfb
+535, 0xb3c0b61d82b48b8
+536, 0x4750a10815c78ea7
+537, 0x9cf09cca3ddece69
+538, 0x2a69f1c94cc901a2
+539, 0x347a0e446e1ce86d
+540, 0xb06f3a5a5ab37bb1
+541, 0x8035bd0713d591db
+542, 0x539c9637042c3a1f
+543, 0xd7ba4dc6b273cbd7
+544, 0x12f3f99933444f85
+545, 0x4a9517b9783fb9a4
+546, 0x6422b2ea95093bc5
+547, 0x3a5ecff0f996c2a6
+548, 0x31de504efc76a723
+549, 0x7ccb7c5233c21a9f
+550, 0xc687d9e6ce4186e8
+551, 0x6e40769d6940376a
+552, 0xf51207314f1f7528
+553, 0x67ee3acb190865e3
+554, 0xe08d586270588761
+555, 0xe387fa489af1a75c
+556, 0x73414a52d29d8375
+557, 0x671a38191cf2a357
+558, 0xe00fb25b1aa54008
+559, 0x11a0610e22cf549b
+560, 0xc90cc865d57c75be
+561, 0x90d0863cc15f2b79
+562, 0x8b3e60d32ebcb856
+563, 0xb28cc55af621e04a
+564, 0xcf60bd3cb2a5ab1d
+565, 0x212cb5d421948f86
+566, 0xee297b96e0a3363f
+567, 0x4e9392ff998760d1
+568, 0x61940c8d0105ba3e
+569, 0x14ebcbae72a59a16
+570, 0xdf0f39a3d10c02af
+571, 0xfc047b2b3c1c549d
+572, 0x91718b5b98e3b286
+573, 0x9ea9539b1547d326
+574, 0x7a5a624a89a165e6
+575, 0x145b37dcaa8c4166
+576, 0x63814bbb90e5616c
+577, 0xc4bc3ca6c38bb739
+578, 0x853c3a61ddc6626c
+579, 0xa7ce8481c433829a
+580, 0x8aff426941cc07b
+581, 0x2dc3347ca68d8b95
+582, 0xce69f44f349e9917
+583, 0x2fa5cb8aca009b11
+584, 0xf26bb012115d9aca
+585, 0xafa01c2f2d27235a
+586, 0xabcba21f1b40305e
+587, 0xfec20c896c0c1128
+588, 0xc5f7a71ebacadfa0
+589, 0xc8479ad14bab4eef
+590, 0xad86ec9a3e7d3dc
+591, 0xbbecd65292b915c5
+592, 0xb1f9e28149e67446
+593, 0x708d081c03dad352
+594, 0xaa8a84dbd1de916c
+595, 0x9aa3efb29ba9480b
+596, 0xd3c63969ff11443e
+597, 0x1e9e9ac861315919
+598, 0x4fe227f91e66b41d
+599, 0xefc0212d43d253ab
+600, 0x98341437727c42d1
+601, 0x5ea85c0fe9008adc
+602, 0x7891b15faa808613
+603, 0x32db2d63989aacfd
+604, 0xc92f7f28e88fd7bc
+605, 0x3513545eb6549475
+606, 0x49abe0082906fbf8
+607, 0xcee1e1a6551e729c
+608, 0x38556672b592a28e
+609, 0xc3e61409c4ec2d45
+610, 0x96c67ce2995a0fd4
+611, 0x9b9b0cada870293
+612, 0x82d6dd5dada48037
+613, 0xeea4f415299f1706
+614, 0x371107895f152ab3
+615, 0x2f6686159f4396bb
+616, 0x61005a2ff3680089
+617, 0x9d2f2cafb595e6b6
+618, 0x4a812a920f011672
+619, 0x317554d3a77385d7
+620, 0x24c01086727eb74b
+621, 0xa15ff76d618a3a9e
+622, 0x2121bfd983859940
+623, 0x384d11577eea8114
+624, 0xab0f4299f3c44d88
+625, 0x136fd4b07cfa14d9
+626, 0x665fe45cbfaa972a
+627, 0x76c5a23398a314e9
+628, 0x5507036357ccda98
+629, 0xd9b8c5ac9dce632b
+630, 0x366bc71781da6e27
+631, 0xdd2b2ba1d6be6d15
+632, 0xf33ed0d50ea6f1a6
+633, 0xf05a9b1900174c18
+634, 0x3947e1419e2787cf
+635, 0x6c742b1e029637d0
+636, 0x32aba12196a0d2e8
+637, 0x1b94aab2e82e7df
+638, 0x68b617db19229d6
+639, 0x6c88a95ac0a33f98
+640, 0xdc9b95fd60c2d23e
+641, 0x999e6971d3afc8b3
+642, 0x7071fc6ad8b60129
+643, 0x41a8184ef62485f6
+644, 0xb68e0605c7d5e713
+645, 0x272b961a1d1bbee
+646, 0x23f04e76446187b0
+647, 0x999a7a8f6d33f260
+648, 0xdbd6318df4f168d
+649, 0x8f5e74c84c40711e
+650, 0x8ccc6b04393a19d6
+651, 0xadcd24b782dd8d3d
+652, 0x1a966b4f80ef9499
+653, 0xcb6d4f9ff5a280f0
+654, 0x8095ff2b8484018a
+655, 0xbfd3389611b8e771
+656, 0x278eb670b7d12d51
+657, 0x31df54ca8d65c20f
+658, 0x121c7fb38af6985e
+659, 0x84fb94f38fe1d0a
+660, 0x15ae8af1a6d48f02
+661, 0x8d51e4a62cba1a28
+662, 0x58e6b6b3ae0f9e42
+663, 0x9365a0a85669cc99
+664, 0xe56e92f65a2106df
+665, 0x68fa299c66b428fc
+666, 0x55e51bb0b0a832c6
+667, 0x48b565293f9bc494
+668, 0x73d8132b1cbabb57
+669, 0x9178ac3926c36cbc
+670, 0xe2f22c7b28ea5e0f
+671, 0x6af45322a99afb12
+672, 0x59072fcb486a46f4
+673, 0x166b717b08d3d8e
+674, 0xd4e627a2dfacc4ab
+675, 0x33dad6f2921dedaa
+676, 0x4b13b806834a6704
+677, 0xe5f7971b398ed54d
+678, 0x20bfae65e3e6899b
+679, 0x881dab45d2b4fc98
+680, 0x6f248126b5b885be
+681, 0x7aeb39e986f9deee
+682, 0xf819f9574b8c3a03
+683, 0xff3d93ed6bd9781a
+684, 0x3a31e2e24a2f6385
+685, 0x7888a88f8944a5e
+686, 0x4faee12f5de95537
+687, 0x7f3e4efccdb2ed67
+688, 0x91e0f2fc12593af5
+689, 0xb5be8a4b886a40d3
+690, 0x998e8288ac3a9b1b
+691, 0x85c48fc8b1349e7b
+692, 0xf03af25222d8fae5
+693, 0x45467e805b242c2e
+694, 0xa2350db793dbebdc
+695, 0xfebe5b61d2174553
+696, 0xa9a331f02c54ad0b
+697, 0xe94e49a0f905aef3
+698, 0xe54b4c812b55e3da
+699, 0xdc454114c6bc0278
+700, 0x99c7765ab476baa2
+701, 0xccd9590e47fdff7c
+702, 0xfa2bcae7afd6cb71
+703, 0x2c1bf1a433a6f0f7
+704, 0x53882c62ff0aab28
+705, 0x80ac900f844dacc
+706, 0x27ba8eb5c4a44d54
+707, 0x78f3dfb072a46004
+708, 0x34e00e6ec629edce
+709, 0x5b88d19b552d1fbd
+710, 0xe4df375dc79df432
+711, 0x37446312ff79c3b4
+712, 0xb72256900a95fa6d
+713, 0x89f3171fbdff0bfc
+714, 0xd37885b048687eba
+715, 0xbb033213b283b60e
+716, 0xcf10b523ee769030
+717, 0xbf8070b6cfd7bafb
+718, 0xb7194da81fd1763b
+719, 0xbfc303de88e68d24
+720, 0xb949c7a5aea8a072
+721, 0x844216e7bae90455
+722, 0xf1e7f20840049a33
+723, 0x96e3263ad0cae794
+724, 0x10772d51f6e9ba49
+725, 0xcea24fccae9d23b3
+726, 0xefd378add9dde040
+727, 0xba0c7c5275805976
+728, 0x2e2a04608f64fa8c
+729, 0xafb42ec43aa0fa7
+730, 0x30444b84241ac465
+731, 0x19ef384bac4493ab
+732, 0xfd1ac615d3ba5ab9
+733, 0x6cc781ba38643aff
+734, 0x30ff27ebed875cfd
+735, 0xee1a261aca97ae62
+736, 0xc5a92715202bc940
+737, 0x9e6ec76f93c657ff
+738, 0x9b9fd55f55191ca5
+739, 0x654b13af008d8f03
+740, 0x1b7f030d9bd0719f
+741, 0x6d622e277550cb7f
+742, 0x3f8ee6b8830d0538
+743, 0x475462bcd0de190f
+744, 0x21380e8a513bdbcd
+745, 0x629bf3771b1bd7a4
+746, 0x3b5fd0b62c353709
+747, 0xf95634006ec3867e
+748, 0x1be8bb584a6653c2
+749, 0x2e2d3cfa85320ce8
+750, 0x5b904b692252d11d
+751, 0x4bfd76631d527990
+752, 0xc019571ca2bec4a0
+753, 0xf2eb730cea4cd751
+754, 0xd4571d709530191a
+755, 0x3b5bd947061f5a7d
+756, 0x56e2322cd2d1d1c0
+757, 0xa8830a5f62019f83
+758, 0x901d130c1b873cf3
+759, 0xb5dd29b363c61299
+760, 0xbb710bec3a17b26d
+761, 0xc0c464daca0f2328
+762, 0x4dc8055df02650f5
+763, 0x3d3cd9bbe8b957af
+764, 0xdb79612c2635b828
+765, 0xe25b3a8ad8fa3040
+766, 0xd5875c563cbf236b
+767, 0x46861c1c3849c9bc
+768, 0xf84bf1a2814dff43
+769, 0x6d8103902e0ad5e6
+770, 0x99f51c9be8af79e5
+771, 0xb0bfa8540ff94a96
+772, 0xaf45109a4e06f7d0
+773, 0x281df3e55aea9bfc
+774, 0x6a1155ca8aa40e60
+775, 0x754d32c5de1f5da
+776, 0xce1eafb1c6ca916f
+777, 0xc4f2185fa8577bd1
+778, 0x4a188e9bdb5501d9
+779, 0xbb14107e99bd5550
+780, 0xf0381d8425ec2962
+781, 0x213dbfffc16ec4f6
+782, 0x7a999c5a28ea65bc
+783, 0x23758c2aba7709ff
+784, 0xea7e4bb205e93b44
+785, 0x9c5a31e53911c658
+786, 0x7f04d0bbdc689ddc
+787, 0xe3ed89ab8d78dcb3
+788, 0x73c38bfb43986210
+789, 0x740c7d787eb8e158
+790, 0x5284fafdfb3fb9ec
+791, 0x2e91a58ac1fb1409
+792, 0xb94a600bf0a09af3
+793, 0x533ea4dbe07d81dd
+794, 0x48c3f1a736b3c5fd
+795, 0x56ae3499fa8720ce
+796, 0x526f2def663ca818
+797, 0x2f085759c65665c4
+798, 0xf715f042c69e0db4
+799, 0x110889c399231e60
+800, 0x64584a244866f3a0
+801, 0xf02ec101a39405d3
+802, 0xe73cd5e9a7f17283
+803, 0xfea64869e7028234
+804, 0x97559974ad877891
+805, 0xc8695aba1dc9f2e5
+806, 0x7b62b76ffc2264ec
+807, 0xf5e1df172ec5ccd
+808, 0xafaeb68765e443bd
+809, 0xd3870eb2e8337623
+810, 0x4f944d684138fb39
+811, 0x6977c575038916ad
+812, 0x8ada1a225df95a56
+813, 0xe4044c6c58d15e54
+814, 0x4e5121366681cf2
+815, 0xcf8640b079357b0d
+816, 0xcd5b157d44106fa3
+817, 0x9d7a5481279e25a1
+818, 0xe10e9db41fb4b34f
+819, 0x1052607be1eadff9
+820, 0x3403d67232fe2265
+821, 0xac9358f498c34afc
+822, 0x820172da0dc39c9
+823, 0xe186e91a3b826b6a
+824, 0x1a838e2a40284445
+825, 0x1870b617ebd7bce6
+826, 0xcb7cba4424be1ed7
+827, 0x6a2e56e40fdf9041
+828, 0xace93bbe108f97ee
+829, 0xfeb9bc74ac41ca08
+830, 0x8cb2d05b0f6a1f51
+831, 0x73792309f3fac0a9
+832, 0x2507343d431308ca
+833, 0xd0ea1197be615412
+834, 0xb1870812f1d2fa94
+835, 0x6d067b6935dcd23e
+836, 0xaf161014e5492c31
+837, 0xd4be0dce97064be4
+838, 0xf8edfe3fc75c20f1
+839, 0x894751dc442d2d9c
+840, 0xb4a95f6a6663456c
+841, 0x74e93162e2d805db
+842, 0x784bc5f3a7a2f645
+843, 0xd234d7c5b0582ea9
+844, 0x491f28d0ab6cb97c
+845, 0xa79419e5cf4336c3
+846, 0x66b00141978c849
+847, 0xa7ddbd64698d563f
+848, 0xefc33a4a5d97d4b2
+849, 0x95075514a65aebdc
+850, 0x40eca5b3e28cd25e
+851, 0x90ec7d00e9c9e35d
+852, 0x63e84104d5af417a
+853, 0xdaca0ea32df5744
+854, 0x7ed54f2587795881
+855, 0x5a73931760af4ee0
+856, 0x857d1a185a3081ec
+857, 0x6eac2aabe67fb463
+858, 0xd1f86155d8bfc55f
+859, 0x6d56398f3e7877ef
+860, 0x7642f61dfc62bc17
+861, 0x1d76b12843246ffa
+862, 0xde7817809b8a31d0
+863, 0xbcca9cd091198f9d
+864, 0xf71ca566dddcdfd4
+865, 0xea4386ee8b61d082
+866, 0xe351729d6010bac4
+867, 0xfd685d8a49910dd6
+868, 0xa7a20ea6c686bd3
+869, 0x1cdaf82f4dbd5536
+870, 0xa3da1d1e77dda3e0
+871, 0x4f723b3818ff8b2a
+872, 0x1290669eca152469
+873, 0xb54158b52d30651b
+874, 0xc06b74f2c7f0fee
+875, 0x7d5840bcbf702379
+876, 0x19fa4c1254a82ed
+877, 0xcf5ce090ad0b38ea
+878, 0xd4edd6ac9437e16d
+879, 0xc6ebf25eb623b426
+880, 0xd2b6dbdf00d8fea2
+881, 0x949cf98391cc59e1
+882, 0x380a0c7d0356f7b3
+883, 0x8ffefe32465473bf
+884, 0x637b6542d27c861e
+885, 0x347d12ffc664ecd9
+886, 0xea66e3a0c75a6b37
+887, 0xc3aff6f34fb537a1
+888, 0x67bdf3579959bf49
+889, 0xa17a348e3a74b723
+890, 0x93c9ef26ddadd569
+891, 0x483909059a5ac0b2
+892, 0x26ec9074b56d5a0d
+893, 0x6216000d9a48403a
+894, 0x79b43909eab1ec05
+895, 0xe4a8e8d03649e0de
+896, 0x1435d666f3ccdc08
+897, 0xb9e22ba902650a0e
+898, 0x44dffcccc68b41f8
+899, 0x23e60dcc7a559a17
+900, 0x6fd1735eacd81266
+901, 0xf6bda0745ea20c8e
+902, 0x85efcaefe271e07c
+903, 0x9be996ee931cef42
+904, 0xe78b41c158611d64
+905, 0xd6201df605839830
+906, 0x702e8e47d2769fd3
+907, 0xb8dcf70e18cf14c
+908, 0xac2690bab1bf5c17
+909, 0x92b166b71205d696
+910, 0xb0e73c795fc6df28
+911, 0x4bf2322c8b6b6f0d
+912, 0xa842fbe67918cea0
+913, 0xb01a8675d9294e54
+914, 0xfbe3c94f03ca5af2
+915, 0x51a5c089600c441f
+916, 0x60f0fd7512d85ded
+917, 0xef3113d3bc2cadb0
+918, 0xe1ea128ade300d60
+919, 0xde413b7f8d92d746
+920, 0xfc32c6d43f47c5d8
+921, 0x69d551d8c2b54c68
+922, 0xb9bc68c175777943
+923, 0xb9c79c687f0dae90
+924, 0xd799421ef883c06e
+925, 0xbff553ca95a29a3e
+926, 0xfc9ffac46bd0aca1
+927, 0x4f6c3a30c80c3e5a
+928, 0x8b7245bc6dc4a0a
+929, 0xaf4e191a4575ff60
+930, 0x41218c4a76b90f0b
+931, 0x986052aa51b8e89b
+932, 0x284b464ed5622f9
+933, 0xba6bded912626b40
+934, 0x43cad3ed7443cb5c
+935, 0x21641fa95725f328
+936, 0x6d99d6d09d755822
+937, 0x8246dfa2d4838492
+938, 0xd2ee70b9056f4726
+939, 0x87db515a786fbb8b
+940, 0x7c63e4c1d7786e7d
+941, 0xd1a9d548f10b3e88
+942, 0xa00856475f3b74c9
+943, 0x7f1964ce67148bf4
+944, 0x446650ec71e6018c
+945, 0xb1805ca07d1b6345
+946, 0x869c0a1625b7271b
+947, 0x79d6da06ce2ecfe2
+948, 0xec7b3cafc5e3c85f
+949, 0x1745ce21e39f2c3d
+950, 0xd9a0a7af6ee97825
+951, 0x680e0e52a6e11d5c
+952, 0xd86b3f344ff7f4cd
+953, 0xab56af117c840b9c
+954, 0x5c5404c7e333a10e
+955, 0x4f1eb462f35d990d
+956, 0xf857605a5644458e
+957, 0x3bb87cdf09262f86
+958, 0xd57295baf6da64b
+959, 0xb5993f48472f2894
+960, 0x7d1a501608c060b2
+961, 0x45fabe2d0e54adf0
+962, 0xbb41c3806afb4efe
+963, 0xbfbc506049424c8
+964, 0xb7dd6b67f2203344
+965, 0x389ce52eff883b81
+966, 0xe259c55c0cf6d000
+967, 0x70fb3e3824f7d213
+968, 0x9f36d5599ed55f4b
+969, 0xd14cf6f12f83c4f7
+970, 0x570a09d56aaa0b66
+971, 0x8accafd527f4598
+972, 0xa42d64c62175adfd
+973, 0xddb9c6a87b6e1558
+974, 0xd80b6c69fa1cde2a
+975, 0x44ebaac10082207b
+976, 0xf99be8889552fa1a
+977, 0x38253cd4b38b5dc5
+978, 0x85356c8b02675791
+979, 0xbf91677b2ecdcf55
+980, 0x2316cb85e93f366e
+981, 0x9abf35954db6b053
+982, 0xf49f7425e086b45a
+983, 0x8f5b625e074afde2
+984, 0xe0d614559791b080
+985, 0xbf7b866afab2a525
+986, 0xde89d7e1641a6412
+987, 0x1d10687d8ae5b86f
+988, 0x1f034caa0e904cbd
+989, 0x2086357aec8a7a2c
+990, 0x22dc476b80c56e1e
+991, 0xbef5a73cc0e3a493
+992, 0xddfa3829b26ed797
+993, 0x8917a87ec3d4dc78
+994, 0xfeabe390628c365e
+995, 0x581b0c4f6fb2d642
+996, 0x1ef8c590adbf5b9a
+997, 0x4d8e13aac0cce879
+998, 0xfe38f71e5977fad0
+999, 0x1f83a32d4adfd2ed
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-2.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..69d24c38c28959361283624e02f8891fa69b6c5f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/philox-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x399e5b222b82fa9
+1, 0x41fd08c1f00f3bc5
+2, 0x78b8824162ee4d04
+3, 0x176747919e02739d
+4, 0xfaa88f002a8d3596
+5, 0x418eb6f592e6c227
+6, 0xef83020b8344dd45
+7, 0x30a74a1a6eaa064b
+8, 0x93d43bf97a490c3
+9, 0xe4ba28b442194cc
+10, 0xc829083a168a8656
+11, 0x73f45d50f8e22849
+12, 0xf912db57352824cc
+13, 0xf524216927b12ada
+14, 0x22b7697473b1dfda
+15, 0x311e2a936414b39f
+16, 0xb905abfdcc425be6
+17, 0x4b14630d031eac9c
+18, 0x1cf0c4ae01222bc8
+19, 0xa6c33efc6e82ef3
+20, 0x43b3576937ba0948
+21, 0x1e483d17cdde108a
+22, 0x6722784cac11ac88
+23, 0xee87569a48fc45d7
+24, 0xb821dcbe74d18661
+25, 0xa5d1876ef3da1a81
+26, 0xe4121c2af72a483
+27, 0x2d747e355a52cf43
+28, 0x609059957bd03725
+29, 0xc3327244b49e16c5
+30, 0xb5ae6cb000dde769
+31, 0x774315003209017
+32, 0xa2013397ba8db605
+33, 0x73b228945dbcd957
+34, 0x801af7190375d3c0
+35, 0xae6dca29f24c9c67
+36, 0xd1cc0bcb1ca26249
+37, 0x1defa62a5bd853be
+38, 0x67c2f5557fa89462
+39, 0xf1729b58122fab02
+40, 0xb67eb71949ec6c42
+41, 0x5456366ec1f8f7d7
+42, 0x44492b32eb7966f5
+43, 0xa801804159f175f1
+44, 0x5a416f23cac70d84
+45, 0x186f55293302303d
+46, 0x7339d5d7b6a43639
+47, 0xfc6df38d6a566121
+48, 0xed2fe018f150b39e
+49, 0x508e0b04a781fa1b
+50, 0x8bee9d50f32eaf50
+51, 0x9870015d37e63cc
+52, 0x93c6b12309c14f2d
+53, 0xb571cf798abe93ff
+54, 0x85c35a297a88ae6e
+55, 0x9b1b79afe497a2ae
+56, 0x1ca02e5b95d96b8d
+57, 0x5bb695a666c0a94a
+58, 0x4e3caf9bbab0b208
+59, 0x44a44be1a89f2dc1
+60, 0x4ff37c33445758d1
+61, 0xd0e02875322f35da
+62, 0xfd449a91fb92646b
+63, 0xbe0b49096b95db4d
+64, 0xffa3647cad13ef5d
+65, 0x75c127a61acd10c8
+66, 0xd65f697756f5f98e
+67, 0x3ced84be93d94434
+68, 0x4da3095c2fc46d68
+69, 0x67564e2a771ee9ac
+70, 0x36944775180644a9
+71, 0xf458db1c177cdb60
+72, 0x5b58406dcd034c8
+73, 0x793301a3fdab2a73
+74, 0x1c2a1a16d6db6128
+75, 0xc2dacd4ddddbe56c
+76, 0x2e7d15be2301a111
+77, 0xd4f4a6341b3bcd18
+78, 0x3622996bbe6a9e3b
+79, 0xaf29aa9a7d6d47da
+80, 0x6d7dbb74a4cd68ae
+81, 0xc260a17e0f39f841
+82, 0xdee0170f2af66f0d
+83, 0xf84ae780d7b5a06e
+84, 0x8326247b73f43c3a
+85, 0xd44eef44b4f98b84
+86, 0x3d10aee62ec895e3
+87, 0x4f23fef01bf703b3
+88, 0xf8e50aa57d888df6
+89, 0x7da67411e3bef261
+90, 0x1d00f2769b2f96d7
+91, 0x7ef9a15b7444b84e
+92, 0xcfa16436cc2b7e21
+93, 0x29ab8cfac00460ff
+94, 0x23613de8608b0e70
+95, 0xb1aa0980625798a8
+96, 0xb9256fd29db7df99
+97, 0xdacf311bf3e7fa18
+98, 0xa013c8f9fada20d8
+99, 0xaf5fd4fe8230fe3e
+100, 0xd3d59ca55102bc5c
+101, 0x9d08e2aa5242767f
+102, 0x40278fe131e83b53
+103, 0x56397d03c7c14c98
+104, 0xe874b77b119359b3
+105, 0x926a1ba4304ab19f
+106, 0x1e115d5aa695a91d
+107, 0xc6a459df441f2fe3
+108, 0x2ca842bc1b0b3c6a
+109, 0x24c804cf8e5eed16
+110, 0x7ca00fc4a4c3ebd3
+111, 0x546af7cecc4a4ba6
+112, 0x8faae1fa18fd6e3
+113, 0x40420b0089641a6a
+114, 0x88175a35d9abcb83
+115, 0xf7d746d1b8b1357c
+116, 0x7dae771a651be970
+117, 0x2f6485247ee4df84
+118, 0x6883702fab2d8ec5
+119, 0xeb7eea829a67f9a6
+120, 0x60d5880b485562ed
+121, 0x7d4ca3d7e41a4e7e
+122, 0xbb7fef961ab8de18
+123, 0x3b92452fb810c164
+124, 0x5f4b4755348b338
+125, 0xca45a715a7539806
+126, 0xc33efd9da5399dd
+127, 0x593d665a51d4aedd
+128, 0x75d6b8636563036b
+129, 0x7b57caa55e262082
+130, 0x4ede7427969e0dd5
+131, 0xc3f19b6f78ea00b
+132, 0xeea7bab9be2181ea
+133, 0x652c45fe9c420c04
+134, 0x14ba9e3d175670ee
+135, 0xd2ad156ba6490474
+136, 0x4d65ae41065f614
+137, 0x6ff911c8afa28eb1
+138, 0xedc2b33588f3cb68
+139, 0x437c8bc324666a2f
+140, 0x828cee25457a3f0
+141, 0x530c986091f31b9b
+142, 0x2f34671e8326ade7
+143, 0x4f686a8f4d77f6da
+144, 0xa4c1987083498895
+145, 0xbce5a88b672b0fb1
+146, 0x8476115a9e6a00cc
+147, 0x16de18a55dd2c238
+148, 0xdf38cf4c416232bc
+149, 0x2cb837924e7559f3
+150, 0xfad4727484e982ed
+151, 0x32a55d4b7801e4f
+152, 0x8b9ef96804bd10a5
+153, 0xa1fd422c9b5cf2a9
+154, 0xf46ddb122eb7e442
+155, 0x6e3842547afa3b33
+156, 0x863dee1c34afe5c4
+157, 0x6a43a1935b6db171
+158, 0x1060a5c2f8145821
+159, 0xf783ec9ed34c4607
+160, 0x1da4a86bf5f8c0b0
+161, 0x4c7714041ba12af8
+162, 0x580da7010be2f192
+163, 0xad682fe795a7ea7a
+164, 0x6687b6cb88a9ed2c
+165, 0x3c8d4b175517cd18
+166, 0xe9247c3a524a6b6b
+167, 0x337ca9cfaa02658
+168, 0xed95399481c6feec
+169, 0x58726a088e606062
+170, 0xfe7588a5b4ee342a
+171, 0xee434c7ed146fdee
+172, 0xe2ade8b60fdc4ba5
+173, 0xd57e4c155de4eaab
+174, 0xdefeae12de1137cb
+175, 0xb7a276a241316ac1
+176, 0xeb838b1b1df4ca15
+177, 0x6f78965edea32f6f
+178, 0x18bebd264d7a5d53
+179, 0x3641c691d77005ec
+180, 0xbe70ed7efea8c24c
+181, 0x33047fa8d03ca560
+182, 0x3bed0d2221ff0f87
+183, 0x23083a6ffbcf38a2
+184, 0xc23eb827073d3fa5
+185, 0xc873bb3415e9fb9b
+186, 0xa4645179e54147fe
+187, 0x2c72fb443f66e207
+188, 0x98084915dd89d8f4
+189, 0x88baa2de12c99037
+190, 0x85c74ab238cb795f
+191, 0xe122186469ea3a26
+192, 0x4c3bba99b3249292
+193, 0x85d6845d9a015234
+194, 0x147ddd69c13e6a31
+195, 0x255f4d678c9a570b
+196, 0x2d7c0c410bf962b4
+197, 0x58eb7649e0aa16ca
+198, 0x9d240bf662fe0783
+199, 0x5f74f6fa32d293cc
+200, 0x4928e52f0f79d9b9
+201, 0xe61c2b87146b706d
+202, 0xcfcd90d100cf5431
+203, 0xf15ea8138e6aa178
+204, 0x6ab8287024f9a819
+205, 0xed8942593db74e01
+206, 0xefc00e4ec2ae36dd
+207, 0xc21429fb9387f334
+208, 0xf9a3389e285a9bce
+209, 0xacdee8c43aae49b3
+210, 0xefc382f02ad55c25
+211, 0x1153b50e8d406b72
+212, 0xb00d39ebcc2f89d8
+213, 0xde62f0b9831c8850
+214, 0xc076994662eef6c7
+215, 0x66f08f4752f1e3ef
+216, 0x283b90619796249a
+217, 0x4e4869bc4227499e
+218, 0xb45ad78a49efd7ed
+219, 0xffe19aa77abf5f4b
+220, 0xfce11a0daf913aef
+221, 0x7e4e64450d5cdceb
+222, 0xe9621997cfd62762
+223, 0x4d2c9e156868081
+224, 0x4e2d96eb7cc9a08
+225, 0xda74849bba6e3bd3
+226, 0x6f4621da935e7fde
+227, 0xb94b914aa0497259
+228, 0xd50d03e8b8db1563
+229, 0x1a45c1ce5dca422e
+230, 0xc8d30d33276f843f
+231, 0xb57245774e4176b4
+232, 0x8d36342c05abbbb1
+233, 0x3591ad893ecf9e78
+234, 0x62f4717239ee0ac8
+235, 0x9b71148a1a1d4200
+236, 0x65f8e0f56dd94463
+237, 0x453b1fcfd4fac8c2
+238, 0x4c25e48e54a55865
+239, 0xa866baa05112ace2
+240, 0x7741d3c69c6e79c5
+241, 0x7deb375e8f4f7a8a
+242, 0xc242087ede42abd8
+243, 0x2fa9d1d488750c4b
+244, 0xe8940137a935d3d3
+245, 0x1dab4918ca24b2f2
+246, 0xe2368c782168fe3e
+247, 0x6e8b2d1d73695909
+248, 0x70455ebea268b33e
+249, 0x656a919202e28da1
+250, 0x5a5a8935647da999
+251, 0x428c6f77e118c13c
+252, 0xa87aee2b675bb083
+253, 0x3873a6412b239969
+254, 0x5f72c1e91cb8a2ee
+255, 0xa25af80a1beb5679
+256, 0x1af65d27c7b4abc3
+257, 0x133437060670e067
+258, 0xb1990fa39a97d32e
+259, 0x724adc89ae10ed17
+260, 0x3f682a3f2363a240
+261, 0x29198f8dbd343499
+262, 0xdfaeeaa42bc51105
+263, 0x5baff3901b9480c2
+264, 0x3f760a67043e77f5
+265, 0x610fa7aa355a43ba
+266, 0x394856ac09c4f7a7
+267, 0x1d9229d058aee82e
+268, 0x19c674804c41aeec
+269, 0x74cf12372012f4aa
+270, 0xa5d89b353fa2f6ca
+271, 0x697e4f672ac363dd
+272, 0xde6f55ba73df5af9
+273, 0x679cf537510bd68f
+274, 0x3dc916114ae9ef7e
+275, 0xd7e31a66ec2ee7ba
+276, 0xc21bebb968728495
+277, 0xc5e0781414e2adfd
+278, 0x71147b5412ddd4bd
+279, 0x3b864b410625cca9
+280, 0x433d67c0036cdc6
+281, 0x48083afa0ae20b1b
+282, 0x2d80beecd64ac4e8
+283, 0x2a753c27c3a3ee3e
+284, 0xb2c5e6afd1fe051a
+285, 0xea677930cd66c46b
+286, 0x4c3960932f92810a
+287, 0xf1b367a9e527eaba
+288, 0xb7d92a8a9a69a98e
+289, 0x9f9ad3210bd6b453
+290, 0x817f2889db2dcbd8
+291, 0x4270a665ac15813c
+292, 0x90b85353bd2be4dd
+293, 0x10c0460f7b2d68d
+294, 0x11cef32b94f947f5
+295, 0x3cf29ed8e7d477e8
+296, 0x793aaa9bd50599ef
+297, 0xbac15d1190014aad
+298, 0x987944ae80b5cb13
+299, 0x460aa51f8d57c484
+300, 0xc77df0385f97c2d3
+301, 0x92e743b7293a3822
+302, 0xbc3458bcfbcbb8c0
+303, 0xe277bcf3d04b4ed7
+304, 0xa537ae5cf1c9a31c
+305, 0x95eb00d30bd8cfb2
+306, 0x6376361c24e4f2dd
+307, 0x374477fe87b9ea8e
+308, 0x8210f1a9a039902e
+309, 0xe7628f7031321f68
+310, 0x8b8e9c0888fc1d3d
+311, 0x306be461fdc9e0ed
+312, 0x510009372f9b56f5
+313, 0xa6e6fa486b7a027a
+314, 0x9d3f002025203b5a
+315, 0x7a46e0e81ecbef86
+316, 0x41e280c611d04df0
+317, 0xedcec10418a99e8a
+318, 0x5c27b6327e0b9dbd
+319, 0xa81ed2035b509f07
+320, 0x3581e855983a4cc4
+321, 0x4744594b25e9809d
+322, 0xc737ac7c27fbd0ed
+323, 0x1b523a307045433a
+324, 0x8b4ce9171076f1d9
+325, 0x2db02d817cd5eec0
+326, 0x24a1f1229af50288
+327, 0x5550c0dcf583ff16
+328, 0x3587baaa122ec422
+329, 0xf9d3dc894229e510
+330, 0xf3100430d5cf8e87
+331, 0xc31af79862f8e2fb
+332, 0xd20582063b9f3537
+333, 0xac5e90ac95fcc7ad
+334, 0x107c4c704d5109d4
+335, 0xebc8628906dbfd70
+336, 0x215242776da8c531
+337, 0xa98002f1dcf08b51
+338, 0xbc3bdc07f3b09718
+339, 0x238677062495b512
+340, 0x53b4796f2a3c49e8
+341, 0x6424286467e22f0e
+342, 0x14d0952a11a71bac
+343, 0x2f97098149b82514
+344, 0x3777f2fdc425ad2
+345, 0xa32f2382938876d4
+346, 0xda8a39a021f20ae3
+347, 0x364361ef0a6ac32c
+348, 0x4413eede008ff05a
+349, 0x8dda8ace851aa327
+350, 0x4303cabbdcecd1ee
+351, 0x2e69f06d74aa549f
+352, 0x4797079cd4d9275c
+353, 0xc7b1890917e98307
+354, 0x34031b0e822a4b4c
+355, 0xfc79f76b566303ea
+356, 0x77014adbe255a930
+357, 0xab6c43dd162f3be5
+358, 0xa430041f3463f6b9
+359, 0x5c191a32ada3f84a
+360, 0xe8674a0781645a31
+361, 0x3a11cb667b8d0916
+362, 0xaedc73e80c39fd8a
+363, 0xfde12c1b42328765
+364, 0x97abb7dcccdc1a0b
+365, 0x52475c14d2167bc8
+366, 0x540e8811196d5aff
+367, 0xa867e4ccdb2b4b77
+368, 0x2be04af61e5bcfb9
+369, 0x81b645102bfc5dfd
+370, 0x96a52c9a66c6450f
+371, 0x632ec2d136889234
+372, 0x4ed530c0b36a6c25
+373, 0x6f4851225546b75
+374, 0x2c065d6ba46a1144
+375, 0xf8a3613ff416551d
+376, 0xb5f0fd60e9c971a9
+377, 0x339011a03bb4be65
+378, 0x9439f72b6995ded6
+379, 0xc1b03f3ef3b2292d
+380, 0xad12fd221daab3ae
+381, 0xf615b770f2cf996f
+382, 0x269d0fdcb764172
+383, 0x67837025e8039256
+384, 0x6402831fc823fafa
+385, 0x22854146a4abb964
+386, 0x7b5ad9b5a1bad7a8
+387, 0x67170e7beb6ac935
+388, 0xfc2d1e8e24adfaaa
+389, 0x7ded4395345ff40d
+390, 0x418981760a80dd07
+391, 0xc03bef38022c1d2
+392, 0x3a11850b26eade29
+393, 0xaa56d02c7175c5f4
+394, 0xd83b7917b9bfbff5
+395, 0x3c1df2f8fa6fced3
+396, 0xf3d6e2999c0bb760
+397, 0xc66d683a59a950e3
+398, 0x8e3972a9d73ffabf
+399, 0x97720a0443edffd9
+400, 0xa85f5d2fe198444a
+401, 0xfc5f0458e1b0de5e
+402, 0xe3973f03df632b87
+403, 0xe151073c84c594b3
+404, 0x68eb4e22e7ff8ecf
+405, 0x274f36eaed7cae27
+406, 0x3b87b1eb60896b13
+407, 0xbe0b2f831442d70a
+408, 0x2782ed7a48a1b328
+409, 0xb3619d890310f704
+410, 0xb03926b11b55921a
+411, 0xdb46fc44aa6a0ce4
+412, 0x4b063e2ef2e9453a
+413, 0xe1584f1aeec60fb5
+414, 0x7092bd6a879c5a49
+415, 0xb84e1e7c7d52b0e6
+416, 0x29d09ca48db64dfb
+417, 0x8f6c4a402066e905
+418, 0x77390795eabc36b
+419, 0xcc2dc2e4141cc69f
+420, 0x2727f83beb9e3c7c
+421, 0x1b29868619331de0
+422, 0xd38c571e192c246f
+423, 0x535327479fe37b6f
+424, 0xaff9ce5758617eb3
+425, 0x5658539e9288a4e4
+426, 0x8df91d87126c4c6d
+427, 0xe931cf8fdba6e255
+428, 0x815dfdf25fbee9e8
+429, 0x5c61f4c7cba91697
+430, 0xdd5f5512fe2313a1
+431, 0x499dd918a92a53cd
+432, 0xa7e969d007c97dfd
+433, 0xb8d39c6fc81ac0bb
+434, 0x1d646983def5746c
+435, 0x44d4b3b17432a60c
+436, 0x65664232a14db1e3
+437, 0xda8fae6433e7500b
+438, 0xbe51b94ff2a3fe94
+439, 0xe9b1bd9a9098ef9f
+440, 0xfe47d54176297ef5
+441, 0xb8ab99bc03bb7135
+442, 0xcfad97f608565b38
+443, 0xf05da71f6760d9c1
+444, 0xef8da40a7c70e7b
+445, 0xe0465d58dbd5d138
+446, 0xb54a2d70eb1a938
+447, 0xfdd50c905958f2d8
+448, 0x3c41933c90a57d43
+449, 0x678f6d894c6ad0bb
+450, 0x403e8f4582274e8
+451, 0x5cbbe975668df6b0
+452, 0x297e6520a7902f03
+453, 0x8f6dded33cd1efd7
+454, 0x8e903c97be8d783b
+455, 0x10bd015577e30f77
+456, 0x3fcd69d1c36eab0c
+457, 0xb45989f3ca198d3
+458, 0x507655ce02b491a9
+459, 0xa92cf99bb78602ce
+460, 0xebfb82055fbc2f0f
+461, 0x3334256279289b7a
+462, 0xc19d2a0f740ee0ac
+463, 0x8bb070dea3934905
+464, 0xa4ab57d3a8d1b3eb
+465, 0xfee1b09bcacf7ff4
+466, 0xccc7fb41ceec41fa
+467, 0xd4da49094eb5a74d
+468, 0xed5c693770af02ed
+469, 0x369dabc9bbfaa8e4
+470, 0x7eab9f360d054199
+471, 0xe36dbebf5ee94076
+472, 0xd30840e499b23d7
+473, 0x8678e6cb545015ff
+474, 0x3a47932ca0b336e
+475, 0xeb7c742b6e93d6fe
+476, 0x1404ea51fe5a62a9
+477, 0xa72cd49db978e288
+478, 0xfd7bada020173dcf
+479, 0xc9e74fc7abe50054
+480, 0x93197847bb66808d
+481, 0x25fd5f053dce5698
+482, 0xe198a9b18cc21f4
+483, 0x5cc27b1689452d5d
+484, 0x8b3657af955a98dc
+485, 0xc17f7584f54aa1c0
+486, 0xe821b088246b1427
+487, 0x32b5a9f6b45b6fa0
+488, 0x2aef7c315c2bae0c
+489, 0xe1af8129846b705a
+490, 0x4123b4c091b34614
+491, 0x6999d61ec341c073
+492, 0x14b9a8fcf86831ea
+493, 0xfd4cff6548f46c9f
+494, 0x350c3b7e6cc8d7d6
+495, 0x202a5047fecafcd5
+496, 0xa82509fe496bb57d
+497, 0x835e4b2608b575fe
+498, 0xf3abe3da919f54ec
+499, 0x8705a21e2c9b8796
+500, 0xfd02d1427005c314
+501, 0xa38458faa637f49b
+502, 0x61622f2360e7622a
+503, 0xe89335a773c2963b
+504, 0x481264b659b0e0d0
+505, 0x1e82ae94ebf62f15
+506, 0x8ea7812de49209d4
+507, 0xff963d764680584
+508, 0x418a68bef717f4af
+509, 0x581f0e7621a8ab91
+510, 0x840337e9a0ec4150
+511, 0x951ef61b344be505
+512, 0xc8b1b899feb61ec2
+513, 0x8b78ca13c56f6ed9
+514, 0x3d2fd793715a946f
+515, 0xf1c04fabcd0f4084
+516, 0x92b602614a9a9fcc
+517, 0x7991bd7a94a65be7
+518, 0x5dead10b06cad2d7
+519, 0xda7719b33f722f06
+520, 0x9d87a722b7bff71e
+521, 0xb038e479071409e9
+522, 0xf4e8bbec48054775
+523, 0x4fec2cd7a28a88ea
+524, 0x839e28526aad3e56
+525, 0xd37ec57852a98bf0
+526, 0xdef2cbbe00f3a02d
+527, 0x1aecfe01a9e4d801
+528, 0x59018d3c8beaf067
+529, 0x892753e6ac8bf3cd
+530, 0xefdd3437023d2d1c
+531, 0x447bfbd148c8cb88
+532, 0x282380221bd442b8
+533, 0xfce8658d1347384a
+534, 0x60b211a7ec6bfa8
+535, 0xd21729cfcc692974
+536, 0x162087ecd5038a47
+537, 0x2b17000c4bce39d2
+538, 0x3a1f75ff6adcdce0
+539, 0x721a411d312f1a2c
+540, 0x9c13b6133f66934d
+541, 0xaa975d14978980e5
+542, 0x9403dbd4754203fa
+543, 0x588c15762fdd643
+544, 0xdd1290f8d0ada73a
+545, 0xd9b77380936103f4
+546, 0xb2e2047a356eb829
+547, 0x7019e5e7f76f7a47
+548, 0x3c29a461f62b001d
+549, 0xa07dc6cfab59c116
+550, 0x9b97e278433f8eb
+551, 0x6affc714e7236588
+552, 0x36170aeb32911a73
+553, 0x4a665104d364a789
+554, 0x4be01464ec276c9c
+555, 0x71bb10271a8b4ecf
+556, 0xbf62e1d068bc018
+557, 0xc9ada5db2cbbb413
+558, 0x2bded75e726650e5
+559, 0x33d5a7af2f34385d
+560, 0x8179c46661d85657
+561, 0x324ebcfd29267359
+562, 0xac4c9311dc9f9110
+563, 0xc14bb6a52f9f9c0
+564, 0xc430abe15e7fb9db
+565, 0xf1cce5c14df91c38
+566, 0x651e3efa2c0750d3
+567, 0x38a33604a8be5c75
+568, 0x7aaf77fe7ff56a49
+569, 0xc0d1cc56bbf27706
+570, 0x887aa47324e156c6
+571, 0x12547c004b085e8d
+572, 0xd86a8d6fbbbfd011
+573, 0x57c860188c92d7b4
+574, 0xcd5d3843d361b8ca
+575, 0x8f586ef05a9cb3ef
+576, 0x174456e1ba6267d5
+577, 0xf5dc302c62fe583c
+578, 0xa349442fabcdb71
+579, 0xe5123c1a8b6fd08e
+580, 0x80681552aa318593
+581, 0xb295396deaef1e31
+582, 0xabb626e0b900e32b
+583, 0xf024db8d3f19c15e
+584, 0x1d04bb9548e2fb6c
+585, 0xd8ed2b2214936c2b
+586, 0x618ca1e430a52bc9
+587, 0xccbca44a6088136b
+588, 0xd0481855c8b9ccbe
+589, 0x3c92a2fade28bdf7
+590, 0x855e9fefc38c0816
+591, 0x1269bbfe55a7b27c
+592, 0x1d6c853d83726d43
+593, 0xc8655511cc7fcafc
+594, 0x301503eb125a9b0e
+595, 0xb3108e4532016b11
+596, 0xbb7ab6245da9cb3d
+597, 0x18004c49116d85eb
+598, 0x3480849c20f61129
+599, 0xe28f45157463937b
+600, 0x8e85e61060f2ce1
+601, 0x1673da4ec589ba5e
+602, 0x74b9a6bd1b194712
+603, 0xed39e147fa8b7601
+604, 0x28ce54019102ca77
+605, 0x42e0347f6d7a2f30
+606, 0xb6a908d1c4814731
+607, 0x16c3435e4e9a126d
+608, 0x8880190514c1ad54
+609, 0xfffd86229a6f773c
+610, 0x4f2420cdb0aa1a93
+611, 0xf8e1acb4120fc1fa
+612, 0x63a8c553ab36a2f2
+613, 0x86b88cf3c0a6a190
+614, 0x44d8b2801622c792
+615, 0xf6eae14e93082ff1
+616, 0xd9ed4f5d1b8fac61
+617, 0x1808ce17f4e1f70
+618, 0x446e83ea336f262f
+619, 0xc7c802b04c0917b7
+620, 0x626f45fd64968b73
+621, 0x9ffa540edc9b2c5c
+622, 0xa96a1e219e486af8
+623, 0x2bb8963884e887a1
+624, 0xba7f68a5d029e3c4
+625, 0xefc45f44392d9ca0
+626, 0x98d77762503c5eab
+627, 0xd89bcf62f2da627c
+628, 0xa3cab8347f833151
+629, 0xa095b7595907d5c7
+630, 0x3b3041274286181
+631, 0xb518db8919eb71fa
+632, 0x187036c14fdc9a36
+633, 0xd06e28301e696f5d
+634, 0xdbc71184e0c56492
+635, 0xfe51e9cae6125bfd
+636, 0x3b12d17cd014df24
+637, 0x3b95e4e2c986ac1a
+638, 0x29c1cce59fb2dea2
+639, 0x58c05793182a49d6
+640, 0xc016477e330d8c00
+641, 0x79ef335133ada5d
+642, 0x168e2cad941203f3
+643, 0xf99d0f219d702ef0
+644, 0x655628068f8f135b
+645, 0xdcdea51910ae3f92
+646, 0x8e4505039c567892
+647, 0x91a9ec7e947c89ae
+648, 0x8717172530f93949
+649, 0x1c80aba9a440171a
+650, 0x9c8f83f6ebe7441e
+651, 0x6c05e1efea4aa7f9
+652, 0x10af696b777c01b
+653, 0x5892e9d9a92fc309
+654, 0xd2ba7da71e709432
+655, 0x46378c7c3269a466
+656, 0x942c63dfe18e772c
+657, 0x6245cf02ef2476f
+658, 0x6f265b2759ea2aea
+659, 0x5aa757f17d17f4a6
+660, 0x1ad6a3c44fa09be6
+661, 0xe861af14e7015fb8
+662, 0x86be2e7db388c77
+663, 0x5c7bba32b519e9a0
+664, 0x3feb314850c4437b
+665, 0x97955add60cfb45b
+666, 0xfdb536230a540bdc
+667, 0xdac9d7bf6e58512e
+668, 0x4894c00e474e8120
+669, 0xa1918a37739da366
+670, 0xa8097f2096532807
+671, 0x592afe50e6c5e643
+672, 0xd69050ee6dcb33dc
+673, 0xa6956b262dd3c561
+674, 0x1a55c815555e63f7
+675, 0x2ec7fd37516de2bb
+676, 0x8ec251d9c70e76ba
+677, 0x9b76e4abafd2689
+678, 0x9ce3f5c751a57df1
+679, 0x915c4818bf287bc7
+680, 0x2293a0d1fe07c735
+681, 0x7627dcd5d5a66d3d
+682, 0xb5e4f92cc49c7138
+683, 0x6fc51298731d268c
+684, 0xd19800aa95441f87
+685, 0x14f70f31162fa115
+686, 0x41a3da3752936f59
+687, 0xbec0652be95652ee
+688, 0x7aa4bdb1020a290f
+689, 0x4382d0d9bee899ef
+690, 0xe6d988ae4277d6ff
+691, 0xe618088ccb2a32d1
+692, 0x411669dfaa899e90
+693, 0x234e2bf4ba76d9f
+694, 0xe109fe4cb7828687
+695, 0x1fb96b5022b0b360
+696, 0x6b24ad76c061a716
+697, 0x7e1781d4d7ecee15
+698, 0xf20c2dbe82ba38ba
+699, 0xeda8e8ae1d943655
+700, 0xa58d196e2a77eaec
+701, 0x44564765a5995a0b
+702, 0x11902fe871ecae21
+703, 0x2ea60279900e675d
+704, 0x38427227c18a9a96
+705, 0xe0af01490a1b1b48
+706, 0x826f91997e057824
+707, 0x1e57308e6e50451
+708, 0xb42d469bbbfdc350
+709, 0xb9734cff1109c49b
+710, 0x98967559bb9d364f
+711, 0xd6be360041907c12
+712, 0xa86a1279122a1e21
+713, 0x26f99a8527bfc698
+714, 0xfa8b85758f28f5d6
+715, 0xe3057429940806ae
+716, 0x4bee2d7e84f93b2b
+717, 0x948350a76ea506f4
+718, 0xa139154488045e74
+719, 0x8893579ba5e78085
+720, 0x5f21c215c6a9e397
+721, 0x456134f3a59641dc
+722, 0x92c0273f8e97a9c6
+723, 0xd2936c9c3f0c6936
+724, 0xcfa4221e752c4735
+725, 0x28cd5a7457355dca
+726, 0xecdfdde23d90999f
+727, 0x60631b2d494d032b
+728, 0xf67289df269a827f
+729, 0xcbe8011ef0f5b7ef
+730, 0x20eea973c70a84f5
+731, 0xbe1fd200398557ce
+732, 0xd2279ee030191bba
+733, 0xf2bd4291dedaf819
+734, 0xfc6d167dbe8c402
+735, 0x39ac298da5d0044b
+736, 0xceac026f5f561ce
+737, 0x10a5b0bdd8ad60e6
+738, 0xdeb3c626df6d4bcb
+739, 0x3c128962e77ff6ca
+740, 0xc786262e9c67a0e5
+741, 0x4332855b3febcdc0
+742, 0x7bda9724d1c0e020
+743, 0x6a8c93399bc4df22
+744, 0xa9b20100ac707396
+745, 0xa11a3458502c4eb5
+746, 0xb185461c60478941
+747, 0x13131d56195b7ff6
+748, 0x8d55875ddbd4aa1c
+749, 0xc09b67425f469aa5
+750, 0x39e33786cc7594c4
+751, 0x75e96db8e4b08b93
+752, 0xda01cd12a3275d1e
+753, 0x2c49e7822344fab5
+754, 0x9bd5f10612514ca7
+755, 0x1c801a5c828e7332
+756, 0x29797d3f4f6c7b4c
+757, 0xac992715e21e4e53
+758, 0xe40e89ee887ddb37
+759, 0x15189a2b265a783b
+760, 0xa854159a52af5c5
+761, 0xb9d8a5a81c12bead
+762, 0x3240cdc9d59e2a58
+763, 0x1d0b872234cf8e23
+764, 0xc01224cf6ce12cff
+765, 0x2601e9f3905c8663
+766, 0xd4ecf9890168d6b4
+767, 0xa45db796d89bfdd5
+768, 0x9f389406dad64ab4
+769, 0xa5a851adce43ffe3
+770, 0xd0962c41c26e5aa9
+771, 0x8a671679e48510a4
+772, 0xc196dc0924a6bfeb
+773, 0x3ead661043b549cb
+774, 0x51af4ca737d405ac
+775, 0xf4425b5c62275fb6
+776, 0x71e69d1f818c10f5
+777, 0xacaf4af2d3c70162
+778, 0x2e1f1d4fd7524244
+779, 0xe54fdd8f388890e8
+780, 0xfda0d33e84eb2b83
+781, 0x53965c5e392b81da
+782, 0x5c92288267263097
+783, 0xcac1b431c878c66c
+784, 0x36c0e1cf417241c6
+785, 0x5cc4d9cd1a36bf2c
+786, 0x32e4257bb5d3e470
+787, 0x4aecff904adb44fb
+788, 0x4d91a8e0d1d60cac
+789, 0xa3b478388385b038
+790, 0x48d955f24eba70be
+791, 0x310e4deb07f24f68
+792, 0x8853e73b1f30a5a
+793, 0x278aee45c2a65c5
+794, 0xf6932eedbd62fb0b
+795, 0xafb95958c82fafad
+796, 0x78e807c18616c16c
+797, 0xd7abadda7488ed9f
+798, 0x2dd72e2572aa2ae6
+799, 0x6ec3791982c2be09
+800, 0x6865bb314fac478f
+801, 0xa14dc0ce09000d1a
+802, 0xb8081ad134da10f2
+803, 0xc4ac1534aa825ef5
+804, 0xd83aeb48ae2d538f
+805, 0x38052027e3074be4
+806, 0xa9833e06ef136582
+807, 0x4f02d790ec9fd78
+808, 0xec2f60bc711c5bdc
+809, 0x9253b0d12268e561
+810, 0xa8ac607fdd62c206
+811, 0x895e28ebc920289f
+812, 0xe2fd42b154243ac7
+813, 0xc69cac2f776eee19
+814, 0xf4d4ac11db56d0dc
+815, 0xa8d37049b9f39833
+816, 0x75abbf8a196c337c
+817, 0xb115bb76750d27b8
+818, 0x39426d187839154
+819, 0xd488423e7f38bf83
+820, 0xbb92e0c76ecb6a62
+821, 0x3055a018ce39f4e3
+822, 0xc93fe0e907729bfb
+823, 0x65985d17c5863340
+824, 0x2088ae081b2028e1
+825, 0x6e628de873314057
+826, 0x864377cccf573f0e
+827, 0xae03f4c9aa63d132
+828, 0xb1db766d6404c66d
+829, 0xdce5a22414a374b
+830, 0x622155b777819997
+831, 0x69fe96e620371f3c
+832, 0xa9c67dbc326d94fc
+833, 0x932a84ae5dd43bab
+834, 0xe2301a20f6c48c3f
+835, 0x795d2e79c6477300
+836, 0xd8e3e631289521e7
+837, 0xae2684979002dfd6
+838, 0xc9c2392377550f89
+839, 0xa1b0c99d508ef7ec
+840, 0x593aef3c5a5272ec
+841, 0xe32e511a4b7162cd
+842, 0xab3b81655f5a2857
+843, 0x1b535e1a0aaf053e
+844, 0x5b33f56c1b6a07e2
+845, 0x782dc8cfcac4ef36
+846, 0xb3d4f256eecfd202
+847, 0xf73a6598f58c4f7e
+848, 0xd5722189524870ae
+849, 0x707878de6b995fc0
+850, 0xc3eb6ba73e3d7e8a
+851, 0xca75c017655b75a7
+852, 0x1b29369ea3541e5f
+853, 0x352e98858bdb58a3
+854, 0x1e4412d184b6b27d
+855, 0x2d375ba0304b2d17
+856, 0x56c30fce69a5d08e
+857, 0x6b8c2b0c06584bda
+858, 0xde4dfff228c8c91f
+859, 0xb7c9edd574e6287f
+860, 0xf6078281c9fca2b2
+861, 0xb9b9a51de02a2f1e
+862, 0xa411bef31c0103b0
+863, 0xc5facd8fc5e1d7a3
+864, 0x54e631c05ddf7359
+865, 0x815b42b3fd06c474
+866, 0xc9ac07566fda18ec
+867, 0xd84ea62957bd8e15
+868, 0x5575f74b5cfd8803
+869, 0x5779a8d460c2e304
+870, 0xfd6e87e264a85587
+871, 0xa1d674daa320b26d
+872, 0x2c3c3ec64b35afc4
+873, 0x393a274ff03e6935
+874, 0x1f40ecbac52c50ea
+875, 0xc3de64fa324ffc0c
+876, 0x56ae828b7f9deb04
+877, 0xe7c1a77b5c1f2cb3
+878, 0xa4c4aab19ea921cc
+879, 0xec164c238825822c
+880, 0xa6a3304770c03b03
+881, 0x3a63641d5b1e8123
+882, 0x42677be3a54617ef
+883, 0xa2680423e3a200c0
+884, 0x8b17cf75f3f37277
+885, 0xe7ce65a49242be3d
+886, 0x7f85934271323e4b
+887, 0xcfb0f431f79a4fab
+888, 0x392e4041a8505b65
+889, 0xd3e5daf0d8b25ea6
+890, 0x9447eff675d80f53
+891, 0xea27a9d53cfaeea8
+892, 0xe3f2335945a83ba
+893, 0x8875a43ce216413b
+894, 0xe49941f9eabce33e
+895, 0x9357c1296683a5b1
+896, 0xf0f16439e81ee701
+897, 0x3181515295ffd79a
+898, 0x9d7150fffd169ed8
+899, 0x2d6a1d281e255a72
+900, 0x81bf1286fb3a92b6
+901, 0x566d3079b499e279
+902, 0xc7939ca8f047341
+903, 0xb1f8050e7c2d59f6
+904, 0x605701045e7be192
+905, 0x51b73360e8e31a1c
+906, 0x9f4ad54483ba9fe0
+907, 0xd3085b8fcf69d1c8
+908, 0xc3e7475026dc5f0b
+909, 0x5800f8554b157354
+910, 0x37dfdf858cfcd963
+911, 0x3a1fce05ce385072
+912, 0xf495c062645c20c3
+913, 0xdcbeec2c3492c773
+914, 0xc38f427589d1d0b4
+915, 0x681ead60216a8184
+916, 0x4bd569c40cc88c41
+917, 0x49b0d442e130b7a2
+918, 0xee349156b7d1fa3f
+919, 0x2bde2d2db055135b
+920, 0xc6a460d2fbcb2378
+921, 0xd0f170494ff3dbb
+922, 0xb294422492528a23
+923, 0xfc95873c854e7b86
+924, 0x6c9c3ad1797bb19c
+925, 0xe0c06f2aab65062d
+926, 0x58e32ce0f11e3a81
+927, 0xa745fcd729ff5036
+928, 0x599b249b2fc2cdb2
+929, 0x78f23b5b0dd5b082
+930, 0x6de3e957f549ecfc
+931, 0x9d0712fa6d878756
+932, 0x9076e8554e4a413a
+933, 0xf3185818c0294de8
+934, 0x5de7cdf4b455b9b6
+935, 0xb15f6908ed703f7d
+936, 0x98c654dfedc6818
+937, 0x120502ab0e93ae42
+938, 0x67966a98a58dc120
+939, 0x1caa0fc628989482
+940, 0xd8b2c3cd480a8625
+941, 0x85c70071b3aed671
+942, 0xff385f8473714662
+943, 0xe2868e4bf3773b63
+944, 0x96cf8019b279298e
+945, 0x8511cc930bd74800
+946, 0x5312e48fdd55f5ab
+947, 0xfcdae564b52df78d
+948, 0x9eee48373e652176
+949, 0x953788f6bcbc56b0
+950, 0xd1a3855dbd2f6b37
+951, 0x3ad32acf77f4d1e9
+952, 0x917c7be81b003e30
+953, 0x9ce817da1e2e9dfb
+954, 0x2968983db162d44d
+955, 0x1e005decef5828ad
+956, 0xc38fe59d1aa4f3d5
+957, 0xf357f1710dc02f1d
+958, 0x2613912a4c83ec67
+959, 0x832a11470b9a17cb
+960, 0x5e85508a611f0dad
+961, 0x2781131677f59d56
+962, 0xa82358d7d4b0237f
+963, 0xfbf8b3cc030c3af6
+964, 0x68b2f68ac8a55adb
+965, 0x3b6fcf353add0ada
+966, 0xd1956049bcd15bd5
+967, 0x95b76f31c7f98b6d
+968, 0x814b6690df971a84
+969, 0xdcf7959cddd819e4
+970, 0xcf8c72c5d804fc88
+971, 0x56883769c8945a22
+972, 0x1f034652f658cf46
+973, 0x41df1324cda235a1
+974, 0xeccd32524504a054
+975, 0x974e0910a04ec02c
+976, 0x72104507b821f6db
+977, 0x791f8d089f273044
+978, 0xe0f79a4f567f73c3
+979, 0x52fe5bea3997f024
+980, 0x5f8b9b446494f78
+981, 0xfd9f511947059190
+982, 0x3aea9dac6063bce3
+983, 0xbfdae4dfc24aee60
+984, 0xa82cdbbf0a280318
+985, 0xf460aae18d70aa9d
+986, 0x997367cb204a57c4
+987, 0x616e21ab95ba05ef
+988, 0x9bfc93bec116769f
+989, 0x2b2ee27c37a3fa5b
+990, 0xb25c6ed54006ee38
+991, 0xab04d4a5c69e69a5
+992, 0x6d2f6b45f2d8438f
+993, 0x4ad2f32afc82f092
+994, 0x513d718908f709c0
+995, 0x5272aadc4fffca51
+996, 0xeb3f87e66156ef5d
+997, 0xf8a3d5a46a86ba85
+998, 0xdb4548a86f27abfd
+999, 0x57c05f47ff62380d
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-1.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-1.csv
new file mode 100644
index 0000000000000000000000000000000000000000..4fffe69591fea3f399f35034057096089d4017fb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-1.csv
@@ -0,0 +1,1001 @@
+seed, 0xdeadbeaf
+0, 0xa475f55fbb6bc638
+1, 0xb2d594b6c29d971c
+2, 0x275bc4ece4484fb1
+3, 0x569be72d9b3492fb
+4, 0x89a5bb9b206a670c
+5, 0xd951bfa06afdc3f9
+6, 0x7ee2e1029d52a265
+7, 0x12ef1d4de0cb4d4c
+8, 0x41658ba8f0ef0280
+9, 0x5b650c82e4fe09c5
+10, 0x638a9f3e30ec4e94
+11, 0x147487fb2ba9233e
+12, 0x89ef035603d2d1fb
+13, 0xe66ca57a190e6cbe
+14, 0x330f673740dd61fc
+15, 0xc71d3dce2f8bb34e
+16, 0x3c07c39ff150b185
+17, 0x5df952b6cae8f099
+18, 0x9f09f2b1f0ceac80
+19, 0x19598eee2d0c4c67
+20, 0x64e06483702e0ebd
+21, 0xda04d1fdb545f7fa
+22, 0xf2cf53b61a0c4f9b
+23, 0xf0bb724ce196f66e
+24, 0x71cefde55d9cf0f
+25, 0x6323f62824a20048
+26, 0x1e93604680f14b4e
+27, 0xd9d8fad1d4654025
+28, 0xf4ee25af2e76ca08
+29, 0x6af3325896befa98
+30, 0xad9e43abf5e04053
+31, 0xbf930e318ce09de3
+32, 0x61f9583b4f9ffe76
+33, 0x9b69d0b3d5ec8958
+34, 0xa608f250f9b2ca41
+35, 0x6fdba7073dc2bb5d
+36, 0xa9d57601efea6d26
+37, 0xc24a88a994954105
+38, 0xc728b1f78d88fe5b
+39, 0x88da88c2b083b3b2
+40, 0xa9e27f7303c76cfd
+41, 0xc4c24608c29176eb
+42, 0x5420b58466b972fd
+43, 0xd2018a661b6756c8
+44, 0x7caed83d9573fc7
+45, 0x562a3d81b849a06a
+46, 0x16588af120c21f2c
+47, 0x658109a7e0eb4837
+48, 0x877aabb14d3822e1
+49, 0x95704c342c3745fe
+50, 0xeeb8a0dc81603616
+51, 0x431bf94889290419
+52, 0xe4a9410ab92a5863
+53, 0xbc6be64ea60f12ba
+54, 0x328a2da920015063
+55, 0x40f6b3bf8271ae07
+56, 0x4068ff00a0e854f8
+57, 0x1b287572ca13fa78
+58, 0xa11624a600490b99
+59, 0x4a04ef29eb7150fa
+60, 0xcc9469ab5ffb739
+61, 0x99a6a9f8d95e782
+62, 0x8e90356573e7a070
+63, 0xa740b8fb415c81c4
+64, 0x47eccef67447f3da
+65, 0x2c720afe3a62a49b
+66, 0xe2a747f0a43eacf4
+67, 0xba063a87ab165576
+68, 0xbc1c78ed27feb5a3
+69, 0x285a19fa3974f9d
+70, 0x489c61e704f5f0e3
+71, 0xf5ab04f6b03f238b
+72, 0x7e25f88138a110dd
+73, 0xc3d1cef3d7c1f1d1
+74, 0xc3de6ec64d0d8e00
+75, 0x73682a15b6cc5088
+76, 0x6fecbeb319163dc5
+77, 0x7e100d5defe570a1
+78, 0xad2af9af076dce57
+79, 0x3c65100e23cd3a9a
+80, 0x4b442cc6cfe521bb
+81, 0xe89dc50f8ab1ef75
+82, 0x8b3c6fdc2496566
+83, 0xdfc50042bc2c308c
+84, 0xe39c5f158b33d2b2
+85, 0x92f6adefdfeb0ac
+86, 0xdf5808a949c85b3e
+87, 0x437384021c9dace9
+88, 0xa7b5ed0d3d67d8f
+89, 0xe1408f8b21da3c34
+90, 0xa1bba125c1e80522
+91, 0x7611dc4710385264
+92, 0xb00a46ea84082917
+93, 0x51bf8002ffa87cef
+94, 0x9bb81013e9810adc
+95, 0xd28f6600013541cd
+96, 0xc2ca3b1fa7791c1f
+97, 0x47f9ad58f099c82c
+98, 0x4d1bb9458469caf9
+99, 0xca0b165b2844257
+100, 0xc3b2e667d075dc66
+101, 0xde22f71136a3dbb1
+102, 0x23b4e3b6f219e4c3
+103, 0x327e0db4c9782f66
+104, 0x9365506a6c7a1807
+105, 0x3e868382dedd3be7
+106, 0xff04fa6534bcaa99
+107, 0x96621a8862995305
+108, 0x81bf39cb5f8e1df7
+109, 0x79b684bb8c37af7a
+110, 0xae3bc073c3cde33c
+111, 0x7805674112c899ac
+112, 0xd95a27995abb20f2
+113, 0x71a503c57b105c40
+114, 0x5ff00d6a73ec8acc
+115, 0x12f96391d91e47c2
+116, 0xd55ca097b3bd4947
+117, 0x794d79d20468b04
+118, 0x35d814efb0d7a07d
+119, 0xfa9ac9bd0aae76d3
+120, 0xa77b8a3711e175cd
+121, 0xe6694fbf421f9489
+122, 0xd8f1756525a1a0aa
+123, 0xe38dfa8426277433
+124, 0x16b640c269bbcd44
+125, 0x2a7a5a67ca24cfeb
+126, 0x669039c28d5344b4
+127, 0x2a445ee81fd596bb
+128, 0x600df94cf25607e0
+129, 0x9358561a7579abff
+130, 0xee1d52ea179fc274
+131, 0x21a8b325e89d31be
+132, 0x36fc0917486eec0a
+133, 0x3d99f40717a6be9f
+134, 0x39ac140051ca55ff
+135, 0xcef7447c26711575
+136, 0xf22666870eff441d
+137, 0x4a53c6134e1c7268
+138, 0xd26de518ad6bdb1b
+139, 0x1a736bf75b8b0e55
+140, 0xef1523f4e6bd0219
+141, 0xb287b32fd615ad92
+142, 0x2583d6af5e841dd5
+143, 0x4b9294aae7ca670c
+144, 0xf5aa4a84174f3ca9
+145, 0x886300f9e0dc6376
+146, 0x3611401e475ef130
+147, 0x69b56432b367e1ac
+148, 0x30c330e9ab36b7c4
+149, 0x1e0e73079a85b8d5
+150, 0x40fdfc7a5bfaecf
+151, 0xd7760f3e8e75a085
+152, 0x1cc1891f7f625313
+153, 0xeece1fe6165b4272
+154, 0xe61111b0c166a3c1
+155, 0x2f1201563312f185
+156, 0xfd10e8ecdd2a57cb
+157, 0x51cdc8c9dd3a89bf
+158, 0xed13cc93938b5496
+159, 0x843816129750526b
+160, 0xd09995cd6819ada
+161, 0x4601e778d40607df
+162, 0xef9df06bd66c2ea0
+163, 0xae0bdecd3db65d69
+164, 0xbb921a3c65a4ae9a
+165, 0xd66698ce8e9361be
+166, 0xacdc91647b6068f4
+167, 0xe505ef68f2a5c1c0
+168, 0xd6e62fd27c6ab137
+169, 0x6a2ba2c6a4641d86
+170, 0x9c89143715c3b81
+171, 0xe408c4e00362601a
+172, 0x986155cbf5d4bd9d
+173, 0xb9e6831728c893a7
+174, 0xb985497c3bf88d8c
+175, 0xd0d729214b727bec
+176, 0x4e557f75fece38a
+177, 0x6572067fdfd623ca
+178, 0x178d49bb4d5cd794
+179, 0xe6baf59f60445d82
+180, 0x5607d53518e3a8d2
+181, 0xba7931adb6ebbd61
+182, 0xe853576172611329
+183, 0xe945daff96000c44
+184, 0x565b9ba3d952a176
+185, 0xcdb54d4f88c584c8
+186, 0x482a7499bee9b5e5
+187, 0x76560dd0affe825b
+188, 0x2a56221faa5ca22c
+189, 0x7729be5b361f5a25
+190, 0xd6f2195795764876
+191, 0x59ef7f8f423f18c5
+192, 0x7ebefed6d02adde1
+193, 0xcfec7265329c73e5
+194, 0x4fd8606a5e59881c
+195, 0x95860982ae370b73
+196, 0xdecfa33b1f902acc
+197, 0xf9b8a57400b7c0a6
+198, 0xd20b822672ec857b
+199, 0x4eb81084096c7364
+200, 0xe535c29a44d9b6ad
+201, 0xdef8b48ebacb2e29
+202, 0x1063bc2b8ba0e915
+203, 0xe4e837fb53d76d02
+204, 0x4df935db53579fb8
+205, 0xa30a0c8053869a89
+206, 0xe891ee58a388a7b5
+207, 0x17931a0c64b8a985
+208, 0xaf2d350b494ce1b3
+209, 0x2ab9345ffbcfed82
+210, 0x7de3fe628a2592f0
+211, 0x85cf54fab8b7e79d
+212, 0x42d221520edab71b
+213, 0x17b695b3af36c233
+214, 0xa4ffe50fe53eb485
+215, 0x1102d242db800e4d
+216, 0xc8dc01f0233b3b6
+217, 0x984a030321053d36
+218, 0x27fa8dc7b7112c0e
+219, 0xba634dd8294e177f
+220, 0xe67ce34b36332eb
+221, 0x8f1351e1894fb41a
+222, 0xb522a3048761fd30
+223, 0xc350ad9bc6729edc
+224, 0xe0ed105bd3c805e1
+225, 0xa14043d2b0825aa7
+226, 0xee7779ce7fc11fdf
+227, 0xc0fa8ba23a60ab25
+228, 0xb596d1ce259afbad
+229, 0xaa9b8445537fdf62
+230, 0x770ab2c700762e13
+231, 0xe812f1183e40cc1
+232, 0x44bc898e57aefbbd
+233, 0xdd8a871df785c996
+234, 0x88836a5e371eb36b
+235, 0xb6081c9152623f27
+236, 0x895acbcd6528ca96
+237, 0xfb67e33ddfbed435
+238, 0xaf7af47d323ce26
+239, 0xe354a510c3c39b2d
+240, 0x5cacdedda0672ba3
+241, 0xa440d9a2c6c22b09
+242, 0x6395099f48d64304
+243, 0xc11cf04c75f655b5
+244, 0x1c4e054d144ddb30
+245, 0x3e0c2db89d336636
+246, 0x127ecf18a5b0b9a7
+247, 0x3b50551a88ea7a73
+248, 0xbd27003e47f1f684
+249, 0xf32d657782baac9b
+250, 0x727f5cabf020bc9
+251, 0x39c1c1c226197dc7
+252, 0x5552c87b35deeb69
+253, 0x64d54067b5ce493f
+254, 0x3494b091fe28dda0
+255, 0xdf0278bc85ee2965
+256, 0xdef16fec25efbd66
+257, 0xe2be09f578c4ce28
+258, 0xd27a9271979d3019
+259, 0x427f6fcd71845e3
+260, 0x26b52c5f81ec142b
+261, 0x98267efc3986ad46
+262, 0x7bf4165ddb7e4374
+263, 0xd05f7996d7941010
+264, 0x3b3991de97b45f14
+265, 0x9068217fb4f27a30
+266, 0xd8fe295160afc7f3
+267, 0x8a159fab4c3bc06f
+268, 0x57855506d19080b6
+269, 0x7636df6b3f2367a4
+270, 0x2844ee3abd1d5ec9
+271, 0xe5788de061f51c16
+272, 0x69e78cc9132a164
+273, 0xacd53cde6d8cd421
+274, 0xb23f3100068e91da
+275, 0x4140070a47f53891
+276, 0xe4a422225a96e53a
+277, 0xb82a8925a272a2ac
+278, 0x7c2f9573590fe3b7
+279, 0xbaf80764db170575
+280, 0x955abffa54358368
+281, 0x355ce7460614a869
+282, 0x3700ede779a4afbf
+283, 0x10a6ec01d92d68cd
+284, 0x3308f5a0a4c0afef
+285, 0x97b892d7601136c9
+286, 0x4955c3b941b8552e
+287, 0xca85aa67e941961d
+288, 0xb1859ae5db28e9d2
+289, 0x305d072ac1521fbd
+290, 0xed52a868996085bb
+291, 0x723bfa6a76358852
+292, 0x78d946ecd97c5fb3
+293, 0x39205b30a8e23e79
+294, 0xb927e3d086baadbe
+295, 0xa18d6946136e1ff5
+296, 0xdab6f0b51c1eb5ff
+297, 0xf0a640bf7a1af60c
+298, 0xf0e81db09004d0d4
+299, 0xfe76cebdbe5a4dde
+300, 0x2dafe9cc3decc376
+301, 0x4c871fdf1af34205
+302, 0xe79617d0c8fa893b
+303, 0xee658aaad3a141f7
+304, 0xfd91aa74863e19f1
+305, 0x841b8f55c103cc22
+306, 0x22766ed65444ad5d
+307, 0x56d03d1beca6c17a
+308, 0x5fd4c112c92036ae
+309, 0x75466ae58a5616dc
+310, 0xfbf98b1081e802a9
+311, 0xdc325e957bf6d8f5
+312, 0xb08da7015ebd19b7
+313, 0xf25a9c0944f0c073
+314, 0xf4625bafa0ced718
+315, 0x4349c9e093a9e692
+316, 0x75a9ccd4dd8935cb
+317, 0x7e6cf9e539361e91
+318, 0x20fdd22fb6edd475
+319, 0x5973021b57c2311f
+320, 0x75392403667edc15
+321, 0xed9b2156ea70d9f1
+322, 0xf40c114db50b64a0
+323, 0xe26bb2c9eef20c62
+324, 0x409c1e3037869f03
+325, 0xcdfd71fdda3b7f91
+326, 0xa0dfae46816777d6
+327, 0xde060a8f61a8deb8
+328, 0x890e082a8b0ca4fc
+329, 0xb9f2958eddf2d0db
+330, 0xd17c148020d20e30
+331, 0xffdc9cc176fe7201
+332, 0xffb83d925b764c1
+333, 0x817ea639e313da8d
+334, 0xa4dd335dd891ca91
+335, 0x1342d25a5e81f488
+336, 0xfa7eb9c3cf466b03
+337, 0xfe0a423d44b185d0
+338, 0x101cfd430ab96049
+339, 0x7b5d3eda9c4504b
+340, 0xe20ccc006e0193f1
+341, 0xf54ccddedebc5df0
+342, 0xc0edd142bd58f1db
+343, 0x3831f40d378d2430
+344, 0x80132353f0a88289
+345, 0x688f23c419d03ef8
+346, 0x4c6837e697884066
+347, 0x699387bb2e9a3a8f
+348, 0x8996f860342448d8
+349, 0xb0f80dff99bfa5cc
+350, 0x3e927a7f9ea12c8e
+351, 0xd7e498d1e5f9dff3
+352, 0x78ecb97bb3f864cc
+353, 0x3c4ffd069a014d38
+354, 0xf8d5073a1e09b4d4
+355, 0x8717e854f9faef23
+356, 0xfbcc5478d8d0ad7
+357, 0xd3cd8b233ca274ff
+358, 0x8bd8f11f79beb265
+359, 0xf64498a832d8fd0e
+360, 0xb01bba75112131ec
+361, 0x55572445a7869781
+362, 0x7b56622f18cb3d7a
+363, 0x7f192c9e075bdb83
+364, 0xd9a112f836b83ff3
+365, 0x68673b37269653dc
+366, 0xe46a9433fb6a0879
+367, 0x127d756ca4779001
+368, 0xc1378e8b1e8eab94
+369, 0x1006edb0f51d078c
+370, 0xc6dd53961232d926
+371, 0x9a4aeef44038256d
+372, 0xd357f4fa652d4f5f
+373, 0x59f3d2cc3378598
+374, 0xe76e6207a824a7fc
+375, 0x5fc5e33712ceffef
+376, 0x77d24aeb0ccb1adc
+377, 0x5be4b2826805659e
+378, 0x257c69d787e64634
+379, 0x58dd52ca6bc727b1
+380, 0x3ab997767235ea33
+381, 0x986a2a7a966fad14
+382, 0xc900f8b27761dcc4
+383, 0x44991bdb13795700
+384, 0xe5c145a4fe733b2
+385, 0x56f041b56bffe0d3
+386, 0x5779c4fef8067996
+387, 0xa0fe8748e829532d
+388, 0x840c1277d78d9dd4
+389, 0x37ebcb315432acbc
+390, 0xf4bc8738433ba3be
+391, 0x8b122993f2e10062
+392, 0xe1fe8481f2681ed5
+393, 0x8e23f1630d9f494a
+394, 0xda24661a01b7d0b3
+395, 0x7a02942a179cee36
+396, 0xf1e08a3c09b71ac
+397, 0x3dec2cc7ee0bd8fd
+398, 0x1f3e480113d805d4
+399, 0xc061b973ad4e3f2c
+400, 0x6bea750f17a66836
+401, 0xbc2add72eac84c25
+402, 0xcff058d3f97934ca
+403, 0x54ccc30987778ec2
+404, 0x93449ec1e1469558
+405, 0xe2ff369eb0c6836
+406, 0x41c2df2d63bf8e55
+407, 0xf9302629b6c71be2
+408, 0xdd30376b8e5ab29a
+409, 0x12db9e04f911d754
+410, 0x8d03d6cd359f1b97
+411, 0xe15956511abf1cee
+412, 0x9b68e10e2c2fd940
+413, 0x2e28de6491c1ce53
+414, 0x52b329b72d0c109d
+415, 0xc2c0b115f9da2a60
+416, 0x6ca084105271bbff
+417, 0x49b92b8676058c1e
+418, 0x767fc92a70f7e5a3
+419, 0x87ba4ed4b65a6aa0
+420, 0xf70b052e0a3975e9
+421, 0x3e925c3306db9eec
+422, 0x43253f1d96ac9513
+423, 0xe3e04f1a1ea454c4
+424, 0x763e3f4cc81ba0c8
+425, 0x2a2721ac69265705
+426, 0xdf3b0ac6416ea214
+427, 0xa6a6b57450f3e000
+428, 0xc3d3b1ac7dbfe6ac
+429, 0xb66e5e6f7d2e4ec0
+430, 0x43c65296f98f0f04
+431, 0xdb0f6e3ff974d842
+432, 0x3d6b48e02ebb203b
+433, 0xd74674ebf09d8f27
+434, 0xbe65243c58fc1200
+435, 0x55eb210a68d42625
+436, 0x87badab097dbe883
+437, 0xada3fda85a53824f
+438, 0xef2791e8f48cd37a
+439, 0x3fe7fceb927a641a
+440, 0xd3bffd3ff031ac78
+441, 0xb94efe03da4d18fb
+442, 0x162a0ad8da65ea68
+443, 0x300f234ef5b7e4a6
+444, 0xa2a8b4c77024e4fb
+445, 0x5950f095ddd7b109
+446, 0xded66dd2b1bb02ba
+447, 0x8ec24b7fa509bcb6
+448, 0x9bede53d924bdad6
+449, 0xa9c3f46423be1930
+450, 0x6dfc90597f8de8b4
+451, 0xb7419ebc65b434f0
+452, 0xa6596949238f58b9
+453, 0x966cbade640829b8
+454, 0x58c74877bdcbf65e
+455, 0xaa103b8f89b0c453
+456, 0x219f0a86e41179a4
+457, 0x90f534fc06ddc57f
+458, 0x8db7cdd644f1affa
+459, 0x38f91de0167127ac
+460, 0xdcd2a65e4df43daa
+461, 0x3e04f34a7e01f834
+462, 0x5b237eea68007768
+463, 0x7ff4d2b015921768
+464, 0xf786b286549d3d51
+465, 0xaefa053fc2c3884c
+466, 0x8e6a8ff381515d36
+467, 0x35b94f3d0a1fce3c
+468, 0x165266d19e9abb64
+469, 0x1deb5caa5f9d8076
+470, 0x13ab91290c7cfe9d
+471, 0x3651ca9856be3e05
+472, 0xe7b705f6e9cccc19
+473, 0xd6e7f79668c127ed
+474, 0xa9faf37154896f92
+475, 0x89fbf190603e0ab1
+476, 0xb34d155a86f942d0
+477, 0xb2d4400a78bfdd76
+478, 0x7c0946aca8cfb3f0
+479, 0x7492771591c9d0e8
+480, 0xd084d95c5ca2eb28
+481, 0xb18d12bd3a6023e
+482, 0xea217ed7b864d80b
+483, 0xe52f69a755dd5c6f
+484, 0x127133993d81c4aa
+485, 0xe07188fcf1670bfb
+486, 0x178fbfe668e4661d
+487, 0x1c9ee14bb0cda154
+488, 0x8d043b96b6668f98
+489, 0xbc858986ec96ca2b
+490, 0x7660f779d528b6b7
+491, 0xd448c6a1f74ae1d3
+492, 0x178e122cfc2a6862
+493, 0x236f000abaf2d23b
+494, 0x171b27f3f0921915
+495, 0x4c3ff07652f50a70
+496, 0x18663e5e7d3a66ca
+497, 0xb38c97946c750cc9
+498, 0xc5031aae6f78f909
+499, 0x4d1514e2925e95c1
+500, 0x4c2184a741dabfbb
+501, 0xfd410364edf77182
+502, 0xc228157f863ee873
+503, 0x9856fdc735cc09fc
+504, 0x660496cd1e41d60e
+505, 0x2edf1d7e01954c32
+506, 0xd32e94639bdd98cf
+507, 0x8e153f48709a77d
+508, 0x89357f332d2d6561
+509, 0x1840d512c97085e6
+510, 0x2f18d035c9e26a85
+511, 0x77b88b1448b26d5b
+512, 0xc1ca6ef4cdae0799
+513, 0xcc203f9e4508165f
+514, 0xeaf762fbc9e0cbbe
+515, 0xc070c687f3c4a290
+516, 0xd49ed321068d5c15
+517, 0x84a55eec17ee64ee
+518, 0x4d8ee685298a8871
+519, 0x9ff5f17d7e029793
+520, 0x791d7d0d62e46302
+521, 0xab218b9114e22bc6
+522, 0x4902b7ab3f7119a7
+523, 0x694930f2e29b049e
+524, 0x1a3c90650848999f
+525, 0x79f1b9d8499c932b
+526, 0xfacb6d3d55e3c92f
+527, 0x8fd8b4f25a5da9f5
+528, 0xd037dcc3a7e62ae7
+529, 0xfecf57300d8f84f4
+530, 0x32079b1e1dc12d48
+531, 0xe5f8f1e62b288f54
+532, 0x97feba3a9c108894
+533, 0xd279a51e1899a9a0
+534, 0xd68eea8e8e363fa8
+535, 0x7394cf2deeca9386
+536, 0x5f70b0c80f1dbf10
+537, 0x8d646916ed40462
+538, 0xd253bb1c8a12bbb6
+539, 0x38f399a821fbd73e
+540, 0x947523a26333ac90
+541, 0xb52e90affbc52a37
+542, 0xcf899cd964654da4
+543, 0xdf66ae9cca8d99e7
+544, 0x6051478e57c21b6a
+545, 0xffa7dc975af3c1da
+546, 0x195c7bff2d1a8f5
+547, 0x64f12b6575cf984d
+548, 0x536034cb842cf9e1
+549, 0x180f247ce5bbfad
+550, 0x8ced45081b134867
+551, 0x532bbfdf426710f3
+552, 0x4747933e74c4f54d
+553, 0x197a890dc4793401
+554, 0x76c7cc2bd42fae2
+555, 0xdabfd67f69675dd0
+556, 0x85c690a68cdb3197
+557, 0xe482cec89ce8f92
+558, 0x20bc9fb7797011b1
+559, 0x76dc85a2185782ad
+560, 0x3df37c164422117a
+561, 0x99211f5d231e0ab0
+562, 0xef7fd794a0a91f4
+563, 0x419577151915f5fe
+564, 0x3ce14a0a7135dae3
+565, 0x389b57598a075d6a
+566, 0x8cc2a9d51b5af9aa
+567, 0xe80a9beffbd13f13
+568, 0x65e96b22ea8a54d8
+569, 0x79f38c4164138ede
+570, 0xd1955846cba03d81
+571, 0x60359fe58e4f26d6
+572, 0x4ea724f585f8d13e
+573, 0x316dfdbadc801a3c
+574, 0x20aa29b7c6dd66fe
+575, 0x65eaf83a6a008caa
+576, 0x407000aff1b9e8cb
+577, 0xb4d49bfb2b268c40
+578, 0xd4e6fe8a7a0f14a9
+579, 0xe34afef924e8f58e
+580, 0xe377b0c891844824
+581, 0x29c2e20c112d30c8
+582, 0x906aad1fe0c18a95
+583, 0x308385f0efbb6474
+584, 0xf23900481bf70445
+585, 0xfdfe3ade7f937a55
+586, 0xf37aae71c33c4f97
+587, 0x1c81e3775a8bed85
+588, 0x7eb5013882ce35ea
+589, 0x37a1c1692495818d
+590, 0x3f90ae118622a0ba
+591, 0x58e4fe6fea29b037
+592, 0xd10ff1d269808825
+593, 0xbce30edb60c21bba
+594, 0x123732329afd6fee
+595, 0x429b4059f797d840
+596, 0x421166568a8c4be1
+597, 0x88f895c424c1bd7f
+598, 0x2adaf7a7b9f781cb
+599, 0xa425644b26cb698
+600, 0x8cc44d2486cc5743
+601, 0xdb9f357a33abf6ba
+602, 0x1a57c4ea77a4d70c
+603, 0x1dea29be75239e44
+604, 0x463141a137121a06
+605, 0x8fecfbbe0b8a9517
+606, 0x92c83984b3566123
+607, 0x3b1c69180ed28665
+608, 0x14a6073425ea8717
+609, 0x71f4c2b3283238d7
+610, 0xb3d491e3152f19f
+611, 0x3a0ba3a11ebac5d2
+612, 0xddb4d1dd4c0f54ac
+613, 0xdb8f36fe02414035
+614, 0x1cf5df5031b1902c
+615, 0x23a20ed12ef95870
+616, 0xf113e573b2dedcbb
+617, 0x308e2395cde0a9fa
+618, 0xd377a22581c3a7da
+619, 0xe0ced97a947a66fb
+620, 0xe44f4de9cd754b00
+621, 0x2344943337d9d1bf
+622, 0x4b5ae5e2ea6e749c
+623, 0x9b8d2e3ef41d1c01
+624, 0x59a5a53ebbd24c6b
+625, 0x4f7611bf9e8a06fb
+626, 0xea38c7b61361cd06
+627, 0xf125a2bfdd2c0c7
+628, 0x2df8dcb5926b9ebb
+629, 0x233e18720cc56988
+630, 0x974c61379b4aa95e
+631, 0xc7fe24c1c868910b
+632, 0x818fd1affc82a842
+633, 0xcee92a952a26d38e
+634, 0x8962f575ebcbf43
+635, 0x7770687e3678c460
+636, 0xdfb1db4ed1298117
+637, 0xb9db54cb03d434d3
+638, 0x34aebbf2244257ad
+639, 0xd836db0cb210c490
+640, 0x935daed7138957cd
+641, 0x3cd914b14e7948fd
+642, 0xd0472e9ed0a0f7f0
+643, 0xa9df33dca697f75e
+644, 0x15e9ea259398721a
+645, 0x23eeba0f970abd60
+646, 0x2217fdf8bbe99a12
+647, 0x5ea490a95717b198
+648, 0xf4e2bfc28280b639
+649, 0x9d19916072d6f05c
+650, 0x5e0387cab1734c6a
+651, 0x93c2c8ac26e5f01e
+652, 0xb0d934354d957eb1
+653, 0xee5099a1eef3188c
+654, 0x8be0abca8edc1115
+655, 0x989a60845dbf5aa3
+656, 0x181c7ed964eee892
+657, 0x49838ea07481288d
+658, 0x17dbc75d66116b2e
+659, 0xa4cafb7a87c0117e
+660, 0xab2d0ae44cdc2e6e
+661, 0xdf802f2457e7da6
+662, 0x4b966c4b9187e124
+663, 0x62de9db6f4811e1a
+664, 0x1e20485968bc62
+665, 0xe9ac288265caca94
+666, 0xc5c694d349aa8c1a
+667, 0x3d67f2083d9bdf10
+668, 0x9a2468e503085486
+669, 0x9d6acd3dc152d1a3
+670, 0xca951e2aeee8df77
+671, 0x2707371af9cdd7b0
+672, 0x2347ae6a4eb5ecbd
+673, 0x16abe5582cb426f
+674, 0x523af4ff980bbccb
+675, 0xb07a0f043e3694aa
+676, 0x14d7c3da81b2de7
+677, 0xf471f1b8ac22305b
+678, 0xdb087ffff9e18520
+679, 0x1a352db3574359e8
+680, 0x48d5431502cc7476
+681, 0x7c9b7e7003dfd1bf
+682, 0x4f43a48aae987169
+683, 0x9a5d3eb66dedb3e9
+684, 0xa7b331af76a9f817
+685, 0xba440154b118ab2d
+686, 0x64d22344ce24c9c6
+687, 0xa22377bd52bd043
+688, 0x9dfa1bb18ca6c5f7
+689, 0xdccf44a92f644c8b
+690, 0xf623d0a49fd18145
+691, 0x556d5c37978e28b3
+692, 0xad96e32ce9d2bb8b
+693, 0x2e479c120be52798
+694, 0x7501cf871af7b2f7
+695, 0xd02536a5d026a5b8
+696, 0x4b37ff53e76ab5a4
+697, 0xdb3a4039caaeab13
+698, 0x6cbd65e3b700c7be
+699, 0x7367abd98761a147
+700, 0xf4f9ba216a35aa77
+701, 0xf88ca25ce921eb86
+702, 0xb211de082ec2cbf2
+703, 0xdd94aa46ec57e12e
+704, 0xa967d74ad8210240
+705, 0xdaa1fada8cfa887
+706, 0x85901d081c4488ee
+707, 0xcf67f79a699ef06
+708, 0x7f2f1f0de921ee14
+709, 0x28bc61e9d3f2328b
+710, 0x3332f2963faf18e5
+711, 0x4167ac71fcf43a6
+712, 0x843c1746b0160b74
+713, 0xd9be80070c578a5e
+714, 0xbd7250c9af1473e7
+715, 0x43f78afaa3647899
+716, 0x91c6b5dd715a75a5
+717, 0x29cc66c8a07bfef3
+718, 0x3f5c667311dc22be
+719, 0x4f49cd47958260cd
+720, 0xbef8be43d920b64e
+721, 0x7a892a5f13061d8b
+722, 0x9532f40125c819b1
+723, 0x924fca3045f8a564
+724, 0x9b2c6442453b0c20
+725, 0x7e21009085b8e793
+726, 0x9b98c17e17af59d2
+727, 0xba61acb73e3ae89a
+728, 0xb9d61a710555c138
+729, 0xc2a425d80978974b
+730, 0xa275e13592da7d67
+731, 0xe962103202d9ad0f
+732, 0xbdf8367a4d6f33fd
+733, 0xe59beb2f8648bdc8
+734, 0xb4c387d8fbc4ac1c
+735, 0x5e3f276b63054b75
+736, 0xf27e616aa54d8464
+737, 0x3f271661d1cd7426
+738, 0x43a69dbee7502c78
+739, 0x8066fcea6df059a1
+740, 0x3c10f19409bdc993
+741, 0x6ba6f43fb21f23e0
+742, 0x9e182d70a5bccf09
+743, 0x1520783d2a63a199
+744, 0xba1dcc0c70b9cace
+745, 0x1009e1e9b1032d8
+746, 0xf632f6a95fb0315
+747, 0x48e711c7114cbfff
+748, 0xef281dcec67debf7
+749, 0x33789894d6abf59b
+750, 0x6c8e541fffbe7f9c
+751, 0x85417f13b08e0a88
+752, 0x9a581e36d589608f
+753, 0x461dca50b1befd35
+754, 0x5a3231680dde6462
+755, 0xcc57acf729780b97
+756, 0x50301efef62e1054
+757, 0x675d042cd4f6bbc9
+758, 0x1652fdd3794384c9
+759, 0x1c93bbeeb763cd4d
+760, 0x44b7240c4b105242
+761, 0x4c6af2a1b606ccfb
+762, 0x18fc43ece2ec1a40
+763, 0x859a5511aeae8acb
+764, 0x2f56826f1996ad2f
+765, 0xa8e95ce8bb363bdf
+766, 0xf4da396054e50e4b
+767, 0x5493865e9895883c
+768, 0x768e4c8b332ac0e3
+769, 0x32195d2aa583fca5
+770, 0xf2f353f21266bc15
+771, 0x43cddf1d021307d
+772, 0x6031e3aa30300e4a
+773, 0x4f1298469ac6088f
+774, 0x4b4d450bafac574e
+775, 0x23e1cf9c0582a22b
+776, 0x2e9036980db49cd0
+777, 0xe4e228b113c411b2
+778, 0x8bddcdb82b51706
+779, 0xd2a7ea8288593629
+780, 0x67fe90e98fdda61
+781, 0x7b63494dba95717b
+782, 0x105625904510d782
+783, 0xdf4aa2242454e50a
+784, 0x32541d6cd7d6c7e3
+785, 0x5661fb432591cf3b
+786, 0xce920a5ed047bce7
+787, 0xed4178a3c96eea8f
+788, 0xe378cd996e39863b
+789, 0x169e1fdc8e2b05e1
+790, 0xaee1812ef7149a96
+791, 0x648571c7453d12c5
+792, 0xb7b6bc9328573c43
+793, 0xe7fb969078e270d7
+794, 0xdfc2b1b8985f6e6f
+795, 0x862b6527ee39a1aa
+796, 0x1ee329aea91d7882
+797, 0x20d25324f2fe704
+798, 0xbfcc47401fc3bbfd
+799, 0x1515cdc8d48b2904
+800, 0xbd6eefe86284261c
+801, 0x9b1f28e3b35f22ee
+802, 0x842a29d35e5aecda
+803, 0xf2346109ad370765
+804, 0x24d68add5a71afd9
+805, 0x4a691421613d91e2
+806, 0x60e3058b3c244051
+807, 0x79194905cdaa5de8
+808, 0xe0e2df35c01e8987
+809, 0xe29b78beffbb5e4a
+810, 0xcdcdbc020218c19e
+811, 0x5ae0af8c16feae43
+812, 0x8109292feeaf14fa
+813, 0x34113f7508dfa521
+814, 0xc062ac163f56730a
+815, 0xf1660e66ec6d4c4c
+816, 0x5966c55f60151c80
+817, 0x3865ae8ec934b17
+818, 0x472a7314afb055ec
+819, 0x7a24277309a44a44
+820, 0x556e02dd35d38baa
+821, 0x9849611a1bc96ec1
+822, 0xd176f5d5a8eb0843
+823, 0x44db12ec60510030
+824, 0x272e3a06a0030078
+825, 0x7c4764dbefc075ea
+826, 0x910712f3735c1183
+827, 0xd49a2da74ae7aff6
+828, 0xcf9b3e6e8f776d71
+829, 0x27789fe3ec481a02
+830, 0x86659f82c6b5912b
+831, 0xe044b3dbf339158c
+832, 0x99d81f6bb62a37b0
+833, 0x5f5830c246fada9a
+834, 0xe68abab1eeb432cb
+835, 0x49c5c5ace04e104
+836, 0x1ac3871b3fc6771b
+837, 0x773b39f32d070652
+838, 0x9c4138c2ae58b1f3
+839, 0xac41c63d7452ac60
+840, 0x9248826b245359e1
+841, 0x99bba1c7a64f1670
+842, 0xe0dc99ff4ebb92f2
+843, 0x113638652740f87c
+844, 0xebf51e94da88cfc
+845, 0x5441c344b81b2585
+846, 0xe1e69e0bc2de652a
+847, 0xe9ab6d64ae42ed1e
+848, 0x879af8730e305f31
+849, 0x36b9ad912c7e00d6
+850, 0x83ef5e9fca853886
+851, 0xda54d48bb20ea974
+852, 0x32c6d93aefa92aa2
+853, 0x4e887b2c3391847d
+854, 0x50966e815f42b1b8
+855, 0x53411ac087832837
+856, 0x46f64fef79df4f29
+857, 0xb34aae3924cd272c
+858, 0xf5ad455869a0adbe
+859, 0x8351ded7144edac8
+860, 0xeb558af089677494
+861, 0x36ed71d69293a8d6
+862, 0x659f90bf5431b254
+863, 0x53349102b7519949
+864, 0x3db83e20b1713610
+865, 0x6d63f96090556254
+866, 0x4cc0467e8f45c645
+867, 0xb8840c4bd5cd4091
+868, 0xbd381463cc93d584
+869, 0x203410d878c2066d
+870, 0x2ebea06213cf71c8
+871, 0x598e8fb75e3fceb4
+872, 0xdcca41ceba0fce02
+873, 0x61bf69212b56aae5
+874, 0x97eed7f70c9114fa
+875, 0xf46f37a8b7a063f9
+876, 0x66c8f4ffe5bd6efa
+877, 0xe43fd6efda2d4e32
+878, 0x12d6c799e5ad01de
+879, 0x9ac83e7f8b709360
+880, 0xbbb7bb3c1957513d
+881, 0x7f87c08d4b3796b0
+882, 0x9a7d1d74b6aa4a5c
+883, 0xa4314530ff741b6f
+884, 0x99a80c6b6f15fca8
+885, 0xd2fec81d6d5fc3ce
+886, 0x15a98be1cc40cea
+887, 0x98693eb7719366f3
+888, 0x36ccdc2a9e9d4de8
+889, 0x3c8208f63d77df25
+890, 0xca2e376e2343df6
+891, 0xcc9b17cbb54420c6
+892, 0x8724c44a64d7dcb8
+893, 0x9d00c6949ff33869
+894, 0xf4f8e584d2699372
+895, 0x88f4748cdd5a2d53
+896, 0xe215072a1205bc6d
+897, 0x190934fe6d740442
+898, 0x7fac5c0ab2af106d
+899, 0x1b86633a0bd84fa1
+900, 0x1293e54318492dfb
+901, 0x433324fd390f34b9
+902, 0x4c5eb2c67a44643b
+903, 0x59a6e281c388b0dd
+904, 0xe78e03f9c44623b7
+905, 0x91307a93c768fc3d
+906, 0xde8867b004d8e3ff
+907, 0xdf52c3f57b7c5862
+908, 0x993f3e1d10358a92
+909, 0x9ccb10bc3e18662d
+910, 0x45093ce48a114c73
+911, 0xd59d05979d26330a
+912, 0x417c0e03300119a9
+913, 0x1c336500f90cde81
+914, 0x1c8ccd29ead9b85b
+915, 0xb76baf3e55d4d950
+916, 0x133ad6196c75fd7e
+917, 0x34200b0cde7ed560
+918, 0x9c7c3dacb213c8d9
+919, 0xd97563c4fd9bf1b6
+920, 0x5d910e871835b6cb
+921, 0x7d46c4733a16bdf9
+922, 0xe41d73194ddc87b2
+923, 0x7d3d8a0855a465a9
+924, 0x70c2a8b5d3f90c0f
+925, 0x9e7565ca5dccfe12
+926, 0x2c0acb4577aa51b1
+927, 0x3d2cd211145b79c7
+928, 0x15a7b17aa6da7732
+929, 0xab44a3730c27d780
+930, 0xf008bd6c802bde3a
+931, 0x82ed86ddf3619f77
+932, 0xaabe982ab15c49f9
+933, 0x9bcad8fa6d8e58a4
+934, 0x8f39ed8243718aa1
+935, 0xe9489340e03e3cb6
+936, 0xc722314f5eefb8d0
+937, 0x870e8869a436df59
+938, 0x4dae75b8087a8204
+939, 0xe1d790f6ec6e425b
+940, 0xafd39ea1b1d0ed09
+941, 0xdf2c99e464ddf08f
+942, 0x74936d859ab9644d
+943, 0x3871302164250e73
+944, 0x764b68921e911886
+945, 0x2a1d024b26bb9d66
+946, 0x797fba43918e75b4
+947, 0x62ec6d24ccca335b
+948, 0xf4bd8b951762b520
+949, 0x9d450dede9119397
+950, 0x5393a26d10f8c124
+951, 0x6b74769392896b57
+952, 0x7f61dbcc0e328581
+953, 0x64e1df3884d0d94
+954, 0xba77dcdf23738c37
+955, 0xf8e288bc0a177475
+956, 0x4a8abfd1702ecb7d
+957, 0x53f22886694736a7
+958, 0x8fc982597ced3e3
+959, 0x1bc46090f820fff7
+960, 0x8bd31f965d02229f
+961, 0x65cd0cb29996ee53
+962, 0x702e0f4fcf8c2e9f
+963, 0x293b77bff307a9a0
+964, 0x125a986b8b305788
+965, 0x416b0eea428ebf3c
+966, 0xeac85421ab0e8469
+967, 0x7f5496095019aa68
+968, 0x1a96d7afbc708e0
+969, 0xb91262e6766e01e1
+970, 0xd0a549cc4ccc6954
+971, 0x75a9a073f50c8a0d
+972, 0xae275d2c1c6cd23c
+973, 0xcf159b5ec5d28fd4
+974, 0x75d0838ce9b92b
+975, 0xd4eddcee6dc4677f
+976, 0x6a0a8ad5df6b75b8
+977, 0x6f3fd0ef0f13ecc4
+978, 0xb75a5826c1a8f8a8
+979, 0xd47098bbc7943766
+980, 0x3d4ddd62d5f23dd1
+981, 0x760a904e4583841c
+982, 0x2afeb5022b4cf1f
+983, 0x66d5f653729f0a13
+984, 0x9a6a5ab62980d30f
+985, 0xc332f5643bbf8d5b
+986, 0x848fb702e4056a90
+987, 0xa057beaf3f9e8c5f
+988, 0x6cc603e4560a6c6a
+989, 0xec761811a7b23211
+990, 0xb14aa4090a82aaa5
+991, 0xe29d9d028a5b2dbb
+992, 0x5564e53738d68f97
+993, 0xfabca36542eaaf3b
+994, 0xb9912fcb782020a2
+995, 0xe865e01b349284fd
+996, 0x540b5ff11c5f9274
+997, 0x3463f64e1e7451dc
+998, 0xe15d3e2f33b735f8
+999, 0xf5433336eadef6e
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-2.csv b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-2.csv
new file mode 100644
index 0000000000000000000000000000000000000000..70aebd5d539256e0abd453bb45828b691c6abdf0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64-testset-2.csv
@@ -0,0 +1,1001 @@
+seed, 0x0
+0, 0x91959e5fb96a6332
+1, 0x3c1dd8a25a7e9f21
+2, 0x657bdffc99798d9e
+3, 0x1a04de320b19e022
+4, 0x65b92af0e5f3c61c
+5, 0x9c84070ce8f743c0
+6, 0xbb10e573693cdb25
+7, 0xd65ea9e76b37fb6b
+8, 0x503efd0e76c8ae66
+9, 0xd711dcd04c26d0f
+10, 0x12f53f435814ac8c
+11, 0xb392cd402cfc82bd
+12, 0x461764550e06c889
+13, 0x716a48b3514e6979
+14, 0xdd0a322213c18ad7
+15, 0x6673a8ca0a05c4d7
+16, 0x2992ef333437f844
+17, 0xc4aaf7e8240b2aad
+18, 0x6ab0a1af1f41474f
+19, 0xb0bae400c226941d
+20, 0xe5f80c2eeeab48c6
+21, 0x3832c6a93a4024bf
+22, 0x280bd824fabe8368
+23, 0x66b626228321e5ff
+24, 0xe0bdfba5325a307e
+25, 0x3a5f65c6ef254e05
+26, 0x99ea12503cb02f94
+27, 0x5d01fd2db77d420b
+28, 0x6959bf5f36b2368d
+29, 0xd856e30c62b5f5be
+30, 0xe33233e1d8140e66
+31, 0xb78be619d415fa8d
+32, 0x4f943bb2cc63d3b
+33, 0x9b1460b290952d81
+34, 0x19205d794826740e
+35, 0x64617bd9d7a6a1ff
+36, 0x30442124b55ea76a
+37, 0xebbbc3b29d0333fc
+38, 0x39235a0fe359751c
+39, 0xf9629768891121aa
+40, 0x32052f53f366e05a
+41, 0x60cc5b412c925bc8
+42, 0xf8b7ecda1c0e5a9
+43, 0x195f036e170a2568
+44, 0xfe06d0381a9ca782
+45, 0x919d89e8b88eebbf
+46, 0xa47fb30148cf0d43
+47, 0x5c983e99d5f9fd56
+48, 0xe7492cdb6a1d42cd
+49, 0xf9cfe5c865b0cfd8
+50, 0x35b653367bbc3b99
+51, 0xb1d92f6f4d4e440b
+52, 0x737e1d5bd87ed9c0
+53, 0x7a880ca1498f8e17
+54, 0x687dae8494f9a3f7
+55, 0x6bae1989f441d5d7
+56, 0x71ad3fa5a9195c2e
+57, 0x16b3969779f5d03
+58, 0xd1bce2ac973f15b3
+59, 0xa114b1ee2ce0dcdd
+60, 0x270d75c11eb1b8d5
+61, 0xc48ffa087c0a7bc
+62, 0xaaf9dc48cda9848d
+63, 0x8111cf10ef6e584d
+64, 0x6736df6af40ee6f4
+65, 0x1a1a111682fbf98d
+66, 0xeb217658e1cb3b5d
+67, 0xcaf58a8b79de9dec
+68, 0x25d0ffd63c88d7a1
+69, 0x4c498cd871b7f176
+70, 0x4069a6156eb0cf3c
+71, 0xdf012f12edcdd867
+72, 0x7734c0ac8edb1689
+73, 0xed6960ac53dbc245
+74, 0x305e20da8868c661
+75, 0x5f0c7a3719956f95
+76, 0x66842bbe3b28895
+77, 0xb608bc9a31eac410
+78, 0xfcb17d5529503abd
+79, 0x829ae5cbc29b92ee
+80, 0x17f2f0027bc24f3a
+81, 0x435926c33d8f44cc
+82, 0x3ab899327098dbec
+83, 0xaf78573b27f8ead8
+84, 0xa8b334fabcf8dc60
+85, 0xcdf3b366a6a303db
+86, 0x8da9379dd62b34c8
+87, 0xb0ba511955f264a7
+88, 0x9d72e21a644f961d
+89, 0xfac28382e2e7e710
+90, 0xd457065f048410aa
+91, 0x1cae57d952563969
+92, 0x5a160a6223253e03
+93, 0x2c45df736d73c8bd
+94, 0x7f651ebc6ad9cec5
+95, 0x77a6be96c7d2e7e7
+96, 0x1721fb1dbfd6546a
+97, 0xf73f433ecff3c997
+98, 0xed1e80f680965bfe
+99, 0x6705ad67a3003b30
+100, 0xac21134efcadb9f7
+101, 0x4d2ba0a91d456ac
+102, 0x59da7b59434eb52b
+103, 0x26c1d070fd414b5f
+104, 0xed7079ddfce83d9a
+105, 0x9277d21f88e0fb7a
+106, 0xfae16b9a8d53d282
+107, 0xb08a0e2e405fdf7d
+108, 0x2ea20df44229d6ec
+109, 0x80e4634cd3612825
+110, 0xbe62e8aeba8f8a1a
+111, 0x4981209769c190fb
+112, 0xcec96ef14c7e1f65
+113, 0x73fe4457b47e7b53
+114, 0x1d66300677315c31
+115, 0xe26821290498c4cc
+116, 0xf6110248fd8fb1c5
+117, 0x30fd7fe32dbd8be3
+118, 0x534ec9b910a2bd72
+119, 0x8f9bfe878bbf7382
+120, 0x4f4eb5295c0c2193
+121, 0xdeb22f03a913be9e
+122, 0x40f716f8e2a8886c
+123, 0xc65007d0e386cdb1
+124, 0x9bdd26d92b143a14
+125, 0xf644b0b77ea44625
+126, 0x75f5a53f6b01993a
+127, 0xfe803e347bf41010
+128, 0x594bff5fa17bc360
+129, 0x3551edfb450373c7
+130, 0x898f9dad433615db
+131, 0x923d2406daa26d49
+132, 0x99e07faccbc33426
+133, 0x7389f9ff4470f807
+134, 0xdc2a25957c6df90b
+135, 0x33c6d8965ef3053f
+136, 0x51a8f07e838f1ab
+137, 0x91c5db369380274f
+138, 0xc37de65ac56b207e
+139, 0xfcc6d2375dde7f14
+140, 0xa4e6418bff505958
+141, 0x4b8b9f78e46953c4
+142, 0x255ab2e0f93cf278
+143, 0xdf650717af3d96ef
+144, 0x2caa21cba3aae2b2
+145, 0xce7e46c6f393daa4
+146, 0x1d5b3573f9997ac7
+147, 0x5280c556e850847d
+148, 0x32edc31bef920ad7
+149, 0xefaa6b0b08cf2c6
+150, 0x5151c99d97b111c5
+151, 0x35ccf4bf53d17590
+152, 0xa210d7bd8697b385
+153, 0xa9419f95738fbe61
+154, 0xdeccf93a1a4fdc90
+155, 0xd0ea3365b18e7a05
+156, 0x84122df6dcd31b9a
+157, 0x33040a2125cea5f5
+158, 0xfe18306a862f6d86
+159, 0xdb97c8392e5c4457
+160, 0xc3e0fa735e80e422
+161, 0x7d106ff36467a0c1
+162, 0xb9825eecc720a76d
+163, 0x7fefc6f771647081
+164, 0xf5df3f5b3977bf13
+165, 0x18fb22736d36f1e0
+166, 0xadc4637b4953abfc
+167, 0x174e66d3e17974bd
+168, 0xf1614c51df4db5db
+169, 0x6664ecde5717b293
+170, 0xd5bc5b6839265c26
+171, 0xf6ca9ce1af3f1832
+172, 0xca696789a9d506ea
+173, 0x7399c246c8f9d53
+174, 0xadf49049626417e2
+175, 0xbcd84af37d09ab91
+176, 0xbb41c177f3a3fa45
+177, 0x592becc814d55302
+178, 0xa88b4e65f6cfe5f7
+179, 0xa0a55e34ff879426
+180, 0x3c2ea6aa725b42b7
+181, 0x65ac4a407b1f9521
+182, 0xde63d53f7e88b556
+183, 0x18bc76696d015f40
+184, 0xd1363f2cd4c116a8
+185, 0x2fe859be19a48e4a
+186, 0x83d6099b1415e656
+187, 0x43f2cbc1a4ee6410
+188, 0xb2eca3d3421c533d
+189, 0xc52b98ea3f031f5d
+190, 0xfe57eb01da07e9d1
+191, 0xf9377883537a6031
+192, 0x364030c05dac7add
+193, 0x6815cb06b35d4404
+194, 0xceae2d4ce31894be
+195, 0xc602bcdf6062bf6a
+196, 0xc8e4bd8dcc6062e3
+197, 0x9c29e87b92a1a791
+198, 0x41e626b871ca9651
+199, 0x325c3d1fb8efbcd8
+200, 0x7dbbacf8e3419fb3
+201, 0x3602e72516bb7319
+202, 0x537a008ebd94d24b
+203, 0xda7714fc9d4d161d
+204, 0x1c8c73700e1b621b
+205, 0x2749b80937d6c939
+206, 0x76ee6abac5b14d33
+207, 0xf18d1e92cb6a8b5c
+208, 0x6ce9579d9291c721
+209, 0x60523c745a40e58
+210, 0x637f837fcc901757
+211, 0x2ff71b19661dc5b3
+212, 0x393ab586326ad16f
+213, 0xa0970ea30fe742b7
+214, 0x570222d7f27fe5ae
+215, 0x3b5806d43fd38629
+216, 0x129a0ad7420180c5
+217, 0x1c4726355778d52c
+218, 0x7c1459cf77656499
+219, 0xfe038a0932132069
+220, 0x4c4cc317a937483a
+221, 0xa333d24067e926ba
+222, 0x401d9b6ab37f6ef2
+223, 0x87ad0e491ebe4a2a
+224, 0xfc02f312e72d121d
+225, 0xfde715b3b99767b2
+226, 0xd111c342ba521c92
+227, 0x83b221b10879c617
+228, 0x6a1bf5c01fdf4277
+229, 0x166bfc0c3f5892ee
+230, 0x4608d556d7c57856
+231, 0x8d786857c95ece49
+232, 0x2d357445a1aca4ac
+233, 0x79620dae28ecd796
+234, 0x90e715dc0f2201c4
+235, 0x173b68b4c9f4b665
+236, 0x4e14d040ebac4eef
+237, 0xbd25960b4b892e
+238, 0x911a199db6f1989d
+239, 0xfe822d7c601fd2e0
+240, 0x9b4c1d58d8223a69
+241, 0x907c1891283843b0
+242, 0xf4868bf54061c4b2
+243, 0x17f8cd1fc24efd85
+244, 0xd44253f9af14c3aa
+245, 0x16d0da0cb911d43c
+246, 0x3c6a46615828e79a
+247, 0x498591c1138e11a5
+248, 0xcc0f26336d0d6141
+249, 0x4d3ebc873212309a
+250, 0x16bad7792d5c2c6a
+251, 0x474215a80b2bbd11
+252, 0x7159848abd8492fc
+253, 0x359341c50973685f
+254, 0x27512ee7bf784a4a
+255, 0x45228ea080f70447
+256, 0x880cab616500d50e
+257, 0x12fae93f9830d56e
+258, 0x6744ee64348d9acd
+259, 0x484dada28cd2a828
+260, 0x98491d0729e41863
+261, 0x2f15aac43c2863b0
+262, 0x5727a34d77a1da0f
+263, 0xa435cebef6a62eed
+264, 0xd211697d57b053b0
+265, 0x65aa757b68bd557
+266, 0xe3a1b7a2d8a3e06a
+267, 0x2adf64e67252a7a9
+268, 0xadadcb75cadee276
+269, 0x7934bc57ac8d97bf
+270, 0xccff0d0f412e0606
+271, 0x101a82aa3e8f3db9
+272, 0xb0f2498094b4575c
+273, 0xba2561d9ef26ed8a
+274, 0xfbcd1268fc3febe1
+275, 0x9aa10bb19eb152e0
+276, 0xf496217a601a6d72
+277, 0xe4be1e4f2fa91363
+278, 0x473a602bf3dd68eb
+279, 0xfe8ed2a48c26f4b5
+280, 0x20e94b1a00159476
+281, 0x93e1cb1c6af86ec7
+282, 0x4fcba3898f7442ba
+283, 0x5150c3a3d94891df
+284, 0x91cfce6c85b033ea
+285, 0x625e8a832a806491
+286, 0x28c97ba72e3ec0b2
+287, 0x8e172de217c71ea1
+288, 0x926b80216c732639
+289, 0x28b19431a649ae3d
+290, 0x57c039a6e95a3795
+291, 0xfbc354182fe52718
+292, 0x819dfd7c7d534cef
+293, 0xabb4093a619ed44f
+294, 0xe785b7ac6f656745
+295, 0xb647b4588b2f942f
+296, 0x64cf870a14c72d27
+297, 0x6d4a4a2a0ba9b37e
+298, 0x78bfb0427d7ce6b0
+299, 0x8dcc72b8bfc79ac6
+300, 0x1c14d915d5e76c99
+301, 0xaf48ddea6f096d79
+302, 0x51b39b67aa130d8
+303, 0x1aeeb39d4def06de
+304, 0xd678092ffedfdd27
+305, 0x8f54787f325111d3
+306, 0xf2ca2e827beaa6bc
+307, 0x339d134099e98545
+308, 0x1f6a8a7b33942e43
+309, 0x952c8065dbef669a
+310, 0xe066aeb6690147f7
+311, 0xed25aa92cf58ebb6
+312, 0x7601edce215ef521
+313, 0xed1c5b396abd9434
+314, 0x4fd1e407535de9d5
+315, 0xccc8315a0d4d1441
+316, 0x85753e250bb86976
+317, 0xf232e469378761c3
+318, 0x81d691b8e9aef3c6
+319, 0x224a2f9cab0ad0e
+320, 0x978f3d3e50007f4e
+321, 0xd3713e6a6c0cbe60
+322, 0xcce8f1eadd41f80d
+323, 0x34bda028a97d469
+324, 0x90e242fdf0f59183
+325, 0x4d749754fbc5f092
+326, 0x4399f5b7851cc87b
+327, 0xcb921a5f25f6c5d7
+328, 0x120bf5d0162101
+329, 0x1304cc2aa352735a
+330, 0xf7236c5d0d5d417b
+331, 0xc31b320fc1654306
+332, 0xb468c6b23f3fb4e7
+333, 0xb5985b5bfaca4166
+334, 0x898285a1cd2f8375
+335, 0xa13493da372aa7c9
+336, 0x15c80c09c12634e7
+337, 0x9b765c5cc9d438bd
+338, 0xee7da816a9201dcb
+339, 0x92e269f73b5a248e
+340, 0xa8086c5de81400ce
+341, 0xe0053901853d42be
+342, 0x821df32c012f433e
+343, 0x17a6d69ca37387c7
+344, 0x2b10044bfba3501f
+345, 0x8dfd262afc2e8515
+346, 0xd68c2c7b60226371
+347, 0xe81ac114e4416774
+348, 0x5896d60061ebc471
+349, 0xa996e3147811dbd1
+350, 0xa819c7b80ecb3661
+351, 0x982ad71b38afbc01
+352, 0xab152b65aa17b7fe
+353, 0x4582bc282ef187ef
+354, 0xab5a17fe8d9bc669
+355, 0x83664fa9cb0284b7
+356, 0x234c4b0091968f52
+357, 0x8ab5f51805688d37
+358, 0xe9e11186e0c53eda
+359, 0x10df37ef1de2eccf
+360, 0x780f1b0d52db968f
+361, 0x50bd4ff292872cd5
+362, 0x51e681c265f5ad0
+363, 0x842c49660a527566
+364, 0x6e56ee026e9eda87
+365, 0x4cf39e40d8c80393
+366, 0x13e466df371f7e1f
+367, 0xf2ce1799f38e028e
+368, 0x833c8db7adc6ff0e
+369, 0xc6e189abc2ec98f
+370, 0xafebb3721283fec5
+371, 0xb49bc1eb5cc17bdc
+372, 0xf1d02e818f5e4488
+373, 0xe5e9d5b41a1dd815
+374, 0xce8aca6573b1bfe5
+375, 0x9b0a5d70e268b1d5
+376, 0xf3c0503a8358f4de
+377, 0x2681605dd755669d
+378, 0xea265ca7601efc70
+379, 0xa93747f0a159439f
+380, 0x62a86ede78a23e50
+381, 0xac8a18935c3d063c
+382, 0x729c0a298f5059f5
+383, 0xbbf195e5b54399f4
+384, 0x38aa9d551f968900
+385, 0x3b3e700c58778caa
+386, 0x68e6e33c4443957a
+387, 0x7c56fc13eb269815
+388, 0xaf7daca39711804a
+389, 0x50fde6d10f9544b3
+390, 0xf3d37159f6f6c03d
+391, 0x82d298f5c1a71685
+392, 0x478661ac54c5002c
+393, 0x6053768e1a324ae0
+394, 0xde8fb4a7e56707ea
+395, 0xaa2809301faa8cf4
+396, 0x690a8d49fedd0722
+397, 0xe17c481b9c217de9
+398, 0x60d1d8a2b57288e3
+399, 0x149adfaadc6b0886
+400, 0xa3c18b6eb79cd5fa
+401, 0x5774e3a091af5f58
+402, 0x2acca57ff30e5712
+403, 0x94454d67367c4b0c
+404, 0x581b2985ac2df5ca
+405, 0x71618e50744f3e70
+406, 0x270a7f3bd9a94ae6
+407, 0x3ef81af9bb36cd7b
+408, 0x8a4a2592875254aa
+409, 0x704ac6086fbb414a
+410, 0xda774d5d3f57414d
+411, 0xe20d3358b918ae9e
+412, 0x934a6b9f7b91e247
+413, 0xf91649cde87ec42c
+414, 0x248cec5f9b6ced30
+415, 0x56791809fd8d64ba
+416, 0xf502b2765c1395f
+417, 0x6b04ec973d75aa7f
+418, 0xb0339f2794bb26f
+419, 0x4c524636efbaea49
+420, 0x6bbf3876e9738748
+421, 0xf686524e754e9e24
+422, 0x8dafa05a42d19cd3
+423, 0xc5f069ab2434008e
+424, 0x4fd64cc713cba76
+425, 0xdbf93450c881ed5f
+426, 0x492e278ebabb59a2
+427, 0x993fddfde4542642
+428, 0xecde68a72c8d4e52
+429, 0xe0760b3074c311fd
+430, 0x68dc0e7e06528707
+431, 0x52b50edf49c0fdc7
+432, 0xb2bd4185c138f412
+433, 0x431496d7e1d86f3
+434, 0xa4e605b037e26c44
+435, 0x58236ae1f0aca2b5
+436, 0x26c72c420fc314d8
+437, 0x20134e982ab99a2b
+438, 0x544b59b8b211374b
+439, 0x1301c42f3a14d993
+440, 0x52a6ea740f763b0f
+441, 0xf209d70c2bebf119
+442, 0xac66a4ebc2aa1be
+443, 0x683713ed35878788
+444, 0x2b5578acec06b80c
+445, 0x86428efa11c45b36
+446, 0xb49010adb17d291e
+447, 0x73b686bd8664b6be
+448, 0x6d28ebf57b6884cc
+449, 0x9712091230ff58d9
+450, 0xc9c91f74c38b286
+451, 0x776310ac41dc008e
+452, 0x2f3739df0bf6a88e
+453, 0x5792dc62b94db675
+454, 0x5715910d024b06af
+455, 0xeb1dd745458da08
+456, 0xfce7b07ccfa851a7
+457, 0xc305f1e983ac368
+458, 0x485aa9519ac00bb0
+459, 0xa5354f6589fb0ea0
+460, 0x32fee02dfdbf4454
+461, 0x4d1ddc304bbefaaa
+462, 0x789a270a1737e57e
+463, 0x9f3072f4b1ed8156
+464, 0x4de3c00e89058120
+465, 0xb00a02529e0a86fa
+466, 0x539f6f0edd845d9a
+467, 0x85e578fe15a8c001
+468, 0xa12c8e1a72cce7d8
+469, 0xc6908abbc2b1828
+470, 0xcf70090774cbb38c
+471, 0x3b636a6977b45d4a
+472, 0xf0a731b220680b57
+473, 0x18973929f51443a8
+474, 0xe93e1fbe7eadabe
+475, 0x8233730f0a6dfa02
+476, 0x66e50b6919b0ab74
+477, 0xb1aba87c97fd08a2
+478, 0xd4dffc1fbc117ad6
+479, 0x6f7fa65724b96e6a
+480, 0x4bd5800dee92e0fa
+481, 0xe18a959db6256da
+482, 0xe53a291bc66df487
+483, 0xb7ec306a08651806
+484, 0x1847a6b80d2821e1
+485, 0xda50391283b14d39
+486, 0xacc4d3cd7cceb97a
+487, 0x57f70185165b7bc6
+488, 0x302b6d597c3aaba7
+489, 0xa47f32d037eab51e
+490, 0xe1509b4408abc559
+491, 0x4f30a1d7c2934157
+492, 0x2ad03e6c60b650b2
+493, 0x334d9c337b0a9064
+494, 0xc7f442821e7aac12
+495, 0xbcdeb09298694cdd
+496, 0xe42402389f8f0fb4
+497, 0xe5de56af539df727
+498, 0x7017f9b2101ee240
+499, 0x1ee5e68d5b10001d
+500, 0x436229051836387a
+501, 0xcd532d6d6ec38fb7
+502, 0x30a66606fdf38272
+503, 0xfdaa2ab9cf798496
+504, 0x4277b4adec70e7df
+505, 0x72cfc30256e0eaef
+506, 0x3c3359fd9bd34917
+507, 0xb7aa89598856efb0
+508, 0xf72226f8bf299ef5
+509, 0x258c499275a4356f
+510, 0x999a56bfc7f20d76
+511, 0x2b3e7432e20c18b
+512, 0x2d1251332f760cb5
+513, 0x7420e0eea62157c5
+514, 0xe85c895aa27cec3d
+515, 0x27a0545c7020d57c
+516, 0xc68638a65b4fff0d
+517, 0xfda473983a4ea747
+518, 0xd19fe65fb4c06062
+519, 0x6b1374e050ee15e4
+520, 0x80065ecd49bc4bef
+521, 0x4ee655954bc838de
+522, 0xe8fb777504a72299
+523, 0x86b652ea70f4bdde
+524, 0xcdc9e0fbde7e4f33
+525, 0x352c0a50cd3ac56
+526, 0x4b8605d368be75dc
+527, 0x1ac9ea8129efbc37
+528, 0x470325faa99f39c5
+529, 0x25dd7ef9adccf7a1
+530, 0x5ae2c7a03e965816
+531, 0xf733d2df59dacc7d
+532, 0xa05bbf0a8a1a7a70
+533, 0xe8aa3f102846ef5f
+534, 0xc9b85ec49ae71789
+535, 0xb904c14ed1cb1936
+536, 0x5ae618230b5f0444
+537, 0x97987fe47b5d7467
+538, 0xabb3aca8865ca761
+539, 0x38bfdf29d4508228
+540, 0x353654f408353330
+541, 0xeb7e92930ae4ef0d
+542, 0xec50f1a7ca526b96
+543, 0xd5e2dc08b5697544
+544, 0x24c7fd69d5ec32df
+545, 0x6f7e1095568b8620
+546, 0x6ed9c16ca13b3c8
+547, 0xe676ef460002130f
+548, 0xa3a01a3992c4b430
+549, 0xe2130406c3b1f202
+550, 0xa8f7263e2aedcd20
+551, 0xc45d71ef2e35f507
+552, 0x37155594021da7ba
+553, 0x22dc94f19de73159
+554, 0x7969fc6bffc5443f
+555, 0x97def7e44faa6bfe
+556, 0x8b940f5e8931d71f
+557, 0xd95b1dd3f1a3fdd5
+558, 0x1c83bfdca615701a
+559, 0xb7fcb56279ceca6b
+560, 0xd84f8950f20dcd0
+561, 0xb03343698de3cbe0
+562, 0xf64565d448d71f71
+563, 0xda52b4676e0ae662
+564, 0xda39c2c05b4ffb91
+565, 0xb35e2560421f6a85
+566, 0x1a7b108d48ac3646
+567, 0xc4e264dc390d79ed
+568, 0xa10727dfd9813256
+569, 0x40d23154e720e4f7
+570, 0xd9fa7cd7e313e119
+571, 0xcbf29107859e6013
+572, 0xc357338553d940b7
+573, 0x2641b7ab0bdfcbaa
+574, 0xd12f2b6060533ae7
+575, 0xd0435aa626411c56
+576, 0x44af4a488a9cec72
+577, 0xb934232ea8fa5696
+578, 0x760a8b12072b572d
+579, 0xfab18f9942cfa9b3
+580, 0x5676834c1fe84d16
+581, 0x9c54e4fddb353236
+582, 0xab49edfc9551f293
+583, 0x567f1fb45a871d
+584, 0x32a967c873998834
+585, 0x99240aad380ef8d1
+586, 0x7f66cbd432859a64
+587, 0x4cdc8a4658166822
+588, 0x984e3984a5766492
+589, 0xa3b2d0a3d64d3d94
+590, 0x177f667172f2affc
+591, 0xb1a90607a73a303f
+592, 0xe600b6c36427f878
+593, 0xf758f9834cb7f466
+594, 0x8ee9fce4a3f36449
+595, 0xcb8f11533e7da347
+596, 0xe7cf647794dabd7c
+597, 0xc9d92cfe6110806
+598, 0xea1335fa9145a1ec
+599, 0xbc6c29821d094552
+600, 0x37b9d6a858cc8bc3
+601, 0xf24e4c694929893e
+602, 0x55d025ce2d7d0004
+603, 0xccdc69acccf4267b
+604, 0xc491c04340c222eb
+605, 0xba50f75ecec9befb
+606, 0x1ec7bd85b8fe3bb9
+607, 0xe4de66498c59ae8a
+608, 0x38aa9e912712c889
+609, 0xcee0e43c5cc31566
+610, 0x72b69aa708fc7ed
+611, 0xdff70b7f6fa96679
+612, 0xd6d71d82112aadc3
+613, 0x365177892cb78531
+614, 0xa54852b39de4f72c
+615, 0x11dd5832bf16dd59
+616, 0x248a0f3369c97097
+617, 0xa14cec0260e26792
+618, 0x3517616ff142bed1
+619, 0x9b693ad39dab7636
+620, 0x739dff825e994434
+621, 0x67711e7356098c9
+622, 0xa81f8515d2fdf458
+623, 0xdac2908113fe568e
+624, 0xe99944ebc6e2806a
+625, 0x671728ca5b030975
+626, 0xfdad20edb2b4a789
+627, 0xedc6e466bd0369d2
+628, 0x88b5d469821f7e1b
+629, 0x2eabf94049a522a5
+630, 0x247794b7a2f5a8e3
+631, 0x278942bdbe02c649
+632, 0xbe5a9a9196ab99c1
+633, 0x75955060866da1b5
+634, 0xdedcfa149273c0b5
+635, 0xdbeb7a57758f3867
+636, 0x7b9053347a2c8d5a
+637, 0xa059b3f2eed338a5
+638, 0x59401a46ded3b79f
+639, 0x38044ba56a6d19fb
+640, 0x72c7221b4e77e779
+641, 0x526df3491a3a34da
+642, 0xc3b31184ba16c0c2
+643, 0xd94c7144488624af
+644, 0xcf966ee4dc373f91
+645, 0x62049e65dd416266
+646, 0x7c2adccb925bf8f
+647, 0xd5fa5c22ed4ef8e1
+648, 0xd00134ebd11f2cd1
+649, 0xfbdf81767bed3634
+650, 0x62e8cc8ff66b6e26
+651, 0x3a72d6bcd4f2dcf7
+652, 0xf1cd45b1b46a86ed
+653, 0x1271f98e0938bb9a
+654, 0x82e6927e83dc31fa
+655, 0x7b9b0e0acb67b92d
+656, 0x6df503e397b2e701
+657, 0x93888f6fb561e0c3
+658, 0x393fb6069a40291
+659, 0x967a7d894cc0754d
+660, 0x6e298996ad866333
+661, 0x5ff3cf5559d6ab46
+662, 0xd0d70508c40349f5
+663, 0xc64c66c0dd426b33
+664, 0x8fea340ee35c64dd
+665, 0xf9cd381eb3060005
+666, 0xfcc37c2799fc0b11
+667, 0x6a37c91d65b489fa
+668, 0x57231000fa0a0c9d
+669, 0x55f6e292c6703f9a
+670, 0xd0508ffbfa55a7a6
+671, 0x885db543276bdac8
+672, 0xc26dbe6a26b0e704
+673, 0x21f884874ebd709e
+674, 0x711f0b6c8f732220
+675, 0x354d0a361eaee195
+676, 0x721344d8d30b006a
+677, 0xa0e090a0d3a56f07
+678, 0x16b3d5d823a4952b
+679, 0x59d7874bc9eae7b6
+680, 0x9bbb32710076455f
+681, 0xd4fb22242ffabafd
+682, 0xe1d4ac6770be1d89
+683, 0xb259cedebc73dc8a
+684, 0x35faaa3b4246ab69
+685, 0x5d26addefdaee89
+686, 0x8e7ec350da0f3545
+687, 0xd0f316eed9f8fc79
+688, 0x98b2a52c9bf291b2
+689, 0xe4d294a8aca6a314
+690, 0x25bd554e6aa7673c
+691, 0xcfde5dcba5be2a6c
+692, 0xb5e01fb48d2d2107
+693, 0xe1caf28948028536
+694, 0xd434aa0a26f3ee9b
+695, 0xd17723381641b8f6
+696, 0xfe73bd1f3f3768a2
+697, 0x1cc6b1abd08d67e9
+698, 0x247e328371a28de0
+699, 0x502e7942e5a9104a
+700, 0x6a030fd242eb4502
+701, 0xa2ffe02744014ce8
+702, 0x59290763b18fe04e
+703, 0xcf14241564271436
+704, 0xb0fb73c3c1503aff
+705, 0x94e27c622f82137a
+706, 0x747a5b406ac3e1f0
+707, 0x9a914e96a732031d
+708, 0x59f68c6c8f078835
+709, 0x809d012c73eb4724
+710, 0x5b3c3b73e1b37d74
+711, 0xdde60ef3ba49cdf7
+712, 0x87a14e1f9c761986
+713, 0x4109b960604522af
+714, 0x122d0e1ed0eb6bb9
+715, 0xadc0d29e80bfe33
+716, 0xa25b1b44f5fc8e4e
+717, 0xbab85d8a9b793f20
+718, 0x825f4cbced0e7d1e
+719, 0x2d6ae8807acb37ea
+720, 0x8234420adce2e39
+721, 0x4a8ad4da6b804807
+722, 0x1e19f9bc215e5245
+723, 0x1d6f4848a916dd5e
+724, 0x9ac40dfcdc2d39cc
+725, 0x9f3524e3086155ec
+726, 0x861fffc43124b2ef
+727, 0xe640e3b756396372
+728, 0x41cb0f0c5e149669
+729, 0xe0bd37e1192e4205
+730, 0x62917d3858f4ce47
+731, 0xa36e7eb4d855820a
+732, 0x204b90255a3bf724
+733, 0x66ee83a0175535bc
+734, 0x2c14ce7c6b0c1423
+735, 0x85d9495fa514f70d
+736, 0x5a4fe45ead874dbc
+737, 0xe72248dcb8cfc863
+738, 0xfc21ff2932ed98cd
+739, 0xcbba1edd735b5cad
+740, 0x91ddc32809679bf5
+741, 0x192cdf2c7631ea1f
+742, 0xbbc451ddf2ea286f
+743, 0xad9e80cae2397a64
+744, 0x6918f0119b95d0e5
+745, 0xa40379017a27d70a
+746, 0x1aaeddb600e61e1
+747, 0x15afd93cbd7adda9
+748, 0x156719bc2b757ff4
+749, 0x13d9a59e2b2df49d
+750, 0x9a490986eaddf0a
+751, 0xef9a350f0b3eb6b4
+752, 0x5de7f6295ba4fa4d
+753, 0x7f37fd087c3fdb49
+754, 0xa9fe3749d6f3f209
+755, 0x50912ac036d9bfb
+756, 0x982cb4d726a441f8
+757, 0x8ca8d8af59b872d0
+758, 0x7f8adfb0ceeade8a
+759, 0xdad390ec742be44
+760, 0xa637944d0045be5b
+761, 0x3569a3b3af807061
+762, 0x9599da8eae14511d
+763, 0xc333e8d19589b01a
+764, 0xfb9b524a20b571e1
+765, 0xbd9dc8b37ce5c3e1
+766, 0x142333005fa389ac
+767, 0x1368bc37cd5bcce1
+768, 0x16094907ad6ecf73
+769, 0xb32c90dbba4c1130
+770, 0x82761d97c1747dd0
+771, 0x599f9f267ae3444d
+772, 0x79ad3382994852e1
+773, 0x2511f06d9ef06e54
+774, 0xb35e6ab7d5bbddae
+775, 0xfca9fa83a2988732
+776, 0x7d4350f0394ac3ba
+777, 0xa52a9527bb176ea3
+778, 0xb49fa0ceb2aa8353
+779, 0x1f62e504d1468cc0
+780, 0xe1a77bfccce6efc3
+781, 0x776cdff4dc0d6797
+782, 0x56612e39b652c1f2
+783, 0x5f096a29294eda04
+784, 0x7978abc3aabd8b23
+785, 0x79dd875e0485b979
+786, 0x8a98aa4d5735d778
+787, 0xcca43940f69d2388
+788, 0xb2d4b156f144f93a
+789, 0xbd528a676e9a862
+790, 0x2a394939c8e7ec5e
+791, 0xb1da900c6efe4abc
+792, 0x9869af479de4c034
+793, 0x78dbdfb88ac7c1db
+794, 0x18cb169143088041
+795, 0xe69e5461c51a3e13
+796, 0x5389fa16ea98183c
+797, 0xed7c80d1be1ea520
+798, 0x87246fc359758ced
+799, 0xab323eba95fae4ed
+800, 0xbc4c0dde7f8a1828
+801, 0xdb739f7955610b1a
+802, 0xecd8c68c3434cc
+803, 0x138c2eb88c477f44
+804, 0x28a65f96727aae41
+805, 0xdee879f2cf5629d
+806, 0x684f0c90ef20070f
+807, 0xa24a819ef5621800
+808, 0x8d0054f870e4fdcb
+809, 0x99e8c6e695b600b
+810, 0x50b705245891f7c3
+811, 0xc02eed3a6e58e51a
+812, 0x443d64e95443606c
+813, 0xca24959cfbd2d120
+814, 0xe072609ea48815bc
+815, 0xbcc715026590315b
+816, 0x3e76df24d7aa5938
+817, 0xd8ff04940d9b79ae
+818, 0x54474ce790059bcd
+819, 0x278390dd6aa70e81
+820, 0xf4df619fe35414e4
+821, 0x757d71270264e615
+822, 0x1e8a373699c11b23
+823, 0xef68c82046e67dd6
+824, 0xe280006599972620
+825, 0x234e095183b0f4d6
+826, 0xe3b7560ed9839749
+827, 0xcd5ec4086572332e
+828, 0xc41c0d4aaa279108
+829, 0x4b9cd6126bc16a6d
+830, 0x4a7252734f3e3dd0
+831, 0xb3132df156cc103a
+832, 0xf9e4abbf7b64464a
+833, 0xf936df27fb3c47b7
+834, 0x9142960873f6d71a
+835, 0x4ba6aa3235cdb10d
+836, 0x3237a2e765ba7766
+837, 0xd62f0b94c8e99e54
+838, 0x26b682f90a3ae41b
+839, 0x40ad5e82072b6f81
+840, 0xd0198101f5484000
+841, 0xe4fac60ba11c332
+842, 0x472d0b0a95ef9d38
+843, 0x8512557aec5a3d8f
+844, 0xef83169d3efd4de9
+845, 0x53fe89283e7a7676
+846, 0x2f50933053d69fc4
+847, 0x76f5e4362e2e53a2
+848, 0x8676fdccce28874a
+849, 0x2737764c1fb1f821
+850, 0x4a6f70afc066ab55
+851, 0x27f8e151e310fca4
+852, 0xd606960ccbe85161
+853, 0xcce51d7ddd270a32
+854, 0xb4235999794875c2
+855, 0x580084e358e884
+856, 0x2159d5e6dc8586d7
+857, 0x87bd54d8599b3ba4
+858, 0x3e9ade6a2181664
+859, 0x5e6e140406d97623
+860, 0x511545d5aa0080a2
+861, 0xf49d78ed219aac57
+862, 0xbece1f9c90b8ea87
+863, 0x1c741cac36a2c514
+864, 0x7453c141047db967
+865, 0xd751832a5037eba2
+866, 0x71370a3f30ada1f7
+867, 0x7c01cf2dcb408631
+868, 0x1052a4fbdccc0fa1
+869, 0x13d525c9df3fb6c
+870, 0xa3aa8dbfee760c55
+871, 0xc0288d200f5155cf
+872, 0x79f4bcd12af567c3
+873, 0x8160d163bb548755
+874, 0x5cf2995fb69fd2df
+875, 0xcc98ed01396639df
+876, 0xad95f1d9cfc8256e
+877, 0xa3df27d9fbdbfb9d
+878, 0x83e5f5dda4d52929
+879, 0x9adc05043009f55b
+880, 0xdfe8329dfde1c001
+881, 0x9980ccdd5298e6a2
+882, 0x636a7bd134f6ef56
+883, 0xef5ff780c4be6ba4
+884, 0x290d71dc77a56d16
+885, 0x6d65db9ff58de1e6
+886, 0x944b063b3805a696
+887, 0xce468ca2cce33008
+888, 0x5ba1ccb840f80f48
+889, 0x28ddce36fc9ad268
+890, 0x4f77ef254d507a21
+891, 0xce9b4057fadf3ab
+892, 0xb518bc68298730e6
+893, 0xd2eb5b8e2ec665b0
+894, 0xe1583303a4f87344
+895, 0x9d5a0df4fbe1bed5
+896, 0x2ba9bc03ec8cfd07
+897, 0x479ed880a96ca669
+898, 0xcedf96338324771a
+899, 0x312f4fc2da41ffaa
+900, 0xa0eb9cf23b5e1ed8
+901, 0xf8f88f975dc3f539
+902, 0x4a37e185d0e96e0f
+903, 0xf829654a5c0b46f9
+904, 0x3909cca7a7f8c7fb
+905, 0x4c2e1d66ceb45105
+906, 0xaffaa19e1db8af87
+907, 0x9ec498246bd18c76
+908, 0x21d51558edc089da
+909, 0xe8984112cd1b1561
+910, 0x7de1d2cf54b0c0e1
+911, 0xa06729aed50bfb9d
+912, 0xcf19f733e5db19e1
+913, 0x70edf2624ab777cd
+914, 0x46685becad10e078
+915, 0x825e0f6add46785
+916, 0x66d4af3b15f70de4
+917, 0xc676614b0666b21
+918, 0x282a916c864f5cb7
+919, 0x2707283a3f512167
+920, 0x37ff3afda7461623
+921, 0xc767eb1205e4ca86
+922, 0x46b359aecc4ea25b
+923, 0x67fbbb797a16dbb1
+924, 0x64fd4ba57122290e
+925, 0x8acc2a8ae59d8fac
+926, 0x64a49298599acc67
+927, 0xedf00de67177ce30
+928, 0x1ea9d8d7e76d2d2c
+929, 0x363fcac323f70eb2
+930, 0x19e6e3ec8a9712eb
+931, 0xca541e96b0961f09
+932, 0x4d8fd34c2822ec46
+933, 0x2fdd56a50b32f705
+934, 0xaac2fcf251e3fd3
+935, 0xb0c600299e57045c
+936, 0xd951ec589e909e38
+937, 0x4dc8414390cae508
+938, 0x537ef9d5e2321344
+939, 0xa57bc21fd31aa2dc
+940, 0xa3a60df564183750
+941, 0xbe69a5ce2e369fb6
+942, 0x7744601f4c053ec8
+943, 0x3838452af42f2612
+944, 0xd4f0dad7115a54e9
+945, 0x629cf68d8009a624
+946, 0x2211c8fa34cb98cb
+947, 0x8040b19e2213db83
+948, 0xb2a86d3ba2384fd
+949, 0x4b85cec4f93f0dab
+950, 0xc8d212d21ea6845d
+951, 0x5b271a03a4fe2be0
+952, 0xff4f671319ad8434
+953, 0x8e615a919d5afa96
+954, 0xea7f47c53161160a
+955, 0x33273930b13c6efc
+956, 0x98eedda27fb59c3c
+957, 0x188dc5e92e939677
+958, 0x9dbd0fa0911430f1
+959, 0x5b3dcf3fa75dfd2b
+960, 0x3f03846febdb275d
+961, 0x20cc24faea9e9cf6
+962, 0x854f3ac66199ff5d
+963, 0x31169ac99d341e6f
+964, 0xa85daed3c0bc1bbe
+965, 0x64633711e71ba5dd
+966, 0x530e79978dc73334
+967, 0x636f2ee6e20aef13
+968, 0xf6220f8b6d9a58fb
+969, 0x425db8fa32141a7b
+970, 0xac7c210f4b02be95
+971, 0x5fe8cfbe197a7754
+972, 0xfff7d40c79420ea
+973, 0x5f8bab9ef4697b77
+974, 0xaf6fe54e45b23fe8
+975, 0xce79456ccc70bbce
+976, 0x645ef680f48f1c00
+977, 0xa4dfac46e2028595
+978, 0x6bece4c41effc5df
+979, 0xd316df886442641f
+980, 0xa4f6ff994edd2a6
+981, 0x30281ae3cc49abe4
+982, 0x39acb7b663dea974
+983, 0x5e8829b01a7c06fb
+984, 0x87bdb08cf027f13e
+985, 0xdfa5ede784e802f6
+986, 0x46d03d55711c38cc
+987, 0xa55a961fc9788306
+988, 0xbf09ded495a2e57a
+989, 0xcd601b29a639cc16
+990, 0x2193ce026bfd1085
+991, 0x25ba27f3f225be13
+992, 0x6f685be82f64f2fe
+993, 0xec8454108229c450
+994, 0x6e79d8d205447a44
+995, 0x9ed7b6a96b9ccd68
+996, 0xae7134b3b7f8ee37
+997, 0x66963de0e5ebcc02
+998, 0x29c8dcd0d17c423f
+999, 0xfb8482c827eb90bc
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64_np126.pkl.gz b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64_np126.pkl.gz
new file mode 100644
index 0000000000000000000000000000000000000000..b9f88985ca2c492d4c96adab79151d824dfc6cad
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/data/sfc64_np126.pkl.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3156b5ca5172ec350f81404afa821e292755978518122377019ec6dec773cdac
+size 290
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_direct.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_direct.py
new file mode 100644
index 0000000000000000000000000000000000000000..3ef94b63ac590c9dfb4224df785f977e59b05b51
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_direct.py
@@ -0,0 +1,580 @@
+import os
+from os.path import join
+import sys
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_allclose, assert_array_equal,
+ assert_raises)
+import pytest
+
+from numpy.random import (
+ Generator, MT19937, PCG64, PCG64DXSM, Philox, RandomState, SeedSequence,
+ SFC64, default_rng
+)
+from numpy.random._common import interface
+
+try:
+ import cffi # noqa: F401
+
+ MISSING_CFFI = False
+except ImportError:
+ MISSING_CFFI = True
+
+try:
+ import ctypes # noqa: F401
+
+ MISSING_CTYPES = False
+except ImportError:
+ MISSING_CTYPES = False
+
+if sys.flags.optimize > 1:
+ # no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeFlag > 1
+ # cffi cannot succeed
+ MISSING_CFFI = True
+
+
+pwd = os.path.dirname(os.path.abspath(__file__))
+
+
+def assert_state_equal(actual, target):
+ for key in actual:
+ if isinstance(actual[key], dict):
+ assert_state_equal(actual[key], target[key])
+ elif isinstance(actual[key], np.ndarray):
+ assert_array_equal(actual[key], target[key])
+ else:
+ assert actual[key] == target[key]
+
+
+def uint32_to_float32(u):
+ return ((u >> np.uint32(8)) * (1.0 / 2**24)).astype(np.float32)
+
+
+def uniform32_from_uint64(x):
+ x = np.uint64(x)
+ upper = np.array(x >> np.uint64(32), dtype=np.uint32)
+ lower = np.uint64(0xffffffff)
+ lower = np.array(x & lower, dtype=np.uint32)
+ joined = np.column_stack([lower, upper]).ravel()
+ return uint32_to_float32(joined)
+
+
+def uniform32_from_uint53(x):
+ x = np.uint64(x) >> np.uint64(16)
+ x = np.uint32(x & np.uint64(0xffffffff))
+ return uint32_to_float32(x)
+
+
+def uniform32_from_uint32(x):
+ return uint32_to_float32(x)
+
+
+def uniform32_from_uint(x, bits):
+ if bits == 64:
+ return uniform32_from_uint64(x)
+ elif bits == 53:
+ return uniform32_from_uint53(x)
+ elif bits == 32:
+ return uniform32_from_uint32(x)
+ else:
+ raise NotImplementedError
+
+
+def uniform_from_uint(x, bits):
+ if bits in (64, 63, 53):
+ return uniform_from_uint64(x)
+ elif bits == 32:
+ return uniform_from_uint32(x)
+
+
+def uniform_from_uint64(x):
+ return (x >> np.uint64(11)) * (1.0 / 9007199254740992.0)
+
+
+def uniform_from_uint32(x):
+ out = np.empty(len(x) // 2)
+ for i in range(0, len(x), 2):
+ a = x[i] >> 5
+ b = x[i + 1] >> 6
+ out[i // 2] = (a * 67108864.0 + b) / 9007199254740992.0
+ return out
+
+
+def uniform_from_dsfmt(x):
+ return x.view(np.double) - 1.0
+
+
+def gauss_from_uint(x, n, bits):
+ if bits in (64, 63):
+ doubles = uniform_from_uint64(x)
+ elif bits == 32:
+ doubles = uniform_from_uint32(x)
+ else: # bits == 'dsfmt'
+ doubles = uniform_from_dsfmt(x)
+ gauss = []
+ loc = 0
+ x1 = x2 = 0.0
+ while len(gauss) < n:
+ r2 = 2
+ while r2 >= 1.0 or r2 == 0.0:
+ x1 = 2.0 * doubles[loc] - 1.0
+ x2 = 2.0 * doubles[loc + 1] - 1.0
+ r2 = x1 * x1 + x2 * x2
+ loc += 2
+
+ f = np.sqrt(-2.0 * np.log(r2) / r2)
+ gauss.append(f * x2)
+ gauss.append(f * x1)
+
+ return gauss[:n]
+
+
+def test_seedsequence():
+ from numpy.random.bit_generator import (ISeedSequence,
+ ISpawnableSeedSequence,
+ SeedlessSeedSequence)
+
+ s1 = SeedSequence(range(10), spawn_key=(1, 2), pool_size=6)
+ s1.spawn(10)
+ s2 = SeedSequence(**s1.state)
+ assert_equal(s1.state, s2.state)
+ assert_equal(s1.n_children_spawned, s2.n_children_spawned)
+
+ # The interfaces cannot be instantiated themselves.
+ assert_raises(TypeError, ISeedSequence)
+ assert_raises(TypeError, ISpawnableSeedSequence)
+ dummy = SeedlessSeedSequence()
+ assert_raises(NotImplementedError, dummy.generate_state, 10)
+ assert len(dummy.spawn(10)) == 10
+
+
+def test_generator_spawning():
+ """ Test spawning new generators and bit_generators directly.
+ """
+ rng = np.random.default_rng()
+ seq = rng.bit_generator.seed_seq
+ new_ss = seq.spawn(5)
+ expected_keys = [seq.spawn_key + (i,) for i in range(5)]
+ assert [c.spawn_key for c in new_ss] == expected_keys
+
+ new_bgs = rng.bit_generator.spawn(5)
+ expected_keys = [seq.spawn_key + (i,) for i in range(5, 10)]
+ assert [bg.seed_seq.spawn_key for bg in new_bgs] == expected_keys
+
+ new_rngs = rng.spawn(5)
+ expected_keys = [seq.spawn_key + (i,) for i in range(10, 15)]
+ found_keys = [rng.bit_generator.seed_seq.spawn_key for rng in new_rngs]
+ assert found_keys == expected_keys
+
+ # Sanity check that streams are actually different:
+ assert new_rngs[0].uniform() != new_rngs[1].uniform()
+
+
+def test_non_spawnable():
+ from numpy.random.bit_generator import ISeedSequence
+
+ class FakeSeedSequence:
+ def generate_state(self, n_words, dtype=np.uint32):
+ return np.zeros(n_words, dtype=dtype)
+
+ ISeedSequence.register(FakeSeedSequence)
+
+ rng = np.random.default_rng(FakeSeedSequence())
+
+ with pytest.raises(TypeError, match="The underlying SeedSequence"):
+ rng.spawn(5)
+
+ with pytest.raises(TypeError, match="The underlying SeedSequence"):
+ rng.bit_generator.spawn(5)
+
+
+class Base:
+ dtype = np.uint64
+ data2 = data1 = {}
+
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = PCG64
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.seed_error_type = TypeError
+ cls.invalid_init_types = []
+ cls.invalid_init_values = []
+
+ @classmethod
+ def _read_csv(cls, filename):
+ with open(filename) as csv:
+ seed = csv.readline()
+ seed = seed.split(',')
+ seed = [int(s.strip(), 0) for s in seed[1:]]
+ data = []
+ for line in csv:
+ data.append(int(line.split(',')[-1].strip(), 0))
+ return {'seed': seed, 'data': np.array(data, dtype=cls.dtype)}
+
+ def test_raw(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ uints = bit_generator.random_raw(1000)
+ assert_equal(uints, self.data1['data'])
+
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ uints = bit_generator.random_raw()
+ assert_equal(uints, self.data1['data'][0])
+
+ bit_generator = self.bit_generator(*self.data2['seed'])
+ uints = bit_generator.random_raw(1000)
+ assert_equal(uints, self.data2['data'])
+
+ def test_random_raw(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ uints = bit_generator.random_raw(output=False)
+ assert uints is None
+ uints = bit_generator.random_raw(1000, output=False)
+ assert uints is None
+
+ def test_gauss_inv(self):
+ n = 25
+ rs = RandomState(self.bit_generator(*self.data1['seed']))
+ gauss = rs.standard_normal(n)
+ assert_allclose(gauss,
+ gauss_from_uint(self.data1['data'], n, self.bits))
+
+ rs = RandomState(self.bit_generator(*self.data2['seed']))
+ gauss = rs.standard_normal(25)
+ assert_allclose(gauss,
+ gauss_from_uint(self.data2['data'], n, self.bits))
+
+ def test_uniform_double(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ vals = uniform_from_uint(self.data1['data'], self.bits)
+ uniforms = rs.random(len(vals))
+ assert_allclose(uniforms, vals)
+ assert_equal(uniforms.dtype, np.float64)
+
+ rs = Generator(self.bit_generator(*self.data2['seed']))
+ vals = uniform_from_uint(self.data2['data'], self.bits)
+ uniforms = rs.random(len(vals))
+ assert_allclose(uniforms, vals)
+ assert_equal(uniforms.dtype, np.float64)
+
+ def test_uniform_float(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ vals = uniform32_from_uint(self.data1['data'], self.bits)
+ uniforms = rs.random(len(vals), dtype=np.float32)
+ assert_allclose(uniforms, vals)
+ assert_equal(uniforms.dtype, np.float32)
+
+ rs = Generator(self.bit_generator(*self.data2['seed']))
+ vals = uniform32_from_uint(self.data2['data'], self.bits)
+ uniforms = rs.random(len(vals), dtype=np.float32)
+ assert_allclose(uniforms, vals)
+ assert_equal(uniforms.dtype, np.float32)
+
+ def test_repr(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ assert 'Generator' in repr(rs)
+ assert f'{id(rs):#x}'.upper().replace('X', 'x') in repr(rs)
+
+ def test_str(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ assert 'Generator' in str(rs)
+ assert str(self.bit_generator.__name__) in str(rs)
+ assert f'{id(rs):#x}'.upper().replace('X', 'x') not in str(rs)
+
+ def test_pickle(self):
+ import pickle
+
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ state = bit_generator.state
+ bitgen_pkl = pickle.dumps(bit_generator)
+ reloaded = pickle.loads(bitgen_pkl)
+ reloaded_state = reloaded.state
+ assert_array_equal(Generator(bit_generator).standard_normal(1000),
+ Generator(reloaded).standard_normal(1000))
+ assert bit_generator is not reloaded
+ assert_state_equal(reloaded_state, state)
+
+ ss = SeedSequence(100)
+ aa = pickle.loads(pickle.dumps(ss))
+ assert_equal(ss.state, aa.state)
+
+ def test_pickle_preserves_seed_sequence(self):
+ # GH 26234
+ # Add explicit test that bit generators preserve seed sequences
+ import pickle
+
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ ss = bit_generator.seed_seq
+ bg_plk = pickle.loads(pickle.dumps(bit_generator))
+ ss_plk = bg_plk.seed_seq
+ assert_equal(ss.state, ss_plk.state)
+ assert_equal(ss.pool, ss_plk.pool)
+
+ bit_generator.seed_seq.spawn(10)
+ bg_plk = pickle.loads(pickle.dumps(bit_generator))
+ ss_plk = bg_plk.seed_seq
+ assert_equal(ss.state, ss_plk.state)
+ assert_equal(ss.n_children_spawned, ss_plk.n_children_spawned)
+
+ def test_invalid_state_type(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ with pytest.raises(TypeError):
+ bit_generator.state = {'1'}
+
+ def test_invalid_state_value(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ state = bit_generator.state
+ state['bit_generator'] = 'otherBitGenerator'
+ with pytest.raises(ValueError):
+ bit_generator.state = state
+
+ def test_invalid_init_type(self):
+ bit_generator = self.bit_generator
+ for st in self.invalid_init_types:
+ with pytest.raises(TypeError):
+ bit_generator(*st)
+
+ def test_invalid_init_values(self):
+ bit_generator = self.bit_generator
+ for st in self.invalid_init_values:
+ with pytest.raises((ValueError, OverflowError)):
+ bit_generator(*st)
+
+ def test_benchmark(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ bit_generator._benchmark(1)
+ bit_generator._benchmark(1, 'double')
+ with pytest.raises(ValueError):
+ bit_generator._benchmark(1, 'int32')
+
+ @pytest.mark.skipif(MISSING_CFFI, reason='cffi not available')
+ def test_cffi(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ cffi_interface = bit_generator.cffi
+ assert isinstance(cffi_interface, interface)
+ other_cffi_interface = bit_generator.cffi
+ assert other_cffi_interface is cffi_interface
+
+ @pytest.mark.skipif(MISSING_CTYPES, reason='ctypes not available')
+ def test_ctypes(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ ctypes_interface = bit_generator.ctypes
+ assert isinstance(ctypes_interface, interface)
+ other_ctypes_interface = bit_generator.ctypes
+ assert other_ctypes_interface is ctypes_interface
+
+ def test_getstate(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ state = bit_generator.state
+ alt_state = bit_generator.__getstate__()
+ assert isinstance(alt_state, tuple)
+ assert_state_equal(state, alt_state[0])
+ assert isinstance(alt_state[1], SeedSequence)
+
+class TestPhilox(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = Philox
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.data1 = cls._read_csv(
+ join(pwd, './data/philox-testset-1.csv'))
+ cls.data2 = cls._read_csv(
+ join(pwd, './data/philox-testset-2.csv'))
+ cls.seed_error_type = TypeError
+ cls.invalid_init_types = []
+ cls.invalid_init_values = [(1, None, 1), (-1,), (None, None, 2 ** 257 + 1)]
+
+ def test_set_key(self):
+ bit_generator = self.bit_generator(*self.data1['seed'])
+ state = bit_generator.state
+ keyed = self.bit_generator(counter=state['state']['counter'],
+ key=state['state']['key'])
+ assert_state_equal(bit_generator.state, keyed.state)
+
+
+class TestPCG64(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = PCG64
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.data1 = cls._read_csv(join(pwd, './data/pcg64-testset-1.csv'))
+ cls.data2 = cls._read_csv(join(pwd, './data/pcg64-testset-2.csv'))
+ cls.seed_error_type = (ValueError, TypeError)
+ cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+ cls.invalid_init_values = [(-1,)]
+
+ def test_advance_symmetry(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ state = rs.bit_generator.state
+ step = -0x9e3779b97f4a7c150000000000000000
+ rs.bit_generator.advance(step)
+ val_neg = rs.integers(10)
+ rs.bit_generator.state = state
+ rs.bit_generator.advance(2**128 + step)
+ val_pos = rs.integers(10)
+ rs.bit_generator.state = state
+ rs.bit_generator.advance(10 * 2**128 + step)
+ val_big = rs.integers(10)
+ assert val_neg == val_pos
+ assert val_big == val_pos
+
+ def test_advange_large(self):
+ rs = Generator(self.bit_generator(38219308213743))
+ pcg = rs.bit_generator
+ state = pcg.state["state"]
+ initial_state = 287608843259529770491897792873167516365
+ assert state["state"] == initial_state
+ pcg.advance(sum(2**i for i in (96, 64, 32, 16, 8, 4, 2, 1)))
+ state = pcg.state["state"]
+ advanced_state = 135275564607035429730177404003164635391
+ assert state["state"] == advanced_state
+
+
+
+class TestPCG64DXSM(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = PCG64DXSM
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.data1 = cls._read_csv(join(pwd, './data/pcg64dxsm-testset-1.csv'))
+ cls.data2 = cls._read_csv(join(pwd, './data/pcg64dxsm-testset-2.csv'))
+ cls.seed_error_type = (ValueError, TypeError)
+ cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+ cls.invalid_init_values = [(-1,)]
+
+ def test_advance_symmetry(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ state = rs.bit_generator.state
+ step = -0x9e3779b97f4a7c150000000000000000
+ rs.bit_generator.advance(step)
+ val_neg = rs.integers(10)
+ rs.bit_generator.state = state
+ rs.bit_generator.advance(2**128 + step)
+ val_pos = rs.integers(10)
+ rs.bit_generator.state = state
+ rs.bit_generator.advance(10 * 2**128 + step)
+ val_big = rs.integers(10)
+ assert val_neg == val_pos
+ assert val_big == val_pos
+
+ def test_advange_large(self):
+ rs = Generator(self.bit_generator(38219308213743))
+ pcg = rs.bit_generator
+ state = pcg.state
+ initial_state = 287608843259529770491897792873167516365
+ assert state["state"]["state"] == initial_state
+ pcg.advance(sum(2**i for i in (96, 64, 32, 16, 8, 4, 2, 1)))
+ state = pcg.state["state"]
+ advanced_state = 277778083536782149546677086420637664879
+ assert state["state"] == advanced_state
+
+
+class TestMT19937(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = MT19937
+ cls.bits = 32
+ cls.dtype = np.uint32
+ cls.data1 = cls._read_csv(join(pwd, './data/mt19937-testset-1.csv'))
+ cls.data2 = cls._read_csv(join(pwd, './data/mt19937-testset-2.csv'))
+ cls.seed_error_type = ValueError
+ cls.invalid_init_types = []
+ cls.invalid_init_values = [(-1,)]
+
+ def test_seed_float_array(self):
+ assert_raises(TypeError, self.bit_generator, np.array([np.pi]))
+ assert_raises(TypeError, self.bit_generator, np.array([-np.pi]))
+ assert_raises(TypeError, self.bit_generator, np.array([np.pi, -np.pi]))
+ assert_raises(TypeError, self.bit_generator, np.array([0, np.pi]))
+ assert_raises(TypeError, self.bit_generator, [np.pi])
+ assert_raises(TypeError, self.bit_generator, [0, np.pi])
+
+ def test_state_tuple(self):
+ rs = Generator(self.bit_generator(*self.data1['seed']))
+ bit_generator = rs.bit_generator
+ state = bit_generator.state
+ desired = rs.integers(2 ** 16)
+ tup = (state['bit_generator'], state['state']['key'],
+ state['state']['pos'])
+ bit_generator.state = tup
+ actual = rs.integers(2 ** 16)
+ assert_equal(actual, desired)
+ tup = tup + (0, 0.0)
+ bit_generator.state = tup
+ actual = rs.integers(2 ** 16)
+ assert_equal(actual, desired)
+
+
+class TestSFC64(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = SFC64
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.data1 = cls._read_csv(
+ join(pwd, './data/sfc64-testset-1.csv'))
+ cls.data2 = cls._read_csv(
+ join(pwd, './data/sfc64-testset-2.csv'))
+ cls.seed_error_type = (ValueError, TypeError)
+ cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+ cls.invalid_init_values = [(-1,)]
+
+ def test_legacy_pickle(self):
+ # Pickling format was changed in 2.0.x
+ import gzip
+ import pickle
+
+ expected_state = np.array(
+ [
+ 9957867060933711493,
+ 532597980065565856,
+ 14769588338631205282,
+ 13
+ ],
+ dtype=np.uint64
+ )
+
+ base_path = os.path.split(os.path.abspath(__file__))[0]
+ pkl_file = os.path.join(base_path, "data", "sfc64_np126.pkl.gz")
+ with gzip.open(pkl_file) as gz:
+ sfc = pickle.load(gz)
+
+ assert isinstance(sfc, SFC64)
+ assert_equal(sfc.state["state"]["state"], expected_state)
+
+
+class TestDefaultRNG:
+ def test_seed(self):
+ for args in [(), (None,), (1234,), ([1234, 5678],)]:
+ rg = default_rng(*args)
+ assert isinstance(rg.bit_generator, PCG64)
+
+ def test_passthrough(self):
+ bg = Philox()
+ rg = default_rng(bg)
+ assert rg.bit_generator is bg
+ rg2 = default_rng(rg)
+ assert rg2 is rg
+ assert rg2.bit_generator is bg
+
+ def test_coercion_RandomState_Generator(self):
+ # use default_rng to coerce RandomState to Generator
+ rs = RandomState(1234)
+ rg = default_rng(rs)
+ assert isinstance(rg.bit_generator, MT19937)
+ assert rg.bit_generator is rs._bit_generator
+
+ # RandomState with a non MT19937 bit generator
+ _original = np.random.get_bit_generator()
+ bg = PCG64(12342298)
+ np.random.set_bit_generator(bg)
+ rs = np.random.mtrand._rand
+ rg = default_rng(rs)
+ assert rg.bit_generator is bg
+
+ # vital to get global state back to original, otherwise
+ # other tests start to fail.
+ np.random.set_bit_generator(_original)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_extending.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..d6ffea0b2dbf060180a747f2e549f5fc98d1cfed
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_extending.py
@@ -0,0 +1,126 @@
+from importlib.util import spec_from_file_location, module_from_spec
+import os
+import pytest
+import shutil
+import subprocess
+import sys
+import sysconfig
+import warnings
+
+import numpy as np
+from numpy.testing import IS_WASM, IS_EDITABLE
+
+
+try:
+ import cffi
+except ImportError:
+ cffi = None
+
+if sys.flags.optimize > 1:
+ # no docstrings present to inspect when PYTHONOPTIMIZE/Py_OptimizeFlag > 1
+ # cffi cannot succeed
+ cffi = None
+
+try:
+ with warnings.catch_warnings(record=True) as w:
+ # numba issue gh-4733
+ warnings.filterwarnings('always', '', DeprecationWarning)
+ import numba
+except (ImportError, SystemError):
+ # Certain numpy/numba versions trigger a SystemError due to a numba bug
+ numba = None
+
+try:
+ import cython
+ from Cython.Compiler.Version import version as cython_version
+except ImportError:
+ cython = None
+else:
+ from numpy._utils import _pep440
+ # Note: keep in sync with the one in pyproject.toml
+ required_version = '3.0.6'
+ if _pep440.parse(cython_version) < _pep440.Version(required_version):
+ # too old or wrong cython, skip the test
+ cython = None
+
+
+@pytest.mark.skipif(
+ IS_EDITABLE,
+ reason='Editable install cannot find .pxd headers'
+)
+@pytest.mark.skipif(
+ sys.platform == "win32" and sys.maxsize < 2**32,
+ reason="Failing in 32-bit Windows wheel build job, skip for now"
+)
+@pytest.mark.skipif(IS_WASM, reason="Can't start subprocess")
+@pytest.mark.skipif(cython is None, reason="requires cython")
+@pytest.mark.slow
+def test_cython(tmp_path):
+ import glob
+ # build the examples in a temporary directory
+ srcdir = os.path.join(os.path.dirname(__file__), '..')
+ shutil.copytree(srcdir, tmp_path / 'random')
+ build_dir = tmp_path / 'random' / '_examples' / 'cython'
+ target_dir = build_dir / "build"
+ os.makedirs(target_dir, exist_ok=True)
+ # Ensure we use the correct Python interpreter even when `meson` is
+ # installed in a different Python environment (see gh-24956)
+ native_file = str(build_dir / 'interpreter-native-file.ini')
+ with open(native_file, 'w') as f:
+ f.write("[binaries]\n")
+ f.write(f"python = '{sys.executable}'\n")
+ f.write(f"python3 = '{sys.executable}'")
+ if sys.platform == "win32":
+ subprocess.check_call(["meson", "setup",
+ "--buildtype=release",
+ "--vsenv", "--native-file", native_file,
+ str(build_dir)],
+ cwd=target_dir,
+ )
+ else:
+ subprocess.check_call(["meson", "setup",
+ "--native-file", native_file, str(build_dir)],
+ cwd=target_dir
+ )
+ subprocess.check_call(["meson", "compile", "-vv"], cwd=target_dir)
+
+ # gh-16162: make sure numpy's __init__.pxd was used for cython
+ # not really part of this test, but it is a convenient place to check
+
+ g = glob.glob(str(target_dir / "*" / "extending.pyx.c"))
+ with open(g[0]) as fid:
+ txt_to_find = 'NumPy API declarations from "numpy/__init__'
+ for line in fid:
+ if txt_to_find in line:
+ break
+ else:
+ assert False, ("Could not find '{}' in C file, "
+ "wrong pxd used".format(txt_to_find))
+ # import without adding the directory to sys.path
+ suffix = sysconfig.get_config_var('EXT_SUFFIX')
+
+ def load(modname):
+ so = (target_dir / modname).with_suffix(suffix)
+ spec = spec_from_file_location(modname, so)
+ mod = module_from_spec(spec)
+ spec.loader.exec_module(mod)
+ return mod
+
+ # test that the module can be imported
+ load("extending")
+ load("extending_cpp")
+ # actually test the cython c-extension
+ extending_distributions = load("extending_distributions")
+ from numpy.random import PCG64
+ values = extending_distributions.uniforms_ex(PCG64(0), 10, 'd')
+ assert values.shape == (10,)
+ assert values.dtype == np.float64
+
+@pytest.mark.skipif(numba is None or cffi is None,
+ reason="requires numba and cffi")
+def test_numba():
+ from numpy.random._examples.numba import extending # noqa: F401
+
+@pytest.mark.skipif(cffi is None, reason="requires cffi")
+def test_cffi():
+ from numpy.random._examples.cffi import extending # noqa: F401
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937.py
new file mode 100644
index 0000000000000000000000000000000000000000..c9dc81e96a37fbd13549272d70161847554923b0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937.py
@@ -0,0 +1,2797 @@
+import os.path
+import sys
+import hashlib
+
+import pytest
+
+import numpy as np
+from numpy.exceptions import AxisError
+from numpy.linalg import LinAlgError
+from numpy.testing import (
+ assert_, assert_raises, assert_equal, assert_allclose,
+ assert_warns, assert_no_warnings, assert_array_equal,
+ assert_array_almost_equal, suppress_warnings, IS_WASM)
+
+from numpy.random import Generator, MT19937, SeedSequence, RandomState
+
+random = Generator(MT19937())
+
+JUMP_TEST_DATA = [
+ {
+ "seed": 0,
+ "steps": 10,
+ "initial": {"key_sha256": "bb1636883c2707b51c5b7fc26c6927af4430f2e0785a8c7bc886337f919f9edf", "pos": 9},
+ "jumped": {"key_sha256": "ff682ac12bb140f2d72fba8d3506cf4e46817a0db27aae1683867629031d8d55", "pos": 598},
+ },
+ {
+ "seed":384908324,
+ "steps":312,
+ "initial": {"key_sha256": "16b791a1e04886ccbbb4d448d6ff791267dc458ae599475d08d5cced29d11614", "pos": 311},
+ "jumped": {"key_sha256": "a0110a2cf23b56be0feaed8f787a7fc84bef0cb5623003d75b26bdfa1c18002c", "pos": 276},
+ },
+ {
+ "seed": [839438204, 980239840, 859048019, 821],
+ "steps": 511,
+ "initial": {"key_sha256": "d306cf01314d51bd37892d874308200951a35265ede54d200f1e065004c3e9ea", "pos": 510},
+ "jumped": {"key_sha256": "0e00ab449f01a5195a83b4aee0dfbc2ce8d46466a640b92e33977d2e42f777f8", "pos": 475},
+ },
+]
+
+
+@pytest.fixture(scope='module', params=[True, False])
+def endpoint(request):
+ return request.param
+
+
+class TestSeed:
+ def test_scalar(self):
+ s = Generator(MT19937(0))
+ assert_equal(s.integers(1000), 479)
+ s = Generator(MT19937(4294967295))
+ assert_equal(s.integers(1000), 324)
+
+ def test_array(self):
+ s = Generator(MT19937(range(10)))
+ assert_equal(s.integers(1000), 465)
+ s = Generator(MT19937(np.arange(10)))
+ assert_equal(s.integers(1000), 465)
+ s = Generator(MT19937([0]))
+ assert_equal(s.integers(1000), 479)
+ s = Generator(MT19937([4294967295]))
+ assert_equal(s.integers(1000), 324)
+
+ def test_seedsequence(self):
+ s = MT19937(SeedSequence(0))
+ assert_equal(s.random_raw(1), 2058676884)
+
+ def test_invalid_scalar(self):
+ # seed must be an unsigned 32 bit integer
+ assert_raises(TypeError, MT19937, -0.5)
+ assert_raises(ValueError, MT19937, -1)
+
+ def test_invalid_array(self):
+ # seed must be an unsigned integer
+ assert_raises(TypeError, MT19937, [-0.5])
+ assert_raises(ValueError, MT19937, [-1])
+ assert_raises(ValueError, MT19937, [1, -2, 4294967296])
+
+ def test_noninstantized_bitgen(self):
+ assert_raises(ValueError, Generator, MT19937)
+
+
+class TestBinomial:
+ def test_n_zero(self):
+ # Tests the corner case of n == 0 for the binomial distribution.
+ # binomial(0, p) should be zero for any p in [0, 1].
+ # This test addresses issue #3480.
+ zeros = np.zeros(2, dtype='int')
+ for p in [0, .5, 1]:
+ assert_(random.binomial(0, p) == 0)
+ assert_array_equal(random.binomial(zeros, p), zeros)
+
+ def test_p_is_nan(self):
+ # Issue #4571.
+ assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+ def test_basic(self):
+ random.multinomial(100, [0.2, 0.8])
+
+ def test_zero_probability(self):
+ random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+ def test_int_negative_interval(self):
+ assert_(-5 <= random.integers(-5, -1) < -1)
+ x = random.integers(-5, -1, 5)
+ assert_(np.all(-5 <= x))
+ assert_(np.all(x < -1))
+
+ def test_size(self):
+ # gh-3173
+ p = [0.5, 0.5]
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(random.multinomial(1, p, np.array((2, 2))).shape,
+ (2, 2, 2))
+
+ assert_raises(TypeError, random.multinomial, 1, p,
+ float(1))
+
+ def test_invalid_prob(self):
+ assert_raises(ValueError, random.multinomial, 100, [1.1, 0.2])
+ assert_raises(ValueError, random.multinomial, 100, [-.1, 0.9])
+
+ def test_invalid_n(self):
+ assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2])
+ assert_raises(ValueError, random.multinomial, [-1] * 10, [0.8, 0.2])
+
+ def test_p_non_contiguous(self):
+ p = np.arange(15.)
+ p /= np.sum(p[1::3])
+ pvals = p[1::3]
+ random = Generator(MT19937(1432985819))
+ non_contig = random.multinomial(100, pvals=pvals)
+ random = Generator(MT19937(1432985819))
+ contig = random.multinomial(100, pvals=np.ascontiguousarray(pvals))
+ assert_array_equal(non_contig, contig)
+
+ def test_multinomial_pvals_float32(self):
+ x = np.array([9.9e-01, 9.9e-01, 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09,
+ 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09], dtype=np.float32)
+ pvals = x / x.sum()
+ random = Generator(MT19937(1432985819))
+ match = r"[\w\s]*pvals array is cast to 64-bit floating"
+ with pytest.raises(ValueError, match=match):
+ random.multinomial(1, pvals)
+
+
+class TestMultivariateHypergeometric:
+
+ def setup_method(self):
+ self.seed = 8675309
+
+ def test_argument_validation(self):
+ # Error cases...
+
+ # `colors` must be a 1-d sequence
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ 10, 4)
+
+ # Negative nsample
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [2, 3, 4], -1)
+
+ # Negative color
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [-1, 2, 3], 2)
+
+ # nsample exceeds sum(colors)
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [2, 3, 4], 10)
+
+ # nsample exceeds sum(colors) (edge case of empty colors)
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [], 1)
+
+ # Validation errors associated with very large values in colors.
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [999999999, 101], 5, 1, 'marginals')
+
+ int64_info = np.iinfo(np.int64)
+ max_int64 = int64_info.max
+ max_int64_index = max_int64 // int64_info.dtype.itemsize
+ assert_raises(ValueError, random.multivariate_hypergeometric,
+ [max_int64_index - 100, 101], 5, 1, 'count')
+
+ @pytest.mark.parametrize('method', ['count', 'marginals'])
+ def test_edge_cases(self, method):
+ # Set the seed, but in fact, all the results in this test are
+ # deterministic, so we don't really need this.
+ random = Generator(MT19937(self.seed))
+
+ x = random.multivariate_hypergeometric([0, 0, 0], 0, method=method)
+ assert_array_equal(x, [0, 0, 0])
+
+ x = random.multivariate_hypergeometric([], 0, method=method)
+ assert_array_equal(x, [])
+
+ x = random.multivariate_hypergeometric([], 0, size=1, method=method)
+ assert_array_equal(x, np.empty((1, 0), dtype=np.int64))
+
+ x = random.multivariate_hypergeometric([1, 2, 3], 0, method=method)
+ assert_array_equal(x, [0, 0, 0])
+
+ x = random.multivariate_hypergeometric([9, 0, 0], 3, method=method)
+ assert_array_equal(x, [3, 0, 0])
+
+ colors = [1, 1, 0, 1, 1]
+ x = random.multivariate_hypergeometric(colors, sum(colors),
+ method=method)
+ assert_array_equal(x, colors)
+
+ x = random.multivariate_hypergeometric([3, 4, 5], 12, size=3,
+ method=method)
+ assert_array_equal(x, [[3, 4, 5]]*3)
+
+ # Cases for nsample:
+ # nsample < 10
+ # 10 <= nsample < colors.sum()/2
+ # colors.sum()/2 < nsample < colors.sum() - 10
+ # colors.sum() - 10 < nsample < colors.sum()
+ @pytest.mark.parametrize('nsample', [8, 25, 45, 55])
+ @pytest.mark.parametrize('method', ['count', 'marginals'])
+ @pytest.mark.parametrize('size', [5, (2, 3), 150000])
+ def test_typical_cases(self, nsample, method, size):
+ random = Generator(MT19937(self.seed))
+
+ colors = np.array([10, 5, 20, 25])
+ sample = random.multivariate_hypergeometric(colors, nsample, size,
+ method=method)
+ if isinstance(size, int):
+ expected_shape = (size,) + colors.shape
+ else:
+ expected_shape = size + colors.shape
+ assert_equal(sample.shape, expected_shape)
+ assert_((sample >= 0).all())
+ assert_((sample <= colors).all())
+ assert_array_equal(sample.sum(axis=-1),
+ np.full(size, fill_value=nsample, dtype=int))
+ if isinstance(size, int) and size >= 100000:
+ # This sample is large enough to compare its mean to
+ # the expected values.
+ assert_allclose(sample.mean(axis=0),
+ nsample * colors / colors.sum(),
+ rtol=1e-3, atol=0.005)
+
+ def test_repeatability1(self):
+ random = Generator(MT19937(self.seed))
+ sample = random.multivariate_hypergeometric([3, 4, 5], 5, size=5,
+ method='count')
+ expected = np.array([[2, 1, 2],
+ [2, 1, 2],
+ [1, 1, 3],
+ [2, 0, 3],
+ [2, 1, 2]])
+ assert_array_equal(sample, expected)
+
+ def test_repeatability2(self):
+ random = Generator(MT19937(self.seed))
+ sample = random.multivariate_hypergeometric([20, 30, 50], 50,
+ size=5,
+ method='marginals')
+ expected = np.array([[ 9, 17, 24],
+ [ 7, 13, 30],
+ [ 9, 15, 26],
+ [ 9, 17, 24],
+ [12, 14, 24]])
+ assert_array_equal(sample, expected)
+
+ def test_repeatability3(self):
+ random = Generator(MT19937(self.seed))
+ sample = random.multivariate_hypergeometric([20, 30, 50], 12,
+ size=5,
+ method='marginals')
+ expected = np.array([[2, 3, 7],
+ [5, 3, 4],
+ [2, 5, 5],
+ [5, 3, 4],
+ [1, 5, 6]])
+ assert_array_equal(sample, expected)
+
+
+class TestSetState:
+ def setup_method(self):
+ self.seed = 1234567890
+ self.rg = Generator(MT19937(self.seed))
+ self.bit_generator = self.rg.bit_generator
+ self.state = self.bit_generator.state
+ self.legacy_state = (self.state['bit_generator'],
+ self.state['state']['key'],
+ self.state['state']['pos'])
+
+ def test_gaussian_reset(self):
+ # Make sure the cached every-other-Gaussian is reset.
+ old = self.rg.standard_normal(size=3)
+ self.bit_generator.state = self.state
+ new = self.rg.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_gaussian_reset_in_media_res(self):
+ # When the state is saved with a cached Gaussian, make sure the
+ # cached Gaussian is restored.
+
+ self.rg.standard_normal()
+ state = self.bit_generator.state
+ old = self.rg.standard_normal(size=3)
+ self.bit_generator.state = state
+ new = self.rg.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_negative_binomial(self):
+ # Ensure that the negative binomial results take floating point
+ # arguments without truncation.
+ self.rg.negative_binomial(0.5, 0.5)
+
+
+class TestIntegers:
+ rfunc = random.integers
+
+ # valid integer/boolean types
+ itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
+ np.int32, np.uint32, np.int64, np.uint64]
+
+ def test_unsupported_type(self, endpoint):
+ assert_raises(TypeError, self.rfunc, 1, endpoint=endpoint, dtype=float)
+
+ def test_bounds_checking(self, endpoint):
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+ assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, ubnd, lbnd,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, 1, 0, endpoint=endpoint,
+ dtype=dt)
+
+ assert_raises(ValueError, self.rfunc, [lbnd - 1], ubnd,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, [lbnd], [ubnd + 1],
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, [ubnd], [lbnd],
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, 1, [0],
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, [ubnd+1], [ubnd],
+ endpoint=endpoint, dtype=dt)
+
+ def test_bounds_checking_array(self, endpoint):
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + (not endpoint)
+
+ assert_raises(ValueError, self.rfunc, [lbnd - 1] * 2, [ubnd] * 2,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, [lbnd] * 2,
+ [ubnd + 1] * 2, endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, ubnd, [lbnd] * 2,
+ endpoint=endpoint, dtype=dt)
+ assert_raises(ValueError, self.rfunc, [1] * 2, 0,
+ endpoint=endpoint, dtype=dt)
+
+ def test_rng_zero_and_extremes(self, endpoint):
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+ is_open = not endpoint
+
+ tgt = ubnd - 1
+ assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+ endpoint=endpoint, dtype=dt), tgt)
+ assert_equal(self.rfunc([tgt], tgt + is_open, size=1000,
+ endpoint=endpoint, dtype=dt), tgt)
+
+ tgt = lbnd
+ assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+ endpoint=endpoint, dtype=dt), tgt)
+ assert_equal(self.rfunc(tgt, [tgt + is_open], size=1000,
+ endpoint=endpoint, dtype=dt), tgt)
+
+ tgt = (lbnd + ubnd) // 2
+ assert_equal(self.rfunc(tgt, tgt + is_open, size=1000,
+ endpoint=endpoint, dtype=dt), tgt)
+ assert_equal(self.rfunc([tgt], [tgt + is_open],
+ size=1000, endpoint=endpoint, dtype=dt),
+ tgt)
+
+ def test_rng_zero_and_extremes_array(self, endpoint):
+ size = 1000
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ tgt = ubnd - 1
+ assert_equal(self.rfunc([tgt], [tgt + 1],
+ size=size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+ tgt = lbnd
+ assert_equal(self.rfunc([tgt], [tgt + 1],
+ size=size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+ tgt = (lbnd + ubnd) // 2
+ assert_equal(self.rfunc([tgt], [tgt + 1],
+ size=size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, dtype=dt), tgt)
+ assert_equal(self.rfunc(
+ [tgt] * size, [tgt + 1] * size, size=size, dtype=dt), tgt)
+
+ def test_full_range(self, endpoint):
+ # Test for ticket #1690
+
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ try:
+ self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+ except Exception as e:
+ raise AssertionError("No error should have been raised, "
+ "but one was with the following "
+ "message:\n\n%s" % str(e))
+
+ def test_full_range_array(self, endpoint):
+ # Test for ticket #1690
+
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ try:
+ self.rfunc([lbnd] * 2, [ubnd], endpoint=endpoint, dtype=dt)
+ except Exception as e:
+ raise AssertionError("No error should have been raised, "
+ "but one was with the following "
+ "message:\n\n%s" % str(e))
+
+ def test_in_bounds_fuzz(self, endpoint):
+ # Don't use fixed seed
+ random = Generator(MT19937())
+
+ for dt in self.itype[1:]:
+ for ubnd in [4, 8, 16]:
+ vals = self.rfunc(2, ubnd - endpoint, size=2 ** 16,
+ endpoint=endpoint, dtype=dt)
+ assert_(vals.max() < ubnd)
+ assert_(vals.min() >= 2)
+
+ vals = self.rfunc(0, 2 - endpoint, size=2 ** 16, endpoint=endpoint,
+ dtype=bool)
+ assert_(vals.max() < 2)
+ assert_(vals.min() >= 0)
+
+ def test_scalar_array_equiv(self, endpoint):
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ size = 1000
+ random = Generator(MT19937(1234))
+ scalar = random.integers(lbnd, ubnd, size=size, endpoint=endpoint,
+ dtype=dt)
+
+ random = Generator(MT19937(1234))
+ scalar_array = random.integers([lbnd], [ubnd], size=size,
+ endpoint=endpoint, dtype=dt)
+
+ random = Generator(MT19937(1234))
+ array = random.integers([lbnd] * size, [ubnd] *
+ size, size=size, endpoint=endpoint, dtype=dt)
+ assert_array_equal(scalar, scalar_array)
+ assert_array_equal(scalar, array)
+
+ def test_repeatability(self, endpoint):
+ # We use a sha256 hash of generated sequences of 1000 samples
+ # in the range [0, 6) for all but bool, where the range
+ # is [0, 2). Hashes are for little endian numbers.
+ tgt = {'bool': '053594a9b82d656f967c54869bc6970aa0358cf94ad469c81478459c6a90eee3',
+ 'int16': '54de9072b6ee9ff7f20b58329556a46a447a8a29d67db51201bf88baa6e4e5d4',
+ 'int32': 'd3a0d5efb04542b25ac712e50d21f39ac30f312a5052e9bbb1ad3baa791ac84b',
+ 'int64': '14e224389ac4580bfbdccb5697d6190b496f91227cf67df60989de3d546389b1',
+ 'int8': '0e203226ff3fbbd1580f15da4621e5f7164d0d8d6b51696dd42d004ece2cbec1',
+ 'uint16': '54de9072b6ee9ff7f20b58329556a46a447a8a29d67db51201bf88baa6e4e5d4',
+ 'uint32': 'd3a0d5efb04542b25ac712e50d21f39ac30f312a5052e9bbb1ad3baa791ac84b',
+ 'uint64': '14e224389ac4580bfbdccb5697d6190b496f91227cf67df60989de3d546389b1',
+ 'uint8': '0e203226ff3fbbd1580f15da4621e5f7164d0d8d6b51696dd42d004ece2cbec1'}
+
+ for dt in self.itype[1:]:
+ random = Generator(MT19937(1234))
+
+ # view as little endian for hash
+ if sys.byteorder == 'little':
+ val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
+ dtype=dt)
+ else:
+ val = random.integers(0, 6 - endpoint, size=1000, endpoint=endpoint,
+ dtype=dt).byteswap()
+
+ res = hashlib.sha256(val).hexdigest()
+ assert_(tgt[np.dtype(dt).name] == res)
+
+ # bools do not depend on endianness
+ random = Generator(MT19937(1234))
+ val = random.integers(0, 2 - endpoint, size=1000, endpoint=endpoint,
+ dtype=bool).view(np.int8)
+ res = hashlib.sha256(val).hexdigest()
+ assert_(tgt[np.dtype(bool).name] == res)
+
+ def test_repeatability_broadcasting(self, endpoint):
+ for dt in self.itype:
+ lbnd = 0 if dt in (bool, np.bool) else np.iinfo(dt).min
+ ubnd = 2 if dt in (bool, np.bool) else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ # view as little endian for hash
+ random = Generator(MT19937(1234))
+ val = random.integers(lbnd, ubnd, size=1000, endpoint=endpoint,
+ dtype=dt)
+
+ random = Generator(MT19937(1234))
+ val_bc = random.integers([lbnd] * 1000, ubnd, endpoint=endpoint,
+ dtype=dt)
+
+ assert_array_equal(val, val_bc)
+
+ random = Generator(MT19937(1234))
+ val_bc = random.integers([lbnd] * 1000, [ubnd] * 1000,
+ endpoint=endpoint, dtype=dt)
+
+ assert_array_equal(val, val_bc)
+
+ @pytest.mark.parametrize(
+ 'bound, expected',
+ [(2**32 - 1, np.array([517043486, 1364798665, 1733884389, 1353720612,
+ 3769704066, 1170797179, 4108474671])),
+ (2**32, np.array([517043487, 1364798666, 1733884390, 1353720613,
+ 3769704067, 1170797180, 4108474672])),
+ (2**32 + 1, np.array([517043487, 1733884390, 3769704068, 4108474673,
+ 1831631863, 1215661561, 3869512430]))]
+ )
+ def test_repeatability_32bit_boundary(self, bound, expected):
+ for size in [None, len(expected)]:
+ random = Generator(MT19937(1234))
+ x = random.integers(bound, size=size)
+ assert_equal(x, expected if size is not None else expected[0])
+
+ def test_repeatability_32bit_boundary_broadcasting(self):
+ desired = np.array([[[1622936284, 3620788691, 1659384060],
+ [1417365545, 760222891, 1909653332],
+ [3788118662, 660249498, 4092002593]],
+ [[3625610153, 2979601262, 3844162757],
+ [ 685800658, 120261497, 2694012896],
+ [1207779440, 1586594375, 3854335050]],
+ [[3004074748, 2310761796, 3012642217],
+ [2067714190, 2786677879, 1363865881],
+ [ 791663441, 1867303284, 2169727960]],
+ [[1939603804, 1250951100, 298950036],
+ [1040128489, 3791912209, 3317053765],
+ [3155528714, 61360675, 2305155588]],
+ [[ 817688762, 1335621943, 3288952434],
+ [1770890872, 1102951817, 1957607470],
+ [3099996017, 798043451, 48334215]]])
+ for size in [None, (5, 3, 3)]:
+ random = Generator(MT19937(12345))
+ x = random.integers([[-1], [0], [1]],
+ [2**32 - 1, 2**32, 2**32 + 1],
+ size=size)
+ assert_array_equal(x, desired if size is not None else desired[0])
+
+ def test_int64_uint64_broadcast_exceptions(self, endpoint):
+ configs = {np.uint64: ((0, 2**65), (-1, 2**62), (10, 9), (0, 0)),
+ np.int64: ((0, 2**64), (-(2**64), 2**62), (10, 9), (0, 0),
+ (-2**63-1, -2**63-1))}
+ for dtype in configs:
+ for config in configs[dtype]:
+ low, high = config
+ high = high - endpoint
+ low_a = np.array([[low]*10])
+ high_a = np.array([high] * 10)
+ assert_raises(ValueError, random.integers, low, high,
+ endpoint=endpoint, dtype=dtype)
+ assert_raises(ValueError, random.integers, low_a, high,
+ endpoint=endpoint, dtype=dtype)
+ assert_raises(ValueError, random.integers, low, high_a,
+ endpoint=endpoint, dtype=dtype)
+ assert_raises(ValueError, random.integers, low_a, high_a,
+ endpoint=endpoint, dtype=dtype)
+
+ low_o = np.array([[low]*10], dtype=object)
+ high_o = np.array([high] * 10, dtype=object)
+ assert_raises(ValueError, random.integers, low_o, high,
+ endpoint=endpoint, dtype=dtype)
+ assert_raises(ValueError, random.integers, low, high_o,
+ endpoint=endpoint, dtype=dtype)
+ assert_raises(ValueError, random.integers, low_o, high_o,
+ endpoint=endpoint, dtype=dtype)
+
+ def test_int64_uint64_corner_case(self, endpoint):
+ # When stored in Numpy arrays, `lbnd` is casted
+ # as np.int64, and `ubnd` is casted as np.uint64.
+ # Checking whether `lbnd` >= `ubnd` used to be
+ # done solely via direct comparison, which is incorrect
+ # because when Numpy tries to compare both numbers,
+ # it casts both to np.float64 because there is
+ # no integer superset of np.int64 and np.uint64. However,
+ # `ubnd` is too large to be represented in np.float64,
+ # causing it be round down to np.iinfo(np.int64).max,
+ # leading to a ValueError because `lbnd` now equals
+ # the new `ubnd`.
+
+ dt = np.int64
+ tgt = np.iinfo(np.int64).max
+ lbnd = np.int64(np.iinfo(np.int64).max)
+ ubnd = np.uint64(np.iinfo(np.int64).max + 1 - endpoint)
+
+ # None of these function calls should
+ # generate a ValueError now.
+ actual = random.integers(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+ assert_equal(actual, tgt)
+
+ def test_respect_dtype_singleton(self, endpoint):
+ # See gh-7203
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+ dt = np.bool if dt is bool else dt
+
+ sample = self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+ assert_equal(sample.dtype, dt)
+
+ for dt in (bool, int):
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+
+ # gh-7284: Ensure that we get Python data types
+ sample = self.rfunc(lbnd, ubnd, endpoint=endpoint, dtype=dt)
+ assert not hasattr(sample, 'dtype')
+ assert_equal(type(sample), dt)
+
+ def test_respect_dtype_array(self, endpoint):
+ # See gh-7203
+ for dt in self.itype:
+ lbnd = 0 if dt is bool else np.iinfo(dt).min
+ ubnd = 2 if dt is bool else np.iinfo(dt).max + 1
+ ubnd = ubnd - 1 if endpoint else ubnd
+ dt = np.bool if dt is bool else dt
+
+ sample = self.rfunc([lbnd], [ubnd], endpoint=endpoint, dtype=dt)
+ assert_equal(sample.dtype, dt)
+ sample = self.rfunc([lbnd] * 2, [ubnd] * 2, endpoint=endpoint,
+ dtype=dt)
+ assert_equal(sample.dtype, dt)
+
+ def test_zero_size(self, endpoint):
+ # See gh-7203
+ for dt in self.itype:
+ sample = self.rfunc(0, 0, (3, 0, 4), endpoint=endpoint, dtype=dt)
+ assert sample.shape == (3, 0, 4)
+ assert sample.dtype == dt
+ assert self.rfunc(0, -10, 0, endpoint=endpoint,
+ dtype=dt).shape == (0,)
+ assert_equal(random.integers(0, 0, size=(3, 0, 4)).shape,
+ (3, 0, 4))
+ assert_equal(random.integers(0, -10, size=0).shape, (0,))
+ assert_equal(random.integers(10, 10, size=0).shape, (0,))
+
+ def test_error_byteorder(self):
+ other_byteord_dt = 'i4'
+ with pytest.raises(ValueError):
+ random.integers(0, 200, size=10, dtype=other_byteord_dt)
+
+ # chi2max is the maximum acceptable chi-squared value.
+ @pytest.mark.slow
+ @pytest.mark.parametrize('sample_size,high,dtype,chi2max',
+ [(5000000, 5, np.int8, 125.0), # p-value ~4.6e-25
+ (5000000, 7, np.uint8, 150.0), # p-value ~7.7e-30
+ (10000000, 2500, np.int16, 3300.0), # p-value ~3.0e-25
+ (50000000, 5000, np.uint16, 6500.0), # p-value ~3.5e-25
+ ])
+ def test_integers_small_dtype_chisquared(self, sample_size, high,
+ dtype, chi2max):
+ # Regression test for gh-14774.
+ samples = random.integers(high, size=sample_size, dtype=dtype)
+
+ values, counts = np.unique(samples, return_counts=True)
+ expected = sample_size / high
+ chi2 = ((counts - expected)**2 / expected).sum()
+ assert chi2 < chi2max
+
+
+class TestRandomDist:
+ # Make sure the random distribution returns the correct value for a
+ # given seed
+
+ def setup_method(self):
+ self.seed = 1234567890
+
+ def test_integers(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.integers(-99, 99, size=(3, 2))
+ desired = np.array([[-80, -56], [41, 37], [-83, -16]])
+ assert_array_equal(actual, desired)
+
+ def test_integers_masked(self):
+ # Test masked rejection sampling algorithm to generate array of
+ # uint32 in an interval.
+ random = Generator(MT19937(self.seed))
+ actual = random.integers(0, 99, size=(3, 2), dtype=np.uint32)
+ desired = np.array([[9, 21], [70, 68], [8, 41]], dtype=np.uint32)
+ assert_array_equal(actual, desired)
+
+ def test_integers_closed(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.integers(-99, 99, size=(3, 2), endpoint=True)
+ desired = np.array([[-80, -56], [ 41, 38], [-83, -15]])
+ assert_array_equal(actual, desired)
+
+ def test_integers_max_int(self):
+ # Tests whether integers with closed=True can generate the
+ # maximum allowed Python int that can be converted
+ # into a C long. Previous implementations of this
+ # method have thrown an OverflowError when attempting
+ # to generate this integer.
+ actual = random.integers(np.iinfo('l').max, np.iinfo('l').max,
+ endpoint=True)
+
+ desired = np.iinfo('l').max
+ assert_equal(actual, desired)
+
+ def test_random(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.random((3, 2))
+ desired = np.array([[0.096999199829214, 0.707517457682192],
+ [0.084364834598269, 0.767731206553125],
+ [0.665069021359413, 0.715487190596693]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.random()
+ assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+ def test_random_float(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.random((3, 2))
+ desired = np.array([[0.0969992 , 0.70751746],
+ [0.08436483, 0.76773121],
+ [0.66506902, 0.71548719]])
+ assert_array_almost_equal(actual, desired, decimal=7)
+
+ def test_random_float_scalar(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.random(dtype=np.float32)
+ desired = 0.0969992
+ assert_array_almost_equal(actual, desired, decimal=7)
+
+ @pytest.mark.parametrize('dtype, uint_view_type',
+ [(np.float32, np.uint32),
+ (np.float64, np.uint64)])
+ def test_random_distribution_of_lsb(self, dtype, uint_view_type):
+ random = Generator(MT19937(self.seed))
+ sample = random.random(100000, dtype=dtype)
+ num_ones_in_lsb = np.count_nonzero(sample.view(uint_view_type) & 1)
+ # The probability of a 1 in the least significant bit is 0.25.
+ # With a sample size of 100000, the probability that num_ones_in_lsb
+ # is outside the following range is less than 5e-11.
+ assert 24100 < num_ones_in_lsb < 25900
+
+ def test_random_unsupported_type(self):
+ assert_raises(TypeError, random.random, dtype='int32')
+
+ def test_choice_uniform_replace(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(4, 4)
+ desired = np.array([0, 0, 2, 2], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_replace(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+ desired = np.array([0, 1, 0, 1], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ def test_choice_uniform_noreplace(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(4, 3, replace=False)
+ desired = np.array([2, 0, 3], dtype=np.int64)
+ assert_array_equal(actual, desired)
+ actual = random.choice(4, 4, replace=False, shuffle=False)
+ desired = np.arange(4, dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_noreplace(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(4, 3, replace=False, p=[0.1, 0.3, 0.5, 0.1])
+ desired = np.array([0, 2, 3], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ def test_choice_noninteger(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(['a', 'b', 'c', 'd'], 4)
+ desired = np.array(['a', 'a', 'c', 'c'])
+ assert_array_equal(actual, desired)
+
+ def test_choice_multidimensional_default_axis(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice([[0, 1], [2, 3], [4, 5], [6, 7]], 3)
+ desired = np.array([[0, 1], [0, 1], [4, 5]])
+ assert_array_equal(actual, desired)
+
+ def test_choice_multidimensional_custom_axis(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.choice([[0, 1], [2, 3], [4, 5], [6, 7]], 1, axis=1)
+ desired = np.array([[0], [2], [4], [6]])
+ assert_array_equal(actual, desired)
+
+ def test_choice_exceptions(self):
+ sample = random.choice
+ assert_raises(ValueError, sample, -1, 3)
+ assert_raises(ValueError, sample, 3., 3)
+ assert_raises(ValueError, sample, [], 3)
+ assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+ p=[[0.25, 0.25], [0.25, 0.25]])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+ assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+ # gh-13087
+ assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], 2,
+ replace=False, p=[1, 0, 0])
+
+ def test_choice_return_shape(self):
+ p = [0.1, 0.9]
+ # Check scalar
+ assert_(np.isscalar(random.choice(2, replace=True)))
+ assert_(np.isscalar(random.choice(2, replace=False)))
+ assert_(np.isscalar(random.choice(2, replace=True, p=p)))
+ assert_(np.isscalar(random.choice(2, replace=False, p=p)))
+ assert_(np.isscalar(random.choice([1, 2], replace=True)))
+ assert_(random.choice([None], replace=True) is None)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(random.choice(arr, replace=True) is a)
+
+ # Check 0-d array
+ s = tuple()
+ assert_(not np.isscalar(random.choice(2, s, replace=True)))
+ assert_(not np.isscalar(random.choice(2, s, replace=False)))
+ assert_(not np.isscalar(random.choice(2, s, replace=True, p=p)))
+ assert_(not np.isscalar(random.choice(2, s, replace=False, p=p)))
+ assert_(not np.isscalar(random.choice([1, 2], s, replace=True)))
+ assert_(random.choice([None], s, replace=True).ndim == 0)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(random.choice(arr, s, replace=True).item() is a)
+
+ # Check multi dimensional array
+ s = (2, 3)
+ p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+ assert_equal(random.choice(6, s, replace=True).shape, s)
+ assert_equal(random.choice(6, s, replace=False).shape, s)
+ assert_equal(random.choice(6, s, replace=True, p=p).shape, s)
+ assert_equal(random.choice(6, s, replace=False, p=p).shape, s)
+ assert_equal(random.choice(np.arange(6), s, replace=True).shape, s)
+
+ # Check zero-size
+ assert_equal(random.integers(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+ assert_equal(random.integers(0, -10, size=0).shape, (0,))
+ assert_equal(random.integers(10, 10, size=0).shape, (0,))
+ assert_equal(random.choice(0, size=0).shape, (0,))
+ assert_equal(random.choice([], size=(0,)).shape, (0,))
+ assert_equal(random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+ (3, 0, 4))
+ assert_raises(ValueError, random.choice, [], 10)
+
+ def test_choice_nan_probabilities(self):
+ a = np.array([42, 1, 2])
+ p = [None, None, None]
+ assert_raises(ValueError, random.choice, a, p=p)
+
+ def test_choice_p_non_contiguous(self):
+ p = np.ones(10) / 5
+ p[1::2] = 3.0
+ random = Generator(MT19937(self.seed))
+ non_contig = random.choice(5, 3, p=p[::2])
+ random = Generator(MT19937(self.seed))
+ contig = random.choice(5, 3, p=np.ascontiguousarray(p[::2]))
+ assert_array_equal(non_contig, contig)
+
+ def test_choice_return_type(self):
+ # gh 9867
+ p = np.ones(4) / 4.
+ actual = random.choice(4, 2)
+ assert actual.dtype == np.int64
+ actual = random.choice(4, 2, replace=False)
+ assert actual.dtype == np.int64
+ actual = random.choice(4, 2, p=p)
+ assert actual.dtype == np.int64
+ actual = random.choice(4, 2, p=p, replace=False)
+ assert actual.dtype == np.int64
+
+ def test_choice_large_sample(self):
+ choice_hash = '4266599d12bfcfb815213303432341c06b4349f5455890446578877bb322e222'
+ random = Generator(MT19937(self.seed))
+ actual = random.choice(10000, 5000, replace=False)
+ if sys.byteorder != 'little':
+ actual = actual.byteswap()
+ res = hashlib.sha256(actual.view(np.int8)).hexdigest()
+ assert_(choice_hash == res)
+
+ def test_choice_array_size_empty_tuple(self):
+ random = Generator(MT19937(self.seed))
+ assert_array_equal(random.choice([1, 2, 3], size=()), np.array(1),
+ strict=True)
+ assert_array_equal(random.choice([[1, 2, 3]], size=()), [1, 2, 3])
+ assert_array_equal(random.choice([[1]], size=()), [1], strict=True)
+ assert_array_equal(random.choice([[1]], size=(), axis=1), [1],
+ strict=True)
+
+ def test_bytes(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.bytes(10)
+ desired = b'\x86\xf0\xd4\x18\xe1\x81\t8%\xdd'
+ assert_equal(actual, desired)
+
+ def test_shuffle(self):
+ # Test lists, arrays (of various dtypes), and multidimensional versions
+ # of both, c-contiguous or not:
+ for conv in [lambda x: np.array([]),
+ lambda x: x,
+ lambda x: np.asarray(x).astype(np.int8),
+ lambda x: np.asarray(x).astype(np.float32),
+ lambda x: np.asarray(x).astype(np.complex64),
+ lambda x: np.asarray(x).astype(object),
+ lambda x: [(i, i) for i in x],
+ lambda x: np.asarray([[i, i] for i in x]),
+ lambda x: np.vstack([x, x]).T,
+ # gh-11442
+ lambda x: (np.asarray([(i, i) for i in x],
+ [("a", int), ("b", int)])
+ .view(np.recarray)),
+ # gh-4270
+ lambda x: np.asarray([(i, i) for i in x],
+ [("a", object, (1,)),
+ ("b", np.int32, (1,))])]:
+ random = Generator(MT19937(self.seed))
+ alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+ random.shuffle(alist)
+ actual = alist
+ desired = conv([4, 1, 9, 8, 0, 5, 3, 6, 2, 7])
+ assert_array_equal(actual, desired)
+
+ def test_shuffle_custom_axis(self):
+ random = Generator(MT19937(self.seed))
+ actual = np.arange(16).reshape((4, 4))
+ random.shuffle(actual, axis=1)
+ desired = np.array([[ 0, 3, 1, 2],
+ [ 4, 7, 5, 6],
+ [ 8, 11, 9, 10],
+ [12, 15, 13, 14]])
+ assert_array_equal(actual, desired)
+ random = Generator(MT19937(self.seed))
+ actual = np.arange(16).reshape((4, 4))
+ random.shuffle(actual, axis=-1)
+ assert_array_equal(actual, desired)
+
+ def test_shuffle_custom_axis_empty(self):
+ random = Generator(MT19937(self.seed))
+ desired = np.array([]).reshape((0, 6))
+ for axis in (0, 1):
+ actual = np.array([]).reshape((0, 6))
+ random.shuffle(actual, axis=axis)
+ assert_array_equal(actual, desired)
+
+ def test_shuffle_axis_nonsquare(self):
+ y1 = np.arange(20).reshape(2, 10)
+ y2 = y1.copy()
+ random = Generator(MT19937(self.seed))
+ random.shuffle(y1, axis=1)
+ random = Generator(MT19937(self.seed))
+ random.shuffle(y2.T)
+ assert_array_equal(y1, y2)
+
+ def test_shuffle_masked(self):
+ # gh-3263
+ a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+ b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+ a_orig = a.copy()
+ b_orig = b.copy()
+ for i in range(50):
+ random.shuffle(a)
+ assert_equal(
+ sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+ random.shuffle(b)
+ assert_equal(
+ sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+ def test_shuffle_exceptions(self):
+ random = Generator(MT19937(self.seed))
+ arr = np.arange(10)
+ assert_raises(AxisError, random.shuffle, arr, 1)
+ arr = np.arange(9).reshape((3, 3))
+ assert_raises(AxisError, random.shuffle, arr, 3)
+ assert_raises(TypeError, random.shuffle, arr, slice(1, 2, None))
+ arr = [[1, 2, 3], [4, 5, 6]]
+ assert_raises(NotImplementedError, random.shuffle, arr, 1)
+
+ arr = np.array(3)
+ assert_raises(TypeError, random.shuffle, arr)
+ arr = np.ones((3, 2))
+ assert_raises(AxisError, random.shuffle, arr, 2)
+
+ def test_shuffle_not_writeable(self):
+ random = Generator(MT19937(self.seed))
+ a = np.zeros(5)
+ a.flags.writeable = False
+ with pytest.raises(ValueError, match='read-only'):
+ random.shuffle(a)
+
+ def test_permutation(self):
+ random = Generator(MT19937(self.seed))
+ alist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
+ actual = random.permutation(alist)
+ desired = [4, 1, 9, 8, 0, 5, 3, 6, 2, 7]
+ assert_array_equal(actual, desired)
+
+ random = Generator(MT19937(self.seed))
+ arr_2d = np.atleast_2d([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]).T
+ actual = random.permutation(arr_2d)
+ assert_array_equal(actual, np.atleast_2d(desired).T)
+
+ bad_x_str = "abcd"
+ assert_raises(AxisError, random.permutation, bad_x_str)
+
+ bad_x_float = 1.2
+ assert_raises(AxisError, random.permutation, bad_x_float)
+
+ random = Generator(MT19937(self.seed))
+ integer_val = 10
+ desired = [3, 0, 8, 7, 9, 4, 2, 5, 1, 6]
+
+ actual = random.permutation(integer_val)
+ assert_array_equal(actual, desired)
+
+ def test_permutation_custom_axis(self):
+ a = np.arange(16).reshape((4, 4))
+ desired = np.array([[ 0, 3, 1, 2],
+ [ 4, 7, 5, 6],
+ [ 8, 11, 9, 10],
+ [12, 15, 13, 14]])
+ random = Generator(MT19937(self.seed))
+ actual = random.permutation(a, axis=1)
+ assert_array_equal(actual, desired)
+ random = Generator(MT19937(self.seed))
+ actual = random.permutation(a, axis=-1)
+ assert_array_equal(actual, desired)
+
+ def test_permutation_exceptions(self):
+ random = Generator(MT19937(self.seed))
+ arr = np.arange(10)
+ assert_raises(AxisError, random.permutation, arr, 1)
+ arr = np.arange(9).reshape((3, 3))
+ assert_raises(AxisError, random.permutation, arr, 3)
+ assert_raises(TypeError, random.permutation, arr, slice(1, 2, None))
+
+ @pytest.mark.parametrize("dtype", [int, object])
+ @pytest.mark.parametrize("axis, expected",
+ [(None, np.array([[3, 7, 0, 9, 10, 11],
+ [8, 4, 2, 5, 1, 6]])),
+ (0, np.array([[6, 1, 2, 9, 10, 11],
+ [0, 7, 8, 3, 4, 5]])),
+ (1, np.array([[ 5, 3, 4, 0, 2, 1],
+ [11, 9, 10, 6, 8, 7]]))])
+ def test_permuted(self, dtype, axis, expected):
+ random = Generator(MT19937(self.seed))
+ x = np.arange(12).reshape(2, 6).astype(dtype)
+ random.permuted(x, axis=axis, out=x)
+ assert_array_equal(x, expected)
+
+ random = Generator(MT19937(self.seed))
+ x = np.arange(12).reshape(2, 6).astype(dtype)
+ y = random.permuted(x, axis=axis)
+ assert y.dtype == dtype
+ assert_array_equal(y, expected)
+
+ def test_permuted_with_strides(self):
+ random = Generator(MT19937(self.seed))
+ x0 = np.arange(22).reshape(2, 11)
+ x1 = x0.copy()
+ x = x0[:, ::3]
+ y = random.permuted(x, axis=1, out=x)
+ expected = np.array([[0, 9, 3, 6],
+ [14, 20, 11, 17]])
+ assert_array_equal(y, expected)
+ x1[:, ::3] = expected
+ # Verify that the original x0 was modified in-place as expected.
+ assert_array_equal(x1, x0)
+
+ def test_permuted_empty(self):
+ y = random.permuted([])
+ assert_array_equal(y, [])
+
+ @pytest.mark.parametrize('outshape', [(2, 3), 5])
+ def test_permuted_out_with_wrong_shape(self, outshape):
+ a = np.array([1, 2, 3])
+ out = np.zeros(outshape, dtype=a.dtype)
+ with pytest.raises(ValueError, match='same shape'):
+ random.permuted(a, out=out)
+
+ def test_permuted_out_with_wrong_type(self):
+ out = np.zeros((3, 5), dtype=np.int32)
+ x = np.ones((3, 5))
+ with pytest.raises(TypeError, match='Cannot cast'):
+ random.permuted(x, axis=1, out=out)
+
+ def test_permuted_not_writeable(self):
+ x = np.zeros((2, 5))
+ x.flags.writeable = False
+ with pytest.raises(ValueError, match='read-only'):
+ random.permuted(x, axis=1, out=x)
+
+ def test_beta(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.beta(.1, .9, size=(3, 2))
+ desired = np.array(
+ [[1.083029353267698e-10, 2.449965303168024e-11],
+ [2.397085162969853e-02, 3.590779671820755e-08],
+ [2.830254190078299e-04, 1.744709918330393e-01]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_binomial(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.binomial(100.123, .456, size=(3, 2))
+ desired = np.array([[42, 41],
+ [42, 48],
+ [44, 50]])
+ assert_array_equal(actual, desired)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.binomial(100.123, .456)
+ desired = 42
+ assert_array_equal(actual, desired)
+
+ def test_chisquare(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.chisquare(50, size=(3, 2))
+ desired = np.array([[32.9850547060149, 39.0219480493301],
+ [56.2006134779419, 57.3474165711485],
+ [55.4243733880198, 55.4209797925213]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_dirichlet(self):
+ random = Generator(MT19937(self.seed))
+ alpha = np.array([51.72840233779265162, 39.74494232180943953])
+ actual = random.dirichlet(alpha, size=(3, 2))
+ desired = np.array([[[0.5439892869558927, 0.45601071304410745],
+ [0.5588917345860708, 0.4411082654139292 ]],
+ [[0.5632074165063435, 0.43679258349365657],
+ [0.54862581112627, 0.45137418887373015]],
+ [[0.49961831357047226, 0.5003816864295278 ],
+ [0.52374806183482, 0.47625193816517997]]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+ bad_alpha = np.array([5.4e-01, -1.0e-16])
+ assert_raises(ValueError, random.dirichlet, bad_alpha)
+
+ random = Generator(MT19937(self.seed))
+ alpha = np.array([51.72840233779265162, 39.74494232180943953])
+ actual = random.dirichlet(alpha)
+ assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+ def test_dirichlet_size(self):
+ # gh-3173
+ p = np.array([51.72840233779265162, 39.74494232180943953])
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+ assert_raises(TypeError, random.dirichlet, p, float(1))
+
+ def test_dirichlet_bad_alpha(self):
+ # gh-2089
+ alpha = np.array([5.4e-01, -1.0e-16])
+ assert_raises(ValueError, random.dirichlet, alpha)
+
+ # gh-15876
+ assert_raises(ValueError, random.dirichlet, [[5, 1]])
+ assert_raises(ValueError, random.dirichlet, [[5], [1]])
+ assert_raises(ValueError, random.dirichlet, [[[5], [1]], [[1], [5]]])
+ assert_raises(ValueError, random.dirichlet, np.array([[5, 1], [1, 5]]))
+
+ def test_dirichlet_alpha_non_contiguous(self):
+ a = np.array([51.72840233779265162, -1.0, 39.74494232180943953])
+ alpha = a[::2]
+ random = Generator(MT19937(self.seed))
+ non_contig = random.dirichlet(alpha, size=(3, 2))
+ random = Generator(MT19937(self.seed))
+ contig = random.dirichlet(np.ascontiguousarray(alpha),
+ size=(3, 2))
+ assert_array_almost_equal(non_contig, contig)
+
+ def test_dirichlet_small_alpha(self):
+ eps = 1.0e-9 # 1.0e-10 -> runtime x 10; 1e-11 -> runtime x 200, etc.
+ alpha = eps * np.array([1., 1.0e-3])
+ random = Generator(MT19937(self.seed))
+ actual = random.dirichlet(alpha, size=(3, 2))
+ expected = np.array([
+ [[1., 0.],
+ [1., 0.]],
+ [[1., 0.],
+ [1., 0.]],
+ [[1., 0.],
+ [1., 0.]]
+ ])
+ assert_array_almost_equal(actual, expected, decimal=15)
+
+ @pytest.mark.slow
+ def test_dirichlet_moderately_small_alpha(self):
+ # Use alpha.max() < 0.1 to trigger stick breaking code path
+ alpha = np.array([0.02, 0.04])
+ exact_mean = alpha / alpha.sum()
+ random = Generator(MT19937(self.seed))
+ sample = random.dirichlet(alpha, size=20000000)
+ sample_mean = sample.mean(axis=0)
+ assert_allclose(sample_mean, exact_mean, rtol=1e-3)
+
+ # This set of parameters includes inputs with alpha.max() >= 0.1 and
+ # alpha.max() < 0.1 to exercise both generation methods within the
+ # dirichlet code.
+ @pytest.mark.parametrize(
+ 'alpha',
+ [[5, 9, 0, 8],
+ [0.5, 0, 0, 0],
+ [1, 5, 0, 0, 1.5, 0, 0, 0],
+ [0.01, 0.03, 0, 0.005],
+ [1e-5, 0, 0, 0],
+ [0.002, 0.015, 0, 0, 0.04, 0, 0, 0],
+ [0.0],
+ [0, 0, 0]],
+ )
+ def test_dirichlet_multiple_zeros_in_alpha(self, alpha):
+ alpha = np.array(alpha)
+ y = random.dirichlet(alpha)
+ assert_equal(y[alpha == 0], 0.0)
+
+ def test_exponential(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.exponential(1.1234, size=(3, 2))
+ desired = np.array([[0.098845481066258, 1.560752510746964],
+ [0.075730916041636, 1.769098974710777],
+ [1.488602544592235, 2.49684815275751 ]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_exponential_0(self):
+ assert_equal(random.exponential(scale=0), 0)
+ assert_raises(ValueError, random.exponential, scale=-0.)
+
+ def test_f(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.f(12, 77, size=(3, 2))
+ desired = np.array([[0.461720027077085, 1.100441958872451],
+ [1.100337455217484, 0.91421736740018 ],
+ [0.500811891303113, 0.826802454552058]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gamma(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.gamma(5, 3, size=(3, 2))
+ desired = np.array([[ 5.03850858902096, 7.9228656732049 ],
+ [18.73983605132985, 19.57961681699238],
+ [18.17897755150825, 18.17653912505234]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_gamma_0(self):
+ assert_equal(random.gamma(shape=0, scale=0), 0)
+ assert_raises(ValueError, random.gamma, shape=-0., scale=-0.)
+
+ def test_geometric(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.geometric(.123456789, size=(3, 2))
+ desired = np.array([[1, 11],
+ [1, 12],
+ [11, 17]])
+ assert_array_equal(actual, desired)
+
+ def test_geometric_exceptions(self):
+ assert_raises(ValueError, random.geometric, 1.1)
+ assert_raises(ValueError, random.geometric, [1.1] * 10)
+ assert_raises(ValueError, random.geometric, -0.1)
+ assert_raises(ValueError, random.geometric, [-0.1] * 10)
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, random.geometric, np.nan)
+ assert_raises(ValueError, random.geometric, [np.nan] * 10)
+
+ def test_gumbel(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[ 4.688397515056245, -0.289514845417841],
+ [ 4.981176042584683, -0.633224272589149],
+ [-0.055915275687488, -0.333962478257953]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gumbel_0(self):
+ assert_equal(random.gumbel(scale=0), 0)
+ assert_raises(ValueError, random.gumbel, scale=-0.)
+
+ def test_hypergeometric(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.hypergeometric(10.1, 5.5, 14, size=(3, 2))
+ desired = np.array([[ 9, 9],
+ [ 9, 9],
+ [10, 9]])
+ assert_array_equal(actual, desired)
+
+ # Test nbad = 0
+ actual = random.hypergeometric(5, 0, 3, size=4)
+ desired = np.array([3, 3, 3, 3])
+ assert_array_equal(actual, desired)
+
+ actual = random.hypergeometric(15, 0, 12, size=4)
+ desired = np.array([12, 12, 12, 12])
+ assert_array_equal(actual, desired)
+
+ # Test ngood = 0
+ actual = random.hypergeometric(0, 5, 3, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ actual = random.hypergeometric(0, 15, 12, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ def test_laplace(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[-3.156353949272393, 1.195863024830054],
+ [-3.435458081645966, 1.656882398925444],
+ [ 0.924824032467446, 1.251116432209336]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_laplace_0(self):
+ assert_equal(random.laplace(scale=0), 0)
+ assert_raises(ValueError, random.laplace, scale=-0.)
+
+ def test_logistic(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[-4.338584631510999, 1.890171436749954],
+ [-4.64547787337966 , 2.514545562919217],
+ [ 1.495389489198666, 1.967827627577474]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_lognormal(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+ desired = np.array([[ 0.0268252166335, 13.9534486483053],
+ [ 0.1204014788936, 2.2422077497792],
+ [ 4.2484199496128, 12.0093343977523]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_lognormal_0(self):
+ assert_equal(random.lognormal(sigma=0), 1)
+ assert_raises(ValueError, random.lognormal, sigma=-0.)
+
+ def test_logseries(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.logseries(p=.923456789, size=(3, 2))
+ desired = np.array([[14, 17],
+ [3, 18],
+ [5, 1]])
+ assert_array_equal(actual, desired)
+
+ def test_logseries_zero(self):
+ random = Generator(MT19937(self.seed))
+ assert random.logseries(0) == 1
+
+ @pytest.mark.parametrize("value", [np.nextafter(0., -1), 1., np.nan, 5.])
+ def test_logseries_exceptions(self, value):
+ random = Generator(MT19937(self.seed))
+ with np.errstate(invalid="ignore"):
+ with pytest.raises(ValueError):
+ random.logseries(value)
+ with pytest.raises(ValueError):
+ # contiguous path:
+ random.logseries(np.array([value] * 10))
+ with pytest.raises(ValueError):
+ # non-contiguous path:
+ random.logseries(np.array([value] * 10)[::2])
+
+ def test_multinomial(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial(20, [1 / 6.] * 6, size=(3, 2))
+ desired = np.array([[[1, 5, 1, 6, 4, 3],
+ [4, 2, 6, 2, 4, 2]],
+ [[5, 3, 2, 6, 3, 1],
+ [4, 4, 0, 2, 3, 7]],
+ [[6, 3, 1, 5, 3, 2],
+ [5, 5, 3, 1, 2, 4]]])
+ assert_array_equal(actual, desired)
+
+ @pytest.mark.skipif(IS_WASM, reason="fp errors don't work in wasm")
+ @pytest.mark.parametrize("method", ["svd", "eigh", "cholesky"])
+ def test_multivariate_normal(self, method):
+ random = Generator(MT19937(self.seed))
+ mean = (.123456789, 10)
+ cov = [[1, 0], [0, 1]]
+ size = (3, 2)
+ actual = random.multivariate_normal(mean, cov, size, method=method)
+ desired = np.array([[[-1.747478062846581, 11.25613495182354 ],
+ [-0.9967333370066214, 10.342002097029821 ]],
+ [[ 0.7850019631242964, 11.181113712443013 ],
+ [ 0.8901349653255224, 8.873825399642492 ]],
+ [[ 0.7130260107430003, 9.551628690083056 ],
+ [ 0.7127098726541128, 11.991709234143173 ]]])
+
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ # Check for default size, was raising deprecation warning
+ actual = random.multivariate_normal(mean, cov, method=method)
+ desired = np.array([0.233278563284287, 9.424140804347195])
+ assert_array_almost_equal(actual, desired, decimal=15)
+ # Check that non symmetric covariance input raises exception when
+ # check_valid='raises' if using default svd method.
+ mean = [0, 0]
+ cov = [[1, 2], [1, 2]]
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='raise')
+
+ # Check that non positive-semidefinite covariance warns with
+ # RuntimeWarning
+ cov = [[1, 2], [2, 1]]
+ assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov)
+ assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov,
+ method='eigh')
+ assert_raises(LinAlgError, random.multivariate_normal, mean, cov,
+ method='cholesky')
+
+ # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+ assert_no_warnings(random.multivariate_normal, mean, cov,
+ check_valid='ignore')
+
+ # and that it raises with RuntimeWarning check_valid='raises'
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='raise')
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='raise', method='eigh')
+
+ # check degenerate samples from singular covariance matrix
+ cov = [[1, 1], [1, 1]]
+ if method in ('svd', 'eigh'):
+ samples = random.multivariate_normal(mean, cov, size=(3, 2),
+ method=method)
+ assert_array_almost_equal(samples[..., 0], samples[..., 1],
+ decimal=6)
+ else:
+ assert_raises(LinAlgError, random.multivariate_normal, mean, cov,
+ method='cholesky')
+
+ cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+ with suppress_warnings() as sup:
+ random.multivariate_normal(mean, cov, method=method)
+ w = sup.record(RuntimeWarning)
+ assert len(w) == 0
+
+ mu = np.zeros(2)
+ cov = np.eye(2)
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='other')
+ assert_raises(ValueError, random.multivariate_normal,
+ np.zeros((2, 1, 1)), cov)
+ assert_raises(ValueError, random.multivariate_normal,
+ mu, np.empty((3, 2)))
+ assert_raises(ValueError, random.multivariate_normal,
+ mu, np.eye(3))
+
+ @pytest.mark.parametrize('mean, cov', [([0], [[1+1j]]), ([0j], [[1]])])
+ def test_multivariate_normal_disallow_complex(self, mean, cov):
+ random = Generator(MT19937(self.seed))
+ with pytest.raises(TypeError, match="must not be complex"):
+ random.multivariate_normal(mean, cov)
+
+ @pytest.mark.parametrize("method", ["svd", "eigh", "cholesky"])
+ def test_multivariate_normal_basic_stats(self, method):
+ random = Generator(MT19937(self.seed))
+ n_s = 1000
+ mean = np.array([1, 2])
+ cov = np.array([[2, 1], [1, 2]])
+ s = random.multivariate_normal(mean, cov, size=(n_s,), method=method)
+ s_center = s - mean
+ cov_emp = (s_center.T @ s_center) / (n_s - 1)
+ # these are pretty loose and are only designed to detect major errors
+ assert np.all(np.abs(s_center.mean(-2)) < 0.1)
+ assert np.all(np.abs(cov_emp - cov) < 0.2)
+
+ def test_negative_binomial(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.negative_binomial(n=100, p=.12345, size=(3, 2))
+ desired = np.array([[543, 727],
+ [775, 760],
+ [600, 674]])
+ assert_array_equal(actual, desired)
+
+ def test_negative_binomial_exceptions(self):
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, random.negative_binomial, 100, np.nan)
+ assert_raises(ValueError, random.negative_binomial, 100,
+ [np.nan] * 10)
+
+ def test_negative_binomial_p0_exception(self):
+ # Verify that p=0 raises an exception.
+ with assert_raises(ValueError):
+ x = random.negative_binomial(1, 0)
+
+ def test_negative_binomial_invalid_p_n_combination(self):
+ # Verify that values of p and n that would result in an overflow
+ # or infinite loop raise an exception.
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, random.negative_binomial, 2**62, 0.1)
+ assert_raises(ValueError, random.negative_binomial, [2**62], [0.1])
+
+ def test_noncentral_chisquare(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+ desired = np.array([[ 1.70561552362133, 15.97378184942111],
+ [13.71483425173724, 20.17859633310629],
+ [11.3615477156643 , 3.67891108738029]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ actual = random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+ desired = np.array([[9.41427665607629e-04, 1.70473157518850e-04],
+ [1.14554372041263e+00, 1.38187755933435e-03],
+ [1.90659181905387e+00, 1.21772577941822e+00]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+ desired = np.array([[0.82947954590419, 1.80139670767078],
+ [6.58720057417794, 7.00491463609814],
+ [6.31101879073157, 6.30982307753005]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_noncentral_f(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+ size=(3, 2))
+ desired = np.array([[0.060310671139 , 0.23866058175939],
+ [0.86860246709073, 0.2668510459738 ],
+ [0.23375780078364, 1.88922102885943]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_noncentral_f_nan(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.noncentral_f(dfnum=5, dfden=2, nonc=np.nan)
+ assert np.isnan(actual)
+
+ def test_normal(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[-3.618412914693162, 2.635726692647081],
+ [-2.116923463013243, 0.807460983059643],
+ [ 1.446547137248593, 2.485684213886024]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_normal_0(self):
+ assert_equal(random.normal(scale=0), 0)
+ assert_raises(ValueError, random.normal, scale=-0.)
+
+ def test_pareto(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.pareto(a=.123456789, size=(3, 2))
+ desired = np.array([[1.0394926776069018e+00, 7.7142534343505773e+04],
+ [7.2640150889064703e-01, 3.4650454783825594e+05],
+ [4.5852344481994740e+04, 6.5851383009539105e+07]])
+ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+ # matrix differs by 24 nulps. Discussion:
+ # https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+ # Consensus is that this is probably some gcc quirk that affects
+ # rounding but not in any important way, so we just use a looser
+ # tolerance on this test:
+ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+ def test_poisson(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.poisson(lam=.123456789, size=(3, 2))
+ desired = np.array([[0, 0],
+ [0, 0],
+ [0, 0]])
+ assert_array_equal(actual, desired)
+
+ def test_poisson_exceptions(self):
+ lambig = np.iinfo('int64').max
+ lamneg = -1
+ assert_raises(ValueError, random.poisson, lamneg)
+ assert_raises(ValueError, random.poisson, [lamneg] * 10)
+ assert_raises(ValueError, random.poisson, lambig)
+ assert_raises(ValueError, random.poisson, [lambig] * 10)
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, random.poisson, np.nan)
+ assert_raises(ValueError, random.poisson, [np.nan] * 10)
+
+ def test_power(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.power(a=.123456789, size=(3, 2))
+ desired = np.array([[1.977857368842754e-09, 9.806792196620341e-02],
+ [2.482442984543471e-10, 1.527108843266079e-01],
+ [8.188283434244285e-02, 3.950547209346948e-01]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_rayleigh(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.rayleigh(scale=10, size=(3, 2))
+ desired = np.array([[4.19494429102666, 16.66920198906598],
+ [3.67184544902662, 17.74695521962917],
+ [16.27935397855501, 21.08355560691792]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_rayleigh_0(self):
+ assert_equal(random.rayleigh(scale=0), 0)
+ assert_raises(ValueError, random.rayleigh, scale=-0.)
+
+ def test_standard_cauchy(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_cauchy(size=(3, 2))
+ desired = np.array([[-1.489437778266206, -3.275389641569784],
+ [ 0.560102864910406, -0.680780916282552],
+ [-1.314912905226277, 0.295852965660225]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_exponential(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_exponential(size=(3, 2), method='inv')
+ desired = np.array([[0.102031839440643, 1.229350298474972],
+ [0.088137284693098, 1.459859985522667],
+ [1.093830802293668, 1.256977002164613]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_expoential_type_error(self):
+ assert_raises(TypeError, random.standard_exponential, dtype=np.int32)
+
+ def test_standard_gamma(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_gamma(shape=3, size=(3, 2))
+ desired = np.array([[0.62970724056362, 1.22379851271008],
+ [3.899412530884 , 4.12479964250139],
+ [3.74994102464584, 3.74929307690815]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_standard_gammma_scalar_float(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_gamma(3, dtype=np.float32)
+ desired = 2.9242148399353027
+ assert_array_almost_equal(actual, desired, decimal=6)
+
+ def test_standard_gamma_float(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_gamma(shape=3, size=(3, 2))
+ desired = np.array([[0.62971, 1.2238 ],
+ [3.89941, 4.1248 ],
+ [3.74994, 3.74929]])
+ assert_array_almost_equal(actual, desired, decimal=5)
+
+ def test_standard_gammma_float_out(self):
+ actual = np.zeros((3, 2), dtype=np.float32)
+ random = Generator(MT19937(self.seed))
+ random.standard_gamma(10.0, out=actual, dtype=np.float32)
+ desired = np.array([[10.14987, 7.87012],
+ [ 9.46284, 12.56832],
+ [13.82495, 7.81533]], dtype=np.float32)
+ assert_array_almost_equal(actual, desired, decimal=5)
+
+ random = Generator(MT19937(self.seed))
+ random.standard_gamma(10.0, out=actual, size=(3, 2), dtype=np.float32)
+ assert_array_almost_equal(actual, desired, decimal=5)
+
+ def test_standard_gamma_unknown_type(self):
+ assert_raises(TypeError, random.standard_gamma, 1.,
+ dtype='int32')
+
+ def test_out_size_mismatch(self):
+ out = np.zeros(10)
+ assert_raises(ValueError, random.standard_gamma, 10.0, size=20,
+ out=out)
+ assert_raises(ValueError, random.standard_gamma, 10.0, size=(10, 1),
+ out=out)
+
+ def test_standard_gamma_0(self):
+ assert_equal(random.standard_gamma(shape=0), 0)
+ assert_raises(ValueError, random.standard_gamma, shape=-0.)
+
+ def test_standard_normal(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_normal(size=(3, 2))
+ desired = np.array([[-1.870934851846581, 1.25613495182354 ],
+ [-1.120190126006621, 0.342002097029821],
+ [ 0.661545174124296, 1.181113712443012]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_normal_unsupported_type(self):
+ assert_raises(TypeError, random.standard_normal, dtype=np.int32)
+
+ def test_standard_t(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_t(df=10, size=(3, 2))
+ desired = np.array([[-1.484666193042647, 0.30597891831161 ],
+ [ 1.056684299648085, -0.407312602088507],
+ [ 0.130704414281157, -2.038053410490321]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_triangular(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.triangular(left=5.12, mode=10.23, right=20.34,
+ size=(3, 2))
+ desired = np.array([[ 7.86664070590917, 13.6313848513185 ],
+ [ 7.68152445215983, 14.36169131136546],
+ [13.16105603911429, 13.72341621856971]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_uniform(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
+ desired = np.array([[2.13306255040998 , 7.816987531021207],
+ [2.015436610109887, 8.377577533009589],
+ [7.421792588856135, 7.891185744455209]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_uniform_range_bounds(self):
+ fmin = np.finfo('float').min
+ fmax = np.finfo('float').max
+
+ func = random.uniform
+ assert_raises(OverflowError, func, -np.inf, 0)
+ assert_raises(OverflowError, func, 0, np.inf)
+ assert_raises(OverflowError, func, fmin, fmax)
+ assert_raises(OverflowError, func, [-np.inf], [0])
+ assert_raises(OverflowError, func, [0], [np.inf])
+
+ # (fmax / 1e17) - fmin is within range, so this should not throw
+ # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+ # DBL_MAX by increasing fmin a bit
+ random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+ def test_uniform_zero_range(self):
+ func = random.uniform
+ result = func(1.5, 1.5)
+ assert_allclose(result, 1.5)
+ result = func([0.0, np.pi], [0.0, np.pi])
+ assert_allclose(result, [0.0, np.pi])
+ result = func([[2145.12], [2145.12]], [2145.12, 2145.12])
+ assert_allclose(result, 2145.12 + np.zeros((2, 2)))
+
+ def test_uniform_neg_range(self):
+ func = random.uniform
+ assert_raises(ValueError, func, 2, 1)
+ assert_raises(ValueError, func, [1, 2], [1, 1])
+ assert_raises(ValueError, func, [[0, 1],[2, 3]], 2)
+
+ def test_scalar_exception_propagation(self):
+ # Tests that exceptions are correctly propagated in distributions
+ # when called with objects that throw exceptions when converted to
+ # scalars.
+ #
+ # Regression test for gh: 8865
+
+ class ThrowingFloat(np.ndarray):
+ def __float__(self):
+ raise TypeError
+
+ throwing_float = np.array(1.0).view(ThrowingFloat)
+ assert_raises(TypeError, random.uniform, throwing_float,
+ throwing_float)
+
+ class ThrowingInteger(np.ndarray):
+ def __int__(self):
+ raise TypeError
+
+ throwing_int = np.array(1).view(ThrowingInteger)
+ assert_raises(TypeError, random.hypergeometric, throwing_int, 1, 1)
+
+ def test_vonmises(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+ desired = np.array([[ 1.107972248690106, 2.841536476232361],
+ [ 1.832602376042457, 1.945511926976032],
+ [-0.260147475776542, 2.058047492231698]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_vonmises_small(self):
+ # check infinite loop, gh-4720
+ random = Generator(MT19937(self.seed))
+ r = random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+ assert_(np.isfinite(r).all())
+
+ def test_vonmises_nan(self):
+ random = Generator(MT19937(self.seed))
+ r = random.vonmises(mu=0., kappa=np.nan)
+ assert_(np.isnan(r))
+
+ @pytest.mark.parametrize("kappa", [1e4, 1e15])
+ def test_vonmises_large_kappa(self, kappa):
+ random = Generator(MT19937(self.seed))
+ rs = RandomState(random.bit_generator)
+ state = random.bit_generator.state
+
+ random_state_vals = rs.vonmises(0, kappa, size=10)
+ random.bit_generator.state = state
+ gen_vals = random.vonmises(0, kappa, size=10)
+ if kappa < 1e6:
+ assert_allclose(random_state_vals, gen_vals)
+ else:
+ assert np.all(random_state_vals != gen_vals)
+
+ @pytest.mark.parametrize("mu", [-7., -np.pi, -3.1, np.pi, 3.2])
+ @pytest.mark.parametrize("kappa", [1e-9, 1e-6, 1, 1e3, 1e15])
+ def test_vonmises_large_kappa_range(self, mu, kappa):
+ random = Generator(MT19937(self.seed))
+ r = random.vonmises(mu, kappa, 50)
+ assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+ def test_wald(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.wald(mean=1.23, scale=1.54, size=(3, 2))
+ desired = np.array([[0.26871721804551, 3.2233942732115 ],
+ [2.20328374987066, 2.40958405189353],
+ [2.07093587449261, 0.73073890064369]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_weibull(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.weibull(a=1.23, size=(3, 2))
+ desired = np.array([[0.138613914769468, 1.306463419753191],
+ [0.111623365934763, 1.446570494646721],
+ [1.257145775276011, 1.914247725027957]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_weibull_0(self):
+ random = Generator(MT19937(self.seed))
+ assert_equal(random.weibull(a=0, size=12), np.zeros(12))
+ assert_raises(ValueError, random.weibull, a=-0.)
+
+ def test_zipf(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.zipf(a=1.23, size=(3, 2))
+ desired = np.array([[ 1, 1],
+ [ 10, 867],
+ [354, 2]])
+ assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+ # tests that functions that broadcast behave
+ # correctly when presented with non-scalar arguments
+ def setup_method(self):
+ self.seed = 123456789
+
+ def test_uniform(self):
+ random = Generator(MT19937(self.seed))
+ low = [0]
+ high = [1]
+ uniform = random.uniform
+ desired = np.array([0.16693771389729, 0.19635129550675, 0.75563050964095])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.uniform(low * 3, high)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.uniform(low, high * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_normal(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ random = Generator(MT19937(self.seed))
+ desired = np.array([-0.38736406738527, 0.79594375042255, 0.0197076236097])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.normal(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.normal, loc * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ normal = random.normal
+ actual = normal(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+ def test_beta(self):
+ a = [1]
+ b = [2]
+ bad_a = [-1]
+ bad_b = [-2]
+ desired = np.array([0.18719338682602, 0.73234824491364, 0.17928615186455])
+
+ random = Generator(MT19937(self.seed))
+ beta = random.beta
+ actual = beta(a * 3, b)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, beta, bad_a * 3, b)
+ assert_raises(ValueError, beta, a * 3, bad_b)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.beta(a, b * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_exponential(self):
+ scale = [1]
+ bad_scale = [-1]
+ desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.exponential(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.exponential, bad_scale * 3)
+
+ def test_standard_gamma(self):
+ shape = [1]
+ bad_shape = [-1]
+ desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+ random = Generator(MT19937(self.seed))
+ std_gamma = random.standard_gamma
+ actual = std_gamma(shape * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+ def test_gamma(self):
+ shape = [1]
+ scale = [2]
+ bad_shape = [-1]
+ bad_scale = [-2]
+ desired = np.array([1.34491986425611, 0.42760990636187, 1.4355697857258])
+
+ random = Generator(MT19937(self.seed))
+ gamma = random.gamma
+ actual = gamma(shape * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape * 3, scale)
+ assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ gamma = random.gamma
+ actual = gamma(shape, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape, scale * 3)
+ assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+ def test_f(self):
+ dfnum = [1]
+ dfden = [2]
+ bad_dfnum = [-1]
+ bad_dfden = [-2]
+ desired = np.array([0.07765056244107, 7.72951397913186, 0.05786093891763])
+
+ random = Generator(MT19937(self.seed))
+ f = random.f
+ actual = f(dfnum * 3, dfden)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+ assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+ random = Generator(MT19937(self.seed))
+ f = random.f
+ actual = f(dfnum, dfden * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+ assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+ def test_noncentral_f(self):
+ dfnum = [2]
+ dfden = [3]
+ nonc = [4]
+ bad_dfnum = [0]
+ bad_dfden = [-1]
+ bad_nonc = [-2]
+ desired = np.array([2.02434240411421, 12.91838601070124, 1.24395160354629])
+
+ random = Generator(MT19937(self.seed))
+ nonc_f = random.noncentral_f
+ actual = nonc_f(dfnum * 3, dfden, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert np.all(np.isnan(nonc_f(dfnum, dfden, [np.nan] * 3)))
+
+ assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+ random = Generator(MT19937(self.seed))
+ nonc_f = random.noncentral_f
+ actual = nonc_f(dfnum, dfden * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+ random = Generator(MT19937(self.seed))
+ nonc_f = random.noncentral_f
+ actual = nonc_f(dfnum, dfden, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+ def test_noncentral_f_small_df(self):
+ random = Generator(MT19937(self.seed))
+ desired = np.array([0.04714867120827, 0.1239390327694])
+ actual = random.noncentral_f(0.9, 0.9, 2, size=2)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_chisquare(self):
+ df = [1]
+ bad_df = [-1]
+ desired = np.array([0.05573640064251, 1.47220224353539, 2.9469379318589])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.chisquare(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.chisquare, bad_df * 3)
+
+ def test_noncentral_chisquare(self):
+ df = [1]
+ nonc = [2]
+ bad_df = [-1]
+ bad_nonc = [-2]
+ desired = np.array([0.07710766249436, 5.27829115110304, 0.630732147399])
+
+ random = Generator(MT19937(self.seed))
+ nonc_chi = random.noncentral_chisquare
+ actual = nonc_chi(df * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+ assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+ random = Generator(MT19937(self.seed))
+ nonc_chi = random.noncentral_chisquare
+ actual = nonc_chi(df, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+ assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+ def test_standard_t(self):
+ df = [1]
+ bad_df = [-1]
+ desired = np.array([-1.39498829447098, -1.23058658835223, 0.17207021065983])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.standard_t(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.standard_t, bad_df * 3)
+
+ def test_vonmises(self):
+ mu = [2]
+ kappa = [1]
+ bad_kappa = [-1]
+ desired = np.array([2.25935584988528, 2.23326261461399, -2.84152146503326])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.vonmises(mu * 3, kappa)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.vonmises, mu * 3, bad_kappa)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.vonmises(mu, kappa * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.vonmises, mu, bad_kappa * 3)
+
+ def test_pareto(self):
+ a = [1]
+ bad_a = [-1]
+ desired = np.array([0.95905052946317, 0.2383810889437 , 1.04988745750013])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.pareto(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.pareto, bad_a * 3)
+
+ def test_weibull(self):
+ a = [1]
+ bad_a = [-1]
+ desired = np.array([0.67245993212806, 0.21380495318094, 0.7177848928629])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.weibull(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.weibull, bad_a * 3)
+
+ def test_power(self):
+ a = [1]
+ bad_a = [-1]
+ desired = np.array([0.48954864361052, 0.19249412888486, 0.51216834058807])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.power(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.power, bad_a * 3)
+
+ def test_laplace(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ desired = np.array([-1.09698732625119, -0.93470271947368, 0.71592671378202])
+
+ random = Generator(MT19937(self.seed))
+ laplace = random.laplace
+ actual = laplace(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ laplace = random.laplace
+ actual = laplace(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+ def test_gumbel(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ desired = np.array([1.70020068231762, 1.52054354273631, -0.34293267607081])
+
+ random = Generator(MT19937(self.seed))
+ gumbel = random.gumbel
+ actual = gumbel(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ gumbel = random.gumbel
+ actual = gumbel(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+ def test_logistic(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ desired = np.array([-1.607487640433, -1.40925686003678, 1.12887112820397])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.logistic(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.logistic, loc * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.logistic(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.logistic, loc, bad_scale * 3)
+ assert_equal(random.logistic(1.0, 0.0), 1.0)
+
+ def test_lognormal(self):
+ mean = [0]
+ sigma = [1]
+ bad_sigma = [-1]
+ desired = np.array([0.67884390500697, 2.21653186290321, 1.01990310084276])
+
+ random = Generator(MT19937(self.seed))
+ lognormal = random.lognormal
+ actual = lognormal(mean * 3, sigma)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.lognormal(mean, sigma * 3)
+ assert_raises(ValueError, random.lognormal, mean, bad_sigma * 3)
+
+ def test_rayleigh(self):
+ scale = [1]
+ bad_scale = [-1]
+ desired = np.array(
+ [1.1597068009872629,
+ 0.6539188836253857,
+ 1.1981526554349398]
+ )
+
+ random = Generator(MT19937(self.seed))
+ actual = random.rayleigh(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.rayleigh, bad_scale * 3)
+
+ def test_wald(self):
+ mean = [0.5]
+ scale = [1]
+ bad_mean = [0]
+ bad_scale = [-2]
+ desired = np.array([0.38052407392905, 0.50701641508592, 0.484935249864])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.wald(mean * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.wald, bad_mean * 3, scale)
+ assert_raises(ValueError, random.wald, mean * 3, bad_scale)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.wald(mean, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, random.wald, bad_mean, scale * 3)
+ assert_raises(ValueError, random.wald, mean, bad_scale * 3)
+
+ def test_triangular(self):
+ left = [1]
+ right = [3]
+ mode = [2]
+ bad_left_one = [3]
+ bad_mode_one = [4]
+ bad_left_two, bad_mode_two = right * 2
+ desired = np.array([1.57781954604754, 1.62665986867957, 2.30090130831326])
+
+ random = Generator(MT19937(self.seed))
+ triangular = random.triangular
+ actual = triangular(left * 3, mode, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+ assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+ assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+ right)
+
+ random = Generator(MT19937(self.seed))
+ triangular = random.triangular
+ actual = triangular(left, mode * 3, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+ assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+ right)
+
+ random = Generator(MT19937(self.seed))
+ triangular = random.triangular
+ actual = triangular(left, mode, right * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+ assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+ right * 3)
+
+ assert_raises(ValueError, triangular, 10., 0., 20.)
+ assert_raises(ValueError, triangular, 10., 25., 20.)
+ assert_raises(ValueError, triangular, 10., 10., 10.)
+
+ def test_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ desired = np.array([0, 0, 1])
+
+ random = Generator(MT19937(self.seed))
+ binom = random.binomial
+ actual = binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n * 3, p)
+ assert_raises(ValueError, binom, n * 3, bad_p_one)
+ assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.binomial(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n, p * 3)
+ assert_raises(ValueError, binom, n, bad_p_one * 3)
+ assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+ def test_negative_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ desired = np.array([0, 2, 1], dtype=np.int64)
+
+ random = Generator(MT19937(self.seed))
+ neg_binom = random.negative_binomial
+ actual = neg_binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n * 3, p)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+ random = Generator(MT19937(self.seed))
+ neg_binom = random.negative_binomial
+ actual = neg_binom(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n, p * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+ def test_poisson(self):
+
+ lam = [1]
+ bad_lam_one = [-1]
+ desired = np.array([0, 0, 3])
+
+ random = Generator(MT19937(self.seed))
+ max_lam = random._poisson_lam_max
+ bad_lam_two = [max_lam * 2]
+ poisson = random.poisson
+ actual = poisson(lam * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, poisson, bad_lam_one * 3)
+ assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+ def test_zipf(self):
+ a = [2]
+ bad_a = [0]
+ desired = np.array([1, 8, 1])
+
+ random = Generator(MT19937(self.seed))
+ zipf = random.zipf
+ actual = zipf(a * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, zipf, bad_a * 3)
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, zipf, np.nan)
+ assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+ def test_geometric(self):
+ p = [0.5]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ desired = np.array([1, 1, 3])
+
+ random = Generator(MT19937(self.seed))
+ geometric = random.geometric
+ actual = geometric(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, geometric, bad_p_one * 3)
+ assert_raises(ValueError, geometric, bad_p_two * 3)
+
+ def test_hypergeometric(self):
+ ngood = [1]
+ nbad = [2]
+ nsample = [2]
+ bad_ngood = [-1]
+ bad_nbad = [-2]
+ bad_nsample_one = [-1]
+ bad_nsample_two = [4]
+ desired = np.array([0, 0, 1])
+
+ random = Generator(MT19937(self.seed))
+ actual = random.hypergeometric(ngood * 3, nbad, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, random.hypergeometric, bad_ngood * 3, nbad, nsample)
+ assert_raises(ValueError, random.hypergeometric, ngood * 3, bad_nbad, nsample)
+ assert_raises(ValueError, random.hypergeometric, ngood * 3, nbad, bad_nsample_one)
+ assert_raises(ValueError, random.hypergeometric, ngood * 3, nbad, bad_nsample_two)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.hypergeometric(ngood, nbad * 3, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, random.hypergeometric, bad_ngood, nbad * 3, nsample)
+ assert_raises(ValueError, random.hypergeometric, ngood, bad_nbad * 3, nsample)
+ assert_raises(ValueError, random.hypergeometric, ngood, nbad * 3, bad_nsample_one)
+ assert_raises(ValueError, random.hypergeometric, ngood, nbad * 3, bad_nsample_two)
+
+ random = Generator(MT19937(self.seed))
+ hypergeom = random.hypergeometric
+ actual = hypergeom(ngood, nbad, nsample * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+ assert_raises(ValueError, hypergeom, -1, 10, 20)
+ assert_raises(ValueError, hypergeom, 10, -1, 20)
+ assert_raises(ValueError, hypergeom, 10, 10, -1)
+ assert_raises(ValueError, hypergeom, 10, 10, 25)
+
+ # ValueError for arguments that are too big.
+ assert_raises(ValueError, hypergeom, 2**30, 10, 20)
+ assert_raises(ValueError, hypergeom, 999, 2**31, 50)
+ assert_raises(ValueError, hypergeom, 999, [2**29, 2**30], 1000)
+
+ def test_logseries(self):
+ p = [0.5]
+ bad_p_one = [2]
+ bad_p_two = [-1]
+ desired = np.array([1, 1, 1])
+
+ random = Generator(MT19937(self.seed))
+ logseries = random.logseries
+ actual = logseries(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, logseries, bad_p_one * 3)
+ assert_raises(ValueError, logseries, bad_p_two * 3)
+
+ def test_multinomial(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial([5, 20], [1 / 6.] * 6, size=(3, 2))
+ desired = np.array([[[0, 0, 2, 1, 2, 0],
+ [2, 3, 6, 4, 2, 3]],
+ [[1, 0, 1, 0, 2, 1],
+ [7, 2, 2, 1, 4, 4]],
+ [[0, 2, 0, 1, 2, 0],
+ [3, 2, 3, 3, 4, 5]]], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial([5, 20], [1 / 6.] * 6)
+ desired = np.array([[0, 0, 2, 1, 2, 0],
+ [2, 3, 6, 4, 2, 3]], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial([5, 20], [[1 / 6.] * 6] * 2)
+ desired = np.array([[0, 0, 2, 1, 2, 0],
+ [2, 3, 6, 4, 2, 3]], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial([[5], [20]], [[1 / 6.] * 6] * 2)
+ desired = np.array([[[0, 0, 2, 1, 2, 0],
+ [0, 0, 2, 1, 1, 1]],
+ [[4, 2, 3, 3, 5, 3],
+ [7, 2, 2, 1, 4, 4]]], dtype=np.int64)
+ assert_array_equal(actual, desired)
+
+ @pytest.mark.parametrize("n", [10,
+ np.array([10, 10]),
+ np.array([[[10]], [[10]]])
+ ]
+ )
+ def test_multinomial_pval_broadcast(self, n):
+ random = Generator(MT19937(self.seed))
+ pvals = np.array([1 / 4] * 4)
+ actual = random.multinomial(n, pvals)
+ n_shape = tuple() if isinstance(n, int) else n.shape
+ expected_shape = n_shape + (4,)
+ assert actual.shape == expected_shape
+ pvals = np.vstack([pvals, pvals])
+ actual = random.multinomial(n, pvals)
+ expected_shape = np.broadcast_shapes(n_shape, pvals.shape[:-1]) + (4,)
+ assert actual.shape == expected_shape
+
+ pvals = np.vstack([[pvals], [pvals]])
+ actual = random.multinomial(n, pvals)
+ expected_shape = np.broadcast_shapes(n_shape, pvals.shape[:-1])
+ assert actual.shape == expected_shape + (4,)
+ actual = random.multinomial(n, pvals, size=(3, 2) + expected_shape)
+ assert actual.shape == (3, 2) + expected_shape + (4,)
+
+ with pytest.raises(ValueError):
+ # Ensure that size is not broadcast
+ actual = random.multinomial(n, pvals, size=(1,) * 6)
+
+ def test_invalid_pvals_broadcast(self):
+ random = Generator(MT19937(self.seed))
+ pvals = [[1 / 6] * 6, [1 / 4] * 6]
+ assert_raises(ValueError, random.multinomial, 1, pvals)
+ assert_raises(ValueError, random.multinomial, 6, 0.5)
+
+ def test_empty_outputs(self):
+ random = Generator(MT19937(self.seed))
+ actual = random.multinomial(np.empty((10, 0, 6), "i8"), [1 / 6] * 6)
+ assert actual.shape == (10, 0, 6, 6)
+ actual = random.multinomial(12, np.empty((10, 0, 10)))
+ assert actual.shape == (10, 0, 10)
+ actual = random.multinomial(np.empty((3, 0, 7), "i8"),
+ np.empty((3, 0, 7, 4)))
+ assert actual.shape == (3, 0, 7, 4)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+ # make sure each state produces the same sequence even in threads
+ def setup_method(self):
+ self.seeds = range(4)
+
+ def check_function(self, function, sz):
+ from threading import Thread
+
+ out1 = np.empty((len(self.seeds),) + sz)
+ out2 = np.empty((len(self.seeds),) + sz)
+
+ # threaded generation
+ t = [Thread(target=function, args=(Generator(MT19937(s)), o))
+ for s, o in zip(self.seeds, out1)]
+ [x.start() for x in t]
+ [x.join() for x in t]
+
+ # the same serial
+ for s, o in zip(self.seeds, out2):
+ function(Generator(MT19937(s)), o)
+
+ # these platforms change x87 fpu precision mode in threads
+ if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+ assert_array_almost_equal(out1, out2)
+ else:
+ assert_array_equal(out1, out2)
+
+ def test_normal(self):
+ def gen_random(state, out):
+ out[...] = state.normal(size=10000)
+
+ self.check_function(gen_random, sz=(10000,))
+
+ def test_exp(self):
+ def gen_random(state, out):
+ out[...] = state.exponential(scale=np.ones((100, 1000)))
+
+ self.check_function(gen_random, sz=(100, 1000))
+
+ def test_multinomial(self):
+ def gen_random(state, out):
+ out[...] = state.multinomial(10, [1 / 6.] * 6, size=10000)
+
+ self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+ def setup_method(self):
+ self.argOne = np.array([2])
+ self.argTwo = np.array([3])
+ self.argThree = np.array([4])
+ self.tgtShape = (1,)
+
+ def test_one_arg_funcs(self):
+ funcs = (random.exponential, random.standard_gamma,
+ random.chisquare, random.standard_t,
+ random.pareto, random.weibull,
+ random.power, random.rayleigh,
+ random.poisson, random.zipf,
+ random.geometric, random.logseries)
+
+ probfuncs = (random.geometric, random.logseries)
+
+ for func in funcs:
+ if func in probfuncs: # p < 1.0
+ out = func(np.array([0.5]))
+
+ else:
+ out = func(self.argOne)
+
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_two_arg_funcs(self):
+ funcs = (random.uniform, random.normal,
+ random.beta, random.gamma,
+ random.f, random.noncentral_chisquare,
+ random.vonmises, random.laplace,
+ random.gumbel, random.logistic,
+ random.lognormal, random.wald,
+ random.binomial, random.negative_binomial)
+
+ probfuncs = (random.binomial, random.negative_binomial)
+
+ for func in funcs:
+ if func in probfuncs: # p <= 1
+ argTwo = np.array([0.5])
+
+ else:
+ argTwo = self.argTwo
+
+ out = func(self.argOne, argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, argTwo[0])
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_integers(self, endpoint):
+ itype = [np.bool, np.int8, np.uint8, np.int16, np.uint16,
+ np.int32, np.uint32, np.int64, np.uint64]
+ func = random.integers
+ high = np.array([1])
+ low = np.array([0])
+
+ for dt in itype:
+ out = func(low, high, endpoint=endpoint, dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(low[0], high, endpoint=endpoint, dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(low, high[0], endpoint=endpoint, dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_three_arg_funcs(self):
+ funcs = [random.noncentral_f, random.triangular,
+ random.hypergeometric]
+
+ for func in funcs:
+ out = func(self.argOne, self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, self.argTwo[0], self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+
+@pytest.mark.parametrize("config", JUMP_TEST_DATA)
+def test_jumped(config):
+ # Each config contains the initial seed, a number of raw steps
+ # the sha256 hashes of the initial and the final states' keys and
+ # the position of the initial and the final state.
+ # These were produced using the original C implementation.
+ seed = config["seed"]
+ steps = config["steps"]
+
+ mt19937 = MT19937(seed)
+ # Burn step
+ mt19937.random_raw(steps)
+ key = mt19937.state["state"]["key"]
+ if sys.byteorder == 'big':
+ key = key.byteswap()
+ sha256 = hashlib.sha256(key)
+ assert mt19937.state["state"]["pos"] == config["initial"]["pos"]
+ assert sha256.hexdigest() == config["initial"]["key_sha256"]
+
+ jumped = mt19937.jumped()
+ key = jumped.state["state"]["key"]
+ if sys.byteorder == 'big':
+ key = key.byteswap()
+ sha256 = hashlib.sha256(key)
+ assert jumped.state["state"]["pos"] == config["jumped"]["pos"]
+ assert sha256.hexdigest() == config["jumped"]["key_sha256"]
+
+
+def test_broadcast_size_error():
+ mu = np.ones(3)
+ sigma = np.ones((4, 3))
+ size = (10, 4, 2)
+ assert random.normal(mu, sigma, size=(5, 4, 3)).shape == (5, 4, 3)
+ with pytest.raises(ValueError):
+ random.normal(mu, sigma, size=size)
+ with pytest.raises(ValueError):
+ random.normal(mu, sigma, size=(1, 3))
+ with pytest.raises(ValueError):
+ random.normal(mu, sigma, size=(4, 1, 1))
+ # 1 arg
+ shape = np.ones((4, 3))
+ with pytest.raises(ValueError):
+ random.standard_gamma(shape, size=size)
+ with pytest.raises(ValueError):
+ random.standard_gamma(shape, size=(3,))
+ with pytest.raises(ValueError):
+ random.standard_gamma(shape, size=3)
+ # Check out
+ out = np.empty(size)
+ with pytest.raises(ValueError):
+ random.standard_gamma(shape, out=out)
+
+ # 2 arg
+ with pytest.raises(ValueError):
+ random.binomial(1, [0.3, 0.7], size=(2, 1))
+ with pytest.raises(ValueError):
+ random.binomial([1, 2], 0.3, size=(2, 1))
+ with pytest.raises(ValueError):
+ random.binomial([1, 2], [0.3, 0.7], size=(2, 1))
+ with pytest.raises(ValueError):
+ random.multinomial([2, 2], [.3, .7], size=(2, 1))
+
+ # 3 arg
+ a = random.chisquare(5, size=3)
+ b = random.chisquare(5, size=(4, 3))
+ c = random.chisquare(5, size=(5, 4, 3))
+ assert random.noncentral_f(a, b, c).shape == (5, 4, 3)
+ with pytest.raises(ValueError, match=r"Output size \(6, 5, 1, 1\) is"):
+ random.noncentral_f(a, b, c, size=(6, 5, 1, 1))
+
+
+def test_broadcast_size_scalar():
+ mu = np.ones(3)
+ sigma = np.ones(3)
+ random.normal(mu, sigma, size=3)
+ with pytest.raises(ValueError):
+ random.normal(mu, sigma, size=2)
+
+
+def test_ragged_shuffle():
+ # GH 18142
+ seq = [[], [], 1]
+ gen = Generator(MT19937(0))
+ assert_no_warnings(gen.shuffle, seq)
+ assert seq == [1, [], []]
+
+
+@pytest.mark.parametrize("high", [-2, [-2]])
+@pytest.mark.parametrize("endpoint", [True, False])
+def test_single_arg_integer_exception(high, endpoint):
+ # GH 14333
+ gen = Generator(MT19937(0))
+ msg = 'high < 0' if endpoint else 'high <= 0'
+ with pytest.raises(ValueError, match=msg):
+ gen.integers(high, endpoint=endpoint)
+ msg = 'low > high' if endpoint else 'low >= high'
+ with pytest.raises(ValueError, match=msg):
+ gen.integers(-1, high, endpoint=endpoint)
+ with pytest.raises(ValueError, match=msg):
+ gen.integers([-1], high, endpoint=endpoint)
+
+
+@pytest.mark.parametrize("dtype", ["f4", "f8"])
+def test_c_contig_req_out(dtype):
+ # GH 18704
+ out = np.empty((2, 3), order="F", dtype=dtype)
+ shape = [1, 2, 3]
+ with pytest.raises(ValueError, match="Supplied output array"):
+ random.standard_gamma(shape, out=out, dtype=dtype)
+ with pytest.raises(ValueError, match="Supplied output array"):
+ random.standard_gamma(shape, out=out, size=out.shape, dtype=dtype)
+
+
+@pytest.mark.parametrize("dtype", ["f4", "f8"])
+@pytest.mark.parametrize("order", ["F", "C"])
+@pytest.mark.parametrize("dist", [random.standard_normal, random.random])
+def test_contig_req_out(dist, order, dtype):
+ # GH 18704
+ out = np.empty((2, 3), dtype=dtype, order=order)
+ variates = dist(out=out, dtype=dtype)
+ assert variates is out
+ variates = dist(out=out, dtype=dtype, size=out.shape)
+ assert variates is out
+
+
+def test_generator_ctor_old_style_pickle():
+ rg = np.random.Generator(np.random.PCG64DXSM(0))
+ rg.standard_normal(1)
+ # Directly call reduce which is used in pickling
+ ctor, (bit_gen, ), _ = rg.__reduce__()
+ # Simulate unpickling an old pickle that only has the name
+ assert bit_gen.__class__.__name__ == "PCG64DXSM"
+ print(ctor)
+ b = ctor(*("PCG64DXSM",))
+ print(b)
+ b.bit_generator.state = bit_gen.state
+ state_b = b.bit_generator.state
+ assert bit_gen.state == state_b
+
+
+def test_pickle_preserves_seed_sequence():
+ # GH 26234
+ # Add explicit test that bit generators preserve seed sequences
+ import pickle
+
+ rg = np.random.Generator(np.random.PCG64DXSM(20240411))
+ ss = rg.bit_generator.seed_seq
+ rg_plk = pickle.loads(pickle.dumps(rg))
+ ss_plk = rg_plk.bit_generator.seed_seq
+ assert_equal(ss.state, ss_plk.state)
+ assert_equal(ss.pool, ss_plk.pool)
+
+ rg.bit_generator.seed_seq.spawn(10)
+ rg_plk = pickle.loads(pickle.dumps(rg))
+ ss_plk = rg_plk.bit_generator.seed_seq
+ assert_equal(ss.state, ss_plk.state)
+
+
+@pytest.mark.parametrize("version", [121, 126])
+def test_legacy_pickle(version):
+ # Pickling format was changes in 1.22.x and in 2.0.x
+ import pickle
+ import gzip
+
+ base_path = os.path.split(os.path.abspath(__file__))[0]
+ pkl_file = os.path.join(
+ base_path, "data", f"generator_pcg64_np{version}.pkl.gz"
+ )
+ with gzip.open(pkl_file) as gz:
+ rg = pickle.load(gz)
+ state = rg.bit_generator.state['state']
+
+ assert isinstance(rg, Generator)
+ assert isinstance(rg.bit_generator, np.random.PCG64)
+ assert state['state'] == 35399562948360463058890781895381311971
+ assert state['inc'] == 87136372517582989555478159403783844777
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py
new file mode 100644
index 0000000000000000000000000000000000000000..c34e6bb3ba74f2f9084a7400fc608776d8e278c0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_generator_mt19937_regressions.py
@@ -0,0 +1,206 @@
+from numpy.testing import (assert_, assert_array_equal)
+import numpy as np
+import pytest
+from numpy.random import Generator, MT19937
+
+
+class TestRegression:
+
+ def setup_method(self):
+ self.mt19937 = Generator(MT19937(121263137472525314065))
+
+ def test_vonmises_range(self):
+ # Make sure generated random variables are in [-pi, pi].
+ # Regression test for ticket #986.
+ for mu in np.linspace(-7., 7., 5):
+ r = self.mt19937.vonmises(mu, 1, 50)
+ assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+ def test_hypergeometric_range(self):
+ # Test for ticket #921
+ assert_(np.all(self.mt19937.hypergeometric(3, 18, 11, size=10) < 4))
+ assert_(np.all(self.mt19937.hypergeometric(18, 3, 11, size=10) > 0))
+
+ # Test for ticket #5623
+ args = (2**20 - 2, 2**20 - 2, 2**20 - 2) # Check for 32-bit systems
+ assert_(self.mt19937.hypergeometric(*args) > 0)
+
+ def test_logseries_convergence(self):
+ # Test for ticket #923
+ N = 1000
+ rvsn = self.mt19937.logseries(0.8, size=N)
+ # these two frequency counts should be close to theoretical
+ # numbers with this large sample
+ # theoretical large N result is 0.49706795
+ freq = np.sum(rvsn == 1) / N
+ msg = f'Frequency was {freq:f}, should be > 0.45'
+ assert_(freq > 0.45, msg)
+ # theoretical large N result is 0.19882718
+ freq = np.sum(rvsn == 2) / N
+ msg = f'Frequency was {freq:f}, should be < 0.23'
+ assert_(freq < 0.23, msg)
+
+ def test_shuffle_mixed_dimension(self):
+ # Test for trac ticket #2074
+ for t in [[1, 2, 3, None],
+ [(1, 1), (2, 2), (3, 3), None],
+ [1, (2, 2), (3, 3), None],
+ [(1, 1), 2, 3, None]]:
+ mt19937 = Generator(MT19937(12345))
+ shuffled = np.array(t, dtype=object)
+ mt19937.shuffle(shuffled)
+ expected = np.array([t[2], t[0], t[3], t[1]], dtype=object)
+ assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+ def test_call_within_randomstate(self):
+ # Check that custom BitGenerator does not call into global state
+ res = np.array([1, 8, 0, 1, 5, 3, 3, 8, 1, 4])
+ for i in range(3):
+ mt19937 = Generator(MT19937(i))
+ m = Generator(MT19937(4321))
+ # If m.state is not honored, the result will change
+ assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+ def test_multivariate_normal_size_types(self):
+ # Test for multivariate_normal issue with 'size' argument.
+ # Check that the multivariate_normal size argument can be a
+ # numpy integer.
+ self.mt19937.multivariate_normal([0], [[0]], size=1)
+ self.mt19937.multivariate_normal([0], [[0]], size=np.int_(1))
+ self.mt19937.multivariate_normal([0], [[0]], size=np.int64(1))
+
+ def test_beta_small_parameters(self):
+ # Test that beta with small a and b parameters does not produce
+ # NaNs due to roundoff errors causing 0 / 0, gh-5851
+ x = self.mt19937.beta(0.0001, 0.0001, size=100)
+ assert_(not np.any(np.isnan(x)), 'Nans in mt19937.beta')
+
+ def test_beta_very_small_parameters(self):
+ # gh-24203: beta would hang with very small parameters.
+ self.mt19937.beta(1e-49, 1e-40)
+
+ def test_beta_ridiculously_small_parameters(self):
+ # gh-24266: beta would generate nan when the parameters
+ # were subnormal or a small multiple of the smallest normal.
+ tiny = np.finfo(1.0).tiny
+ x = self.mt19937.beta(tiny/32, tiny/40, size=50)
+ assert not np.any(np.isnan(x))
+
+ def test_beta_expected_zero_frequency(self):
+ # gh-24475: For small a and b (e.g. a=0.0025, b=0.0025), beta
+ # would generate too many zeros.
+ a = 0.0025
+ b = 0.0025
+ n = 1000000
+ x = self.mt19937.beta(a, b, size=n)
+ nzeros = np.count_nonzero(x == 0)
+ # beta CDF at x = np.finfo(np.double).smallest_subnormal/2
+ # is p = 0.0776169083131899, e.g,
+ #
+ # import numpy as np
+ # from mpmath import mp
+ # mp.dps = 160
+ # x = mp.mpf(np.finfo(np.float64).smallest_subnormal)/2
+ # # CDF of the beta distribution at x:
+ # p = mp.betainc(a, b, x1=0, x2=x, regularized=True)
+ # n = 1000000
+ # exprected_freq = float(n*p)
+ #
+ expected_freq = 77616.90831318991
+ assert 0.95*expected_freq < nzeros < 1.05*expected_freq
+
+ def test_choice_sum_of_probs_tolerance(self):
+ # The sum of probs should be 1.0 with some tolerance.
+ # For low precision dtypes the tolerance was too tight.
+ # See numpy github issue 6123.
+ a = [1, 2, 3]
+ counts = [4, 4, 2]
+ for dt in np.float16, np.float32, np.float64:
+ probs = np.array(counts, dtype=dt) / sum(counts)
+ c = self.mt19937.choice(a, p=probs)
+ assert_(c in a)
+ with pytest.raises(ValueError):
+ self.mt19937.choice(a, p=probs*0.9)
+
+ def test_shuffle_of_array_of_different_length_strings(self):
+ # Test that permuting an array of different length strings
+ # will not cause a segfault on garbage collection
+ # Tests gh-7710
+
+ a = np.array(['a', 'a' * 1000])
+
+ for _ in range(100):
+ self.mt19937.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_shuffle_of_array_of_objects(self):
+ # Test that permuting an array of objects will not cause
+ # a segfault on garbage collection.
+ # See gh-7719
+ a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+ for _ in range(1000):
+ self.mt19937.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_permutation_subclass(self):
+
+ class N(np.ndarray):
+ pass
+
+ mt19937 = Generator(MT19937(1))
+ orig = np.arange(3).view(N)
+ perm = mt19937.permutation(orig)
+ assert_array_equal(perm, np.array([2, 0, 1]))
+ assert_array_equal(orig, np.arange(3).view(N))
+
+ class M:
+ a = np.arange(5)
+
+ def __array__(self, dtype=None, copy=None):
+ return self.a
+
+ mt19937 = Generator(MT19937(1))
+ m = M()
+ perm = mt19937.permutation(m)
+ assert_array_equal(perm, np.array([4, 1, 3, 0, 2]))
+ assert_array_equal(m.__array__(), np.arange(5))
+
+ def test_gamma_0(self):
+ assert self.mt19937.standard_gamma(0.0) == 0.0
+ assert_array_equal(self.mt19937.standard_gamma([0.0]), 0.0)
+
+ actual = self.mt19937.standard_gamma([0.0], dtype='float')
+ expected = np.array([0.], dtype=np.float32)
+ assert_array_equal(actual, expected)
+
+ def test_geometric_tiny_prob(self):
+ # Regression test for gh-17007.
+ # When p = 1e-30, the probability that a sample will exceed 2**63-1
+ # is 0.9999999999907766, so we expect the result to be all 2**63-1.
+ assert_array_equal(self.mt19937.geometric(p=1e-30, size=3),
+ np.iinfo(np.int64).max)
+
+ def test_zipf_large_parameter(self):
+ # Regression test for part of gh-9829: a call such as rng.zipf(10000)
+ # would hang.
+ n = 8
+ sample = self.mt19937.zipf(10000, size=n)
+ assert_array_equal(sample, np.ones(n, dtype=np.int64))
+
+ def test_zipf_a_near_1(self):
+ # Regression test for gh-9829: a call such as rng.zipf(1.0000000000001)
+ # would hang.
+ n = 100000
+ sample = self.mt19937.zipf(1.0000000000001, size=n)
+ # Not much of a test, but let's do something more than verify that
+ # it doesn't hang. Certainly for a monotonically decreasing
+ # discrete distribution truncated to signed 64 bit integers, more
+ # than half should be less than 2**62.
+ assert np.count_nonzero(sample < 2**62) > n/2
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_random.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_random.py
new file mode 100644
index 0000000000000000000000000000000000000000..c98584aeda9df3ea64209038521784c4b2c24ba9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_random.py
@@ -0,0 +1,1751 @@
+import warnings
+
+import pytest
+
+import numpy as np
+from numpy.testing import (
+ assert_, assert_raises, assert_equal, assert_warns,
+ assert_no_warnings, assert_array_equal, assert_array_almost_equal,
+ suppress_warnings, IS_WASM
+ )
+from numpy import random
+import sys
+
+
+class TestSeed:
+ def test_scalar(self):
+ s = np.random.RandomState(0)
+ assert_equal(s.randint(1000), 684)
+ s = np.random.RandomState(4294967295)
+ assert_equal(s.randint(1000), 419)
+
+ def test_array(self):
+ s = np.random.RandomState(range(10))
+ assert_equal(s.randint(1000), 468)
+ s = np.random.RandomState(np.arange(10))
+ assert_equal(s.randint(1000), 468)
+ s = np.random.RandomState([0])
+ assert_equal(s.randint(1000), 973)
+ s = np.random.RandomState([4294967295])
+ assert_equal(s.randint(1000), 265)
+
+ def test_invalid_scalar(self):
+ # seed must be an unsigned 32 bit integer
+ assert_raises(TypeError, np.random.RandomState, -0.5)
+ assert_raises(ValueError, np.random.RandomState, -1)
+
+ def test_invalid_array(self):
+ # seed must be an unsigned 32 bit integer
+ assert_raises(TypeError, np.random.RandomState, [-0.5])
+ assert_raises(ValueError, np.random.RandomState, [-1])
+ assert_raises(ValueError, np.random.RandomState, [4294967296])
+ assert_raises(ValueError, np.random.RandomState, [1, 2, 4294967296])
+ assert_raises(ValueError, np.random.RandomState, [1, -2, 4294967296])
+
+ def test_invalid_array_shape(self):
+ # gh-9832
+ assert_raises(ValueError, np.random.RandomState,
+ np.array([], dtype=np.int64))
+ assert_raises(ValueError, np.random.RandomState, [[1, 2, 3]])
+ assert_raises(ValueError, np.random.RandomState, [[1, 2, 3],
+ [4, 5, 6]])
+
+
+class TestBinomial:
+ def test_n_zero(self):
+ # Tests the corner case of n == 0 for the binomial distribution.
+ # binomial(0, p) should be zero for any p in [0, 1].
+ # This test addresses issue #3480.
+ zeros = np.zeros(2, dtype='int')
+ for p in [0, .5, 1]:
+ assert_(random.binomial(0, p) == 0)
+ assert_array_equal(random.binomial(zeros, p), zeros)
+
+ def test_p_is_nan(self):
+ # Issue #4571.
+ assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+ def test_basic(self):
+ random.multinomial(100, [0.2, 0.8])
+
+ def test_zero_probability(self):
+ random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+ def test_int_negative_interval(self):
+ assert_(-5 <= random.randint(-5, -1) < -1)
+ x = random.randint(-5, -1, 5)
+ assert_(np.all(-5 <= x))
+ assert_(np.all(x < -1))
+
+ def test_size(self):
+ # gh-3173
+ p = [0.5, 0.5]
+ assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(np.random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(np.random.multinomial(1, p, np.array((2, 2))).shape,
+ (2, 2, 2))
+
+ assert_raises(TypeError, np.random.multinomial, 1, p,
+ float(1))
+
+ def test_multidimensional_pvals(self):
+ assert_raises(ValueError, np.random.multinomial, 10, [[0, 1]])
+ assert_raises(ValueError, np.random.multinomial, 10, [[0], [1]])
+ assert_raises(ValueError, np.random.multinomial, 10, [[[0], [1]], [[1], [0]]])
+ assert_raises(ValueError, np.random.multinomial, 10, np.array([[0, 1], [1, 0]]))
+
+
+class TestSetState:
+ def setup_method(self):
+ self.seed = 1234567890
+ self.prng = random.RandomState(self.seed)
+ self.state = self.prng.get_state()
+
+ def test_basic(self):
+ old = self.prng.tomaxint(16)
+ self.prng.set_state(self.state)
+ new = self.prng.tomaxint(16)
+ assert_(np.all(old == new))
+
+ def test_gaussian_reset(self):
+ # Make sure the cached every-other-Gaussian is reset.
+ old = self.prng.standard_normal(size=3)
+ self.prng.set_state(self.state)
+ new = self.prng.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_gaussian_reset_in_media_res(self):
+ # When the state is saved with a cached Gaussian, make sure the
+ # cached Gaussian is restored.
+
+ self.prng.standard_normal()
+ state = self.prng.get_state()
+ old = self.prng.standard_normal(size=3)
+ self.prng.set_state(state)
+ new = self.prng.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_backwards_compatibility(self):
+ # Make sure we can accept old state tuples that do not have the
+ # cached Gaussian value.
+ old_state = self.state[:-2]
+ x1 = self.prng.standard_normal(size=16)
+ self.prng.set_state(old_state)
+ x2 = self.prng.standard_normal(size=16)
+ self.prng.set_state(self.state)
+ x3 = self.prng.standard_normal(size=16)
+ assert_(np.all(x1 == x2))
+ assert_(np.all(x1 == x3))
+
+ def test_negative_binomial(self):
+ # Ensure that the negative binomial results take floating point
+ # arguments without truncation.
+ self.prng.negative_binomial(0.5, 0.5)
+
+ def test_set_invalid_state(self):
+ # gh-25402
+ with pytest.raises(IndexError):
+ self.prng.set_state(())
+
+
+class TestRandint:
+
+ rfunc = np.random.randint
+
+ # valid integer/boolean types
+ itype = [np.bool, np.int8, np.uint8, np.int16, np.uint16,
+ np.int32, np.uint32, np.int64, np.uint64]
+
+ def test_unsupported_type(self):
+ assert_raises(TypeError, self.rfunc, 1, dtype=float)
+
+ def test_bounds_checking(self):
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+ assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd, dtype=dt)
+ assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1, dtype=dt)
+ assert_raises(ValueError, self.rfunc, ubnd, lbnd, dtype=dt)
+ assert_raises(ValueError, self.rfunc, 1, 0, dtype=dt)
+
+ def test_rng_zero_and_extremes(self):
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ tgt = ubnd - 1
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ tgt = lbnd
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ tgt = (lbnd + ubnd)//2
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ def test_full_range(self):
+ # Test for ticket #1690
+
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ try:
+ self.rfunc(lbnd, ubnd, dtype=dt)
+ except Exception as e:
+ raise AssertionError("No error should have been raised, "
+ "but one was with the following "
+ "message:\n\n%s" % str(e))
+
+ def test_in_bounds_fuzz(self):
+ # Don't use fixed seed
+ np.random.seed()
+
+ for dt in self.itype[1:]:
+ for ubnd in [4, 8, 16]:
+ vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
+ assert_(vals.max() < ubnd)
+ assert_(vals.min() >= 2)
+
+ vals = self.rfunc(0, 2, size=2**16, dtype=np.bool)
+
+ assert_(vals.max() < 2)
+ assert_(vals.min() >= 0)
+
+ def test_repeatability(self):
+ import hashlib
+ # We use a sha256 hash of generated sequences of 1000 samples
+ # in the range [0, 6) for all but bool, where the range
+ # is [0, 2). Hashes are for little endian numbers.
+ tgt = {'bool': '509aea74d792fb931784c4b0135392c65aec64beee12b0cc167548a2c3d31e71',
+ 'int16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+ 'int32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+ 'int64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+ 'int8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404',
+ 'uint16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+ 'uint32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+ 'uint64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+ 'uint8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404'}
+
+ for dt in self.itype[1:]:
+ np.random.seed(1234)
+
+ # view as little endian for hash
+ if sys.byteorder == 'little':
+ val = self.rfunc(0, 6, size=1000, dtype=dt)
+ else:
+ val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
+
+ res = hashlib.sha256(val.view(np.int8)).hexdigest()
+ assert_(tgt[np.dtype(dt).name] == res)
+
+ # bools do not depend on endianness
+ np.random.seed(1234)
+ val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
+ res = hashlib.sha256(val).hexdigest()
+ assert_(tgt[np.dtype(bool).name] == res)
+
+ def test_int64_uint64_corner_case(self):
+ # When stored in Numpy arrays, `lbnd` is casted
+ # as np.int64, and `ubnd` is casted as np.uint64.
+ # Checking whether `lbnd` >= `ubnd` used to be
+ # done solely via direct comparison, which is incorrect
+ # because when Numpy tries to compare both numbers,
+ # it casts both to np.float64 because there is
+ # no integer superset of np.int64 and np.uint64. However,
+ # `ubnd` is too large to be represented in np.float64,
+ # causing it be round down to np.iinfo(np.int64).max,
+ # leading to a ValueError because `lbnd` now equals
+ # the new `ubnd`.
+
+ dt = np.int64
+ tgt = np.iinfo(np.int64).max
+ lbnd = np.int64(np.iinfo(np.int64).max)
+ ubnd = np.uint64(np.iinfo(np.int64).max + 1)
+
+ # None of these function calls should
+ # generate a ValueError now.
+ actual = np.random.randint(lbnd, ubnd, dtype=dt)
+ assert_equal(actual, tgt)
+
+ def test_respect_dtype_singleton(self):
+ # See gh-7203
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ sample = self.rfunc(lbnd, ubnd, dtype=dt)
+ assert_equal(sample.dtype, np.dtype(dt))
+
+ for dt in (bool, int):
+ # The legacy rng uses "long" as the default integer:
+ lbnd = 0 if dt is bool else np.iinfo("long").min
+ ubnd = 2 if dt is bool else np.iinfo("long").max + 1
+
+ # gh-7284: Ensure that we get Python data types
+ sample = self.rfunc(lbnd, ubnd, dtype=dt)
+ assert_(not hasattr(sample, 'dtype'))
+ assert_equal(type(sample), dt)
+
+
+class TestRandomDist:
+ # Make sure the random distribution returns the correct value for a
+ # given seed
+
+ def setup_method(self):
+ self.seed = 1234567890
+
+ def test_rand(self):
+ np.random.seed(self.seed)
+ actual = np.random.rand(3, 2)
+ desired = np.array([[0.61879477158567997, 0.59162362775974664],
+ [0.88868358904449662, 0.89165480011560816],
+ [0.4575674820298663, 0.7781880808593471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_randn(self):
+ np.random.seed(self.seed)
+ actual = np.random.randn(3, 2)
+ desired = np.array([[1.34016345771863121, 1.73759122771936081],
+ [1.498988344300628, -0.2286433324536169],
+ [2.031033998682787, 2.17032494605655257]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_randint(self):
+ np.random.seed(self.seed)
+ actual = np.random.randint(-99, 99, size=(3, 2))
+ desired = np.array([[31, 3],
+ [-52, 41],
+ [-48, -66]])
+ assert_array_equal(actual, desired)
+
+ def test_random_integers(self):
+ np.random.seed(self.seed)
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ actual = np.random.random_integers(-99, 99, size=(3, 2))
+ assert_(len(w) == 1)
+ desired = np.array([[31, 3],
+ [-52, 41],
+ [-48, -66]])
+ assert_array_equal(actual, desired)
+
+ def test_random_integers_max_int(self):
+ # Tests whether random_integers can generate the
+ # maximum allowed Python int that can be converted
+ # into a C long. Previous implementations of this
+ # method have thrown an OverflowError when attempting
+ # to generate this integer.
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ actual = np.random.random_integers(np.iinfo('l').max,
+ np.iinfo('l').max)
+ assert_(len(w) == 1)
+
+ desired = np.iinfo('l').max
+ assert_equal(actual, desired)
+
+ def test_random_integers_deprecated(self):
+ with warnings.catch_warnings():
+ warnings.simplefilter("error", DeprecationWarning)
+
+ # DeprecationWarning raised with high == None
+ assert_raises(DeprecationWarning,
+ np.random.random_integers,
+ np.iinfo('l').max)
+
+ # DeprecationWarning raised with high != None
+ assert_raises(DeprecationWarning,
+ np.random.random_integers,
+ np.iinfo('l').max, np.iinfo('l').max)
+
+ def test_random(self):
+ np.random.seed(self.seed)
+ actual = np.random.random((3, 2))
+ desired = np.array([[0.61879477158567997, 0.59162362775974664],
+ [0.88868358904449662, 0.89165480011560816],
+ [0.4575674820298663, 0.7781880808593471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_choice_uniform_replace(self):
+ np.random.seed(self.seed)
+ actual = np.random.choice(4, 4)
+ desired = np.array([2, 3, 2, 3])
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_replace(self):
+ np.random.seed(self.seed)
+ actual = np.random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+ desired = np.array([1, 1, 2, 2])
+ assert_array_equal(actual, desired)
+
+ def test_choice_uniform_noreplace(self):
+ np.random.seed(self.seed)
+ actual = np.random.choice(4, 3, replace=False)
+ desired = np.array([0, 1, 3])
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_noreplace(self):
+ np.random.seed(self.seed)
+ actual = np.random.choice(4, 3, replace=False,
+ p=[0.1, 0.3, 0.5, 0.1])
+ desired = np.array([2, 3, 1])
+ assert_array_equal(actual, desired)
+
+ def test_choice_noninteger(self):
+ np.random.seed(self.seed)
+ actual = np.random.choice(['a', 'b', 'c', 'd'], 4)
+ desired = np.array(['c', 'd', 'c', 'd'])
+ assert_array_equal(actual, desired)
+
+ def test_choice_exceptions(self):
+ sample = np.random.choice
+ assert_raises(ValueError, sample, -1, 3)
+ assert_raises(ValueError, sample, 3., 3)
+ assert_raises(ValueError, sample, [[1, 2], [3, 4]], 3)
+ assert_raises(ValueError, sample, [], 3)
+ assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+ p=[[0.25, 0.25], [0.25, 0.25]])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+ assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+ # gh-13087
+ assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], 2,
+ replace=False, p=[1, 0, 0])
+
+ def test_choice_return_shape(self):
+ p = [0.1, 0.9]
+ # Check scalar
+ assert_(np.isscalar(np.random.choice(2, replace=True)))
+ assert_(np.isscalar(np.random.choice(2, replace=False)))
+ assert_(np.isscalar(np.random.choice(2, replace=True, p=p)))
+ assert_(np.isscalar(np.random.choice(2, replace=False, p=p)))
+ assert_(np.isscalar(np.random.choice([1, 2], replace=True)))
+ assert_(np.random.choice([None], replace=True) is None)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(np.random.choice(arr, replace=True) is a)
+
+ # Check 0-d array
+ s = tuple()
+ assert_(not np.isscalar(np.random.choice(2, s, replace=True)))
+ assert_(not np.isscalar(np.random.choice(2, s, replace=False)))
+ assert_(not np.isscalar(np.random.choice(2, s, replace=True, p=p)))
+ assert_(not np.isscalar(np.random.choice(2, s, replace=False, p=p)))
+ assert_(not np.isscalar(np.random.choice([1, 2], s, replace=True)))
+ assert_(np.random.choice([None], s, replace=True).ndim == 0)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(np.random.choice(arr, s, replace=True).item() is a)
+
+ # Check multi dimensional array
+ s = (2, 3)
+ p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+ assert_equal(np.random.choice(6, s, replace=True).shape, s)
+ assert_equal(np.random.choice(6, s, replace=False).shape, s)
+ assert_equal(np.random.choice(6, s, replace=True, p=p).shape, s)
+ assert_equal(np.random.choice(6, s, replace=False, p=p).shape, s)
+ assert_equal(np.random.choice(np.arange(6), s, replace=True).shape, s)
+
+ # Check zero-size
+ assert_equal(np.random.randint(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+ assert_equal(np.random.randint(0, -10, size=0).shape, (0,))
+ assert_equal(np.random.randint(10, 10, size=0).shape, (0,))
+ assert_equal(np.random.choice(0, size=0).shape, (0,))
+ assert_equal(np.random.choice([], size=(0,)).shape, (0,))
+ assert_equal(np.random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+ (3, 0, 4))
+ assert_raises(ValueError, np.random.choice, [], 10)
+
+ def test_choice_nan_probabilities(self):
+ a = np.array([42, 1, 2])
+ p = [None, None, None]
+ assert_raises(ValueError, np.random.choice, a, p=p)
+
+ def test_bytes(self):
+ np.random.seed(self.seed)
+ actual = np.random.bytes(10)
+ desired = b'\x82Ui\x9e\xff\x97+Wf\xa5'
+ assert_equal(actual, desired)
+
+ def test_shuffle(self):
+ # Test lists, arrays (of various dtypes), and multidimensional versions
+ # of both, c-contiguous or not:
+ for conv in [lambda x: np.array([]),
+ lambda x: x,
+ lambda x: np.asarray(x).astype(np.int8),
+ lambda x: np.asarray(x).astype(np.float32),
+ lambda x: np.asarray(x).astype(np.complex64),
+ lambda x: np.asarray(x).astype(object),
+ lambda x: [(i, i) for i in x],
+ lambda x: np.asarray([[i, i] for i in x]),
+ lambda x: np.vstack([x, x]).T,
+ # gh-11442
+ lambda x: (np.asarray([(i, i) for i in x],
+ [("a", int), ("b", int)])
+ .view(np.recarray)),
+ # gh-4270
+ lambda x: np.asarray([(i, i) for i in x],
+ [("a", object), ("b", np.int32)])]:
+ np.random.seed(self.seed)
+ alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+ np.random.shuffle(alist)
+ actual = alist
+ desired = conv([0, 1, 9, 6, 2, 4, 5, 8, 7, 3])
+ assert_array_equal(actual, desired)
+
+ def test_shuffle_masked(self):
+ # gh-3263
+ a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+ b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+ a_orig = a.copy()
+ b_orig = b.copy()
+ for i in range(50):
+ np.random.shuffle(a)
+ assert_equal(
+ sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+ np.random.shuffle(b)
+ assert_equal(
+ sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+ @pytest.mark.parametrize("random",
+ [np.random, np.random.RandomState(), np.random.default_rng()])
+ def test_shuffle_untyped_warning(self, random):
+ # Create a dict works like a sequence but isn't one
+ values = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6}
+ with pytest.warns(UserWarning,
+ match="you are shuffling a 'dict' object") as rec:
+ random.shuffle(values)
+ assert "test_random" in rec[0].filename
+
+ @pytest.mark.parametrize("random",
+ [np.random, np.random.RandomState(), np.random.default_rng()])
+ @pytest.mark.parametrize("use_array_like", [True, False])
+ def test_shuffle_no_object_unpacking(self, random, use_array_like):
+ class MyArr(np.ndarray):
+ pass
+
+ items = [
+ None, np.array([3]), np.float64(3), np.array(10), np.float64(7)
+ ]
+ arr = np.array(items, dtype=object)
+ item_ids = {id(i) for i in items}
+ if use_array_like:
+ arr = arr.view(MyArr)
+
+ # The array was created fine, and did not modify any objects:
+ assert all(id(i) in item_ids for i in arr)
+
+ if use_array_like and not isinstance(random, np.random.Generator):
+ # The old API gives incorrect results, but warns about it.
+ with pytest.warns(UserWarning,
+ match="Shuffling a one dimensional array.*"):
+ random.shuffle(arr)
+ else:
+ random.shuffle(arr)
+ assert all(id(i) in item_ids for i in arr)
+
+ def test_shuffle_memoryview(self):
+ # gh-18273
+ # allow graceful handling of memoryviews
+ # (treat the same as arrays)
+ np.random.seed(self.seed)
+ a = np.arange(5).data
+ np.random.shuffle(a)
+ assert_equal(np.asarray(a), [0, 1, 4, 3, 2])
+ rng = np.random.RandomState(self.seed)
+ rng.shuffle(a)
+ assert_equal(np.asarray(a), [0, 1, 2, 3, 4])
+ rng = np.random.default_rng(self.seed)
+ rng.shuffle(a)
+ assert_equal(np.asarray(a), [4, 1, 0, 3, 2])
+
+ def test_shuffle_not_writeable(self):
+ a = np.zeros(3)
+ a.flags.writeable = False
+ with pytest.raises(ValueError, match='read-only'):
+ np.random.shuffle(a)
+
+ def test_beta(self):
+ np.random.seed(self.seed)
+ actual = np.random.beta(.1, .9, size=(3, 2))
+ desired = np.array(
+ [[1.45341850513746058e-02, 5.31297615662868145e-04],
+ [1.85366619058432324e-06, 4.19214516800110563e-03],
+ [1.58405155108498093e-04, 1.26252891949397652e-04]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_binomial(self):
+ np.random.seed(self.seed)
+ actual = np.random.binomial(100, .456, size=(3, 2))
+ desired = np.array([[37, 43],
+ [42, 48],
+ [46, 45]])
+ assert_array_equal(actual, desired)
+
+ def test_chisquare(self):
+ np.random.seed(self.seed)
+ actual = np.random.chisquare(50, size=(3, 2))
+ desired = np.array([[63.87858175501090585, 68.68407748911370447],
+ [65.77116116901505904, 47.09686762438974483],
+ [72.3828403199695174, 74.18408615260374006]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_dirichlet(self):
+ np.random.seed(self.seed)
+ alpha = np.array([51.72840233779265162, 39.74494232180943953])
+ actual = np.random.mtrand.dirichlet(alpha, size=(3, 2))
+ desired = np.array([[[0.54539444573611562, 0.45460555426388438],
+ [0.62345816822039413, 0.37654183177960598]],
+ [[0.55206000085785778, 0.44793999914214233],
+ [0.58964023305154301, 0.41035976694845688]],
+ [[0.59266909280647828, 0.40733090719352177],
+ [0.56974431743975207, 0.43025568256024799]]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_dirichlet_size(self):
+ # gh-3173
+ p = np.array([51.72840233779265162, 39.74494232180943953])
+ assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(np.random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(np.random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(np.random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+ assert_raises(TypeError, np.random.dirichlet, p, float(1))
+
+ def test_dirichlet_bad_alpha(self):
+ # gh-2089
+ alpha = np.array([5.4e-01, -1.0e-16])
+ assert_raises(ValueError, np.random.mtrand.dirichlet, alpha)
+
+ # gh-15876
+ assert_raises(ValueError, random.dirichlet, [[5, 1]])
+ assert_raises(ValueError, random.dirichlet, [[5], [1]])
+ assert_raises(ValueError, random.dirichlet, [[[5], [1]], [[1], [5]]])
+ assert_raises(ValueError, random.dirichlet, np.array([[5, 1], [1, 5]]))
+
+ def test_exponential(self):
+ np.random.seed(self.seed)
+ actual = np.random.exponential(1.1234, size=(3, 2))
+ desired = np.array([[1.08342649775011624, 1.00607889924557314],
+ [2.46628830085216721, 2.49668106809923884],
+ [0.68717433461363442, 1.69175666993575979]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_exponential_0(self):
+ assert_equal(np.random.exponential(scale=0), 0)
+ assert_raises(ValueError, np.random.exponential, scale=-0.)
+
+ def test_f(self):
+ np.random.seed(self.seed)
+ actual = np.random.f(12, 77, size=(3, 2))
+ desired = np.array([[1.21975394418575878, 1.75135759791559775],
+ [1.44803115017146489, 1.22108959480396262],
+ [1.02176975757740629, 1.34431827623300415]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gamma(self):
+ np.random.seed(self.seed)
+ actual = np.random.gamma(5, 3, size=(3, 2))
+ desired = np.array([[24.60509188649287182, 28.54993563207210627],
+ [26.13476110204064184, 12.56988482927716078],
+ [31.71863275789960568, 33.30143302795922011]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_gamma_0(self):
+ assert_equal(np.random.gamma(shape=0, scale=0), 0)
+ assert_raises(ValueError, np.random.gamma, shape=-0., scale=-0.)
+
+ def test_geometric(self):
+ np.random.seed(self.seed)
+ actual = np.random.geometric(.123456789, size=(3, 2))
+ desired = np.array([[8, 7],
+ [17, 17],
+ [5, 12]])
+ assert_array_equal(actual, desired)
+
+ def test_gumbel(self):
+ np.random.seed(self.seed)
+ actual = np.random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[0.19591898743416816, 0.34405539668096674],
+ [-1.4492522252274278, -1.47374816298446865],
+ [1.10651090478803416, -0.69535848626236174]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gumbel_0(self):
+ assert_equal(np.random.gumbel(scale=0), 0)
+ assert_raises(ValueError, np.random.gumbel, scale=-0.)
+
+ def test_hypergeometric(self):
+ np.random.seed(self.seed)
+ actual = np.random.hypergeometric(10, 5, 14, size=(3, 2))
+ desired = np.array([[10, 10],
+ [10, 10],
+ [9, 9]])
+ assert_array_equal(actual, desired)
+
+ # Test nbad = 0
+ actual = np.random.hypergeometric(5, 0, 3, size=4)
+ desired = np.array([3, 3, 3, 3])
+ assert_array_equal(actual, desired)
+
+ actual = np.random.hypergeometric(15, 0, 12, size=4)
+ desired = np.array([12, 12, 12, 12])
+ assert_array_equal(actual, desired)
+
+ # Test ngood = 0
+ actual = np.random.hypergeometric(0, 5, 3, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ actual = np.random.hypergeometric(0, 15, 12, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ def test_laplace(self):
+ np.random.seed(self.seed)
+ actual = np.random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[0.66599721112760157, 0.52829452552221945],
+ [3.12791959514407125, 3.18202813572992005],
+ [-0.05391065675859356, 1.74901336242837324]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_laplace_0(self):
+ assert_equal(np.random.laplace(scale=0), 0)
+ assert_raises(ValueError, np.random.laplace, scale=-0.)
+
+ def test_logistic(self):
+ np.random.seed(self.seed)
+ actual = np.random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[1.09232835305011444, 0.8648196662399954],
+ [4.27818590694950185, 4.33897006346929714],
+ [-0.21682183359214885, 2.63373365386060332]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_lognormal(self):
+ np.random.seed(self.seed)
+ actual = np.random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+ desired = np.array([[16.50698631688883822, 36.54846706092654784],
+ [22.67886599981281748, 0.71617561058995771],
+ [65.72798501792723869, 86.84341601437161273]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_lognormal_0(self):
+ assert_equal(np.random.lognormal(sigma=0), 1)
+ assert_raises(ValueError, np.random.lognormal, sigma=-0.)
+
+ def test_logseries(self):
+ np.random.seed(self.seed)
+ actual = np.random.logseries(p=.923456789, size=(3, 2))
+ desired = np.array([[2, 2],
+ [6, 17],
+ [3, 6]])
+ assert_array_equal(actual, desired)
+
+ def test_multinomial(self):
+ np.random.seed(self.seed)
+ actual = np.random.multinomial(20, [1/6.]*6, size=(3, 2))
+ desired = np.array([[[4, 3, 5, 4, 2, 2],
+ [5, 2, 8, 2, 2, 1]],
+ [[3, 4, 3, 6, 0, 4],
+ [2, 1, 4, 3, 6, 4]],
+ [[4, 4, 2, 5, 2, 3],
+ [4, 3, 4, 2, 3, 4]]])
+ assert_array_equal(actual, desired)
+
+ def test_multivariate_normal(self):
+ np.random.seed(self.seed)
+ mean = (.123456789, 10)
+ cov = [[1, 0], [0, 1]]
+ size = (3, 2)
+ actual = np.random.multivariate_normal(mean, cov, size)
+ desired = np.array([[[1.463620246718631, 11.73759122771936],
+ [1.622445133300628, 9.771356667546383]],
+ [[2.154490787682787, 12.170324946056553],
+ [1.719909438201865, 9.230548443648306]],
+ [[0.689515026297799, 9.880729819607714],
+ [-0.023054015651998, 9.201096623542879]]])
+
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ # Check for default size, was raising deprecation warning
+ actual = np.random.multivariate_normal(mean, cov)
+ desired = np.array([0.895289569463708, 9.17180864067987])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ # Check that non positive-semidefinite covariance warns with
+ # RuntimeWarning
+ mean = [0, 0]
+ cov = [[1, 2], [2, 1]]
+ assert_warns(RuntimeWarning, np.random.multivariate_normal, mean, cov)
+
+ # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+ assert_no_warnings(np.random.multivariate_normal, mean, cov,
+ check_valid='ignore')
+
+ # and that it raises with RuntimeWarning check_valid='raises'
+ assert_raises(ValueError, np.random.multivariate_normal, mean, cov,
+ check_valid='raise')
+
+ cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+ with suppress_warnings() as sup:
+ np.random.multivariate_normal(mean, cov)
+ w = sup.record(RuntimeWarning)
+ assert len(w) == 0
+
+ def test_negative_binomial(self):
+ np.random.seed(self.seed)
+ actual = np.random.negative_binomial(n=100, p=.12345, size=(3, 2))
+ desired = np.array([[848, 841],
+ [892, 611],
+ [779, 647]])
+ assert_array_equal(actual, desired)
+
+ def test_noncentral_chisquare(self):
+ np.random.seed(self.seed)
+ actual = np.random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+ desired = np.array([[23.91905354498517511, 13.35324692733826346],
+ [31.22452661329736401, 16.60047399466177254],
+ [5.03461598262724586, 17.94973089023519464]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ actual = np.random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+ desired = np.array([[1.47145377828516666, 0.15052899268012659],
+ [0.00943803056963588, 1.02647251615666169],
+ [0.332334982684171, 0.15451287602753125]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ np.random.seed(self.seed)
+ actual = np.random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+ desired = np.array([[9.597154162763948, 11.725484450296079],
+ [10.413711048138335, 3.694475922923986],
+ [13.484222138963087, 14.377255424602957]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_noncentral_f(self):
+ np.random.seed(self.seed)
+ actual = np.random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+ size=(3, 2))
+ desired = np.array([[1.40598099674926669, 0.34207973179285761],
+ [3.57715069265772545, 7.92632662577829805],
+ [0.43741599463544162, 1.1774208752428319]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_normal(self):
+ np.random.seed(self.seed)
+ actual = np.random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[2.80378370443726244, 3.59863924443872163],
+ [3.121433477601256, -0.33382987590723379],
+ [4.18552478636557357, 4.46410668111310471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_normal_0(self):
+ assert_equal(np.random.normal(scale=0), 0)
+ assert_raises(ValueError, np.random.normal, scale=-0.)
+
+ def test_pareto(self):
+ np.random.seed(self.seed)
+ actual = np.random.pareto(a=.123456789, size=(3, 2))
+ desired = np.array(
+ [[2.46852460439034849e+03, 1.41286880810518346e+03],
+ [5.28287797029485181e+07, 6.57720981047328785e+07],
+ [1.40840323350391515e+02, 1.98390255135251704e+05]])
+ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+ # matrix differs by 24 nulps. Discussion:
+ # https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+ # Consensus is that this is probably some gcc quirk that affects
+ # rounding but not in any important way, so we just use a looser
+ # tolerance on this test:
+ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+ def test_poisson(self):
+ np.random.seed(self.seed)
+ actual = np.random.poisson(lam=.123456789, size=(3, 2))
+ desired = np.array([[0, 0],
+ [1, 0],
+ [0, 0]])
+ assert_array_equal(actual, desired)
+
+ def test_poisson_exceptions(self):
+ lambig = np.iinfo('l').max
+ lamneg = -1
+ assert_raises(ValueError, np.random.poisson, lamneg)
+ assert_raises(ValueError, np.random.poisson, [lamneg]*10)
+ assert_raises(ValueError, np.random.poisson, lambig)
+ assert_raises(ValueError, np.random.poisson, [lambig]*10)
+
+ def test_power(self):
+ np.random.seed(self.seed)
+ actual = np.random.power(a=.123456789, size=(3, 2))
+ desired = np.array([[0.02048932883240791, 0.01424192241128213],
+ [0.38446073748535298, 0.39499689943484395],
+ [0.00177699707563439, 0.13115505880863756]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_rayleigh(self):
+ np.random.seed(self.seed)
+ actual = np.random.rayleigh(scale=10, size=(3, 2))
+ desired = np.array([[13.8882496494248393, 13.383318339044731],
+ [20.95413364294492098, 21.08285015800712614],
+ [11.06066537006854311, 17.35468505778271009]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_rayleigh_0(self):
+ assert_equal(np.random.rayleigh(scale=0), 0)
+ assert_raises(ValueError, np.random.rayleigh, scale=-0.)
+
+ def test_standard_cauchy(self):
+ np.random.seed(self.seed)
+ actual = np.random.standard_cauchy(size=(3, 2))
+ desired = np.array([[0.77127660196445336, -6.55601161955910605],
+ [0.93582023391158309, -2.07479293013759447],
+ [-4.74601644297011926, 0.18338989290760804]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_exponential(self):
+ np.random.seed(self.seed)
+ actual = np.random.standard_exponential(size=(3, 2))
+ desired = np.array([[0.96441739162374596, 0.89556604882105506],
+ [2.1953785836319808, 2.22243285392490542],
+ [0.6116915921431676, 1.50592546727413201]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_gamma(self):
+ np.random.seed(self.seed)
+ actual = np.random.standard_gamma(shape=3, size=(3, 2))
+ desired = np.array([[5.50841531318455058, 6.62953470301903103],
+ [5.93988484943779227, 2.31044849402133989],
+ [7.54838614231317084, 8.012756093271868]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_standard_gamma_0(self):
+ assert_equal(np.random.standard_gamma(shape=0), 0)
+ assert_raises(ValueError, np.random.standard_gamma, shape=-0.)
+
+ def test_standard_normal(self):
+ np.random.seed(self.seed)
+ actual = np.random.standard_normal(size=(3, 2))
+ desired = np.array([[1.34016345771863121, 1.73759122771936081],
+ [1.498988344300628, -0.2286433324536169],
+ [2.031033998682787, 2.17032494605655257]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_t(self):
+ np.random.seed(self.seed)
+ actual = np.random.standard_t(df=10, size=(3, 2))
+ desired = np.array([[0.97140611862659965, -0.08830486548450577],
+ [1.36311143689505321, -0.55317463909867071],
+ [-0.18473749069684214, 0.61181537341755321]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_triangular(self):
+ np.random.seed(self.seed)
+ actual = np.random.triangular(left=5.12, mode=10.23, right=20.34,
+ size=(3, 2))
+ desired = np.array([[12.68117178949215784, 12.4129206149193152],
+ [16.20131377335158263, 16.25692138747600524],
+ [11.20400690911820263, 14.4978144835829923]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_uniform(self):
+ np.random.seed(self.seed)
+ actual = np.random.uniform(low=1.23, high=10.54, size=(3, 2))
+ desired = np.array([[6.99097932346268003, 6.73801597444323974],
+ [9.50364421400426274, 9.53130618907631089],
+ [5.48995325769805476, 8.47493103280052118]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_uniform_range_bounds(self):
+ fmin = np.finfo('float').min
+ fmax = np.finfo('float').max
+
+ func = np.random.uniform
+ assert_raises(OverflowError, func, -np.inf, 0)
+ assert_raises(OverflowError, func, 0, np.inf)
+ assert_raises(OverflowError, func, fmin, fmax)
+ assert_raises(OverflowError, func, [-np.inf], [0])
+ assert_raises(OverflowError, func, [0], [np.inf])
+
+ # (fmax / 1e17) - fmin is within range, so this should not throw
+ # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+ # DBL_MAX by increasing fmin a bit
+ np.random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+ def test_scalar_exception_propagation(self):
+ # Tests that exceptions are correctly propagated in distributions
+ # when called with objects that throw exceptions when converted to
+ # scalars.
+ #
+ # Regression test for gh: 8865
+
+ class ThrowingFloat(np.ndarray):
+ def __float__(self):
+ raise TypeError
+
+ throwing_float = np.array(1.0).view(ThrowingFloat)
+ assert_raises(TypeError, np.random.uniform, throwing_float,
+ throwing_float)
+
+ class ThrowingInteger(np.ndarray):
+ def __int__(self):
+ raise TypeError
+
+ __index__ = __int__
+
+ throwing_int = np.array(1).view(ThrowingInteger)
+ assert_raises(TypeError, np.random.hypergeometric, throwing_int, 1, 1)
+
+ def test_vonmises(self):
+ np.random.seed(self.seed)
+ actual = np.random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+ desired = np.array([[2.28567572673902042, 2.89163838442285037],
+ [0.38198375564286025, 2.57638023113890746],
+ [1.19153771588353052, 1.83509849681825354]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_vonmises_small(self):
+ # check infinite loop, gh-4720
+ np.random.seed(self.seed)
+ r = np.random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+ np.testing.assert_(np.isfinite(r).all())
+
+ def test_wald(self):
+ np.random.seed(self.seed)
+ actual = np.random.wald(mean=1.23, scale=1.54, size=(3, 2))
+ desired = np.array([[3.82935265715889983, 5.13125249184285526],
+ [0.35045403618358717, 1.50832396872003538],
+ [0.24124319895843183, 0.22031101461955038]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_weibull(self):
+ np.random.seed(self.seed)
+ actual = np.random.weibull(a=1.23, size=(3, 2))
+ desired = np.array([[0.97097342648766727, 0.91422896443565516],
+ [1.89517770034962929, 1.91414357960479564],
+ [0.67057783752390987, 1.39494046635066793]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_weibull_0(self):
+ np.random.seed(self.seed)
+ assert_equal(np.random.weibull(a=0, size=12), np.zeros(12))
+ assert_raises(ValueError, np.random.weibull, a=-0.)
+
+ def test_zipf(self):
+ np.random.seed(self.seed)
+ actual = np.random.zipf(a=1.23, size=(3, 2))
+ desired = np.array([[66, 29],
+ [1, 1],
+ [3, 13]])
+ assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+ # tests that functions that broadcast behave
+ # correctly when presented with non-scalar arguments
+ def setup_method(self):
+ self.seed = 123456789
+
+ def setSeed(self):
+ np.random.seed(self.seed)
+
+ # TODO: Include test for randint once it can broadcast
+ # Can steal the test written in PR #6938
+
+ def test_uniform(self):
+ low = [0]
+ high = [1]
+ uniform = np.random.uniform
+ desired = np.array([0.53283302478975902,
+ 0.53413660089041659,
+ 0.50955303552646702])
+
+ self.setSeed()
+ actual = uniform(low * 3, high)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ self.setSeed()
+ actual = uniform(low, high * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_normal(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ normal = np.random.normal
+ desired = np.array([2.2129019979039612,
+ 2.1283977976520019,
+ 1.8417114045748335])
+
+ self.setSeed()
+ actual = normal(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, normal, loc * 3, bad_scale)
+
+ self.setSeed()
+ actual = normal(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+ def test_beta(self):
+ a = [1]
+ b = [2]
+ bad_a = [-1]
+ bad_b = [-2]
+ beta = np.random.beta
+ desired = np.array([0.19843558305989056,
+ 0.075230336409423643,
+ 0.24976865978980844])
+
+ self.setSeed()
+ actual = beta(a * 3, b)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, beta, bad_a * 3, b)
+ assert_raises(ValueError, beta, a * 3, bad_b)
+
+ self.setSeed()
+ actual = beta(a, b * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, beta, bad_a, b * 3)
+ assert_raises(ValueError, beta, a, bad_b * 3)
+
+ def test_exponential(self):
+ scale = [1]
+ bad_scale = [-1]
+ exponential = np.random.exponential
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.setSeed()
+ actual = exponential(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, exponential, bad_scale * 3)
+
+ def test_standard_gamma(self):
+ shape = [1]
+ bad_shape = [-1]
+ std_gamma = np.random.standard_gamma
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.setSeed()
+ actual = std_gamma(shape * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+ def test_gamma(self):
+ shape = [1]
+ scale = [2]
+ bad_shape = [-1]
+ bad_scale = [-2]
+ gamma = np.random.gamma
+ desired = np.array([1.5221370731769048,
+ 1.5277256455738331,
+ 1.4248762625178359])
+
+ self.setSeed()
+ actual = gamma(shape * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape * 3, scale)
+ assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+ self.setSeed()
+ actual = gamma(shape, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape, scale * 3)
+ assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+ def test_f(self):
+ dfnum = [1]
+ dfden = [2]
+ bad_dfnum = [-1]
+ bad_dfden = [-2]
+ f = np.random.f
+ desired = np.array([0.80038951638264799,
+ 0.86768719635363512,
+ 2.7251095168386801])
+
+ self.setSeed()
+ actual = f(dfnum * 3, dfden)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+ assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+ self.setSeed()
+ actual = f(dfnum, dfden * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+ assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+ def test_noncentral_f(self):
+ dfnum = [2]
+ dfden = [3]
+ nonc = [4]
+ bad_dfnum = [0]
+ bad_dfden = [-1]
+ bad_nonc = [-2]
+ nonc_f = np.random.noncentral_f
+ desired = np.array([9.1393943263705211,
+ 13.025456344595602,
+ 8.8018098359100545])
+
+ self.setSeed()
+ actual = nonc_f(dfnum * 3, dfden, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+ self.setSeed()
+ actual = nonc_f(dfnum, dfden * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+ self.setSeed()
+ actual = nonc_f(dfnum, dfden, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+ def test_noncentral_f_small_df(self):
+ self.setSeed()
+ desired = np.array([6.869638627492048, 0.785880199263955])
+ actual = np.random.noncentral_f(0.9, 0.9, 2, size=2)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_chisquare(self):
+ df = [1]
+ bad_df = [-1]
+ chisquare = np.random.chisquare
+ desired = np.array([0.57022801133088286,
+ 0.51947702108840776,
+ 0.1320969254923558])
+
+ self.setSeed()
+ actual = chisquare(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, chisquare, bad_df * 3)
+
+ def test_noncentral_chisquare(self):
+ df = [1]
+ nonc = [2]
+ bad_df = [-1]
+ bad_nonc = [-2]
+ nonc_chi = np.random.noncentral_chisquare
+ desired = np.array([9.0015599467913763,
+ 4.5804135049718742,
+ 6.0872302432834564])
+
+ self.setSeed()
+ actual = nonc_chi(df * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+ assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+ self.setSeed()
+ actual = nonc_chi(df, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+ assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+ def test_standard_t(self):
+ df = [1]
+ bad_df = [-1]
+ t = np.random.standard_t
+ desired = np.array([3.0702872575217643,
+ 5.8560725167361607,
+ 1.0274791436474273])
+
+ self.setSeed()
+ actual = t(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, t, bad_df * 3)
+
+ def test_vonmises(self):
+ mu = [2]
+ kappa = [1]
+ bad_kappa = [-1]
+ vonmises = np.random.vonmises
+ desired = np.array([2.9883443664201312,
+ -2.7064099483995943,
+ -1.8672476700665914])
+
+ self.setSeed()
+ actual = vonmises(mu * 3, kappa)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, vonmises, mu * 3, bad_kappa)
+
+ self.setSeed()
+ actual = vonmises(mu, kappa * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, vonmises, mu, bad_kappa * 3)
+
+ def test_pareto(self):
+ a = [1]
+ bad_a = [-1]
+ pareto = np.random.pareto
+ desired = np.array([1.1405622680198362,
+ 1.1465519762044529,
+ 1.0389564467453547])
+
+ self.setSeed()
+ actual = pareto(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, pareto, bad_a * 3)
+
+ def test_weibull(self):
+ a = [1]
+ bad_a = [-1]
+ weibull = np.random.weibull
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.setSeed()
+ actual = weibull(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, weibull, bad_a * 3)
+
+ def test_power(self):
+ a = [1]
+ bad_a = [-1]
+ power = np.random.power
+ desired = np.array([0.53283302478975902,
+ 0.53413660089041659,
+ 0.50955303552646702])
+
+ self.setSeed()
+ actual = power(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, power, bad_a * 3)
+
+ def test_laplace(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ laplace = np.random.laplace
+ desired = np.array([0.067921356028507157,
+ 0.070715642226971326,
+ 0.019290950698972624])
+
+ self.setSeed()
+ actual = laplace(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+ self.setSeed()
+ actual = laplace(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+ def test_gumbel(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ gumbel = np.random.gumbel
+ desired = np.array([0.2730318639556768,
+ 0.26936705726291116,
+ 0.33906220393037939])
+
+ self.setSeed()
+ actual = gumbel(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+ self.setSeed()
+ actual = gumbel(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+ def test_logistic(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ logistic = np.random.logistic
+ desired = np.array([0.13152135837586171,
+ 0.13675915696285773,
+ 0.038216792802833396])
+
+ self.setSeed()
+ actual = logistic(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, logistic, loc * 3, bad_scale)
+
+ self.setSeed()
+ actual = logistic(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, logistic, loc, bad_scale * 3)
+
+ def test_lognormal(self):
+ mean = [0]
+ sigma = [1]
+ bad_sigma = [-1]
+ lognormal = np.random.lognormal
+ desired = np.array([9.1422086044848427,
+ 8.4013952870126261,
+ 6.3073234116578671])
+
+ self.setSeed()
+ actual = lognormal(mean * 3, sigma)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+
+ self.setSeed()
+ actual = lognormal(mean, sigma * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, lognormal, mean, bad_sigma * 3)
+
+ def test_rayleigh(self):
+ scale = [1]
+ bad_scale = [-1]
+ rayleigh = np.random.rayleigh
+ desired = np.array([1.2337491937897689,
+ 1.2360119924878694,
+ 1.1936818095781789])
+
+ self.setSeed()
+ actual = rayleigh(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, rayleigh, bad_scale * 3)
+
+ def test_wald(self):
+ mean = [0.5]
+ scale = [1]
+ bad_mean = [0]
+ bad_scale = [-2]
+ wald = np.random.wald
+ desired = np.array([0.11873681120271318,
+ 0.12450084820795027,
+ 0.9096122728408238])
+
+ self.setSeed()
+ actual = wald(mean * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, wald, bad_mean * 3, scale)
+ assert_raises(ValueError, wald, mean * 3, bad_scale)
+
+ self.setSeed()
+ actual = wald(mean, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, wald, bad_mean, scale * 3)
+ assert_raises(ValueError, wald, mean, bad_scale * 3)
+ assert_raises(ValueError, wald, 0.0, 1)
+ assert_raises(ValueError, wald, 0.5, 0.0)
+
+ def test_triangular(self):
+ left = [1]
+ right = [3]
+ mode = [2]
+ bad_left_one = [3]
+ bad_mode_one = [4]
+ bad_left_two, bad_mode_two = right * 2
+ triangular = np.random.triangular
+ desired = np.array([2.03339048710429,
+ 2.0347400359389356,
+ 2.0095991069536208])
+
+ self.setSeed()
+ actual = triangular(left * 3, mode, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+ assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+ assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+ right)
+
+ self.setSeed()
+ actual = triangular(left, mode * 3, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+ assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+ right)
+
+ self.setSeed()
+ actual = triangular(left, mode, right * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+ assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+ right * 3)
+
+ def test_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ binom = np.random.binomial
+ desired = np.array([1, 1, 1])
+
+ self.setSeed()
+ actual = binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n * 3, p)
+ assert_raises(ValueError, binom, n * 3, bad_p_one)
+ assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+ self.setSeed()
+ actual = binom(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n, p * 3)
+ assert_raises(ValueError, binom, n, bad_p_one * 3)
+ assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+ def test_negative_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ neg_binom = np.random.negative_binomial
+ desired = np.array([1, 0, 1])
+
+ self.setSeed()
+ actual = neg_binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n * 3, p)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+ self.setSeed()
+ actual = neg_binom(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n, p * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+ def test_poisson(self):
+ max_lam = np.random.RandomState()._poisson_lam_max
+
+ lam = [1]
+ bad_lam_one = [-1]
+ bad_lam_two = [max_lam * 2]
+ poisson = np.random.poisson
+ desired = np.array([1, 1, 0])
+
+ self.setSeed()
+ actual = poisson(lam * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, poisson, bad_lam_one * 3)
+ assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+ def test_zipf(self):
+ a = [2]
+ bad_a = [0]
+ zipf = np.random.zipf
+ desired = np.array([2, 2, 1])
+
+ self.setSeed()
+ actual = zipf(a * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, zipf, bad_a * 3)
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, zipf, np.nan)
+ assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+ def test_geometric(self):
+ p = [0.5]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ geom = np.random.geometric
+ desired = np.array([2, 2, 2])
+
+ self.setSeed()
+ actual = geom(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, geom, bad_p_one * 3)
+ assert_raises(ValueError, geom, bad_p_two * 3)
+
+ def test_hypergeometric(self):
+ ngood = [1]
+ nbad = [2]
+ nsample = [2]
+ bad_ngood = [-1]
+ bad_nbad = [-2]
+ bad_nsample_one = [0]
+ bad_nsample_two = [4]
+ hypergeom = np.random.hypergeometric
+ desired = np.array([1, 1, 1])
+
+ self.setSeed()
+ actual = hypergeom(ngood * 3, nbad, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood * 3, nbad, nsample)
+ assert_raises(ValueError, hypergeom, ngood * 3, bad_nbad, nsample)
+ assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_one)
+ assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_two)
+
+ self.setSeed()
+ actual = hypergeom(ngood, nbad * 3, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood, nbad * 3, nsample)
+ assert_raises(ValueError, hypergeom, ngood, bad_nbad * 3, nsample)
+ assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_one)
+ assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_two)
+
+ self.setSeed()
+ actual = hypergeom(ngood, nbad, nsample * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+ def test_logseries(self):
+ p = [0.5]
+ bad_p_one = [2]
+ bad_p_two = [-1]
+ logseries = np.random.logseries
+ desired = np.array([1, 1, 1])
+
+ self.setSeed()
+ actual = logseries(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, logseries, bad_p_one * 3)
+ assert_raises(ValueError, logseries, bad_p_two * 3)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+ # make sure each state produces the same sequence even in threads
+ def setup_method(self):
+ self.seeds = range(4)
+
+ def check_function(self, function, sz):
+ from threading import Thread
+
+ out1 = np.empty((len(self.seeds),) + sz)
+ out2 = np.empty((len(self.seeds),) + sz)
+
+ # threaded generation
+ t = [Thread(target=function, args=(np.random.RandomState(s), o))
+ for s, o in zip(self.seeds, out1)]
+ [x.start() for x in t]
+ [x.join() for x in t]
+
+ # the same serial
+ for s, o in zip(self.seeds, out2):
+ function(np.random.RandomState(s), o)
+
+ # these platforms change x87 fpu precision mode in threads
+ if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+ assert_array_almost_equal(out1, out2)
+ else:
+ assert_array_equal(out1, out2)
+
+ def test_normal(self):
+ def gen_random(state, out):
+ out[...] = state.normal(size=10000)
+ self.check_function(gen_random, sz=(10000,))
+
+ def test_exp(self):
+ def gen_random(state, out):
+ out[...] = state.exponential(scale=np.ones((100, 1000)))
+ self.check_function(gen_random, sz=(100, 1000))
+
+ def test_multinomial(self):
+ def gen_random(state, out):
+ out[...] = state.multinomial(10, [1/6.]*6, size=10000)
+ self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+ def setup_method(self):
+ self.argOne = np.array([2])
+ self.argTwo = np.array([3])
+ self.argThree = np.array([4])
+ self.tgtShape = (1,)
+
+ def test_one_arg_funcs(self):
+ funcs = (np.random.exponential, np.random.standard_gamma,
+ np.random.chisquare, np.random.standard_t,
+ np.random.pareto, np.random.weibull,
+ np.random.power, np.random.rayleigh,
+ np.random.poisson, np.random.zipf,
+ np.random.geometric, np.random.logseries)
+
+ probfuncs = (np.random.geometric, np.random.logseries)
+
+ for func in funcs:
+ if func in probfuncs: # p < 1.0
+ out = func(np.array([0.5]))
+
+ else:
+ out = func(self.argOne)
+
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_two_arg_funcs(self):
+ funcs = (np.random.uniform, np.random.normal,
+ np.random.beta, np.random.gamma,
+ np.random.f, np.random.noncentral_chisquare,
+ np.random.vonmises, np.random.laplace,
+ np.random.gumbel, np.random.logistic,
+ np.random.lognormal, np.random.wald,
+ np.random.binomial, np.random.negative_binomial)
+
+ probfuncs = (np.random.binomial, np.random.negative_binomial)
+
+ for func in funcs:
+ if func in probfuncs: # p <= 1
+ argTwo = np.array([0.5])
+
+ else:
+ argTwo = self.argTwo
+
+ out = func(self.argOne, argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, argTwo[0])
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_randint(self):
+ itype = [bool, np.int8, np.uint8, np.int16, np.uint16,
+ np.int32, np.uint32, np.int64, np.uint64]
+ func = np.random.randint
+ high = np.array([1])
+ low = np.array([0])
+
+ for dt in itype:
+ out = func(low, high, dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(low[0], high, dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(low, high[0], dtype=dt)
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_three_arg_funcs(self):
+ funcs = [np.random.noncentral_f, np.random.triangular,
+ np.random.hypergeometric]
+
+ for func in funcs:
+ out = func(self.argOne, self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, self.argTwo[0], self.argThree)
+ assert_equal(out.shape, self.tgtShape)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate.py
new file mode 100644
index 0000000000000000000000000000000000000000..5121a684f693a14febd473272509d491a4438631
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate.py
@@ -0,0 +1,2124 @@
+import hashlib
+import pickle
+import sys
+import warnings
+
+import numpy as np
+import pytest
+from numpy.testing import (
+ assert_, assert_raises, assert_equal, assert_warns,
+ assert_no_warnings, assert_array_equal, assert_array_almost_equal,
+ suppress_warnings, IS_WASM
+ )
+
+from numpy.random import MT19937, PCG64
+from numpy import random
+
+INT_FUNCS = {'binomial': (100.0, 0.6),
+ 'geometric': (.5,),
+ 'hypergeometric': (20, 20, 10),
+ 'logseries': (.5,),
+ 'multinomial': (20, np.ones(6) / 6.0),
+ 'negative_binomial': (100, .5),
+ 'poisson': (10.0,),
+ 'zipf': (2,),
+ }
+
+if np.iinfo(np.long).max < 2**32:
+ # Windows and some 32-bit platforms, e.g., ARM
+ INT_FUNC_HASHES = {'binomial': '2fbead005fc63942decb5326d36a1f32fe2c9d32c904ee61e46866b88447c263',
+ 'logseries': '23ead5dcde35d4cfd4ef2c105e4c3d43304b45dc1b1444b7823b9ee4fa144ebb',
+ 'geometric': '0d764db64f5c3bad48c8c33551c13b4d07a1e7b470f77629bef6c985cac76fcf',
+ 'hypergeometric': '7b59bf2f1691626c5815cdcd9a49e1dd68697251d4521575219e4d2a1b8b2c67',
+ 'multinomial': 'd754fa5b92943a38ec07630de92362dd2e02c43577fc147417dc5b9db94ccdd3',
+ 'negative_binomial': '8eb216f7cb2a63cf55605422845caaff002fddc64a7dc8b2d45acd477a49e824',
+ 'poisson': '70c891d76104013ebd6f6bcf30d403a9074b886ff62e4e6b8eb605bf1a4673b7',
+ 'zipf': '01f074f97517cd5d21747148ac6ca4074dde7fcb7acbaec0a936606fecacd93f',
+ }
+else:
+ INT_FUNC_HASHES = {'binomial': '8626dd9d052cb608e93d8868de0a7b347258b199493871a1dc56e2a26cacb112',
+ 'geometric': '8edd53d272e49c4fc8fbbe6c7d08d563d62e482921f3131d0a0e068af30f0db9',
+ 'hypergeometric': '83496cc4281c77b786c9b7ad88b74d42e01603a55c60577ebab81c3ba8d45657',
+ 'logseries': '65878a38747c176bc00e930ebafebb69d4e1e16cd3a704e264ea8f5e24f548db',
+ 'multinomial': '7a984ae6dca26fd25374479e118b22f55db0aedccd5a0f2584ceada33db98605',
+ 'negative_binomial': 'd636d968e6a24ae92ab52fe11c46ac45b0897e98714426764e820a7d77602a61',
+ 'poisson': '956552176f77e7c9cb20d0118fc9cf690be488d790ed4b4c4747b965e61b0bb4',
+ 'zipf': 'f84ba7feffda41e606e20b28dfc0f1ea9964a74574513d4a4cbc98433a8bfa45',
+ }
+
+
+@pytest.fixture(scope='module', params=INT_FUNCS)
+def int_func(request):
+ return (request.param, INT_FUNCS[request.param],
+ INT_FUNC_HASHES[request.param])
+
+
+@pytest.fixture
+def restore_singleton_bitgen():
+ """Ensures that the singleton bitgen is restored after a test"""
+ orig_bitgen = np.random.get_bit_generator()
+ yield
+ np.random.set_bit_generator(orig_bitgen)
+
+
+def assert_mt19937_state_equal(a, b):
+ assert_equal(a['bit_generator'], b['bit_generator'])
+ assert_array_equal(a['state']['key'], b['state']['key'])
+ assert_array_equal(a['state']['pos'], b['state']['pos'])
+ assert_equal(a['has_gauss'], b['has_gauss'])
+ assert_equal(a['gauss'], b['gauss'])
+
+
+class TestSeed:
+ def test_scalar(self):
+ s = random.RandomState(0)
+ assert_equal(s.randint(1000), 684)
+ s = random.RandomState(4294967295)
+ assert_equal(s.randint(1000), 419)
+
+ def test_array(self):
+ s = random.RandomState(range(10))
+ assert_equal(s.randint(1000), 468)
+ s = random.RandomState(np.arange(10))
+ assert_equal(s.randint(1000), 468)
+ s = random.RandomState([0])
+ assert_equal(s.randint(1000), 973)
+ s = random.RandomState([4294967295])
+ assert_equal(s.randint(1000), 265)
+
+ def test_invalid_scalar(self):
+ # seed must be an unsigned 32 bit integer
+ assert_raises(TypeError, random.RandomState, -0.5)
+ assert_raises(ValueError, random.RandomState, -1)
+
+ def test_invalid_array(self):
+ # seed must be an unsigned 32 bit integer
+ assert_raises(TypeError, random.RandomState, [-0.5])
+ assert_raises(ValueError, random.RandomState, [-1])
+ assert_raises(ValueError, random.RandomState, [4294967296])
+ assert_raises(ValueError, random.RandomState, [1, 2, 4294967296])
+ assert_raises(ValueError, random.RandomState, [1, -2, 4294967296])
+
+ def test_invalid_array_shape(self):
+ # gh-9832
+ assert_raises(ValueError, random.RandomState, np.array([],
+ dtype=np.int64))
+ assert_raises(ValueError, random.RandomState, [[1, 2, 3]])
+ assert_raises(ValueError, random.RandomState, [[1, 2, 3],
+ [4, 5, 6]])
+
+ def test_cannot_seed(self):
+ rs = random.RandomState(PCG64(0))
+ with assert_raises(TypeError):
+ rs.seed(1234)
+
+ def test_invalid_initialization(self):
+ assert_raises(ValueError, random.RandomState, MT19937)
+
+
+class TestBinomial:
+ def test_n_zero(self):
+ # Tests the corner case of n == 0 for the binomial distribution.
+ # binomial(0, p) should be zero for any p in [0, 1].
+ # This test addresses issue #3480.
+ zeros = np.zeros(2, dtype='int')
+ for p in [0, .5, 1]:
+ assert_(random.binomial(0, p) == 0)
+ assert_array_equal(random.binomial(zeros, p), zeros)
+
+ def test_p_is_nan(self):
+ # Issue #4571.
+ assert_raises(ValueError, random.binomial, 1, np.nan)
+
+
+class TestMultinomial:
+ def test_basic(self):
+ random.multinomial(100, [0.2, 0.8])
+
+ def test_zero_probability(self):
+ random.multinomial(100, [0.2, 0.8, 0.0, 0.0, 0.0])
+
+ def test_int_negative_interval(self):
+ assert_(-5 <= random.randint(-5, -1) < -1)
+ x = random.randint(-5, -1, 5)
+ assert_(np.all(-5 <= x))
+ assert_(np.all(x < -1))
+
+ def test_size(self):
+ # gh-3173
+ p = [0.5, 0.5]
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.multinomial(1, p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(random.multinomial(1, p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(random.multinomial(1, p, np.array((2, 2))).shape,
+ (2, 2, 2))
+
+ assert_raises(TypeError, random.multinomial, 1, p,
+ float(1))
+
+ def test_invalid_prob(self):
+ assert_raises(ValueError, random.multinomial, 100, [1.1, 0.2])
+ assert_raises(ValueError, random.multinomial, 100, [-.1, 0.9])
+
+ def test_invalid_n(self):
+ assert_raises(ValueError, random.multinomial, -1, [0.8, 0.2])
+
+ def test_p_non_contiguous(self):
+ p = np.arange(15.)
+ p /= np.sum(p[1::3])
+ pvals = p[1::3]
+ random.seed(1432985819)
+ non_contig = random.multinomial(100, pvals=pvals)
+ random.seed(1432985819)
+ contig = random.multinomial(100, pvals=np.ascontiguousarray(pvals))
+ assert_array_equal(non_contig, contig)
+
+ def test_multinomial_pvals_float32(self):
+ x = np.array([9.9e-01, 9.9e-01, 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09,
+ 1.0e-09, 1.0e-09, 1.0e-09, 1.0e-09], dtype=np.float32)
+ pvals = x / x.sum()
+ match = r"[\w\s]*pvals array is cast to 64-bit floating"
+ with pytest.raises(ValueError, match=match):
+ random.multinomial(1, pvals)
+
+ def test_multinomial_n_float(self):
+ # Non-index integer types should gracefully truncate floats
+ random.multinomial(100.5, [0.2, 0.8])
+
+class TestSetState:
+ def setup_method(self):
+ self.seed = 1234567890
+ self.random_state = random.RandomState(self.seed)
+ self.state = self.random_state.get_state()
+
+ def test_basic(self):
+ old = self.random_state.tomaxint(16)
+ self.random_state.set_state(self.state)
+ new = self.random_state.tomaxint(16)
+ assert_(np.all(old == new))
+
+ def test_gaussian_reset(self):
+ # Make sure the cached every-other-Gaussian is reset.
+ old = self.random_state.standard_normal(size=3)
+ self.random_state.set_state(self.state)
+ new = self.random_state.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_gaussian_reset_in_media_res(self):
+ # When the state is saved with a cached Gaussian, make sure the
+ # cached Gaussian is restored.
+
+ self.random_state.standard_normal()
+ state = self.random_state.get_state()
+ old = self.random_state.standard_normal(size=3)
+ self.random_state.set_state(state)
+ new = self.random_state.standard_normal(size=3)
+ assert_(np.all(old == new))
+
+ def test_backwards_compatibility(self):
+ # Make sure we can accept old state tuples that do not have the
+ # cached Gaussian value.
+ old_state = self.state[:-2]
+ x1 = self.random_state.standard_normal(size=16)
+ self.random_state.set_state(old_state)
+ x2 = self.random_state.standard_normal(size=16)
+ self.random_state.set_state(self.state)
+ x3 = self.random_state.standard_normal(size=16)
+ assert_(np.all(x1 == x2))
+ assert_(np.all(x1 == x3))
+
+ def test_negative_binomial(self):
+ # Ensure that the negative binomial results take floating point
+ # arguments without truncation.
+ self.random_state.negative_binomial(0.5, 0.5)
+
+ def test_get_state_warning(self):
+ rs = random.RandomState(PCG64())
+ with suppress_warnings() as sup:
+ w = sup.record(RuntimeWarning)
+ state = rs.get_state()
+ assert_(len(w) == 1)
+ assert isinstance(state, dict)
+ assert state['bit_generator'] == 'PCG64'
+
+ def test_invalid_legacy_state_setting(self):
+ state = self.random_state.get_state()
+ new_state = ('Unknown', ) + state[1:]
+ assert_raises(ValueError, self.random_state.set_state, new_state)
+ assert_raises(TypeError, self.random_state.set_state,
+ np.array(new_state, dtype=object))
+ state = self.random_state.get_state(legacy=False)
+ del state['bit_generator']
+ assert_raises(ValueError, self.random_state.set_state, state)
+
+ def test_pickle(self):
+ self.random_state.seed(0)
+ self.random_state.random_sample(100)
+ self.random_state.standard_normal()
+ pickled = self.random_state.get_state(legacy=False)
+ assert_equal(pickled['has_gauss'], 1)
+ rs_unpick = pickle.loads(pickle.dumps(self.random_state))
+ unpickled = rs_unpick.get_state(legacy=False)
+ assert_mt19937_state_equal(pickled, unpickled)
+
+ def test_state_setting(self):
+ attr_state = self.random_state.__getstate__()
+ self.random_state.standard_normal()
+ self.random_state.__setstate__(attr_state)
+ state = self.random_state.get_state(legacy=False)
+ assert_mt19937_state_equal(attr_state, state)
+
+ def test_repr(self):
+ assert repr(self.random_state).startswith('RandomState(MT19937)')
+
+
+class TestRandint:
+
+ rfunc = random.randint
+
+ # valid integer/boolean types
+ itype = [np.bool, np.int8, np.uint8, np.int16, np.uint16,
+ np.int32, np.uint32, np.int64, np.uint64]
+
+ def test_unsupported_type(self):
+ assert_raises(TypeError, self.rfunc, 1, dtype=float)
+
+ def test_bounds_checking(self):
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+ assert_raises(ValueError, self.rfunc, lbnd - 1, ubnd, dtype=dt)
+ assert_raises(ValueError, self.rfunc, lbnd, ubnd + 1, dtype=dt)
+ assert_raises(ValueError, self.rfunc, ubnd, lbnd, dtype=dt)
+ assert_raises(ValueError, self.rfunc, 1, 0, dtype=dt)
+
+ def test_rng_zero_and_extremes(self):
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ tgt = ubnd - 1
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ tgt = lbnd
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ tgt = (lbnd + ubnd)//2
+ assert_equal(self.rfunc(tgt, tgt + 1, size=1000, dtype=dt), tgt)
+
+ def test_full_range(self):
+ # Test for ticket #1690
+
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ try:
+ self.rfunc(lbnd, ubnd, dtype=dt)
+ except Exception as e:
+ raise AssertionError("No error should have been raised, "
+ "but one was with the following "
+ "message:\n\n%s" % str(e))
+
+ def test_in_bounds_fuzz(self):
+ # Don't use fixed seed
+ random.seed()
+
+ for dt in self.itype[1:]:
+ for ubnd in [4, 8, 16]:
+ vals = self.rfunc(2, ubnd, size=2**16, dtype=dt)
+ assert_(vals.max() < ubnd)
+ assert_(vals.min() >= 2)
+
+ vals = self.rfunc(0, 2, size=2**16, dtype=np.bool)
+
+ assert_(vals.max() < 2)
+ assert_(vals.min() >= 0)
+
+ def test_repeatability(self):
+ # We use a sha256 hash of generated sequences of 1000 samples
+ # in the range [0, 6) for all but bool, where the range
+ # is [0, 2). Hashes are for little endian numbers.
+ tgt = {'bool': '509aea74d792fb931784c4b0135392c65aec64beee12b0cc167548a2c3d31e71',
+ 'int16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+ 'int32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+ 'int64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+ 'int8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404',
+ 'uint16': '7b07f1a920e46f6d0fe02314155a2330bcfd7635e708da50e536c5ebb631a7d4',
+ 'uint32': 'e577bfed6c935de944424667e3da285012e741892dcb7051a8f1ce68ab05c92f',
+ 'uint64': '0fbead0b06759df2cfb55e43148822d4a1ff953c7eb19a5b08445a63bb64fa9e',
+ 'uint8': '001aac3a5acb935a9b186cbe14a1ca064b8bb2dd0b045d48abeacf74d0203404'}
+
+ for dt in self.itype[1:]:
+ random.seed(1234)
+
+ # view as little endian for hash
+ if sys.byteorder == 'little':
+ val = self.rfunc(0, 6, size=1000, dtype=dt)
+ else:
+ val = self.rfunc(0, 6, size=1000, dtype=dt).byteswap()
+
+ res = hashlib.sha256(val.view(np.int8)).hexdigest()
+ assert_(tgt[np.dtype(dt).name] == res)
+
+ # bools do not depend on endianness
+ random.seed(1234)
+ val = self.rfunc(0, 2, size=1000, dtype=bool).view(np.int8)
+ res = hashlib.sha256(val).hexdigest()
+ assert_(tgt[np.dtype(bool).name] == res)
+
+ @pytest.mark.skipif(np.iinfo('l').max < 2**32,
+ reason='Cannot test with 32-bit C long')
+ def test_repeatability_32bit_boundary_broadcasting(self):
+ desired = np.array([[[3992670689, 2438360420, 2557845020],
+ [4107320065, 4142558326, 3216529513],
+ [1605979228, 2807061240, 665605495]],
+ [[3211410639, 4128781000, 457175120],
+ [1712592594, 1282922662, 3081439808],
+ [3997822960, 2008322436, 1563495165]],
+ [[1398375547, 4269260146, 115316740],
+ [3414372578, 3437564012, 2112038651],
+ [3572980305, 2260248732, 3908238631]],
+ [[2561372503, 223155946, 3127879445],
+ [ 441282060, 3514786552, 2148440361],
+ [1629275283, 3479737011, 3003195987]],
+ [[ 412181688, 940383289, 3047321305],
+ [2978368172, 764731833, 2282559898],
+ [ 105711276, 720447391, 3596512484]]])
+ for size in [None, (5, 3, 3)]:
+ random.seed(12345)
+ x = self.rfunc([[-1], [0], [1]], [2**32 - 1, 2**32, 2**32 + 1],
+ size=size)
+ assert_array_equal(x, desired if size is not None else desired[0])
+
+ def test_int64_uint64_corner_case(self):
+ # When stored in Numpy arrays, `lbnd` is casted
+ # as np.int64, and `ubnd` is casted as np.uint64.
+ # Checking whether `lbnd` >= `ubnd` used to be
+ # done solely via direct comparison, which is incorrect
+ # because when Numpy tries to compare both numbers,
+ # it casts both to np.float64 because there is
+ # no integer superset of np.int64 and np.uint64. However,
+ # `ubnd` is too large to be represented in np.float64,
+ # causing it be round down to np.iinfo(np.int64).max,
+ # leading to a ValueError because `lbnd` now equals
+ # the new `ubnd`.
+
+ dt = np.int64
+ tgt = np.iinfo(np.int64).max
+ lbnd = np.int64(np.iinfo(np.int64).max)
+ ubnd = np.uint64(np.iinfo(np.int64).max + 1)
+
+ # None of these function calls should
+ # generate a ValueError now.
+ actual = random.randint(lbnd, ubnd, dtype=dt)
+ assert_equal(actual, tgt)
+
+ def test_respect_dtype_singleton(self):
+ # See gh-7203
+ for dt in self.itype:
+ lbnd = 0 if dt is np.bool else np.iinfo(dt).min
+ ubnd = 2 if dt is np.bool else np.iinfo(dt).max + 1
+
+ sample = self.rfunc(lbnd, ubnd, dtype=dt)
+ assert_equal(sample.dtype, np.dtype(dt))
+
+ for dt in (bool, int):
+ # The legacy random generation forces the use of "long" on this
+ # branch even when the input is `int` and the default dtype
+ # for int changed (dtype=int is also the functions default)
+ op_dtype = "long" if dt is int else "bool"
+ lbnd = 0 if dt is bool else np.iinfo(op_dtype).min
+ ubnd = 2 if dt is bool else np.iinfo(op_dtype).max + 1
+
+ sample = self.rfunc(lbnd, ubnd, dtype=dt)
+ assert_(not hasattr(sample, 'dtype'))
+ assert_equal(type(sample), dt)
+
+
+class TestRandomDist:
+ # Make sure the random distribution returns the correct value for a
+ # given seed
+
+ def setup_method(self):
+ self.seed = 1234567890
+
+ def test_rand(self):
+ random.seed(self.seed)
+ actual = random.rand(3, 2)
+ desired = np.array([[0.61879477158567997, 0.59162362775974664],
+ [0.88868358904449662, 0.89165480011560816],
+ [0.4575674820298663, 0.7781880808593471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_rand_singleton(self):
+ random.seed(self.seed)
+ actual = random.rand()
+ desired = 0.61879477158567997
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_randn(self):
+ random.seed(self.seed)
+ actual = random.randn(3, 2)
+ desired = np.array([[1.34016345771863121, 1.73759122771936081],
+ [1.498988344300628, -0.2286433324536169],
+ [2.031033998682787, 2.17032494605655257]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ random.seed(self.seed)
+ actual = random.randn()
+ assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+ def test_randint(self):
+ random.seed(self.seed)
+ actual = random.randint(-99, 99, size=(3, 2))
+ desired = np.array([[31, 3],
+ [-52, 41],
+ [-48, -66]])
+ assert_array_equal(actual, desired)
+
+ def test_random_integers(self):
+ random.seed(self.seed)
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ actual = random.random_integers(-99, 99, size=(3, 2))
+ assert_(len(w) == 1)
+ desired = np.array([[31, 3],
+ [-52, 41],
+ [-48, -66]])
+ assert_array_equal(actual, desired)
+
+ random.seed(self.seed)
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ actual = random.random_integers(198, size=(3, 2))
+ assert_(len(w) == 1)
+ assert_array_equal(actual, desired + 100)
+
+ def test_tomaxint(self):
+ random.seed(self.seed)
+ rs = random.RandomState(self.seed)
+ actual = rs.tomaxint(size=(3, 2))
+ if np.iinfo(np.long).max == 2147483647:
+ desired = np.array([[1328851649, 731237375],
+ [1270502067, 320041495],
+ [1908433478, 499156889]], dtype=np.int64)
+ else:
+ desired = np.array([[5707374374421908479, 5456764827585442327],
+ [8196659375100692377, 8224063923314595285],
+ [4220315081820346526, 7177518203184491332]],
+ dtype=np.int64)
+
+ assert_equal(actual, desired)
+
+ rs.seed(self.seed)
+ actual = rs.tomaxint()
+ assert_equal(actual, desired[0, 0])
+
+ def test_random_integers_max_int(self):
+ # Tests whether random_integers can generate the
+ # maximum allowed Python int that can be converted
+ # into a C long. Previous implementations of this
+ # method have thrown an OverflowError when attempting
+ # to generate this integer.
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ actual = random.random_integers(np.iinfo('l').max,
+ np.iinfo('l').max)
+ assert_(len(w) == 1)
+
+ desired = np.iinfo('l').max
+ assert_equal(actual, desired)
+ with suppress_warnings() as sup:
+ w = sup.record(DeprecationWarning)
+ typer = np.dtype('l').type
+ actual = random.random_integers(typer(np.iinfo('l').max),
+ typer(np.iinfo('l').max))
+ assert_(len(w) == 1)
+ assert_equal(actual, desired)
+
+ def test_random_integers_deprecated(self):
+ with warnings.catch_warnings():
+ warnings.simplefilter("error", DeprecationWarning)
+
+ # DeprecationWarning raised with high == None
+ assert_raises(DeprecationWarning,
+ random.random_integers,
+ np.iinfo('l').max)
+
+ # DeprecationWarning raised with high != None
+ assert_raises(DeprecationWarning,
+ random.random_integers,
+ np.iinfo('l').max, np.iinfo('l').max)
+
+ def test_random_sample(self):
+ random.seed(self.seed)
+ actual = random.random_sample((3, 2))
+ desired = np.array([[0.61879477158567997, 0.59162362775974664],
+ [0.88868358904449662, 0.89165480011560816],
+ [0.4575674820298663, 0.7781880808593471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ random.seed(self.seed)
+ actual = random.random_sample()
+ assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+ def test_choice_uniform_replace(self):
+ random.seed(self.seed)
+ actual = random.choice(4, 4)
+ desired = np.array([2, 3, 2, 3])
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_replace(self):
+ random.seed(self.seed)
+ actual = random.choice(4, 4, p=[0.4, 0.4, 0.1, 0.1])
+ desired = np.array([1, 1, 2, 2])
+ assert_array_equal(actual, desired)
+
+ def test_choice_uniform_noreplace(self):
+ random.seed(self.seed)
+ actual = random.choice(4, 3, replace=False)
+ desired = np.array([0, 1, 3])
+ assert_array_equal(actual, desired)
+
+ def test_choice_nonuniform_noreplace(self):
+ random.seed(self.seed)
+ actual = random.choice(4, 3, replace=False, p=[0.1, 0.3, 0.5, 0.1])
+ desired = np.array([2, 3, 1])
+ assert_array_equal(actual, desired)
+
+ def test_choice_noninteger(self):
+ random.seed(self.seed)
+ actual = random.choice(['a', 'b', 'c', 'd'], 4)
+ desired = np.array(['c', 'd', 'c', 'd'])
+ assert_array_equal(actual, desired)
+
+ def test_choice_exceptions(self):
+ sample = random.choice
+ assert_raises(ValueError, sample, -1, 3)
+ assert_raises(ValueError, sample, 3., 3)
+ assert_raises(ValueError, sample, [[1, 2], [3, 4]], 3)
+ assert_raises(ValueError, sample, [], 3)
+ assert_raises(ValueError, sample, [1, 2, 3, 4], 3,
+ p=[[0.25, 0.25], [0.25, 0.25]])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4, 0.2])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
+ assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
+ assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+ # gh-13087
+ assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1,), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], (-1, 1), replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], 2,
+ replace=False, p=[1, 0, 0])
+
+ def test_choice_return_shape(self):
+ p = [0.1, 0.9]
+ # Check scalar
+ assert_(np.isscalar(random.choice(2, replace=True)))
+ assert_(np.isscalar(random.choice(2, replace=False)))
+ assert_(np.isscalar(random.choice(2, replace=True, p=p)))
+ assert_(np.isscalar(random.choice(2, replace=False, p=p)))
+ assert_(np.isscalar(random.choice([1, 2], replace=True)))
+ assert_(random.choice([None], replace=True) is None)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(random.choice(arr, replace=True) is a)
+
+ # Check 0-d array
+ s = tuple()
+ assert_(not np.isscalar(random.choice(2, s, replace=True)))
+ assert_(not np.isscalar(random.choice(2, s, replace=False)))
+ assert_(not np.isscalar(random.choice(2, s, replace=True, p=p)))
+ assert_(not np.isscalar(random.choice(2, s, replace=False, p=p)))
+ assert_(not np.isscalar(random.choice([1, 2], s, replace=True)))
+ assert_(random.choice([None], s, replace=True).ndim == 0)
+ a = np.array([1, 2])
+ arr = np.empty(1, dtype=object)
+ arr[0] = a
+ assert_(random.choice(arr, s, replace=True).item() is a)
+
+ # Check multi dimensional array
+ s = (2, 3)
+ p = [0.1, 0.1, 0.1, 0.1, 0.4, 0.2]
+ assert_equal(random.choice(6, s, replace=True).shape, s)
+ assert_equal(random.choice(6, s, replace=False).shape, s)
+ assert_equal(random.choice(6, s, replace=True, p=p).shape, s)
+ assert_equal(random.choice(6, s, replace=False, p=p).shape, s)
+ assert_equal(random.choice(np.arange(6), s, replace=True).shape, s)
+
+ # Check zero-size
+ assert_equal(random.randint(0, 0, size=(3, 0, 4)).shape, (3, 0, 4))
+ assert_equal(random.randint(0, -10, size=0).shape, (0,))
+ assert_equal(random.randint(10, 10, size=0).shape, (0,))
+ assert_equal(random.choice(0, size=0).shape, (0,))
+ assert_equal(random.choice([], size=(0,)).shape, (0,))
+ assert_equal(random.choice(['a', 'b'], size=(3, 0, 4)).shape,
+ (3, 0, 4))
+ assert_raises(ValueError, random.choice, [], 10)
+
+ def test_choice_nan_probabilities(self):
+ a = np.array([42, 1, 2])
+ p = [None, None, None]
+ assert_raises(ValueError, random.choice, a, p=p)
+
+ def test_choice_p_non_contiguous(self):
+ p = np.ones(10) / 5
+ p[1::2] = 3.0
+ random.seed(self.seed)
+ non_contig = random.choice(5, 3, p=p[::2])
+ random.seed(self.seed)
+ contig = random.choice(5, 3, p=np.ascontiguousarray(p[::2]))
+ assert_array_equal(non_contig, contig)
+
+ def test_bytes(self):
+ random.seed(self.seed)
+ actual = random.bytes(10)
+ desired = b'\x82Ui\x9e\xff\x97+Wf\xa5'
+ assert_equal(actual, desired)
+
+ def test_shuffle(self):
+ # Test lists, arrays (of various dtypes), and multidimensional versions
+ # of both, c-contiguous or not:
+ for conv in [lambda x: np.array([]),
+ lambda x: x,
+ lambda x: np.asarray(x).astype(np.int8),
+ lambda x: np.asarray(x).astype(np.float32),
+ lambda x: np.asarray(x).astype(np.complex64),
+ lambda x: np.asarray(x).astype(object),
+ lambda x: [(i, i) for i in x],
+ lambda x: np.asarray([[i, i] for i in x]),
+ lambda x: np.vstack([x, x]).T,
+ # gh-11442
+ lambda x: (np.asarray([(i, i) for i in x],
+ [("a", int), ("b", int)])
+ .view(np.recarray)),
+ # gh-4270
+ lambda x: np.asarray([(i, i) for i in x],
+ [("a", object, (1,)),
+ ("b", np.int32, (1,))])]:
+ random.seed(self.seed)
+ alist = conv([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
+ random.shuffle(alist)
+ actual = alist
+ desired = conv([0, 1, 9, 6, 2, 4, 5, 8, 7, 3])
+ assert_array_equal(actual, desired)
+
+ def test_shuffle_masked(self):
+ # gh-3263
+ a = np.ma.masked_values(np.reshape(range(20), (5, 4)) % 3 - 1, -1)
+ b = np.ma.masked_values(np.arange(20) % 3 - 1, -1)
+ a_orig = a.copy()
+ b_orig = b.copy()
+ for i in range(50):
+ random.shuffle(a)
+ assert_equal(
+ sorted(a.data[~a.mask]), sorted(a_orig.data[~a_orig.mask]))
+ random.shuffle(b)
+ assert_equal(
+ sorted(b.data[~b.mask]), sorted(b_orig.data[~b_orig.mask]))
+
+ def test_shuffle_invalid_objects(self):
+ x = np.array(3)
+ assert_raises(TypeError, random.shuffle, x)
+
+ def test_permutation(self):
+ random.seed(self.seed)
+ alist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
+ actual = random.permutation(alist)
+ desired = [0, 1, 9, 6, 2, 4, 5, 8, 7, 3]
+ assert_array_equal(actual, desired)
+
+ random.seed(self.seed)
+ arr_2d = np.atleast_2d([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]).T
+ actual = random.permutation(arr_2d)
+ assert_array_equal(actual, np.atleast_2d(desired).T)
+
+ random.seed(self.seed)
+ bad_x_str = "abcd"
+ assert_raises(IndexError, random.permutation, bad_x_str)
+
+ random.seed(self.seed)
+ bad_x_float = 1.2
+ assert_raises(IndexError, random.permutation, bad_x_float)
+
+ integer_val = 10
+ desired = [9, 0, 8, 5, 1, 3, 4, 7, 6, 2]
+
+ random.seed(self.seed)
+ actual = random.permutation(integer_val)
+ assert_array_equal(actual, desired)
+
+ def test_beta(self):
+ random.seed(self.seed)
+ actual = random.beta(.1, .9, size=(3, 2))
+ desired = np.array(
+ [[1.45341850513746058e-02, 5.31297615662868145e-04],
+ [1.85366619058432324e-06, 4.19214516800110563e-03],
+ [1.58405155108498093e-04, 1.26252891949397652e-04]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_binomial(self):
+ random.seed(self.seed)
+ actual = random.binomial(100.123, .456, size=(3, 2))
+ desired = np.array([[37, 43],
+ [42, 48],
+ [46, 45]])
+ assert_array_equal(actual, desired)
+
+ random.seed(self.seed)
+ actual = random.binomial(100.123, .456)
+ desired = 37
+ assert_array_equal(actual, desired)
+
+ def test_chisquare(self):
+ random.seed(self.seed)
+ actual = random.chisquare(50, size=(3, 2))
+ desired = np.array([[63.87858175501090585, 68.68407748911370447],
+ [65.77116116901505904, 47.09686762438974483],
+ [72.3828403199695174, 74.18408615260374006]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_dirichlet(self):
+ random.seed(self.seed)
+ alpha = np.array([51.72840233779265162, 39.74494232180943953])
+ actual = random.dirichlet(alpha, size=(3, 2))
+ desired = np.array([[[0.54539444573611562, 0.45460555426388438],
+ [0.62345816822039413, 0.37654183177960598]],
+ [[0.55206000085785778, 0.44793999914214233],
+ [0.58964023305154301, 0.41035976694845688]],
+ [[0.59266909280647828, 0.40733090719352177],
+ [0.56974431743975207, 0.43025568256024799]]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+ bad_alpha = np.array([5.4e-01, -1.0e-16])
+ assert_raises(ValueError, random.dirichlet, bad_alpha)
+
+ random.seed(self.seed)
+ alpha = np.array([51.72840233779265162, 39.74494232180943953])
+ actual = random.dirichlet(alpha)
+ assert_array_almost_equal(actual, desired[0, 0], decimal=15)
+
+ def test_dirichlet_size(self):
+ # gh-3173
+ p = np.array([51.72840233779265162, 39.74494232180943953])
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, np.uint32(1)).shape, (1, 2))
+ assert_equal(random.dirichlet(p, [2, 2]).shape, (2, 2, 2))
+ assert_equal(random.dirichlet(p, (2, 2)).shape, (2, 2, 2))
+ assert_equal(random.dirichlet(p, np.array((2, 2))).shape, (2, 2, 2))
+
+ assert_raises(TypeError, random.dirichlet, p, float(1))
+
+ def test_dirichlet_bad_alpha(self):
+ # gh-2089
+ alpha = np.array([5.4e-01, -1.0e-16])
+ assert_raises(ValueError, random.dirichlet, alpha)
+
+ def test_dirichlet_alpha_non_contiguous(self):
+ a = np.array([51.72840233779265162, -1.0, 39.74494232180943953])
+ alpha = a[::2]
+ random.seed(self.seed)
+ non_contig = random.dirichlet(alpha, size=(3, 2))
+ random.seed(self.seed)
+ contig = random.dirichlet(np.ascontiguousarray(alpha),
+ size=(3, 2))
+ assert_array_almost_equal(non_contig, contig)
+
+ def test_exponential(self):
+ random.seed(self.seed)
+ actual = random.exponential(1.1234, size=(3, 2))
+ desired = np.array([[1.08342649775011624, 1.00607889924557314],
+ [2.46628830085216721, 2.49668106809923884],
+ [0.68717433461363442, 1.69175666993575979]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_exponential_0(self):
+ assert_equal(random.exponential(scale=0), 0)
+ assert_raises(ValueError, random.exponential, scale=-0.)
+
+ def test_f(self):
+ random.seed(self.seed)
+ actual = random.f(12, 77, size=(3, 2))
+ desired = np.array([[1.21975394418575878, 1.75135759791559775],
+ [1.44803115017146489, 1.22108959480396262],
+ [1.02176975757740629, 1.34431827623300415]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gamma(self):
+ random.seed(self.seed)
+ actual = random.gamma(5, 3, size=(3, 2))
+ desired = np.array([[24.60509188649287182, 28.54993563207210627],
+ [26.13476110204064184, 12.56988482927716078],
+ [31.71863275789960568, 33.30143302795922011]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_gamma_0(self):
+ assert_equal(random.gamma(shape=0, scale=0), 0)
+ assert_raises(ValueError, random.gamma, shape=-0., scale=-0.)
+
+ def test_geometric(self):
+ random.seed(self.seed)
+ actual = random.geometric(.123456789, size=(3, 2))
+ desired = np.array([[8, 7],
+ [17, 17],
+ [5, 12]])
+ assert_array_equal(actual, desired)
+
+ def test_geometric_exceptions(self):
+ assert_raises(ValueError, random.geometric, 1.1)
+ assert_raises(ValueError, random.geometric, [1.1] * 10)
+ assert_raises(ValueError, random.geometric, -0.1)
+ assert_raises(ValueError, random.geometric, [-0.1] * 10)
+ with suppress_warnings() as sup:
+ sup.record(RuntimeWarning)
+ assert_raises(ValueError, random.geometric, np.nan)
+ assert_raises(ValueError, random.geometric, [np.nan] * 10)
+
+ def test_gumbel(self):
+ random.seed(self.seed)
+ actual = random.gumbel(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[0.19591898743416816, 0.34405539668096674],
+ [-1.4492522252274278, -1.47374816298446865],
+ [1.10651090478803416, -0.69535848626236174]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_gumbel_0(self):
+ assert_equal(random.gumbel(scale=0), 0)
+ assert_raises(ValueError, random.gumbel, scale=-0.)
+
+ def test_hypergeometric(self):
+ random.seed(self.seed)
+ actual = random.hypergeometric(10.1, 5.5, 14, size=(3, 2))
+ desired = np.array([[10, 10],
+ [10, 10],
+ [9, 9]])
+ assert_array_equal(actual, desired)
+
+ # Test nbad = 0
+ actual = random.hypergeometric(5, 0, 3, size=4)
+ desired = np.array([3, 3, 3, 3])
+ assert_array_equal(actual, desired)
+
+ actual = random.hypergeometric(15, 0, 12, size=4)
+ desired = np.array([12, 12, 12, 12])
+ assert_array_equal(actual, desired)
+
+ # Test ngood = 0
+ actual = random.hypergeometric(0, 5, 3, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ actual = random.hypergeometric(0, 15, 12, size=4)
+ desired = np.array([0, 0, 0, 0])
+ assert_array_equal(actual, desired)
+
+ def test_laplace(self):
+ random.seed(self.seed)
+ actual = random.laplace(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[0.66599721112760157, 0.52829452552221945],
+ [3.12791959514407125, 3.18202813572992005],
+ [-0.05391065675859356, 1.74901336242837324]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_laplace_0(self):
+ assert_equal(random.laplace(scale=0), 0)
+ assert_raises(ValueError, random.laplace, scale=-0.)
+
+ def test_logistic(self):
+ random.seed(self.seed)
+ actual = random.logistic(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[1.09232835305011444, 0.8648196662399954],
+ [4.27818590694950185, 4.33897006346929714],
+ [-0.21682183359214885, 2.63373365386060332]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_lognormal(self):
+ random.seed(self.seed)
+ actual = random.lognormal(mean=.123456789, sigma=2.0, size=(3, 2))
+ desired = np.array([[16.50698631688883822, 36.54846706092654784],
+ [22.67886599981281748, 0.71617561058995771],
+ [65.72798501792723869, 86.84341601437161273]])
+ assert_array_almost_equal(actual, desired, decimal=13)
+
+ def test_lognormal_0(self):
+ assert_equal(random.lognormal(sigma=0), 1)
+ assert_raises(ValueError, random.lognormal, sigma=-0.)
+
+ def test_logseries(self):
+ random.seed(self.seed)
+ actual = random.logseries(p=.923456789, size=(3, 2))
+ desired = np.array([[2, 2],
+ [6, 17],
+ [3, 6]])
+ assert_array_equal(actual, desired)
+
+ def test_logseries_zero(self):
+ assert random.logseries(0) == 1
+
+ @pytest.mark.parametrize("value", [np.nextafter(0., -1), 1., np.nan, 5.])
+ def test_logseries_exceptions(self, value):
+ with np.errstate(invalid="ignore"):
+ with pytest.raises(ValueError):
+ random.logseries(value)
+ with pytest.raises(ValueError):
+ # contiguous path:
+ random.logseries(np.array([value] * 10))
+ with pytest.raises(ValueError):
+ # non-contiguous path:
+ random.logseries(np.array([value] * 10)[::2])
+
+ def test_multinomial(self):
+ random.seed(self.seed)
+ actual = random.multinomial(20, [1 / 6.] * 6, size=(3, 2))
+ desired = np.array([[[4, 3, 5, 4, 2, 2],
+ [5, 2, 8, 2, 2, 1]],
+ [[3, 4, 3, 6, 0, 4],
+ [2, 1, 4, 3, 6, 4]],
+ [[4, 4, 2, 5, 2, 3],
+ [4, 3, 4, 2, 3, 4]]])
+ assert_array_equal(actual, desired)
+
+ def test_multivariate_normal(self):
+ random.seed(self.seed)
+ mean = (.123456789, 10)
+ cov = [[1, 0], [0, 1]]
+ size = (3, 2)
+ actual = random.multivariate_normal(mean, cov, size)
+ desired = np.array([[[1.463620246718631, 11.73759122771936],
+ [1.622445133300628, 9.771356667546383]],
+ [[2.154490787682787, 12.170324946056553],
+ [1.719909438201865, 9.230548443648306]],
+ [[0.689515026297799, 9.880729819607714],
+ [-0.023054015651998, 9.201096623542879]]])
+
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ # Check for default size, was raising deprecation warning
+ actual = random.multivariate_normal(mean, cov)
+ desired = np.array([0.895289569463708, 9.17180864067987])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ # Check that non positive-semidefinite covariance warns with
+ # RuntimeWarning
+ mean = [0, 0]
+ cov = [[1, 2], [2, 1]]
+ assert_warns(RuntimeWarning, random.multivariate_normal, mean, cov)
+
+ # and that it doesn't warn with RuntimeWarning check_valid='ignore'
+ assert_no_warnings(random.multivariate_normal, mean, cov,
+ check_valid='ignore')
+
+ # and that it raises with RuntimeWarning check_valid='raises'
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='raise')
+
+ cov = np.array([[1, 0.1], [0.1, 1]], dtype=np.float32)
+ with suppress_warnings() as sup:
+ random.multivariate_normal(mean, cov)
+ w = sup.record(RuntimeWarning)
+ assert len(w) == 0
+
+ mu = np.zeros(2)
+ cov = np.eye(2)
+ assert_raises(ValueError, random.multivariate_normal, mean, cov,
+ check_valid='other')
+ assert_raises(ValueError, random.multivariate_normal,
+ np.zeros((2, 1, 1)), cov)
+ assert_raises(ValueError, random.multivariate_normal,
+ mu, np.empty((3, 2)))
+ assert_raises(ValueError, random.multivariate_normal,
+ mu, np.eye(3))
+
+ def test_negative_binomial(self):
+ random.seed(self.seed)
+ actual = random.negative_binomial(n=100, p=.12345, size=(3, 2))
+ desired = np.array([[848, 841],
+ [892, 611],
+ [779, 647]])
+ assert_array_equal(actual, desired)
+
+ def test_negative_binomial_exceptions(self):
+ with suppress_warnings() as sup:
+ sup.record(RuntimeWarning)
+ assert_raises(ValueError, random.negative_binomial, 100, np.nan)
+ assert_raises(ValueError, random.negative_binomial, 100,
+ [np.nan] * 10)
+
+ def test_noncentral_chisquare(self):
+ random.seed(self.seed)
+ actual = random.noncentral_chisquare(df=5, nonc=5, size=(3, 2))
+ desired = np.array([[23.91905354498517511, 13.35324692733826346],
+ [31.22452661329736401, 16.60047399466177254],
+ [5.03461598262724586, 17.94973089023519464]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ actual = random.noncentral_chisquare(df=.5, nonc=.2, size=(3, 2))
+ desired = np.array([[1.47145377828516666, 0.15052899268012659],
+ [0.00943803056963588, 1.02647251615666169],
+ [0.332334982684171, 0.15451287602753125]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ random.seed(self.seed)
+ actual = random.noncentral_chisquare(df=5, nonc=0, size=(3, 2))
+ desired = np.array([[9.597154162763948, 11.725484450296079],
+ [10.413711048138335, 3.694475922923986],
+ [13.484222138963087, 14.377255424602957]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_noncentral_f(self):
+ random.seed(self.seed)
+ actual = random.noncentral_f(dfnum=5, dfden=2, nonc=1,
+ size=(3, 2))
+ desired = np.array([[1.40598099674926669, 0.34207973179285761],
+ [3.57715069265772545, 7.92632662577829805],
+ [0.43741599463544162, 1.1774208752428319]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_noncentral_f_nan(self):
+ random.seed(self.seed)
+ actual = random.noncentral_f(dfnum=5, dfden=2, nonc=np.nan)
+ assert np.isnan(actual)
+
+ def test_normal(self):
+ random.seed(self.seed)
+ actual = random.normal(loc=.123456789, scale=2.0, size=(3, 2))
+ desired = np.array([[2.80378370443726244, 3.59863924443872163],
+ [3.121433477601256, -0.33382987590723379],
+ [4.18552478636557357, 4.46410668111310471]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_normal_0(self):
+ assert_equal(random.normal(scale=0), 0)
+ assert_raises(ValueError, random.normal, scale=-0.)
+
+ def test_pareto(self):
+ random.seed(self.seed)
+ actual = random.pareto(a=.123456789, size=(3, 2))
+ desired = np.array(
+ [[2.46852460439034849e+03, 1.41286880810518346e+03],
+ [5.28287797029485181e+07, 6.57720981047328785e+07],
+ [1.40840323350391515e+02, 1.98390255135251704e+05]])
+ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+ # matrix differs by 24 nulps. Discussion:
+ # https://mail.python.org/pipermail/numpy-discussion/2012-September/063801.html
+ # Consensus is that this is probably some gcc quirk that affects
+ # rounding but not in any important way, so we just use a looser
+ # tolerance on this test:
+ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
+
+ def test_poisson(self):
+ random.seed(self.seed)
+ actual = random.poisson(lam=.123456789, size=(3, 2))
+ desired = np.array([[0, 0],
+ [1, 0],
+ [0, 0]])
+ assert_array_equal(actual, desired)
+
+ def test_poisson_exceptions(self):
+ lambig = np.iinfo('l').max
+ lamneg = -1
+ assert_raises(ValueError, random.poisson, lamneg)
+ assert_raises(ValueError, random.poisson, [lamneg] * 10)
+ assert_raises(ValueError, random.poisson, lambig)
+ assert_raises(ValueError, random.poisson, [lambig] * 10)
+ with suppress_warnings() as sup:
+ sup.record(RuntimeWarning)
+ assert_raises(ValueError, random.poisson, np.nan)
+ assert_raises(ValueError, random.poisson, [np.nan] * 10)
+
+ def test_power(self):
+ random.seed(self.seed)
+ actual = random.power(a=.123456789, size=(3, 2))
+ desired = np.array([[0.02048932883240791, 0.01424192241128213],
+ [0.38446073748535298, 0.39499689943484395],
+ [0.00177699707563439, 0.13115505880863756]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_rayleigh(self):
+ random.seed(self.seed)
+ actual = random.rayleigh(scale=10, size=(3, 2))
+ desired = np.array([[13.8882496494248393, 13.383318339044731],
+ [20.95413364294492098, 21.08285015800712614],
+ [11.06066537006854311, 17.35468505778271009]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_rayleigh_0(self):
+ assert_equal(random.rayleigh(scale=0), 0)
+ assert_raises(ValueError, random.rayleigh, scale=-0.)
+
+ def test_standard_cauchy(self):
+ random.seed(self.seed)
+ actual = random.standard_cauchy(size=(3, 2))
+ desired = np.array([[0.77127660196445336, -6.55601161955910605],
+ [0.93582023391158309, -2.07479293013759447],
+ [-4.74601644297011926, 0.18338989290760804]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_exponential(self):
+ random.seed(self.seed)
+ actual = random.standard_exponential(size=(3, 2))
+ desired = np.array([[0.96441739162374596, 0.89556604882105506],
+ [2.1953785836319808, 2.22243285392490542],
+ [0.6116915921431676, 1.50592546727413201]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_gamma(self):
+ random.seed(self.seed)
+ actual = random.standard_gamma(shape=3, size=(3, 2))
+ desired = np.array([[5.50841531318455058, 6.62953470301903103],
+ [5.93988484943779227, 2.31044849402133989],
+ [7.54838614231317084, 8.012756093271868]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_standard_gamma_0(self):
+ assert_equal(random.standard_gamma(shape=0), 0)
+ assert_raises(ValueError, random.standard_gamma, shape=-0.)
+
+ def test_standard_normal(self):
+ random.seed(self.seed)
+ actual = random.standard_normal(size=(3, 2))
+ desired = np.array([[1.34016345771863121, 1.73759122771936081],
+ [1.498988344300628, -0.2286433324536169],
+ [2.031033998682787, 2.17032494605655257]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_randn_singleton(self):
+ random.seed(self.seed)
+ actual = random.randn()
+ desired = np.array(1.34016345771863121)
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_standard_t(self):
+ random.seed(self.seed)
+ actual = random.standard_t(df=10, size=(3, 2))
+ desired = np.array([[0.97140611862659965, -0.08830486548450577],
+ [1.36311143689505321, -0.55317463909867071],
+ [-0.18473749069684214, 0.61181537341755321]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_triangular(self):
+ random.seed(self.seed)
+ actual = random.triangular(left=5.12, mode=10.23, right=20.34,
+ size=(3, 2))
+ desired = np.array([[12.68117178949215784, 12.4129206149193152],
+ [16.20131377335158263, 16.25692138747600524],
+ [11.20400690911820263, 14.4978144835829923]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_uniform(self):
+ random.seed(self.seed)
+ actual = random.uniform(low=1.23, high=10.54, size=(3, 2))
+ desired = np.array([[6.99097932346268003, 6.73801597444323974],
+ [9.50364421400426274, 9.53130618907631089],
+ [5.48995325769805476, 8.47493103280052118]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_uniform_range_bounds(self):
+ fmin = np.finfo('float').min
+ fmax = np.finfo('float').max
+
+ func = random.uniform
+ assert_raises(OverflowError, func, -np.inf, 0)
+ assert_raises(OverflowError, func, 0, np.inf)
+ assert_raises(OverflowError, func, fmin, fmax)
+ assert_raises(OverflowError, func, [-np.inf], [0])
+ assert_raises(OverflowError, func, [0], [np.inf])
+
+ # (fmax / 1e17) - fmin is within range, so this should not throw
+ # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+ # DBL_MAX by increasing fmin a bit
+ random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
+
+ def test_scalar_exception_propagation(self):
+ # Tests that exceptions are correctly propagated in distributions
+ # when called with objects that throw exceptions when converted to
+ # scalars.
+ #
+ # Regression test for gh: 8865
+
+ class ThrowingFloat(np.ndarray):
+ def __float__(self):
+ raise TypeError
+
+ throwing_float = np.array(1.0).view(ThrowingFloat)
+ assert_raises(TypeError, random.uniform, throwing_float,
+ throwing_float)
+
+ class ThrowingInteger(np.ndarray):
+ def __int__(self):
+ raise TypeError
+
+ throwing_int = np.array(1).view(ThrowingInteger)
+ assert_raises(TypeError, random.hypergeometric, throwing_int, 1, 1)
+
+ def test_vonmises(self):
+ random.seed(self.seed)
+ actual = random.vonmises(mu=1.23, kappa=1.54, size=(3, 2))
+ desired = np.array([[2.28567572673902042, 2.89163838442285037],
+ [0.38198375564286025, 2.57638023113890746],
+ [1.19153771588353052, 1.83509849681825354]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_vonmises_small(self):
+ # check infinite loop, gh-4720
+ random.seed(self.seed)
+ r = random.vonmises(mu=0., kappa=1.1e-8, size=10**6)
+ assert_(np.isfinite(r).all())
+
+ def test_vonmises_large(self):
+ # guard against changes in RandomState when Generator is fixed
+ random.seed(self.seed)
+ actual = random.vonmises(mu=0., kappa=1e7, size=3)
+ desired = np.array([4.634253748521111e-04,
+ 3.558873596114509e-04,
+ -2.337119622577433e-04])
+ assert_array_almost_equal(actual, desired, decimal=8)
+
+ def test_vonmises_nan(self):
+ random.seed(self.seed)
+ r = random.vonmises(mu=0., kappa=np.nan)
+ assert_(np.isnan(r))
+
+ def test_wald(self):
+ random.seed(self.seed)
+ actual = random.wald(mean=1.23, scale=1.54, size=(3, 2))
+ desired = np.array([[3.82935265715889983, 5.13125249184285526],
+ [0.35045403618358717, 1.50832396872003538],
+ [0.24124319895843183, 0.22031101461955038]])
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_weibull(self):
+ random.seed(self.seed)
+ actual = random.weibull(a=1.23, size=(3, 2))
+ desired = np.array([[0.97097342648766727, 0.91422896443565516],
+ [1.89517770034962929, 1.91414357960479564],
+ [0.67057783752390987, 1.39494046635066793]])
+ assert_array_almost_equal(actual, desired, decimal=15)
+
+ def test_weibull_0(self):
+ random.seed(self.seed)
+ assert_equal(random.weibull(a=0, size=12), np.zeros(12))
+ assert_raises(ValueError, random.weibull, a=-0.)
+
+ def test_zipf(self):
+ random.seed(self.seed)
+ actual = random.zipf(a=1.23, size=(3, 2))
+ desired = np.array([[66, 29],
+ [1, 1],
+ [3, 13]])
+ assert_array_equal(actual, desired)
+
+
+class TestBroadcast:
+ # tests that functions that broadcast behave
+ # correctly when presented with non-scalar arguments
+ def setup_method(self):
+ self.seed = 123456789
+
+ def set_seed(self):
+ random.seed(self.seed)
+
+ def test_uniform(self):
+ low = [0]
+ high = [1]
+ uniform = random.uniform
+ desired = np.array([0.53283302478975902,
+ 0.53413660089041659,
+ 0.50955303552646702])
+
+ self.set_seed()
+ actual = uniform(low * 3, high)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ self.set_seed()
+ actual = uniform(low, high * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_normal(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ normal = random.normal
+ desired = np.array([2.2129019979039612,
+ 2.1283977976520019,
+ 1.8417114045748335])
+
+ self.set_seed()
+ actual = normal(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, normal, loc * 3, bad_scale)
+
+ self.set_seed()
+ actual = normal(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, normal, loc, bad_scale * 3)
+
+ def test_beta(self):
+ a = [1]
+ b = [2]
+ bad_a = [-1]
+ bad_b = [-2]
+ beta = random.beta
+ desired = np.array([0.19843558305989056,
+ 0.075230336409423643,
+ 0.24976865978980844])
+
+ self.set_seed()
+ actual = beta(a * 3, b)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, beta, bad_a * 3, b)
+ assert_raises(ValueError, beta, a * 3, bad_b)
+
+ self.set_seed()
+ actual = beta(a, b * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, beta, bad_a, b * 3)
+ assert_raises(ValueError, beta, a, bad_b * 3)
+
+ def test_exponential(self):
+ scale = [1]
+ bad_scale = [-1]
+ exponential = random.exponential
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.set_seed()
+ actual = exponential(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, exponential, bad_scale * 3)
+
+ def test_standard_gamma(self):
+ shape = [1]
+ bad_shape = [-1]
+ std_gamma = random.standard_gamma
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.set_seed()
+ actual = std_gamma(shape * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, std_gamma, bad_shape * 3)
+
+ def test_gamma(self):
+ shape = [1]
+ scale = [2]
+ bad_shape = [-1]
+ bad_scale = [-2]
+ gamma = random.gamma
+ desired = np.array([1.5221370731769048,
+ 1.5277256455738331,
+ 1.4248762625178359])
+
+ self.set_seed()
+ actual = gamma(shape * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape * 3, scale)
+ assert_raises(ValueError, gamma, shape * 3, bad_scale)
+
+ self.set_seed()
+ actual = gamma(shape, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gamma, bad_shape, scale * 3)
+ assert_raises(ValueError, gamma, shape, bad_scale * 3)
+
+ def test_f(self):
+ dfnum = [1]
+ dfden = [2]
+ bad_dfnum = [-1]
+ bad_dfden = [-2]
+ f = random.f
+ desired = np.array([0.80038951638264799,
+ 0.86768719635363512,
+ 2.7251095168386801])
+
+ self.set_seed()
+ actual = f(dfnum * 3, dfden)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum * 3, dfden)
+ assert_raises(ValueError, f, dfnum * 3, bad_dfden)
+
+ self.set_seed()
+ actual = f(dfnum, dfden * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, f, bad_dfnum, dfden * 3)
+ assert_raises(ValueError, f, dfnum, bad_dfden * 3)
+
+ def test_noncentral_f(self):
+ dfnum = [2]
+ dfden = [3]
+ nonc = [4]
+ bad_dfnum = [0]
+ bad_dfden = [-1]
+ bad_nonc = [-2]
+ nonc_f = random.noncentral_f
+ desired = np.array([9.1393943263705211,
+ 13.025456344595602,
+ 8.8018098359100545])
+
+ self.set_seed()
+ actual = nonc_f(dfnum * 3, dfden, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert np.all(np.isnan(nonc_f(dfnum, dfden, [np.nan] * 3)))
+
+ assert_raises(ValueError, nonc_f, bad_dfnum * 3, dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, bad_dfden, nonc)
+ assert_raises(ValueError, nonc_f, dfnum * 3, dfden, bad_nonc)
+
+ self.set_seed()
+ actual = nonc_f(dfnum, dfden * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden * 3, nonc)
+ assert_raises(ValueError, nonc_f, dfnum, dfden * 3, bad_nonc)
+
+ self.set_seed()
+ actual = nonc_f(dfnum, dfden, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_f, bad_dfnum, dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, bad_dfden, nonc * 3)
+ assert_raises(ValueError, nonc_f, dfnum, dfden, bad_nonc * 3)
+
+ def test_noncentral_f_small_df(self):
+ self.set_seed()
+ desired = np.array([6.869638627492048, 0.785880199263955])
+ actual = random.noncentral_f(0.9, 0.9, 2, size=2)
+ assert_array_almost_equal(actual, desired, decimal=14)
+
+ def test_chisquare(self):
+ df = [1]
+ bad_df = [-1]
+ chisquare = random.chisquare
+ desired = np.array([0.57022801133088286,
+ 0.51947702108840776,
+ 0.1320969254923558])
+
+ self.set_seed()
+ actual = chisquare(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, chisquare, bad_df * 3)
+
+ def test_noncentral_chisquare(self):
+ df = [1]
+ nonc = [2]
+ bad_df = [-1]
+ bad_nonc = [-2]
+ nonc_chi = random.noncentral_chisquare
+ desired = np.array([9.0015599467913763,
+ 4.5804135049718742,
+ 6.0872302432834564])
+
+ self.set_seed()
+ actual = nonc_chi(df * 3, nonc)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df * 3, nonc)
+ assert_raises(ValueError, nonc_chi, df * 3, bad_nonc)
+
+ self.set_seed()
+ actual = nonc_chi(df, nonc * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, nonc_chi, bad_df, nonc * 3)
+ assert_raises(ValueError, nonc_chi, df, bad_nonc * 3)
+
+ def test_standard_t(self):
+ df = [1]
+ bad_df = [-1]
+ t = random.standard_t
+ desired = np.array([3.0702872575217643,
+ 5.8560725167361607,
+ 1.0274791436474273])
+
+ self.set_seed()
+ actual = t(df * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, t, bad_df * 3)
+ assert_raises(ValueError, random.standard_t, bad_df * 3)
+
+ def test_vonmises(self):
+ mu = [2]
+ kappa = [1]
+ bad_kappa = [-1]
+ vonmises = random.vonmises
+ desired = np.array([2.9883443664201312,
+ -2.7064099483995943,
+ -1.8672476700665914])
+
+ self.set_seed()
+ actual = vonmises(mu * 3, kappa)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, vonmises, mu * 3, bad_kappa)
+
+ self.set_seed()
+ actual = vonmises(mu, kappa * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, vonmises, mu, bad_kappa * 3)
+
+ def test_pareto(self):
+ a = [1]
+ bad_a = [-1]
+ pareto = random.pareto
+ desired = np.array([1.1405622680198362,
+ 1.1465519762044529,
+ 1.0389564467453547])
+
+ self.set_seed()
+ actual = pareto(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, pareto, bad_a * 3)
+ assert_raises(ValueError, random.pareto, bad_a * 3)
+
+ def test_weibull(self):
+ a = [1]
+ bad_a = [-1]
+ weibull = random.weibull
+ desired = np.array([0.76106853658845242,
+ 0.76386282278691653,
+ 0.71243813125891797])
+
+ self.set_seed()
+ actual = weibull(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, weibull, bad_a * 3)
+ assert_raises(ValueError, random.weibull, bad_a * 3)
+
+ def test_power(self):
+ a = [1]
+ bad_a = [-1]
+ power = random.power
+ desired = np.array([0.53283302478975902,
+ 0.53413660089041659,
+ 0.50955303552646702])
+
+ self.set_seed()
+ actual = power(a * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, power, bad_a * 3)
+ assert_raises(ValueError, random.power, bad_a * 3)
+
+ def test_laplace(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ laplace = random.laplace
+ desired = np.array([0.067921356028507157,
+ 0.070715642226971326,
+ 0.019290950698972624])
+
+ self.set_seed()
+ actual = laplace(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc * 3, bad_scale)
+
+ self.set_seed()
+ actual = laplace(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, laplace, loc, bad_scale * 3)
+
+ def test_gumbel(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ gumbel = random.gumbel
+ desired = np.array([0.2730318639556768,
+ 0.26936705726291116,
+ 0.33906220393037939])
+
+ self.set_seed()
+ actual = gumbel(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc * 3, bad_scale)
+
+ self.set_seed()
+ actual = gumbel(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, gumbel, loc, bad_scale * 3)
+
+ def test_logistic(self):
+ loc = [0]
+ scale = [1]
+ bad_scale = [-1]
+ logistic = random.logistic
+ desired = np.array([0.13152135837586171,
+ 0.13675915696285773,
+ 0.038216792802833396])
+
+ self.set_seed()
+ actual = logistic(loc * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, logistic, loc * 3, bad_scale)
+
+ self.set_seed()
+ actual = logistic(loc, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, logistic, loc, bad_scale * 3)
+ assert_equal(random.logistic(1.0, 0.0), 1.0)
+
+ def test_lognormal(self):
+ mean = [0]
+ sigma = [1]
+ bad_sigma = [-1]
+ lognormal = random.lognormal
+ desired = np.array([9.1422086044848427,
+ 8.4013952870126261,
+ 6.3073234116578671])
+
+ self.set_seed()
+ actual = lognormal(mean * 3, sigma)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, lognormal, mean * 3, bad_sigma)
+ assert_raises(ValueError, random.lognormal, mean * 3, bad_sigma)
+
+ self.set_seed()
+ actual = lognormal(mean, sigma * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, lognormal, mean, bad_sigma * 3)
+ assert_raises(ValueError, random.lognormal, mean, bad_sigma * 3)
+
+ def test_rayleigh(self):
+ scale = [1]
+ bad_scale = [-1]
+ rayleigh = random.rayleigh
+ desired = np.array([1.2337491937897689,
+ 1.2360119924878694,
+ 1.1936818095781789])
+
+ self.set_seed()
+ actual = rayleigh(scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, rayleigh, bad_scale * 3)
+
+ def test_wald(self):
+ mean = [0.5]
+ scale = [1]
+ bad_mean = [0]
+ bad_scale = [-2]
+ wald = random.wald
+ desired = np.array([0.11873681120271318,
+ 0.12450084820795027,
+ 0.9096122728408238])
+
+ self.set_seed()
+ actual = wald(mean * 3, scale)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, wald, bad_mean * 3, scale)
+ assert_raises(ValueError, wald, mean * 3, bad_scale)
+ assert_raises(ValueError, random.wald, bad_mean * 3, scale)
+ assert_raises(ValueError, random.wald, mean * 3, bad_scale)
+
+ self.set_seed()
+ actual = wald(mean, scale * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, wald, bad_mean, scale * 3)
+ assert_raises(ValueError, wald, mean, bad_scale * 3)
+ assert_raises(ValueError, wald, 0.0, 1)
+ assert_raises(ValueError, wald, 0.5, 0.0)
+
+ def test_triangular(self):
+ left = [1]
+ right = [3]
+ mode = [2]
+ bad_left_one = [3]
+ bad_mode_one = [4]
+ bad_left_two, bad_mode_two = right * 2
+ triangular = random.triangular
+ desired = np.array([2.03339048710429,
+ 2.0347400359389356,
+ 2.0095991069536208])
+
+ self.set_seed()
+ actual = triangular(left * 3, mode, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one * 3, mode, right)
+ assert_raises(ValueError, triangular, left * 3, bad_mode_one, right)
+ assert_raises(ValueError, triangular, bad_left_two * 3, bad_mode_two,
+ right)
+
+ self.set_seed()
+ actual = triangular(left, mode * 3, right)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode * 3, right)
+ assert_raises(ValueError, triangular, left, bad_mode_one * 3, right)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two * 3,
+ right)
+
+ self.set_seed()
+ actual = triangular(left, mode, right * 3)
+ assert_array_almost_equal(actual, desired, decimal=14)
+ assert_raises(ValueError, triangular, bad_left_one, mode, right * 3)
+ assert_raises(ValueError, triangular, left, bad_mode_one, right * 3)
+ assert_raises(ValueError, triangular, bad_left_two, bad_mode_two,
+ right * 3)
+
+ assert_raises(ValueError, triangular, 10., 0., 20.)
+ assert_raises(ValueError, triangular, 10., 25., 20.)
+ assert_raises(ValueError, triangular, 10., 10., 10.)
+
+ def test_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ binom = random.binomial
+ desired = np.array([1, 1, 1])
+
+ self.set_seed()
+ actual = binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n * 3, p)
+ assert_raises(ValueError, binom, n * 3, bad_p_one)
+ assert_raises(ValueError, binom, n * 3, bad_p_two)
+
+ self.set_seed()
+ actual = binom(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, binom, bad_n, p * 3)
+ assert_raises(ValueError, binom, n, bad_p_one * 3)
+ assert_raises(ValueError, binom, n, bad_p_two * 3)
+
+ def test_negative_binomial(self):
+ n = [1]
+ p = [0.5]
+ bad_n = [-1]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ neg_binom = random.negative_binomial
+ desired = np.array([1, 0, 1])
+
+ self.set_seed()
+ actual = neg_binom(n * 3, p)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n * 3, p)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_one)
+ assert_raises(ValueError, neg_binom, n * 3, bad_p_two)
+
+ self.set_seed()
+ actual = neg_binom(n, p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, neg_binom, bad_n, p * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_one * 3)
+ assert_raises(ValueError, neg_binom, n, bad_p_two * 3)
+
+ def test_poisson(self):
+ max_lam = random.RandomState()._poisson_lam_max
+
+ lam = [1]
+ bad_lam_one = [-1]
+ bad_lam_two = [max_lam * 2]
+ poisson = random.poisson
+ desired = np.array([1, 1, 0])
+
+ self.set_seed()
+ actual = poisson(lam * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, poisson, bad_lam_one * 3)
+ assert_raises(ValueError, poisson, bad_lam_two * 3)
+
+ def test_zipf(self):
+ a = [2]
+ bad_a = [0]
+ zipf = random.zipf
+ desired = np.array([2, 2, 1])
+
+ self.set_seed()
+ actual = zipf(a * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, zipf, bad_a * 3)
+ with np.errstate(invalid='ignore'):
+ assert_raises(ValueError, zipf, np.nan)
+ assert_raises(ValueError, zipf, [0, 0, np.nan])
+
+ def test_geometric(self):
+ p = [0.5]
+ bad_p_one = [-1]
+ bad_p_two = [1.5]
+ geom = random.geometric
+ desired = np.array([2, 2, 2])
+
+ self.set_seed()
+ actual = geom(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, geom, bad_p_one * 3)
+ assert_raises(ValueError, geom, bad_p_two * 3)
+
+ def test_hypergeometric(self):
+ ngood = [1]
+ nbad = [2]
+ nsample = [2]
+ bad_ngood = [-1]
+ bad_nbad = [-2]
+ bad_nsample_one = [0]
+ bad_nsample_two = [4]
+ hypergeom = random.hypergeometric
+ desired = np.array([1, 1, 1])
+
+ self.set_seed()
+ actual = hypergeom(ngood * 3, nbad, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood * 3, nbad, nsample)
+ assert_raises(ValueError, hypergeom, ngood * 3, bad_nbad, nsample)
+ assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_one)
+ assert_raises(ValueError, hypergeom, ngood * 3, nbad, bad_nsample_two)
+
+ self.set_seed()
+ actual = hypergeom(ngood, nbad * 3, nsample)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood, nbad * 3, nsample)
+ assert_raises(ValueError, hypergeom, ngood, bad_nbad * 3, nsample)
+ assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_one)
+ assert_raises(ValueError, hypergeom, ngood, nbad * 3, bad_nsample_two)
+
+ self.set_seed()
+ actual = hypergeom(ngood, nbad, nsample * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, hypergeom, bad_ngood, nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, bad_nbad, nsample * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_one * 3)
+ assert_raises(ValueError, hypergeom, ngood, nbad, bad_nsample_two * 3)
+
+ assert_raises(ValueError, hypergeom, -1, 10, 20)
+ assert_raises(ValueError, hypergeom, 10, -1, 20)
+ assert_raises(ValueError, hypergeom, 10, 10, 0)
+ assert_raises(ValueError, hypergeom, 10, 10, 25)
+
+ def test_logseries(self):
+ p = [0.5]
+ bad_p_one = [2]
+ bad_p_two = [-1]
+ logseries = random.logseries
+ desired = np.array([1, 1, 1])
+
+ self.set_seed()
+ actual = logseries(p * 3)
+ assert_array_equal(actual, desired)
+ assert_raises(ValueError, logseries, bad_p_one * 3)
+ assert_raises(ValueError, logseries, bad_p_two * 3)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start thread")
+class TestThread:
+ # make sure each state produces the same sequence even in threads
+ def setup_method(self):
+ self.seeds = range(4)
+
+ def check_function(self, function, sz):
+ from threading import Thread
+
+ out1 = np.empty((len(self.seeds),) + sz)
+ out2 = np.empty((len(self.seeds),) + sz)
+
+ # threaded generation
+ t = [Thread(target=function, args=(random.RandomState(s), o))
+ for s, o in zip(self.seeds, out1)]
+ [x.start() for x in t]
+ [x.join() for x in t]
+
+ # the same serial
+ for s, o in zip(self.seeds, out2):
+ function(random.RandomState(s), o)
+
+ # these platforms change x87 fpu precision mode in threads
+ if np.intp().dtype.itemsize == 4 and sys.platform == "win32":
+ assert_array_almost_equal(out1, out2)
+ else:
+ assert_array_equal(out1, out2)
+
+ def test_normal(self):
+ def gen_random(state, out):
+ out[...] = state.normal(size=10000)
+
+ self.check_function(gen_random, sz=(10000,))
+
+ def test_exp(self):
+ def gen_random(state, out):
+ out[...] = state.exponential(scale=np.ones((100, 1000)))
+
+ self.check_function(gen_random, sz=(100, 1000))
+
+ def test_multinomial(self):
+ def gen_random(state, out):
+ out[...] = state.multinomial(10, [1 / 6.] * 6, size=10000)
+
+ self.check_function(gen_random, sz=(10000, 6))
+
+
+# See Issue #4263
+class TestSingleEltArrayInput:
+ def setup_method(self):
+ self.argOne = np.array([2])
+ self.argTwo = np.array([3])
+ self.argThree = np.array([4])
+ self.tgtShape = (1,)
+
+ def test_one_arg_funcs(self):
+ funcs = (random.exponential, random.standard_gamma,
+ random.chisquare, random.standard_t,
+ random.pareto, random.weibull,
+ random.power, random.rayleigh,
+ random.poisson, random.zipf,
+ random.geometric, random.logseries)
+
+ probfuncs = (random.geometric, random.logseries)
+
+ for func in funcs:
+ if func in probfuncs: # p < 1.0
+ out = func(np.array([0.5]))
+
+ else:
+ out = func(self.argOne)
+
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_two_arg_funcs(self):
+ funcs = (random.uniform, random.normal,
+ random.beta, random.gamma,
+ random.f, random.noncentral_chisquare,
+ random.vonmises, random.laplace,
+ random.gumbel, random.logistic,
+ random.lognormal, random.wald,
+ random.binomial, random.negative_binomial)
+
+ probfuncs = (random.binomial, random.negative_binomial)
+
+ for func in funcs:
+ if func in probfuncs: # p <= 1
+ argTwo = np.array([0.5])
+
+ else:
+ argTwo = self.argTwo
+
+ out = func(self.argOne, argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], argTwo)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, argTwo[0])
+ assert_equal(out.shape, self.tgtShape)
+
+ def test_three_arg_funcs(self):
+ funcs = [random.noncentral_f, random.triangular,
+ random.hypergeometric]
+
+ for func in funcs:
+ out = func(self.argOne, self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne[0], self.argTwo, self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+ out = func(self.argOne, self.argTwo[0], self.argThree)
+ assert_equal(out.shape, self.tgtShape)
+
+
+# Ensure returned array dtype is correct for platform
+def test_integer_dtype(int_func):
+ random.seed(123456789)
+ fname, args, sha256 = int_func
+ f = getattr(random, fname)
+ actual = f(*args, size=2)
+ assert_(actual.dtype == np.dtype('l'))
+
+
+def test_integer_repeat(int_func):
+ random.seed(123456789)
+ fname, args, sha256 = int_func
+ f = getattr(random, fname)
+ val = f(*args, size=1000000)
+ if sys.byteorder != 'little':
+ val = val.byteswap()
+ res = hashlib.sha256(val.view(np.int8)).hexdigest()
+ assert_(res == sha256)
+
+
+def test_broadcast_size_error():
+ # GH-16833
+ with pytest.raises(ValueError):
+ random.binomial(1, [0.3, 0.7], size=(2, 1))
+ with pytest.raises(ValueError):
+ random.binomial([1, 2], 0.3, size=(2, 1))
+ with pytest.raises(ValueError):
+ random.binomial([1, 2], [0.3, 0.7], size=(2, 1))
+
+
+def test_randomstate_ctor_old_style_pickle():
+ rs = np.random.RandomState(MT19937(0))
+ rs.standard_normal(1)
+ # Directly call reduce which is used in pickling
+ ctor, args, state_a = rs.__reduce__()
+ # Simulate unpickling an old pickle that only has the name
+ assert args[0].__class__.__name__ == "MT19937"
+ b = ctor(*("MT19937",))
+ b.set_state(state_a)
+ state_b = b.get_state(legacy=False)
+
+ assert_equal(state_a['bit_generator'], state_b['bit_generator'])
+ assert_array_equal(state_a['state']['key'], state_b['state']['key'])
+ assert_array_equal(state_a['state']['pos'], state_b['state']['pos'])
+ assert_equal(state_a['has_gauss'], state_b['has_gauss'])
+ assert_equal(state_a['gauss'], state_b['gauss'])
+
+
+def test_hot_swap(restore_singleton_bitgen):
+ # GH 21808
+ def_bg = np.random.default_rng(0)
+ bg = def_bg.bit_generator
+ np.random.set_bit_generator(bg)
+ assert isinstance(np.random.mtrand._rand._bit_generator, type(bg))
+
+ second_bg = np.random.get_bit_generator()
+ assert bg is second_bg
+
+
+def test_seed_alt_bit_gen(restore_singleton_bitgen):
+ # GH 21808
+ bg = PCG64(0)
+ np.random.set_bit_generator(bg)
+ state = np.random.get_state(legacy=False)
+ np.random.seed(1)
+ new_state = np.random.get_state(legacy=False)
+ print(state)
+ print(new_state)
+ assert state["bit_generator"] == "PCG64"
+ assert state["state"]["state"] != new_state["state"]["state"]
+ assert state["state"]["inc"] != new_state["state"]["inc"]
+
+
+def test_state_error_alt_bit_gen(restore_singleton_bitgen):
+ # GH 21808
+ state = np.random.get_state()
+ bg = PCG64(0)
+ np.random.set_bit_generator(bg)
+ with pytest.raises(ValueError, match="state must be for a PCG64"):
+ np.random.set_state(state)
+
+
+def test_swap_worked(restore_singleton_bitgen):
+ # GH 21808
+ np.random.seed(98765)
+ vals = np.random.randint(0, 2 ** 30, 10)
+ bg = PCG64(0)
+ state = bg.state
+ np.random.set_bit_generator(bg)
+ state_direct = np.random.get_state(legacy=False)
+ for field in state:
+ assert state[field] == state_direct[field]
+ np.random.seed(98765)
+ pcg_vals = np.random.randint(0, 2 ** 30, 10)
+ assert not np.all(vals == pcg_vals)
+ new_state = bg.state
+ assert new_state["state"]["state"] != state["state"]["state"]
+ assert new_state["state"]["inc"] == new_state["state"]["inc"]
+
+
+def test_swapped_singleton_against_direct(restore_singleton_bitgen):
+ np.random.set_bit_generator(PCG64(98765))
+ singleton_vals = np.random.randint(0, 2 ** 30, 10)
+ rg = np.random.RandomState(PCG64(98765))
+ non_singleton_vals = rg.randint(0, 2 ** 30, 10)
+ assert_equal(non_singleton_vals, singleton_vals)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate_regression.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..3fd8776c7f969c71c7d0046142598219bd3374b3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_randomstate_regression.py
@@ -0,0 +1,216 @@
+import sys
+
+import pytest
+
+from numpy.testing import (
+ assert_, assert_array_equal, assert_raises,
+ )
+import numpy as np
+
+from numpy import random
+
+
+class TestRegression:
+
+ def test_VonMises_range(self):
+ # Make sure generated random variables are in [-pi, pi].
+ # Regression test for ticket #986.
+ for mu in np.linspace(-7., 7., 5):
+ r = random.vonmises(mu, 1, 50)
+ assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+ def test_hypergeometric_range(self):
+ # Test for ticket #921
+ assert_(np.all(random.hypergeometric(3, 18, 11, size=10) < 4))
+ assert_(np.all(random.hypergeometric(18, 3, 11, size=10) > 0))
+
+ # Test for ticket #5623
+ args = [
+ (2**20 - 2, 2**20 - 2, 2**20 - 2), # Check for 32-bit systems
+ ]
+ is_64bits = sys.maxsize > 2**32
+ if is_64bits and sys.platform != 'win32':
+ # Check for 64-bit systems
+ args.append((2**40 - 2, 2**40 - 2, 2**40 - 2))
+ for arg in args:
+ assert_(random.hypergeometric(*arg) > 0)
+
+ def test_logseries_convergence(self):
+ # Test for ticket #923
+ N = 1000
+ random.seed(0)
+ rvsn = random.logseries(0.8, size=N)
+ # these two frequency counts should be close to theoretical
+ # numbers with this large sample
+ # theoretical large N result is 0.49706795
+ freq = np.sum(rvsn == 1) / N
+ msg = f'Frequency was {freq:f}, should be > 0.45'
+ assert_(freq > 0.45, msg)
+ # theoretical large N result is 0.19882718
+ freq = np.sum(rvsn == 2) / N
+ msg = f'Frequency was {freq:f}, should be < 0.23'
+ assert_(freq < 0.23, msg)
+
+ def test_shuffle_mixed_dimension(self):
+ # Test for trac ticket #2074
+ for t in [[1, 2, 3, None],
+ [(1, 1), (2, 2), (3, 3), None],
+ [1, (2, 2), (3, 3), None],
+ [(1, 1), 2, 3, None]]:
+ random.seed(12345)
+ shuffled = list(t)
+ random.shuffle(shuffled)
+ expected = np.array([t[0], t[3], t[1], t[2]], dtype=object)
+ assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+ def test_call_within_randomstate(self):
+ # Check that custom RandomState does not call into global state
+ m = random.RandomState()
+ res = np.array([0, 8, 7, 2, 1, 9, 4, 7, 0, 3])
+ for i in range(3):
+ random.seed(i)
+ m.seed(4321)
+ # If m.state is not honored, the result will change
+ assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+ def test_multivariate_normal_size_types(self):
+ # Test for multivariate_normal issue with 'size' argument.
+ # Check that the multivariate_normal size argument can be a
+ # numpy integer.
+ random.multivariate_normal([0], [[0]], size=1)
+ random.multivariate_normal([0], [[0]], size=np.int_(1))
+ random.multivariate_normal([0], [[0]], size=np.int64(1))
+
+ def test_beta_small_parameters(self):
+ # Test that beta with small a and b parameters does not produce
+ # NaNs due to roundoff errors causing 0 / 0, gh-5851
+ random.seed(1234567890)
+ x = random.beta(0.0001, 0.0001, size=100)
+ assert_(not np.any(np.isnan(x)), 'Nans in random.beta')
+
+ def test_choice_sum_of_probs_tolerance(self):
+ # The sum of probs should be 1.0 with some tolerance.
+ # For low precision dtypes the tolerance was too tight.
+ # See numpy github issue 6123.
+ random.seed(1234)
+ a = [1, 2, 3]
+ counts = [4, 4, 2]
+ for dt in np.float16, np.float32, np.float64:
+ probs = np.array(counts, dtype=dt) / sum(counts)
+ c = random.choice(a, p=probs)
+ assert_(c in a)
+ assert_raises(ValueError, random.choice, a, p=probs*0.9)
+
+ def test_shuffle_of_array_of_different_length_strings(self):
+ # Test that permuting an array of different length strings
+ # will not cause a segfault on garbage collection
+ # Tests gh-7710
+ random.seed(1234)
+
+ a = np.array(['a', 'a' * 1000])
+
+ for _ in range(100):
+ random.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_shuffle_of_array_of_objects(self):
+ # Test that permuting an array of objects will not cause
+ # a segfault on garbage collection.
+ # See gh-7719
+ random.seed(1234)
+ a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+ for _ in range(1000):
+ random.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_permutation_subclass(self):
+ class N(np.ndarray):
+ pass
+
+ random.seed(1)
+ orig = np.arange(3).view(N)
+ perm = random.permutation(orig)
+ assert_array_equal(perm, np.array([0, 2, 1]))
+ assert_array_equal(orig, np.arange(3).view(N))
+
+ class M:
+ a = np.arange(5)
+
+ def __array__(self, dtype=None, copy=None):
+ return self.a
+
+ random.seed(1)
+ m = M()
+ perm = random.permutation(m)
+ assert_array_equal(perm, np.array([2, 1, 4, 0, 3]))
+ assert_array_equal(m.__array__(), np.arange(5))
+
+ def test_warns_byteorder(self):
+ # GH 13159
+ other_byteord_dt = 'i4'
+ with pytest.deprecated_call(match='non-native byteorder is not'):
+ random.randint(0, 200, size=10, dtype=other_byteord_dt)
+
+ def test_named_argument_initialization(self):
+ # GH 13669
+ rs1 = np.random.RandomState(123456789)
+ rs2 = np.random.RandomState(seed=123456789)
+ assert rs1.randint(0, 100) == rs2.randint(0, 100)
+
+ def test_choice_retun_dtype(self):
+ # GH 9867, now long since the NumPy default changed.
+ c = np.random.choice(10, p=[.1]*10, size=2)
+ assert c.dtype == np.dtype(np.long)
+ c = np.random.choice(10, p=[.1]*10, replace=False, size=2)
+ assert c.dtype == np.dtype(np.long)
+ c = np.random.choice(10, size=2)
+ assert c.dtype == np.dtype(np.long)
+ c = np.random.choice(10, replace=False, size=2)
+ assert c.dtype == np.dtype(np.long)
+
+ @pytest.mark.skipif(np.iinfo('l').max < 2**32,
+ reason='Cannot test with 32-bit C long')
+ def test_randint_117(self):
+ # GH 14189
+ random.seed(0)
+ expected = np.array([2357136044, 2546248239, 3071714933, 3626093760,
+ 2588848963, 3684848379, 2340255427, 3638918503,
+ 1819583497, 2678185683], dtype='int64')
+ actual = random.randint(2**32, size=10)
+ assert_array_equal(actual, expected)
+
+ def test_p_zero_stream(self):
+ # Regression test for gh-14522. Ensure that future versions
+ # generate the same variates as version 1.16.
+ np.random.seed(12345)
+ assert_array_equal(random.binomial(1, [0, 0.25, 0.5, 0.75, 1]),
+ [0, 0, 0, 1, 1])
+
+ def test_n_zero_stream(self):
+ # Regression test for gh-14522. Ensure that future versions
+ # generate the same variates as version 1.16.
+ np.random.seed(8675309)
+ expected = np.array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ [3, 4, 2, 3, 3, 1, 5, 3, 1, 3]])
+ assert_array_equal(random.binomial([[0], [10]], 0.25, size=(2, 10)),
+ expected)
+
+
+def test_multinomial_empty():
+ # gh-20483
+ # Ensure that empty p-vals are correctly handled
+ assert random.multinomial(10, []).shape == (0,)
+ assert random.multinomial(3, [], size=(7, 5, 3)).shape == (7, 5, 3, 0)
+
+
+def test_multinomial_1d_pval():
+ # gh-20483
+ with pytest.raises(TypeError, match="pvals must be a 1-d"):
+ random.multinomial(10, 0.3)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_regression.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..f7b02dc4f7d7f161631e193caf43e3a3e109909c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_regression.py
@@ -0,0 +1,149 @@
+import sys
+from numpy.testing import (
+ assert_, assert_array_equal, assert_raises,
+ )
+from numpy import random
+import numpy as np
+
+
+class TestRegression:
+
+ def test_VonMises_range(self):
+ # Make sure generated random variables are in [-pi, pi].
+ # Regression test for ticket #986.
+ for mu in np.linspace(-7., 7., 5):
+ r = random.mtrand.vonmises(mu, 1, 50)
+ assert_(np.all(r > -np.pi) and np.all(r <= np.pi))
+
+ def test_hypergeometric_range(self):
+ # Test for ticket #921
+ assert_(np.all(np.random.hypergeometric(3, 18, 11, size=10) < 4))
+ assert_(np.all(np.random.hypergeometric(18, 3, 11, size=10) > 0))
+
+ # Test for ticket #5623
+ args = [
+ (2**20 - 2, 2**20 - 2, 2**20 - 2), # Check for 32-bit systems
+ ]
+ is_64bits = sys.maxsize > 2**32
+ if is_64bits and sys.platform != 'win32':
+ # Check for 64-bit systems
+ args.append((2**40 - 2, 2**40 - 2, 2**40 - 2))
+ for arg in args:
+ assert_(np.random.hypergeometric(*arg) > 0)
+
+ def test_logseries_convergence(self):
+ # Test for ticket #923
+ N = 1000
+ np.random.seed(0)
+ rvsn = np.random.logseries(0.8, size=N)
+ # these two frequency counts should be close to theoretical
+ # numbers with this large sample
+ # theoretical large N result is 0.49706795
+ freq = np.sum(rvsn == 1) / N
+ msg = f'Frequency was {freq:f}, should be > 0.45'
+ assert_(freq > 0.45, msg)
+ # theoretical large N result is 0.19882718
+ freq = np.sum(rvsn == 2) / N
+ msg = f'Frequency was {freq:f}, should be < 0.23'
+ assert_(freq < 0.23, msg)
+
+ def test_shuffle_mixed_dimension(self):
+ # Test for trac ticket #2074
+ for t in [[1, 2, 3, None],
+ [(1, 1), (2, 2), (3, 3), None],
+ [1, (2, 2), (3, 3), None],
+ [(1, 1), 2, 3, None]]:
+ np.random.seed(12345)
+ shuffled = list(t)
+ random.shuffle(shuffled)
+ expected = np.array([t[0], t[3], t[1], t[2]], dtype=object)
+ assert_array_equal(np.array(shuffled, dtype=object), expected)
+
+ def test_call_within_randomstate(self):
+ # Check that custom RandomState does not call into global state
+ m = np.random.RandomState()
+ res = np.array([0, 8, 7, 2, 1, 9, 4, 7, 0, 3])
+ for i in range(3):
+ np.random.seed(i)
+ m.seed(4321)
+ # If m.state is not honored, the result will change
+ assert_array_equal(m.choice(10, size=10, p=np.ones(10)/10.), res)
+
+ def test_multivariate_normal_size_types(self):
+ # Test for multivariate_normal issue with 'size' argument.
+ # Check that the multivariate_normal size argument can be a
+ # numpy integer.
+ np.random.multivariate_normal([0], [[0]], size=1)
+ np.random.multivariate_normal([0], [[0]], size=np.int_(1))
+ np.random.multivariate_normal([0], [[0]], size=np.int64(1))
+
+ def test_beta_small_parameters(self):
+ # Test that beta with small a and b parameters does not produce
+ # NaNs due to roundoff errors causing 0 / 0, gh-5851
+ np.random.seed(1234567890)
+ x = np.random.beta(0.0001, 0.0001, size=100)
+ assert_(not np.any(np.isnan(x)), 'Nans in np.random.beta')
+
+ def test_choice_sum_of_probs_tolerance(self):
+ # The sum of probs should be 1.0 with some tolerance.
+ # For low precision dtypes the tolerance was too tight.
+ # See numpy github issue 6123.
+ np.random.seed(1234)
+ a = [1, 2, 3]
+ counts = [4, 4, 2]
+ for dt in np.float16, np.float32, np.float64:
+ probs = np.array(counts, dtype=dt) / sum(counts)
+ c = np.random.choice(a, p=probs)
+ assert_(c in a)
+ assert_raises(ValueError, np.random.choice, a, p=probs*0.9)
+
+ def test_shuffle_of_array_of_different_length_strings(self):
+ # Test that permuting an array of different length strings
+ # will not cause a segfault on garbage collection
+ # Tests gh-7710
+ np.random.seed(1234)
+
+ a = np.array(['a', 'a' * 1000])
+
+ for _ in range(100):
+ np.random.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_shuffle_of_array_of_objects(self):
+ # Test that permuting an array of objects will not cause
+ # a segfault on garbage collection.
+ # See gh-7719
+ np.random.seed(1234)
+ a = np.array([np.arange(1), np.arange(4)], dtype=object)
+
+ for _ in range(1000):
+ np.random.shuffle(a)
+
+ # Force Garbage Collection - should not segfault.
+ import gc
+ gc.collect()
+
+ def test_permutation_subclass(self):
+ class N(np.ndarray):
+ pass
+
+ np.random.seed(1)
+ orig = np.arange(3).view(N)
+ perm = np.random.permutation(orig)
+ assert_array_equal(perm, np.array([0, 2, 1]))
+ assert_array_equal(orig, np.arange(3).view(N))
+
+ class M:
+ a = np.arange(5)
+
+ def __array__(self, dtype=None, copy=None):
+ return self.a
+
+ np.random.seed(1)
+ m = M()
+ perm = np.random.permutation(m)
+ assert_array_equal(perm, np.array([2, 1, 4, 0, 3]))
+ assert_array_equal(m.__array__(), np.arange(5))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_seed_sequence.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_seed_sequence.py
new file mode 100644
index 0000000000000000000000000000000000000000..f08cf80faafa2fc1a369eaf7dd4d6fcccd5e9158
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_seed_sequence.py
@@ -0,0 +1,80 @@
+import numpy as np
+from numpy.testing import assert_array_equal, assert_array_compare
+
+from numpy.random import SeedSequence
+
+
+def test_reference_data():
+ """ Check that SeedSequence generates data the same as the C++ reference.
+
+ https://gist.github.com/imneme/540829265469e673d045
+ """
+ inputs = [
+ [3735928559, 195939070, 229505742, 305419896],
+ [3668361503, 4165561550, 1661411377, 3634257570],
+ [164546577, 4166754639, 1765190214, 1303880213],
+ [446610472, 3941463886, 522937693, 1882353782],
+ [1864922766, 1719732118, 3882010307, 1776744564],
+ [4141682960, 3310988675, 553637289, 902896340],
+ [1134851934, 2352871630, 3699409824, 2648159817],
+ [1240956131, 3107113773, 1283198141, 1924506131],
+ [2669565031, 579818610, 3042504477, 2774880435],
+ [2766103236, 2883057919, 4029656435, 862374500],
+ ]
+ outputs = [
+ [3914649087, 576849849, 3593928901, 2229911004],
+ [2240804226, 3691353228, 1365957195, 2654016646],
+ [3562296087, 3191708229, 1147942216, 3726991905],
+ [1403443605, 3591372999, 1291086759, 441919183],
+ [1086200464, 2191331643, 560336446, 3658716651],
+ [3249937430, 2346751812, 847844327, 2996632307],
+ [2584285912, 4034195531, 3523502488, 169742686],
+ [959045797, 3875435559, 1886309314, 359682705],
+ [3978441347, 432478529, 3223635119, 138903045],
+ [296367413, 4262059219, 13109864, 3283683422],
+ ]
+ outputs64 = [
+ [2477551240072187391, 9577394838764454085],
+ [15854241394484835714, 11398914698975566411],
+ [13708282465491374871, 16007308345579681096],
+ [15424829579845884309, 1898028439751125927],
+ [9411697742461147792, 15714068361935982142],
+ [10079222287618677782, 12870437757549876199],
+ [17326737873898640088, 729039288628699544],
+ [16644868984619524261, 1544825456798124994],
+ [1857481142255628931, 596584038813451439],
+ [18305404959516669237, 14103312907920476776],
+ ]
+ for seed, expected, expected64 in zip(inputs, outputs, outputs64):
+ expected = np.array(expected, dtype=np.uint32)
+ ss = SeedSequence(seed)
+ state = ss.generate_state(len(expected))
+ assert_array_equal(state, expected)
+ state64 = ss.generate_state(len(expected64), dtype=np.uint64)
+ assert_array_equal(state64, expected64)
+
+
+def test_zero_padding():
+ """ Ensure that the implicit zero-padding does not cause problems.
+ """
+ # Ensure that large integers are inserted in little-endian fashion to avoid
+ # trailing 0s.
+ ss0 = SeedSequence(42)
+ ss1 = SeedSequence(42 << 32)
+ assert_array_compare(
+ np.not_equal,
+ ss0.generate_state(4),
+ ss1.generate_state(4))
+
+ # Ensure backwards compatibility with the original 0.17 release for small
+ # integers and no spawn key.
+ expected42 = np.array([3444837047, 2669555309, 2046530742, 3581440988],
+ dtype=np.uint32)
+ assert_array_equal(SeedSequence(42).generate_state(4), expected42)
+
+ # Regression test for gh-16539 to ensure that the implicit 0s don't
+ # conflict with spawn keys.
+ assert_array_compare(
+ np.not_equal,
+ SeedSequence(42, spawn_key=(0,)).generate_state(4),
+ expected42)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_smoke.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_smoke.py
new file mode 100644
index 0000000000000000000000000000000000000000..b402e87384d6fcee08b6351bbbf8ef7587b890e8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/random/tests/test_smoke.py
@@ -0,0 +1,818 @@
+import pickle
+from functools import partial
+
+import numpy as np
+import pytest
+from numpy.testing import assert_equal, assert_, assert_array_equal
+from numpy.random import (Generator, MT19937, PCG64, PCG64DXSM, Philox, SFC64)
+
+@pytest.fixture(scope='module',
+ params=(np.bool, np.int8, np.int16, np.int32, np.int64,
+ np.uint8, np.uint16, np.uint32, np.uint64))
+def dtype(request):
+ return request.param
+
+
+def params_0(f):
+ val = f()
+ assert_(np.isscalar(val))
+ val = f(10)
+ assert_(val.shape == (10,))
+ val = f((10, 10))
+ assert_(val.shape == (10, 10))
+ val = f((10, 10, 10))
+ assert_(val.shape == (10, 10, 10))
+ val = f(size=(5, 5))
+ assert_(val.shape == (5, 5))
+
+
+def params_1(f, bounded=False):
+ a = 5.0
+ b = np.arange(2.0, 12.0)
+ c = np.arange(2.0, 102.0).reshape((10, 10))
+ d = np.arange(2.0, 1002.0).reshape((10, 10, 10))
+ e = np.array([2.0, 3.0])
+ g = np.arange(2.0, 12.0).reshape((1, 10, 1))
+ if bounded:
+ a = 0.5
+ b = b / (1.5 * b.max())
+ c = c / (1.5 * c.max())
+ d = d / (1.5 * d.max())
+ e = e / (1.5 * e.max())
+ g = g / (1.5 * g.max())
+
+ # Scalar
+ f(a)
+ # Scalar - size
+ f(a, size=(10, 10))
+ # 1d
+ f(b)
+ # 2d
+ f(c)
+ # 3d
+ f(d)
+ # 1d size
+ f(b, size=10)
+ # 2d - size - broadcast
+ f(e, size=(10, 2))
+ # 3d - size
+ f(g, size=(10, 10, 10))
+
+
+def comp_state(state1, state2):
+ identical = True
+ if isinstance(state1, dict):
+ for key in state1:
+ identical &= comp_state(state1[key], state2[key])
+ elif type(state1) != type(state2):
+ identical &= type(state1) == type(state2)
+ else:
+ if (isinstance(state1, (list, tuple, np.ndarray)) and isinstance(
+ state2, (list, tuple, np.ndarray))):
+ for s1, s2 in zip(state1, state2):
+ identical &= comp_state(s1, s2)
+ else:
+ identical &= state1 == state2
+ return identical
+
+
+def warmup(rg, n=None):
+ if n is None:
+ n = 11 + np.random.randint(0, 20)
+ rg.standard_normal(n)
+ rg.standard_normal(n)
+ rg.standard_normal(n, dtype=np.float32)
+ rg.standard_normal(n, dtype=np.float32)
+ rg.integers(0, 2 ** 24, n, dtype=np.uint64)
+ rg.integers(0, 2 ** 48, n, dtype=np.uint64)
+ rg.standard_gamma(11.0, n)
+ rg.standard_gamma(11.0, n, dtype=np.float32)
+ rg.random(n, dtype=np.float64)
+ rg.random(n, dtype=np.float32)
+
+
+class RNG:
+ @classmethod
+ def setup_class(cls):
+ # Overridden in test classes. Place holder to silence IDE noise
+ cls.bit_generator = PCG64
+ cls.advance = None
+ cls.seed = [12345]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 64
+ cls._extra_setup()
+
+ @classmethod
+ def _extra_setup(cls):
+ cls.vec_1d = np.arange(2.0, 102.0)
+ cls.vec_2d = np.arange(2.0, 102.0)[None, :]
+ cls.mat = np.arange(2.0, 102.0, 0.01).reshape((100, 100))
+ cls.seed_error = TypeError
+
+ def _reset_state(self):
+ self.rg.bit_generator.state = self.initial_state
+
+ def test_init(self):
+ rg = Generator(self.bit_generator())
+ state = rg.bit_generator.state
+ rg.standard_normal(1)
+ rg.standard_normal(1)
+ rg.bit_generator.state = state
+ new_state = rg.bit_generator.state
+ assert_(comp_state(state, new_state))
+
+ def test_advance(self):
+ state = self.rg.bit_generator.state
+ if hasattr(self.rg.bit_generator, 'advance'):
+ self.rg.bit_generator.advance(self.advance)
+ assert_(not comp_state(state, self.rg.bit_generator.state))
+ else:
+ bitgen_name = self.rg.bit_generator.__class__.__name__
+ pytest.skip(f'Advance is not supported by {bitgen_name}')
+
+ def test_jump(self):
+ state = self.rg.bit_generator.state
+ if hasattr(self.rg.bit_generator, 'jumped'):
+ bit_gen2 = self.rg.bit_generator.jumped()
+ jumped_state = bit_gen2.state
+ assert_(not comp_state(state, jumped_state))
+ self.rg.random(2 * 3 * 5 * 7 * 11 * 13 * 17)
+ self.rg.bit_generator.state = state
+ bit_gen3 = self.rg.bit_generator.jumped()
+ rejumped_state = bit_gen3.state
+ assert_(comp_state(jumped_state, rejumped_state))
+ else:
+ bitgen_name = self.rg.bit_generator.__class__.__name__
+ if bitgen_name not in ('SFC64',):
+ raise AttributeError(f'no "jumped" in {bitgen_name}')
+ pytest.skip(f'Jump is not supported by {bitgen_name}')
+
+ def test_uniform(self):
+ r = self.rg.uniform(-1.0, 0.0, size=10)
+ assert_(len(r) == 10)
+ assert_((r > -1).all())
+ assert_((r <= 0).all())
+
+ def test_uniform_array(self):
+ r = self.rg.uniform(np.array([-1.0] * 10), 0.0, size=10)
+ assert_(len(r) == 10)
+ assert_((r > -1).all())
+ assert_((r <= 0).all())
+ r = self.rg.uniform(np.array([-1.0] * 10),
+ np.array([0.0] * 10), size=10)
+ assert_(len(r) == 10)
+ assert_((r > -1).all())
+ assert_((r <= 0).all())
+ r = self.rg.uniform(-1.0, np.array([0.0] * 10), size=10)
+ assert_(len(r) == 10)
+ assert_((r > -1).all())
+ assert_((r <= 0).all())
+
+ def test_random(self):
+ assert_(len(self.rg.random(10)) == 10)
+ params_0(self.rg.random)
+
+ def test_standard_normal_zig(self):
+ assert_(len(self.rg.standard_normal(10)) == 10)
+
+ def test_standard_normal(self):
+ assert_(len(self.rg.standard_normal(10)) == 10)
+ params_0(self.rg.standard_normal)
+
+ def test_standard_gamma(self):
+ assert_(len(self.rg.standard_gamma(10, 10)) == 10)
+ assert_(len(self.rg.standard_gamma(np.array([10] * 10), 10)) == 10)
+ params_1(self.rg.standard_gamma)
+
+ def test_standard_exponential(self):
+ assert_(len(self.rg.standard_exponential(10)) == 10)
+ params_0(self.rg.standard_exponential)
+
+ def test_standard_exponential_float(self):
+ randoms = self.rg.standard_exponential(10, dtype='float32')
+ assert_(len(randoms) == 10)
+ assert randoms.dtype == np.float32
+ params_0(partial(self.rg.standard_exponential, dtype='float32'))
+
+ def test_standard_exponential_float_log(self):
+ randoms = self.rg.standard_exponential(10, dtype='float32',
+ method='inv')
+ assert_(len(randoms) == 10)
+ assert randoms.dtype == np.float32
+ params_0(partial(self.rg.standard_exponential, dtype='float32',
+ method='inv'))
+
+ def test_standard_cauchy(self):
+ assert_(len(self.rg.standard_cauchy(10)) == 10)
+ params_0(self.rg.standard_cauchy)
+
+ def test_standard_t(self):
+ assert_(len(self.rg.standard_t(10, 10)) == 10)
+ params_1(self.rg.standard_t)
+
+ def test_binomial(self):
+ assert_(self.rg.binomial(10, .5) >= 0)
+ assert_(self.rg.binomial(1000, .5) >= 0)
+
+ def test_reset_state(self):
+ state = self.rg.bit_generator.state
+ int_1 = self.rg.integers(2**31)
+ self.rg.bit_generator.state = state
+ int_2 = self.rg.integers(2**31)
+ assert_(int_1 == int_2)
+
+ def test_entropy_init(self):
+ rg = Generator(self.bit_generator())
+ rg2 = Generator(self.bit_generator())
+ assert_(not comp_state(rg.bit_generator.state,
+ rg2.bit_generator.state))
+
+ def test_seed(self):
+ rg = Generator(self.bit_generator(*self.seed))
+ rg2 = Generator(self.bit_generator(*self.seed))
+ rg.random()
+ rg2.random()
+ assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+ def test_reset_state_gauss(self):
+ rg = Generator(self.bit_generator(*self.seed))
+ rg.standard_normal()
+ state = rg.bit_generator.state
+ n1 = rg.standard_normal(size=10)
+ rg2 = Generator(self.bit_generator())
+ rg2.bit_generator.state = state
+ n2 = rg2.standard_normal(size=10)
+ assert_array_equal(n1, n2)
+
+ def test_reset_state_uint32(self):
+ rg = Generator(self.bit_generator(*self.seed))
+ rg.integers(0, 2 ** 24, 120, dtype=np.uint32)
+ state = rg.bit_generator.state
+ n1 = rg.integers(0, 2 ** 24, 10, dtype=np.uint32)
+ rg2 = Generator(self.bit_generator())
+ rg2.bit_generator.state = state
+ n2 = rg2.integers(0, 2 ** 24, 10, dtype=np.uint32)
+ assert_array_equal(n1, n2)
+
+ def test_reset_state_float(self):
+ rg = Generator(self.bit_generator(*self.seed))
+ rg.random(dtype='float32')
+ state = rg.bit_generator.state
+ n1 = rg.random(size=10, dtype='float32')
+ rg2 = Generator(self.bit_generator())
+ rg2.bit_generator.state = state
+ n2 = rg2.random(size=10, dtype='float32')
+ assert_((n1 == n2).all())
+
+ def test_shuffle(self):
+ original = np.arange(200, 0, -1)
+ permuted = self.rg.permutation(original)
+ assert_((original != permuted).any())
+
+ def test_permutation(self):
+ original = np.arange(200, 0, -1)
+ permuted = self.rg.permutation(original)
+ assert_((original != permuted).any())
+
+ def test_beta(self):
+ vals = self.rg.beta(2.0, 2.0, 10)
+ assert_(len(vals) == 10)
+ vals = self.rg.beta(np.array([2.0] * 10), 2.0)
+ assert_(len(vals) == 10)
+ vals = self.rg.beta(2.0, np.array([2.0] * 10))
+ assert_(len(vals) == 10)
+ vals = self.rg.beta(np.array([2.0] * 10), np.array([2.0] * 10))
+ assert_(len(vals) == 10)
+ vals = self.rg.beta(np.array([2.0] * 10), np.array([[2.0]] * 10))
+ assert_(vals.shape == (10, 10))
+
+ def test_bytes(self):
+ vals = self.rg.bytes(10)
+ assert_(len(vals) == 10)
+
+ def test_chisquare(self):
+ vals = self.rg.chisquare(2.0, 10)
+ assert_(len(vals) == 10)
+ params_1(self.rg.chisquare)
+
+ def test_exponential(self):
+ vals = self.rg.exponential(2.0, 10)
+ assert_(len(vals) == 10)
+ params_1(self.rg.exponential)
+
+ def test_f(self):
+ vals = self.rg.f(3, 1000, 10)
+ assert_(len(vals) == 10)
+
+ def test_gamma(self):
+ vals = self.rg.gamma(3, 2, 10)
+ assert_(len(vals) == 10)
+
+ def test_geometric(self):
+ vals = self.rg.geometric(0.5, 10)
+ assert_(len(vals) == 10)
+ params_1(self.rg.exponential, bounded=True)
+
+ def test_gumbel(self):
+ vals = self.rg.gumbel(2.0, 2.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_laplace(self):
+ vals = self.rg.laplace(2.0, 2.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_logitic(self):
+ vals = self.rg.logistic(2.0, 2.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_logseries(self):
+ vals = self.rg.logseries(0.5, 10)
+ assert_(len(vals) == 10)
+
+ def test_negative_binomial(self):
+ vals = self.rg.negative_binomial(10, 0.2, 10)
+ assert_(len(vals) == 10)
+
+ def test_noncentral_chisquare(self):
+ vals = self.rg.noncentral_chisquare(10, 2, 10)
+ assert_(len(vals) == 10)
+
+ def test_noncentral_f(self):
+ vals = self.rg.noncentral_f(3, 1000, 2, 10)
+ assert_(len(vals) == 10)
+ vals = self.rg.noncentral_f(np.array([3] * 10), 1000, 2)
+ assert_(len(vals) == 10)
+ vals = self.rg.noncentral_f(3, np.array([1000] * 10), 2)
+ assert_(len(vals) == 10)
+ vals = self.rg.noncentral_f(3, 1000, np.array([2] * 10))
+ assert_(len(vals) == 10)
+
+ def test_normal(self):
+ vals = self.rg.normal(10, 0.2, 10)
+ assert_(len(vals) == 10)
+
+ def test_pareto(self):
+ vals = self.rg.pareto(3.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_poisson(self):
+ vals = self.rg.poisson(10, 10)
+ assert_(len(vals) == 10)
+ vals = self.rg.poisson(np.array([10] * 10))
+ assert_(len(vals) == 10)
+ params_1(self.rg.poisson)
+
+ def test_power(self):
+ vals = self.rg.power(0.2, 10)
+ assert_(len(vals) == 10)
+
+ def test_integers(self):
+ vals = self.rg.integers(10, 20, 10)
+ assert_(len(vals) == 10)
+
+ def test_rayleigh(self):
+ vals = self.rg.rayleigh(0.2, 10)
+ assert_(len(vals) == 10)
+ params_1(self.rg.rayleigh, bounded=True)
+
+ def test_vonmises(self):
+ vals = self.rg.vonmises(10, 0.2, 10)
+ assert_(len(vals) == 10)
+
+ def test_wald(self):
+ vals = self.rg.wald(1.0, 1.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_weibull(self):
+ vals = self.rg.weibull(1.0, 10)
+ assert_(len(vals) == 10)
+
+ def test_zipf(self):
+ vals = self.rg.zipf(10, 10)
+ assert_(len(vals) == 10)
+ vals = self.rg.zipf(self.vec_1d)
+ assert_(len(vals) == 100)
+ vals = self.rg.zipf(self.vec_2d)
+ assert_(vals.shape == (1, 100))
+ vals = self.rg.zipf(self.mat)
+ assert_(vals.shape == (100, 100))
+
+ def test_hypergeometric(self):
+ vals = self.rg.hypergeometric(25, 25, 20)
+ assert_(np.isscalar(vals))
+ vals = self.rg.hypergeometric(np.array([25] * 10), 25, 20)
+ assert_(vals.shape == (10,))
+
+ def test_triangular(self):
+ vals = self.rg.triangular(-5, 0, 5)
+ assert_(np.isscalar(vals))
+ vals = self.rg.triangular(-5, np.array([0] * 10), 5)
+ assert_(vals.shape == (10,))
+
+ def test_multivariate_normal(self):
+ mean = [0, 0]
+ cov = [[1, 0], [0, 100]] # diagonal covariance
+ x = self.rg.multivariate_normal(mean, cov, 5000)
+ assert_(x.shape == (5000, 2))
+ x_zig = self.rg.multivariate_normal(mean, cov, 5000)
+ assert_(x.shape == (5000, 2))
+ x_inv = self.rg.multivariate_normal(mean, cov, 5000)
+ assert_(x.shape == (5000, 2))
+ assert_((x_zig != x_inv).any())
+
+ def test_multinomial(self):
+ vals = self.rg.multinomial(100, [1.0 / 3, 2.0 / 3])
+ assert_(vals.shape == (2,))
+ vals = self.rg.multinomial(100, [1.0 / 3, 2.0 / 3], size=10)
+ assert_(vals.shape == (10, 2))
+
+ def test_dirichlet(self):
+ s = self.rg.dirichlet((10, 5, 3), 20)
+ assert_(s.shape == (20, 3))
+
+ def test_pickle(self):
+ pick = pickle.dumps(self.rg)
+ unpick = pickle.loads(pick)
+ assert_(type(self.rg) == type(unpick))
+ assert_(comp_state(self.rg.bit_generator.state,
+ unpick.bit_generator.state))
+
+ pick = pickle.dumps(self.rg)
+ unpick = pickle.loads(pick)
+ assert_(type(self.rg) == type(unpick))
+ assert_(comp_state(self.rg.bit_generator.state,
+ unpick.bit_generator.state))
+
+ def test_seed_array(self):
+ if self.seed_vector_bits is None:
+ bitgen_name = self.bit_generator.__name__
+ pytest.skip(f'Vector seeding is not supported by {bitgen_name}')
+
+ if self.seed_vector_bits == 32:
+ dtype = np.uint32
+ else:
+ dtype = np.uint64
+ seed = np.array([1], dtype=dtype)
+ bg = self.bit_generator(seed)
+ state1 = bg.state
+ bg = self.bit_generator(1)
+ state2 = bg.state
+ assert_(comp_state(state1, state2))
+
+ seed = np.arange(4, dtype=dtype)
+ bg = self.bit_generator(seed)
+ state1 = bg.state
+ bg = self.bit_generator(seed[0])
+ state2 = bg.state
+ assert_(not comp_state(state1, state2))
+
+ seed = np.arange(1500, dtype=dtype)
+ bg = self.bit_generator(seed)
+ state1 = bg.state
+ bg = self.bit_generator(seed[0])
+ state2 = bg.state
+ assert_(not comp_state(state1, state2))
+
+ seed = 2 ** np.mod(np.arange(1500, dtype=dtype),
+ self.seed_vector_bits - 1) + 1
+ bg = self.bit_generator(seed)
+ state1 = bg.state
+ bg = self.bit_generator(seed[0])
+ state2 = bg.state
+ assert_(not comp_state(state1, state2))
+
+ def test_uniform_float(self):
+ rg = Generator(self.bit_generator(12345))
+ warmup(rg)
+ state = rg.bit_generator.state
+ r1 = rg.random(11, dtype=np.float32)
+ rg2 = Generator(self.bit_generator())
+ warmup(rg2)
+ rg2.bit_generator.state = state
+ r2 = rg2.random(11, dtype=np.float32)
+ assert_array_equal(r1, r2)
+ assert_equal(r1.dtype, np.float32)
+ assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+ def test_gamma_floats(self):
+ rg = Generator(self.bit_generator())
+ warmup(rg)
+ state = rg.bit_generator.state
+ r1 = rg.standard_gamma(4.0, 11, dtype=np.float32)
+ rg2 = Generator(self.bit_generator())
+ warmup(rg2)
+ rg2.bit_generator.state = state
+ r2 = rg2.standard_gamma(4.0, 11, dtype=np.float32)
+ assert_array_equal(r1, r2)
+ assert_equal(r1.dtype, np.float32)
+ assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+ def test_normal_floats(self):
+ rg = Generator(self.bit_generator())
+ warmup(rg)
+ state = rg.bit_generator.state
+ r1 = rg.standard_normal(11, dtype=np.float32)
+ rg2 = Generator(self.bit_generator())
+ warmup(rg2)
+ rg2.bit_generator.state = state
+ r2 = rg2.standard_normal(11, dtype=np.float32)
+ assert_array_equal(r1, r2)
+ assert_equal(r1.dtype, np.float32)
+ assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+ def test_normal_zig_floats(self):
+ rg = Generator(self.bit_generator())
+ warmup(rg)
+ state = rg.bit_generator.state
+ r1 = rg.standard_normal(11, dtype=np.float32)
+ rg2 = Generator(self.bit_generator())
+ warmup(rg2)
+ rg2.bit_generator.state = state
+ r2 = rg2.standard_normal(11, dtype=np.float32)
+ assert_array_equal(r1, r2)
+ assert_equal(r1.dtype, np.float32)
+ assert_(comp_state(rg.bit_generator.state, rg2.bit_generator.state))
+
+ def test_output_fill(self):
+ rg = self.rg
+ state = rg.bit_generator.state
+ size = (31, 7, 97)
+ existing = np.empty(size)
+ rg.bit_generator.state = state
+ rg.standard_normal(out=existing)
+ rg.bit_generator.state = state
+ direct = rg.standard_normal(size=size)
+ assert_equal(direct, existing)
+
+ sized = np.empty(size)
+ rg.bit_generator.state = state
+ rg.standard_normal(out=sized, size=sized.shape)
+
+ existing = np.empty(size, dtype=np.float32)
+ rg.bit_generator.state = state
+ rg.standard_normal(out=existing, dtype=np.float32)
+ rg.bit_generator.state = state
+ direct = rg.standard_normal(size=size, dtype=np.float32)
+ assert_equal(direct, existing)
+
+ def test_output_filling_uniform(self):
+ rg = self.rg
+ state = rg.bit_generator.state
+ size = (31, 7, 97)
+ existing = np.empty(size)
+ rg.bit_generator.state = state
+ rg.random(out=existing)
+ rg.bit_generator.state = state
+ direct = rg.random(size=size)
+ assert_equal(direct, existing)
+
+ existing = np.empty(size, dtype=np.float32)
+ rg.bit_generator.state = state
+ rg.random(out=existing, dtype=np.float32)
+ rg.bit_generator.state = state
+ direct = rg.random(size=size, dtype=np.float32)
+ assert_equal(direct, existing)
+
+ def test_output_filling_exponential(self):
+ rg = self.rg
+ state = rg.bit_generator.state
+ size = (31, 7, 97)
+ existing = np.empty(size)
+ rg.bit_generator.state = state
+ rg.standard_exponential(out=existing)
+ rg.bit_generator.state = state
+ direct = rg.standard_exponential(size=size)
+ assert_equal(direct, existing)
+
+ existing = np.empty(size, dtype=np.float32)
+ rg.bit_generator.state = state
+ rg.standard_exponential(out=existing, dtype=np.float32)
+ rg.bit_generator.state = state
+ direct = rg.standard_exponential(size=size, dtype=np.float32)
+ assert_equal(direct, existing)
+
+ def test_output_filling_gamma(self):
+ rg = self.rg
+ state = rg.bit_generator.state
+ size = (31, 7, 97)
+ existing = np.zeros(size)
+ rg.bit_generator.state = state
+ rg.standard_gamma(1.0, out=existing)
+ rg.bit_generator.state = state
+ direct = rg.standard_gamma(1.0, size=size)
+ assert_equal(direct, existing)
+
+ existing = np.zeros(size, dtype=np.float32)
+ rg.bit_generator.state = state
+ rg.standard_gamma(1.0, out=existing, dtype=np.float32)
+ rg.bit_generator.state = state
+ direct = rg.standard_gamma(1.0, size=size, dtype=np.float32)
+ assert_equal(direct, existing)
+
+ def test_output_filling_gamma_broadcast(self):
+ rg = self.rg
+ state = rg.bit_generator.state
+ size = (31, 7, 97)
+ mu = np.arange(97.0) + 1.0
+ existing = np.zeros(size)
+ rg.bit_generator.state = state
+ rg.standard_gamma(mu, out=existing)
+ rg.bit_generator.state = state
+ direct = rg.standard_gamma(mu, size=size)
+ assert_equal(direct, existing)
+
+ existing = np.zeros(size, dtype=np.float32)
+ rg.bit_generator.state = state
+ rg.standard_gamma(mu, out=existing, dtype=np.float32)
+ rg.bit_generator.state = state
+ direct = rg.standard_gamma(mu, size=size, dtype=np.float32)
+ assert_equal(direct, existing)
+
+ def test_output_fill_error(self):
+ rg = self.rg
+ size = (31, 7, 97)
+ existing = np.empty(size)
+ with pytest.raises(TypeError):
+ rg.standard_normal(out=existing, dtype=np.float32)
+ with pytest.raises(ValueError):
+ rg.standard_normal(out=existing[::3])
+ existing = np.empty(size, dtype=np.float32)
+ with pytest.raises(TypeError):
+ rg.standard_normal(out=existing, dtype=np.float64)
+
+ existing = np.zeros(size, dtype=np.float32)
+ with pytest.raises(TypeError):
+ rg.standard_gamma(1.0, out=existing, dtype=np.float64)
+ with pytest.raises(ValueError):
+ rg.standard_gamma(1.0, out=existing[::3], dtype=np.float32)
+ existing = np.zeros(size, dtype=np.float64)
+ with pytest.raises(TypeError):
+ rg.standard_gamma(1.0, out=existing, dtype=np.float32)
+ with pytest.raises(ValueError):
+ rg.standard_gamma(1.0, out=existing[::3])
+
+ def test_integers_broadcast(self, dtype):
+ if dtype == np.bool:
+ upper = 2
+ lower = 0
+ else:
+ info = np.iinfo(dtype)
+ upper = int(info.max) + 1
+ lower = info.min
+ self._reset_state()
+ a = self.rg.integers(lower, [upper] * 10, dtype=dtype)
+ self._reset_state()
+ b = self.rg.integers([lower] * 10, upper, dtype=dtype)
+ assert_equal(a, b)
+ self._reset_state()
+ c = self.rg.integers(lower, upper, size=10, dtype=dtype)
+ assert_equal(a, c)
+ self._reset_state()
+ d = self.rg.integers(np.array(
+ [lower] * 10), np.array([upper], dtype=object), size=10,
+ dtype=dtype)
+ assert_equal(a, d)
+ self._reset_state()
+ e = self.rg.integers(
+ np.array([lower] * 10), np.array([upper] * 10), size=10,
+ dtype=dtype)
+ assert_equal(a, e)
+
+ self._reset_state()
+ a = self.rg.integers(0, upper, size=10, dtype=dtype)
+ self._reset_state()
+ b = self.rg.integers([upper] * 10, dtype=dtype)
+ assert_equal(a, b)
+
+ def test_integers_numpy(self, dtype):
+ high = np.array([1])
+ low = np.array([0])
+
+ out = self.rg.integers(low, high, dtype=dtype)
+ assert out.shape == (1,)
+
+ out = self.rg.integers(low[0], high, dtype=dtype)
+ assert out.shape == (1,)
+
+ out = self.rg.integers(low, high[0], dtype=dtype)
+ assert out.shape == (1,)
+
+ def test_integers_broadcast_errors(self, dtype):
+ if dtype == np.bool:
+ upper = 2
+ lower = 0
+ else:
+ info = np.iinfo(dtype)
+ upper = int(info.max) + 1
+ lower = info.min
+ with pytest.raises(ValueError):
+ self.rg.integers(lower, [upper + 1] * 10, dtype=dtype)
+ with pytest.raises(ValueError):
+ self.rg.integers(lower - 1, [upper] * 10, dtype=dtype)
+ with pytest.raises(ValueError):
+ self.rg.integers([lower - 1], [upper] * 10, dtype=dtype)
+ with pytest.raises(ValueError):
+ self.rg.integers([0], [0], dtype=dtype)
+
+
+class TestMT19937(RNG):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = MT19937
+ cls.advance = None
+ cls.seed = [2 ** 21 + 2 ** 16 + 2 ** 5 + 1]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 32
+ cls._extra_setup()
+ cls.seed_error = ValueError
+
+ def test_numpy_state(self):
+ nprg = np.random.RandomState()
+ nprg.standard_normal(99)
+ state = nprg.get_state()
+ self.rg.bit_generator.state = state
+ state2 = self.rg.bit_generator.state
+ assert_((state[1] == state2['state']['key']).all())
+ assert_(state[2] == state2['state']['pos'])
+
+
+class TestPhilox(RNG):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = Philox
+ cls.advance = 2**63 + 2**31 + 2**15 + 1
+ cls.seed = [12345]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 64
+ cls._extra_setup()
+
+
+class TestSFC64(RNG):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = SFC64
+ cls.advance = None
+ cls.seed = [12345]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 192
+ cls._extra_setup()
+
+
+class TestPCG64(RNG):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = PCG64
+ cls.advance = 2**63 + 2**31 + 2**15 + 1
+ cls.seed = [12345]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 64
+ cls._extra_setup()
+
+
+class TestPCG64DXSM(RNG):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = PCG64DXSM
+ cls.advance = 2**63 + 2**31 + 2**15 + 1
+ cls.seed = [12345]
+ cls.rg = Generator(cls.bit_generator(*cls.seed))
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 64
+ cls._extra_setup()
+
+
+class TestDefaultRNG(RNG):
+ @classmethod
+ def setup_class(cls):
+ # This will duplicate some tests that directly instantiate a fresh
+ # Generator(), but that's okay.
+ cls.bit_generator = PCG64
+ cls.advance = 2**63 + 2**31 + 2**15 + 1
+ cls.seed = [12345]
+ cls.rg = np.random.default_rng(*cls.seed)
+ cls.initial_state = cls.rg.bit_generator.state
+ cls.seed_vector_bits = 64
+ cls._extra_setup()
+
+ def test_default_is_pcg64(self):
+ # In order to change the default BitGenerator, we'll go through
+ # a deprecation cycle to move to a different function.
+ assert_(isinstance(self.rg.bit_generator, PCG64))
+
+ def test_seed(self):
+ np.random.default_rng()
+ np.random.default_rng(None)
+ np.random.default_rng(12345)
+ np.random.default_rng(0)
+ np.random.default_rng(43660444402423911716352051725018508569)
+ np.random.default_rng([43660444402423911716352051725018508569,
+ 279705150948142787361475340226491943209])
+ with pytest.raises(ValueError):
+ np.random.default_rng(-1)
+ with pytest.raises(ValueError):
+ np.random.default_rng([12345, -1])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..1a439ada8c35a6971b5fa8507381bde63ead8a6e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.py
@@ -0,0 +1,2 @@
+from numpy._core.records import __all__, __doc__
+from numpy._core.records import *
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..605770f7c9c0695bcbe71a3832690d9045a6038c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/rec/__init__.pyi
@@ -0,0 +1,22 @@
+from numpy._core.records import (
+ record,
+ recarray,
+ find_duplicate,
+ format_parser,
+ fromarrays,
+ fromrecords,
+ fromstring,
+ fromfile,
+ array,
+)
+__all__ = [
+ "record",
+ "recarray",
+ "format_parser",
+ "fromarrays",
+ "fromrecords",
+ "fromstring",
+ "fromfile",
+ "array",
+ "find_duplicate",
+]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..f370ba71f296be0129c3e7aebc9af769dd83e94e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.py
@@ -0,0 +1,2 @@
+from numpy._core.strings import __all__, __doc__
+from numpy._core.strings import *
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..fb03e9c8b5e62912182623c5787ea554ed2a0bb9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/strings/__init__.pyi
@@ -0,0 +1,95 @@
+from numpy._core.strings import (
+ equal,
+ not_equal,
+ greater_equal,
+ less_equal,
+ greater,
+ less,
+ add,
+ multiply,
+ mod,
+ isalpha,
+ isalnum,
+ isdigit,
+ isspace,
+ isnumeric,
+ isdecimal,
+ islower,
+ isupper,
+ istitle,
+ str_len,
+ find,
+ rfind,
+ index,
+ rindex,
+ count,
+ startswith,
+ endswith,
+ decode,
+ encode,
+ expandtabs,
+ center,
+ ljust,
+ rjust,
+ lstrip,
+ rstrip,
+ strip,
+ zfill,
+ upper,
+ lower,
+ swapcase,
+ capitalize,
+ title,
+ replace,
+ partition,
+ rpartition,
+ translate,
+)
+
+__all__ = [
+ "equal",
+ "not_equal",
+ "less",
+ "less_equal",
+ "greater",
+ "greater_equal",
+ "add",
+ "multiply",
+ "isalpha",
+ "isdigit",
+ "isspace",
+ "isalnum",
+ "islower",
+ "isupper",
+ "istitle",
+ "isdecimal",
+ "isnumeric",
+ "str_len",
+ "find",
+ "rfind",
+ "index",
+ "rindex",
+ "count",
+ "startswith",
+ "endswith",
+ "lstrip",
+ "rstrip",
+ "strip",
+ "replace",
+ "expandtabs",
+ "center",
+ "ljust",
+ "rjust",
+ "zfill",
+ "partition",
+ "rpartition",
+ "upper",
+ "lower",
+ "swapcase",
+ "capitalize",
+ "title",
+ "mod",
+ "decode",
+ "encode",
+ "translate",
+]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a34221e4dde5f8a1eeab7446193344915467769
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.py
@@ -0,0 +1,22 @@
+"""Common test support for all numpy test scripts.
+
+This single module should provide all the common functionality for numpy tests
+in a single location, so that test scripts can just import it and work right
+away.
+
+"""
+from unittest import TestCase
+
+from . import _private
+from ._private.utils import *
+from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
+from ._private import extbuild
+from . import overrides
+
+__all__ = (
+ _private.utils.__all__ + ['TestCase', 'overrides']
+)
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ba3c9a2b7a44bb8f4639fb8e4ab2e528b0a4e572
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/__init__.pyi
@@ -0,0 +1,102 @@
+from unittest import TestCase
+
+from . import overrides
+from ._private.utils import (
+ HAS_LAPACK64,
+ HAS_REFCOUNT,
+ IS_EDITABLE,
+ IS_INSTALLED,
+ IS_MUSL,
+ IS_PYPY,
+ IS_PYSTON,
+ IS_WASM,
+ NOGIL_BUILD,
+ NUMPY_ROOT,
+ IgnoreException,
+ KnownFailureException,
+ SkipTest,
+ assert_,
+ assert_allclose,
+ assert_almost_equal,
+ assert_approx_equal,
+ assert_array_almost_equal,
+ assert_array_almost_equal_nulp,
+ assert_array_compare,
+ assert_array_equal,
+ assert_array_less,
+ assert_array_max_ulp,
+ assert_equal,
+ assert_no_gc_cycles,
+ assert_no_warnings,
+ assert_raises,
+ assert_raises_regex,
+ assert_string_equal,
+ assert_warns,
+ break_cycles,
+ build_err_msg,
+ check_support_sve,
+ clear_and_catch_warnings,
+ decorate_methods,
+ jiffies,
+ measure,
+ memusage,
+ print_assert_equal,
+ run_threaded,
+ rundocs,
+ runstring,
+ suppress_warnings,
+ tempdir,
+ temppath,
+ verbose,
+)
+
+__all__ = [
+ "HAS_LAPACK64",
+ "HAS_REFCOUNT",
+ "IS_EDITABLE",
+ "IS_INSTALLED",
+ "IS_MUSL",
+ "IS_PYPY",
+ "IS_PYSTON",
+ "IS_WASM",
+ "NOGIL_BUILD",
+ "NUMPY_ROOT",
+ "IgnoreException",
+ "KnownFailureException",
+ "SkipTest",
+ "TestCase",
+ "assert_",
+ "assert_allclose",
+ "assert_almost_equal",
+ "assert_approx_equal",
+ "assert_array_almost_equal",
+ "assert_array_almost_equal_nulp",
+ "assert_array_compare",
+ "assert_array_equal",
+ "assert_array_less",
+ "assert_array_max_ulp",
+ "assert_equal",
+ "assert_no_gc_cycles",
+ "assert_no_warnings",
+ "assert_raises",
+ "assert_raises_regex",
+ "assert_string_equal",
+ "assert_warns",
+ "break_cycles",
+ "build_err_msg",
+ "check_support_sve",
+ "clear_and_catch_warnings",
+ "decorate_methods",
+ "jiffies",
+ "measure",
+ "memusage",
+ "overrides",
+ "print_assert_equal",
+ "run_threaded",
+ "rundocs",
+ "runstring",
+ "suppress_warnings",
+ "tempdir",
+ "temppath",
+ "verbose",
+]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/__init__.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.py
new file mode 100644
index 0000000000000000000000000000000000000000..4fd0d839f24962d17b974d59b08ded8c03277fac
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.py
@@ -0,0 +1,252 @@
+"""
+Build a c-extension module on-the-fly in tests.
+See build_and_import_extensions for usage hints
+
+"""
+
+import os
+import pathlib
+import subprocess
+import sys
+import sysconfig
+import textwrap
+
+__all__ = ['build_and_import_extension', 'compile_extension_module']
+
+
+def build_and_import_extension(
+ modname, functions, *, prologue="", build_dir=None,
+ include_dirs=[], more_init=""):
+ """
+ Build and imports a c-extension module `modname` from a list of function
+ fragments `functions`.
+
+
+ Parameters
+ ----------
+ functions : list of fragments
+ Each fragment is a sequence of func_name, calling convention, snippet.
+ prologue : string
+ Code to precede the rest, usually extra ``#include`` or ``#define``
+ macros.
+ build_dir : pathlib.Path
+ Where to build the module, usually a temporary directory
+ include_dirs : list
+ Extra directories to find include files when compiling
+ more_init : string
+ Code to appear in the module PyMODINIT_FUNC
+
+ Returns
+ -------
+ out: module
+ The module will have been loaded and is ready for use
+
+ Examples
+ --------
+ >>> functions = [("test_bytes", "METH_O", \"\"\"
+ if ( !PyBytesCheck(args)) {
+ Py_RETURN_FALSE;
+ }
+ Py_RETURN_TRUE;
+ \"\"\")]
+ >>> mod = build_and_import_extension("testme", functions)
+ >>> assert not mod.test_bytes('abc')
+ >>> assert mod.test_bytes(b'abc')
+ """
+ body = prologue + _make_methods(functions, modname)
+ init = """
+ PyObject *mod = PyModule_Create(&moduledef);
+ #ifdef Py_GIL_DISABLED
+ PyUnstable_Module_SetGIL(mod, Py_MOD_GIL_NOT_USED);
+ #endif
+ """
+ if not build_dir:
+ build_dir = pathlib.Path('.')
+ if more_init:
+ init += """#define INITERROR return NULL
+ """
+ init += more_init
+ init += "\nreturn mod;"
+ source_string = _make_source(modname, init, body)
+ try:
+ mod_so = compile_extension_module(
+ modname, build_dir, include_dirs, source_string)
+ except Exception as e:
+ # shorten the exception chain
+ raise RuntimeError(f"could not compile in {build_dir}:") from e
+ import importlib.util
+ spec = importlib.util.spec_from_file_location(modname, mod_so)
+ foo = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(foo)
+ return foo
+
+
+def compile_extension_module(
+ name, builddir, include_dirs,
+ source_string, libraries=[], library_dirs=[]):
+ """
+ Build an extension module and return the filename of the resulting
+ native code file.
+
+ Parameters
+ ----------
+ name : string
+ name of the module, possibly including dots if it is a module inside a
+ package.
+ builddir : pathlib.Path
+ Where to build the module, usually a temporary directory
+ include_dirs : list
+ Extra directories to find include files when compiling
+ libraries : list
+ Libraries to link into the extension module
+ library_dirs: list
+ Where to find the libraries, ``-L`` passed to the linker
+ """
+ modname = name.split('.')[-1]
+ dirname = builddir / name
+ dirname.mkdir(exist_ok=True)
+ cfile = _convert_str_to_file(source_string, dirname)
+ include_dirs = include_dirs + [sysconfig.get_config_var('INCLUDEPY')]
+
+ return _c_compile(
+ cfile, outputfilename=dirname / modname,
+ include_dirs=include_dirs, libraries=[], library_dirs=[],
+ )
+
+
+def _convert_str_to_file(source, dirname):
+ """Helper function to create a file ``source.c`` in `dirname` that contains
+ the string in `source`. Returns the file name
+ """
+ filename = dirname / 'source.c'
+ with filename.open('w') as f:
+ f.write(str(source))
+ return filename
+
+
+def _make_methods(functions, modname):
+ """ Turns the name, signature, code in functions into complete functions
+ and lists them in a methods_table. Then turns the methods_table into a
+ ``PyMethodDef`` structure and returns the resulting code fragment ready
+ for compilation
+ """
+ methods_table = []
+ codes = []
+ for funcname, flags, code in functions:
+ cfuncname = "%s_%s" % (modname, funcname)
+ if 'METH_KEYWORDS' in flags:
+ signature = '(PyObject *self, PyObject *args, PyObject *kwargs)'
+ else:
+ signature = '(PyObject *self, PyObject *args)'
+ methods_table.append(
+ "{\"%s\", (PyCFunction)%s, %s}," % (funcname, cfuncname, flags))
+ func_code = """
+ static PyObject* {cfuncname}{signature}
+ {{
+ {code}
+ }}
+ """.format(cfuncname=cfuncname, signature=signature, code=code)
+ codes.append(func_code)
+
+ body = "\n".join(codes) + """
+ static PyMethodDef methods[] = {
+ %(methods)s
+ { NULL }
+ };
+ static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "%(modname)s", /* m_name */
+ NULL, /* m_doc */
+ -1, /* m_size */
+ methods, /* m_methods */
+ };
+ """ % dict(methods='\n'.join(methods_table), modname=modname)
+ return body
+
+
+def _make_source(name, init, body):
+ """ Combines the code fragments into source code ready to be compiled
+ """
+ code = """
+ #include
+
+ %(body)s
+
+ PyMODINIT_FUNC
+ PyInit_%(name)s(void) {
+ %(init)s
+ }
+ """ % dict(
+ name=name, init=init, body=body,
+ )
+ return code
+
+
+def _c_compile(cfile, outputfilename, include_dirs=[], libraries=[],
+ library_dirs=[]):
+ if sys.platform == 'win32':
+ compile_extra = ["/we4013"]
+ link_extra = ["/LIBPATH:" + os.path.join(sys.base_prefix, 'libs')]
+ elif sys.platform.startswith('linux'):
+ compile_extra = [
+ "-O0", "-g", "-Werror=implicit-function-declaration", "-fPIC"]
+ link_extra = []
+ else:
+ compile_extra = link_extra = []
+ pass
+ if sys.platform == 'win32':
+ link_extra = link_extra + ['/DEBUG'] # generate .pdb file
+ if sys.platform == 'darwin':
+ # support Fink & Darwinports
+ for s in ('/sw/', '/opt/local/'):
+ if (s + 'include' not in include_dirs
+ and os.path.exists(s + 'include')):
+ include_dirs.append(s + 'include')
+ if s + 'lib' not in library_dirs and os.path.exists(s + 'lib'):
+ library_dirs.append(s + 'lib')
+
+ outputfilename = outputfilename.with_suffix(get_so_suffix())
+ build(
+ cfile, outputfilename,
+ compile_extra, link_extra,
+ include_dirs, libraries, library_dirs)
+ return outputfilename
+
+
+def build(cfile, outputfilename, compile_extra, link_extra,
+ include_dirs, libraries, library_dirs):
+ "use meson to build"
+
+ build_dir = cfile.parent / "build"
+ os.makedirs(build_dir, exist_ok=True)
+ so_name = outputfilename.parts[-1]
+ with open(cfile.parent / "meson.build", "wt") as fid:
+ includes = ['-I' + d for d in include_dirs]
+ link_dirs = ['-L' + d for d in library_dirs]
+ fid.write(textwrap.dedent(f"""\
+ project('foo', 'c')
+ shared_module('{so_name}', '{cfile.parts[-1]}',
+ c_args: {includes} + {compile_extra},
+ link_args: {link_dirs} + {link_extra},
+ link_with: {libraries},
+ name_prefix: '',
+ name_suffix: 'dummy',
+ )
+ """))
+ if sys.platform == "win32":
+ subprocess.check_call(["meson", "setup",
+ "--buildtype=release",
+ "--vsenv", ".."],
+ cwd=build_dir,
+ )
+ else:
+ subprocess.check_call(["meson", "setup", "--vsenv", ".."],
+ cwd=build_dir
+ )
+ subprocess.check_call(["meson", "compile"], cwd=build_dir)
+ os.rename(str(build_dir / so_name) + ".dummy", cfile.parent / so_name)
+
+def get_so_suffix():
+ ret = sysconfig.get_config_var('EXT_SUFFIX')
+ assert ret
+ return ret
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..609a45e79d1614bb920b312ecd4449ef3b05a3f2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/extbuild.pyi
@@ -0,0 +1,25 @@
+import pathlib
+import types
+from collections.abc import Sequence
+
+__all__ = ["build_and_import_extension", "compile_extension_module"]
+
+def build_and_import_extension(
+ modname: str,
+ functions: Sequence[tuple[str, str, str]],
+ *,
+ prologue: str = "",
+ build_dir: pathlib.Path | None = None,
+ include_dirs: Sequence[str] = [],
+ more_init: str = "",
+) -> types.ModuleType: ...
+
+#
+def compile_extension_module(
+ name: str,
+ builddir: pathlib.Path,
+ include_dirs: Sequence[str],
+ source_string: str,
+ libraries: Sequence[str] = [],
+ library_dirs: Sequence[str] = [],
+) -> pathlib.Path: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..42e43e21f37bb68695c6383232ea2082c39898a4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.py
@@ -0,0 +1,2760 @@
+"""
+Utility function to facilitate testing.
+
+"""
+import os
+import sys
+import pathlib
+import platform
+import re
+import gc
+import operator
+import warnings
+from functools import partial, wraps
+import shutil
+import contextlib
+from tempfile import mkdtemp, mkstemp
+from unittest.case import SkipTest
+from warnings import WarningMessage
+import pprint
+import sysconfig
+import concurrent.futures
+import threading
+import importlib.metadata
+
+import numpy as np
+from numpy._core import (
+ intp, float32, empty, arange, array_repr, ndarray, isnat, array)
+from numpy import isfinite, isnan, isinf
+import numpy.linalg._umath_linalg
+from numpy._utils import _rename_parameter
+from numpy._core.tests._natype import pd_NA
+
+from io import StringIO
+
+
+__all__ = [
+ 'assert_equal', 'assert_almost_equal', 'assert_approx_equal',
+ 'assert_array_equal', 'assert_array_less', 'assert_string_equal',
+ 'assert_array_almost_equal', 'assert_raises', 'build_err_msg',
+ 'decorate_methods', 'jiffies', 'memusage', 'print_assert_equal',
+ 'rundocs', 'runstring', 'verbose', 'measure',
+ 'assert_', 'assert_array_almost_equal_nulp', 'assert_raises_regex',
+ 'assert_array_max_ulp', 'assert_warns', 'assert_no_warnings',
+ 'assert_allclose', 'IgnoreException', 'clear_and_catch_warnings',
+ 'SkipTest', 'KnownFailureException', 'temppath', 'tempdir', 'IS_PYPY',
+ 'HAS_REFCOUNT', "IS_WASM", 'suppress_warnings', 'assert_array_compare',
+ 'assert_no_gc_cycles', 'break_cycles', 'HAS_LAPACK64', 'IS_PYSTON',
+ 'IS_MUSL', 'check_support_sve', 'NOGIL_BUILD',
+ 'IS_EDITABLE', 'IS_INSTALLED', 'NUMPY_ROOT', 'run_threaded', 'IS_64BIT',
+ ]
+
+
+class KnownFailureException(Exception):
+ '''Raise this exception to mark a test as a known failing test.'''
+ pass
+
+
+KnownFailureTest = KnownFailureException # backwards compat
+verbose = 0
+
+NUMPY_ROOT = pathlib.Path(np.__file__).parent
+
+try:
+ np_dist = importlib.metadata.distribution('numpy')
+except importlib.metadata.PackageNotFoundError:
+ IS_INSTALLED = IS_EDITABLE = False
+else:
+ IS_INSTALLED = True
+ try:
+ if sys.version_info >= (3, 13):
+ IS_EDITABLE = np_dist.origin.dir_info.editable
+ else:
+ # Backport importlib.metadata.Distribution.origin
+ import json, types # noqa: E401
+ origin = json.loads(
+ np_dist.read_text('direct_url.json') or '{}',
+ object_hook=lambda data: types.SimpleNamespace(**data),
+ )
+ IS_EDITABLE = origin.dir_info.editable
+ except AttributeError:
+ IS_EDITABLE = False
+
+ # spin installs numpy directly via meson, instead of using meson-python, and
+ # runs the module by setting PYTHONPATH. This is problematic because the
+ # resulting installation lacks the Python metadata (.dist-info), and numpy
+ # might already be installed on the environment, causing us to find its
+ # metadata, even though we are not actually loading that package.
+ # Work around this issue by checking if the numpy root matches.
+ if not IS_EDITABLE and np_dist.locate_file('numpy') != NUMPY_ROOT:
+ IS_INSTALLED = False
+
+IS_WASM = platform.machine() in ["wasm32", "wasm64"]
+IS_PYPY = sys.implementation.name == 'pypy'
+IS_PYSTON = hasattr(sys, "pyston_version_info")
+HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
+HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64
+
+IS_MUSL = False
+# alternate way is
+# from packaging.tags import sys_tags
+# _tags = list(sys_tags())
+# if 'musllinux' in _tags[0].platform:
+_v = sysconfig.get_config_var('HOST_GNU_TYPE') or ''
+if 'musl' in _v:
+ IS_MUSL = True
+
+NOGIL_BUILD = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
+IS_64BIT = np.dtype(np.intp).itemsize == 8
+
+def assert_(val, msg=''):
+ """
+ Assert that works in release mode.
+ Accepts callable msg to allow deferring evaluation until failure.
+
+ The Python built-in ``assert`` does not work when executing code in
+ optimized mode (the ``-O`` flag) - no byte-code is generated for it.
+
+ For documentation on usage, refer to the Python documentation.
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ if not val:
+ try:
+ smsg = msg()
+ except TypeError:
+ smsg = msg
+ raise AssertionError(smsg)
+
+
+if os.name == 'nt':
+ # Code "stolen" from enthought/debug/memusage.py
+ def GetPerformanceAttributes(object, counter, instance=None,
+ inum=-1, format=None, machine=None):
+ # NOTE: Many counters require 2 samples to give accurate results,
+ # including "% Processor Time" (as by definition, at any instant, a
+ # thread's CPU usage is either 0 or 100). To read counters like this,
+ # you should copy this function, but keep the counter open, and call
+ # CollectQueryData() each time you need to know.
+ # See http://msdn.microsoft.com/library/en-us/dnperfmo/html/perfmonpt2.asp
+ #(dead link)
+ # My older explanation for this was that the "AddCounter" process
+ # forced the CPU to 100%, but the above makes more sense :)
+ import win32pdh
+ if format is None:
+ format = win32pdh.PDH_FMT_LONG
+ path = win32pdh.MakeCounterPath((machine, object, instance, None,
+ inum, counter))
+ hq = win32pdh.OpenQuery()
+ try:
+ hc = win32pdh.AddCounter(hq, path)
+ try:
+ win32pdh.CollectQueryData(hq)
+ type, val = win32pdh.GetFormattedCounterValue(hc, format)
+ return val
+ finally:
+ win32pdh.RemoveCounter(hc)
+ finally:
+ win32pdh.CloseQuery(hq)
+
+ def memusage(processName="python", instance=0):
+ # from win32pdhutil, part of the win32all package
+ import win32pdh
+ return GetPerformanceAttributes("Process", "Virtual Bytes",
+ processName, instance,
+ win32pdh.PDH_FMT_LONG, None)
+elif sys.platform[:5] == 'linux':
+
+ def memusage(_proc_pid_stat=f'/proc/{os.getpid()}/stat'):
+ """
+ Return virtual memory size in bytes of the running python.
+
+ """
+ try:
+ with open(_proc_pid_stat) as f:
+ l = f.readline().split(' ')
+ return int(l[22])
+ except Exception:
+ return
+else:
+ def memusage():
+ """
+ Return memory usage of running python. [Not implemented]
+
+ """
+ raise NotImplementedError
+
+
+if sys.platform[:5] == 'linux':
+ def jiffies(_proc_pid_stat=f'/proc/{os.getpid()}/stat', _load_time=[]):
+ """
+ Return number of jiffies elapsed.
+
+ Return number of jiffies (1/100ths of a second) that this
+ process has been scheduled in user mode. See man 5 proc.
+
+ """
+ import time
+ if not _load_time:
+ _load_time.append(time.time())
+ try:
+ with open(_proc_pid_stat) as f:
+ l = f.readline().split(' ')
+ return int(l[13])
+ except Exception:
+ return int(100 * (time.time() - _load_time[0]))
+else:
+ # os.getpid is not in all platforms available.
+ # Using time is safe but inaccurate, especially when process
+ # was suspended or sleeping.
+ def jiffies(_load_time=[]):
+ """
+ Return number of jiffies elapsed.
+
+ Return number of jiffies (1/100ths of a second) that this
+ process has been scheduled in user mode. See man 5 proc.
+
+ """
+ import time
+ if not _load_time:
+ _load_time.append(time.time())
+ return int(100 * (time.time() - _load_time[0]))
+
+
+def build_err_msg(arrays, err_msg, header='Items are not equal:',
+ verbose=True, names=('ACTUAL', 'DESIRED'), precision=8):
+ msg = ['\n' + header]
+ err_msg = str(err_msg)
+ if err_msg:
+ if err_msg.find('\n') == -1 and len(err_msg) < 79 - len(header):
+ msg = [msg[0] + ' ' + err_msg]
+ else:
+ msg.append(err_msg)
+ if verbose:
+ for i, a in enumerate(arrays):
+
+ if isinstance(a, ndarray):
+ # precision argument is only needed if the objects are ndarrays
+ r_func = partial(array_repr, precision=precision)
+ else:
+ r_func = repr
+
+ try:
+ r = r_func(a)
+ except Exception as exc:
+ r = f'[repr failed for <{type(a).__name__}>: {exc}]'
+ if r.count('\n') > 3:
+ r = '\n'.join(r.splitlines()[:3])
+ r += '...'
+ msg.append(f' {names[i]}: {r}')
+ return '\n'.join(msg)
+
+
+def assert_equal(actual, desired, err_msg='', verbose=True, *, strict=False):
+ """
+ Raises an AssertionError if two objects are not equal.
+
+ Given two objects (scalars, lists, tuples, dictionaries or numpy arrays),
+ check that all elements of these objects are equal. An exception is raised
+ at the first conflicting values.
+
+ This function handles NaN comparisons as if NaN was a "normal" number.
+ That is, AssertionError is not raised if both objects have NaNs in the same
+ positions. This is in contrast to the IEEE standard on NaNs, which says
+ that NaN compared to anything must return False.
+
+ Parameters
+ ----------
+ actual : array_like
+ The object to check.
+ desired : array_like
+ The expected object.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+ strict : bool, optional
+ If True and either of the `actual` and `desired` arguments is an array,
+ raise an ``AssertionError`` when either the shape or the data type of
+ the arguments does not match. If neither argument is an array, this
+ parameter has no effect.
+
+ .. versionadded:: 2.0.0
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired are not equal.
+
+ See Also
+ --------
+ assert_allclose
+ assert_array_almost_equal_nulp,
+ assert_array_max_ulp,
+
+ Notes
+ -----
+ By default, when one of `actual` and `desired` is a scalar and the other is
+ an array, the function checks that each element of the array is equal to
+ the scalar. This behaviour can be disabled by setting ``strict==True``.
+
+ Examples
+ --------
+ >>> np.testing.assert_equal([4, 5], [4, 6])
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Items are not equal:
+ item=1
+ ACTUAL: 5
+ DESIRED: 6
+
+ The following comparison does not raise an exception. There are NaNs
+ in the inputs, but they are in the same positions.
+
+ >>> np.testing.assert_equal(np.array([1.0, 2.0, np.nan]), [1, 2, np.nan])
+
+ As mentioned in the Notes section, `assert_equal` has special
+ handling for scalars when one of the arguments is an array.
+ Here, the test checks that each value in `x` is 3:
+
+ >>> x = np.full((2, 5), fill_value=3)
+ >>> np.testing.assert_equal(x, 3)
+
+ Use `strict` to raise an AssertionError when comparing a scalar with an
+ array of a different shape:
+
+ >>> np.testing.assert_equal(x, 3, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not equal
+
+ (shapes (2, 5), () mismatch)
+ ACTUAL: array([[3, 3, 3, 3, 3],
+ [3, 3, 3, 3, 3]])
+ DESIRED: array(3)
+
+ The `strict` parameter also ensures that the array data types match:
+
+ >>> x = np.array([2, 2, 2])
+ >>> y = np.array([2., 2., 2.], dtype=np.float32)
+ >>> np.testing.assert_equal(x, y, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not equal
+
+ (dtypes int64, float32 mismatch)
+ ACTUAL: array([2, 2, 2])
+ DESIRED: array([2., 2., 2.], dtype=float32)
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ if isinstance(desired, dict):
+ if not isinstance(actual, dict):
+ raise AssertionError(repr(type(actual)))
+ assert_equal(len(actual), len(desired), err_msg, verbose)
+ for k, i in desired.items():
+ if k not in actual:
+ raise AssertionError(repr(k))
+ assert_equal(actual[k], desired[k], f'key={k!r}\n{err_msg}',
+ verbose)
+ return
+ if isinstance(desired, (list, tuple)) and isinstance(actual, (list, tuple)):
+ assert_equal(len(actual), len(desired), err_msg, verbose)
+ for k in range(len(desired)):
+ assert_equal(actual[k], desired[k], f'item={k!r}\n{err_msg}',
+ verbose)
+ return
+ from numpy._core import ndarray, isscalar, signbit
+ from numpy import iscomplexobj, real, imag
+ if isinstance(actual, ndarray) or isinstance(desired, ndarray):
+ return assert_array_equal(actual, desired, err_msg, verbose,
+ strict=strict)
+ msg = build_err_msg([actual, desired], err_msg, verbose=verbose)
+
+ # Handle complex numbers: separate into real/imag to handle
+ # nan/inf/negative zero correctly
+ # XXX: catch ValueError for subclasses of ndarray where iscomplex fail
+ try:
+ usecomplex = iscomplexobj(actual) or iscomplexobj(desired)
+ except (ValueError, TypeError):
+ usecomplex = False
+
+ if usecomplex:
+ if iscomplexobj(actual):
+ actualr = real(actual)
+ actuali = imag(actual)
+ else:
+ actualr = actual
+ actuali = 0
+ if iscomplexobj(desired):
+ desiredr = real(desired)
+ desiredi = imag(desired)
+ else:
+ desiredr = desired
+ desiredi = 0
+ try:
+ assert_equal(actualr, desiredr)
+ assert_equal(actuali, desiredi)
+ except AssertionError:
+ raise AssertionError(msg)
+
+ # isscalar test to check cases such as [np.nan] != np.nan
+ if isscalar(desired) != isscalar(actual):
+ raise AssertionError(msg)
+
+ try:
+ isdesnat = isnat(desired)
+ isactnat = isnat(actual)
+ dtypes_match = (np.asarray(desired).dtype.type ==
+ np.asarray(actual).dtype.type)
+ if isdesnat and isactnat:
+ # If both are NaT (and have the same dtype -- datetime or
+ # timedelta) they are considered equal.
+ if dtypes_match:
+ return
+ else:
+ raise AssertionError(msg)
+
+ except (TypeError, ValueError, NotImplementedError):
+ pass
+
+ # Inf/nan/negative zero handling
+ try:
+ isdesnan = isnan(desired)
+ isactnan = isnan(actual)
+ if isdesnan and isactnan:
+ return # both nan, so equal
+
+ # handle signed zero specially for floats
+ array_actual = np.asarray(actual)
+ array_desired = np.asarray(desired)
+ if (array_actual.dtype.char in 'Mm' or
+ array_desired.dtype.char in 'Mm'):
+ # version 1.18
+ # until this version, isnan failed for datetime64 and timedelta64.
+ # Now it succeeds but comparison to scalar with a different type
+ # emits a DeprecationWarning.
+ # Avoid that by skipping the next check
+ raise NotImplementedError('cannot compare to a scalar '
+ 'with a different type')
+
+ if desired == 0 and actual == 0:
+ if not signbit(desired) == signbit(actual):
+ raise AssertionError(msg)
+
+ except (TypeError, ValueError, NotImplementedError):
+ pass
+
+ try:
+ # Explicitly use __eq__ for comparison, gh-2552
+ if not (desired == actual):
+ raise AssertionError(msg)
+
+ except (DeprecationWarning, FutureWarning) as e:
+ # this handles the case when the two types are not even comparable
+ if 'elementwise == comparison' in e.args[0]:
+ raise AssertionError(msg)
+ else:
+ raise
+
+
+def print_assert_equal(test_string, actual, desired):
+ """
+ Test if two objects are equal, and print an error message if test fails.
+
+ The test is performed with ``actual == desired``.
+
+ Parameters
+ ----------
+ test_string : str
+ The message supplied to AssertionError.
+ actual : object
+ The object to test for equality against `desired`.
+ desired : object
+ The expected result.
+
+ Examples
+ --------
+ >>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 1])
+ >>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 2])
+ Traceback (most recent call last):
+ ...
+ AssertionError: Test XYZ of func xyz failed
+ ACTUAL:
+ [0, 1]
+ DESIRED:
+ [0, 2]
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ import pprint
+
+ if not (actual == desired):
+ msg = StringIO()
+ msg.write(test_string)
+ msg.write(' failed\nACTUAL: \n')
+ pprint.pprint(actual, msg)
+ msg.write('DESIRED: \n')
+ pprint.pprint(desired, msg)
+ raise AssertionError(msg.getvalue())
+
+
+def assert_almost_equal(actual, desired, decimal=7, err_msg='', verbose=True):
+ """
+ Raises an AssertionError if two items are not equal up to desired
+ precision.
+
+ .. note:: It is recommended to use one of `assert_allclose`,
+ `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
+ instead of this function for more consistent floating point
+ comparisons.
+
+ The test verifies that the elements of `actual` and `desired` satisfy::
+
+ abs(desired-actual) < float64(1.5 * 10**(-decimal))
+
+ That is a looser test than originally documented, but agrees with what the
+ actual implementation in `assert_array_almost_equal` did up to rounding
+ vagaries. An exception is raised at conflicting values. For ndarrays this
+ delegates to assert_array_almost_equal
+
+ Parameters
+ ----------
+ actual : array_like
+ The object to check.
+ desired : array_like
+ The expected object.
+ decimal : int, optional
+ Desired precision, default is 7.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired are not equal up to specified precision.
+
+ See Also
+ --------
+ assert_allclose: Compare two array_like objects for equality with desired
+ relative and/or absolute precision.
+ assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal
+
+ Examples
+ --------
+ >>> from numpy.testing import assert_almost_equal
+ >>> assert_almost_equal(2.3333333333333, 2.33333334)
+ >>> assert_almost_equal(2.3333333333333, 2.33333334, decimal=10)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not almost equal to 10 decimals
+ ACTUAL: 2.3333333333333
+ DESIRED: 2.33333334
+
+ >>> assert_almost_equal(np.array([1.0,2.3333333333333]),
+ ... np.array([1.0,2.33333334]), decimal=9)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not almost equal to 9 decimals
+
+ Mismatched elements: 1 / 2 (50%)
+ Max absolute difference among violations: 6.66669964e-09
+ Max relative difference among violations: 2.85715698e-09
+ ACTUAL: array([1. , 2.333333333])
+ DESIRED: array([1. , 2.33333334])
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ from numpy._core import ndarray
+ from numpy import iscomplexobj, real, imag
+
+ # Handle complex numbers: separate into real/imag to handle
+ # nan/inf/negative zero correctly
+ # XXX: catch ValueError for subclasses of ndarray where iscomplex fail
+ try:
+ usecomplex = iscomplexobj(actual) or iscomplexobj(desired)
+ except ValueError:
+ usecomplex = False
+
+ def _build_err_msg():
+ header = ('Arrays are not almost equal to %d decimals' % decimal)
+ return build_err_msg([actual, desired], err_msg, verbose=verbose,
+ header=header)
+
+ if usecomplex:
+ if iscomplexobj(actual):
+ actualr = real(actual)
+ actuali = imag(actual)
+ else:
+ actualr = actual
+ actuali = 0
+ if iscomplexobj(desired):
+ desiredr = real(desired)
+ desiredi = imag(desired)
+ else:
+ desiredr = desired
+ desiredi = 0
+ try:
+ assert_almost_equal(actualr, desiredr, decimal=decimal)
+ assert_almost_equal(actuali, desiredi, decimal=decimal)
+ except AssertionError:
+ raise AssertionError(_build_err_msg())
+
+ if isinstance(actual, (ndarray, tuple, list)) \
+ or isinstance(desired, (ndarray, tuple, list)):
+ return assert_array_almost_equal(actual, desired, decimal, err_msg)
+ try:
+ # If one of desired/actual is not finite, handle it specially here:
+ # check that both are nan if any is a nan, and test for equality
+ # otherwise
+ if not (isfinite(desired) and isfinite(actual)):
+ if isnan(desired) or isnan(actual):
+ if not (isnan(desired) and isnan(actual)):
+ raise AssertionError(_build_err_msg())
+ else:
+ if not desired == actual:
+ raise AssertionError(_build_err_msg())
+ return
+ except (NotImplementedError, TypeError):
+ pass
+ if abs(desired - actual) >= np.float64(1.5 * 10.0**(-decimal)):
+ raise AssertionError(_build_err_msg())
+
+
+def assert_approx_equal(actual, desired, significant=7, err_msg='',
+ verbose=True):
+ """
+ Raises an AssertionError if two items are not equal up to significant
+ digits.
+
+ .. note:: It is recommended to use one of `assert_allclose`,
+ `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
+ instead of this function for more consistent floating point
+ comparisons.
+
+ Given two numbers, check that they are approximately equal.
+ Approximately equal is defined as the number of significant digits
+ that agree.
+
+ Parameters
+ ----------
+ actual : scalar
+ The object to check.
+ desired : scalar
+ The expected object.
+ significant : int, optional
+ Desired precision, default is 7.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired are not equal up to specified precision.
+
+ See Also
+ --------
+ assert_allclose: Compare two array_like objects for equality with desired
+ relative and/or absolute precision.
+ assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal
+
+ Examples
+ --------
+ >>> np.testing.assert_approx_equal(0.12345677777777e-20, 0.1234567e-20)
+ >>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345671e-20,
+ ... significant=8)
+ >>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345672e-20,
+ ... significant=8)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Items are not equal to 8 significant digits:
+ ACTUAL: 1.234567e-21
+ DESIRED: 1.2345672e-21
+
+ the evaluated condition that raises the exception is
+
+ >>> abs(0.12345670e-20/1e-21 - 0.12345672e-20/1e-21) >= 10**-(8-1)
+ True
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ import numpy as np
+
+ (actual, desired) = map(float, (actual, desired))
+ if desired == actual:
+ return
+ # Normalized the numbers to be in range (-10.0,10.0)
+ # scale = float(pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual))))))
+ with np.errstate(invalid='ignore'):
+ scale = 0.5 * (np.abs(desired) + np.abs(actual))
+ scale = np.power(10, np.floor(np.log10(scale)))
+ try:
+ sc_desired = desired / scale
+ except ZeroDivisionError:
+ sc_desired = 0.0
+ try:
+ sc_actual = actual / scale
+ except ZeroDivisionError:
+ sc_actual = 0.0
+ msg = build_err_msg(
+ [actual, desired], err_msg,
+ header='Items are not equal to %d significant digits:' % significant,
+ verbose=verbose)
+ try:
+ # If one of desired/actual is not finite, handle it specially here:
+ # check that both are nan if any is a nan, and test for equality
+ # otherwise
+ if not (isfinite(desired) and isfinite(actual)):
+ if isnan(desired) or isnan(actual):
+ if not (isnan(desired) and isnan(actual)):
+ raise AssertionError(msg)
+ else:
+ if not desired == actual:
+ raise AssertionError(msg)
+ return
+ except (TypeError, NotImplementedError):
+ pass
+ if np.abs(sc_desired - sc_actual) >= np.power(10., -(significant - 1)):
+ raise AssertionError(msg)
+
+
+def assert_array_compare(comparison, x, y, err_msg='', verbose=True, header='',
+ precision=6, equal_nan=True, equal_inf=True,
+ *, strict=False, names=('ACTUAL', 'DESIRED')):
+ __tracebackhide__ = True # Hide traceback for py.test
+ from numpy._core import (array2string, isnan, inf, errstate,
+ all, max, object_)
+
+ x = np.asanyarray(x)
+ y = np.asanyarray(y)
+
+ # original array for output formatting
+ ox, oy = x, y
+
+ def isnumber(x):
+ return x.dtype.char in '?bhilqpBHILQPefdgFDG'
+
+ def istime(x):
+ return x.dtype.char in "Mm"
+
+ def isvstring(x):
+ return x.dtype.char == "T"
+
+ def func_assert_same_pos(x, y, func=isnan, hasval='nan'):
+ """Handling nan/inf.
+
+ Combine results of running func on x and y, checking that they are True
+ at the same locations.
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+
+ x_id = func(x)
+ y_id = func(y)
+ # We include work-arounds here to handle three types of slightly
+ # pathological ndarray subclasses:
+ # (1) all() on `masked` array scalars can return masked arrays, so we
+ # use != True
+ # (2) __eq__ on some ndarray subclasses returns Python booleans
+ # instead of element-wise comparisons, so we cast to np.bool() and
+ # use isinstance(..., bool) checks
+ # (3) subclasses with bare-bones __array_function__ implementations may
+ # not implement np.all(), so favor using the .all() method
+ # We are not committed to supporting such subclasses, but it's nice to
+ # support them if possible.
+ if np.bool(x_id == y_id).all() != True:
+ msg = build_err_msg(
+ [x, y],
+ err_msg + '\n%s location mismatch:'
+ % (hasval), verbose=verbose, header=header,
+ names=names,
+ precision=precision)
+ raise AssertionError(msg)
+ # If there is a scalar, then here we know the array has the same
+ # flag as it everywhere, so we should return the scalar flag.
+ if isinstance(x_id, bool) or x_id.ndim == 0:
+ return np.bool(x_id)
+ elif isinstance(y_id, bool) or y_id.ndim == 0:
+ return np.bool(y_id)
+ else:
+ return y_id
+
+ try:
+ if strict:
+ cond = x.shape == y.shape and x.dtype == y.dtype
+ else:
+ cond = (x.shape == () or y.shape == ()) or x.shape == y.shape
+ if not cond:
+ if x.shape != y.shape:
+ reason = f'\n(shapes {x.shape}, {y.shape} mismatch)'
+ else:
+ reason = f'\n(dtypes {x.dtype}, {y.dtype} mismatch)'
+ msg = build_err_msg([x, y],
+ err_msg
+ + reason,
+ verbose=verbose, header=header,
+ names=names,
+ precision=precision)
+ raise AssertionError(msg)
+
+ flagged = np.bool(False)
+ if isnumber(x) and isnumber(y):
+ if equal_nan:
+ flagged = func_assert_same_pos(x, y, func=isnan, hasval='nan')
+
+ if equal_inf:
+ flagged |= func_assert_same_pos(x, y,
+ func=lambda xy: xy == +inf,
+ hasval='+inf')
+ flagged |= func_assert_same_pos(x, y,
+ func=lambda xy: xy == -inf,
+ hasval='-inf')
+
+ elif istime(x) and istime(y):
+ # If one is datetime64 and the other timedelta64 there is no point
+ if equal_nan and x.dtype.type == y.dtype.type:
+ flagged = func_assert_same_pos(x, y, func=isnat, hasval="NaT")
+
+ elif isvstring(x) and isvstring(y):
+ dt = x.dtype
+ if equal_nan and dt == y.dtype and hasattr(dt, 'na_object'):
+ is_nan = (isinstance(dt.na_object, float) and
+ np.isnan(dt.na_object))
+ bool_errors = 0
+ try:
+ bool(dt.na_object)
+ except TypeError:
+ bool_errors = 1
+ if is_nan or bool_errors:
+ # nan-like NA object
+ flagged = func_assert_same_pos(
+ x, y, func=isnan, hasval=x.dtype.na_object)
+
+ if flagged.ndim > 0:
+ x, y = x[~flagged], y[~flagged]
+ # Only do the comparison if actual values are left
+ if x.size == 0:
+ return
+ elif flagged:
+ # no sense doing comparison if everything is flagged.
+ return
+
+ val = comparison(x, y)
+ invalids = np.logical_not(val)
+
+ if isinstance(val, bool):
+ cond = val
+ reduced = array([val])
+ else:
+ reduced = val.ravel()
+ cond = reduced.all()
+
+ # The below comparison is a hack to ensure that fully masked
+ # results, for which val.ravel().all() returns np.ma.masked,
+ # do not trigger a failure (np.ma.masked != True evaluates as
+ # np.ma.masked, which is falsy).
+ if cond != True:
+ n_mismatch = reduced.size - reduced.sum(dtype=intp)
+ n_elements = flagged.size if flagged.ndim != 0 else reduced.size
+ percent_mismatch = 100 * n_mismatch / n_elements
+ remarks = [
+ 'Mismatched elements: {} / {} ({:.3g}%)'.format(
+ n_mismatch, n_elements, percent_mismatch)]
+
+ with errstate(all='ignore'):
+ # ignore errors for non-numeric types
+ with contextlib.suppress(TypeError):
+ error = abs(x - y)
+ if np.issubdtype(x.dtype, np.unsignedinteger):
+ error2 = abs(y - x)
+ np.minimum(error, error2, out=error)
+
+ reduced_error = error[invalids]
+ max_abs_error = max(reduced_error)
+ if getattr(error, 'dtype', object_) == object_:
+ remarks.append(
+ 'Max absolute difference among violations: '
+ + str(max_abs_error))
+ else:
+ remarks.append(
+ 'Max absolute difference among violations: '
+ + array2string(max_abs_error))
+
+ # note: this definition of relative error matches that one
+ # used by assert_allclose (found in np.isclose)
+ # Filter values where the divisor would be zero
+ nonzero = np.bool(y != 0)
+ nonzero_and_invalid = np.logical_and(invalids, nonzero)
+
+ if all(~nonzero_and_invalid):
+ max_rel_error = array(inf)
+ else:
+ nonzero_invalid_error = error[nonzero_and_invalid]
+ broadcasted_y = np.broadcast_to(y, error.shape)
+ nonzero_invalid_y = broadcasted_y[nonzero_and_invalid]
+ max_rel_error = max(nonzero_invalid_error
+ / abs(nonzero_invalid_y))
+
+ if getattr(error, 'dtype', object_) == object_:
+ remarks.append(
+ 'Max relative difference among violations: '
+ + str(max_rel_error))
+ else:
+ remarks.append(
+ 'Max relative difference among violations: '
+ + array2string(max_rel_error))
+ err_msg = str(err_msg)
+ err_msg += '\n' + '\n'.join(remarks)
+ msg = build_err_msg([ox, oy], err_msg,
+ verbose=verbose, header=header,
+ names=names,
+ precision=precision)
+ raise AssertionError(msg)
+ except ValueError:
+ import traceback
+ efmt = traceback.format_exc()
+ header = f'error during assertion:\n\n{efmt}\n\n{header}'
+
+ msg = build_err_msg([x, y], err_msg, verbose=verbose, header=header,
+ names=names, precision=precision)
+ raise ValueError(msg)
+
+
+@_rename_parameter(['x', 'y'], ['actual', 'desired'], dep_version='2.0.0')
+def assert_array_equal(actual, desired, err_msg='', verbose=True, *,
+ strict=False):
+ """
+ Raises an AssertionError if two array_like objects are not equal.
+
+ Given two array_like objects, check that the shape is equal and all
+ elements of these objects are equal (but see the Notes for the special
+ handling of a scalar). An exception is raised at shape mismatch or
+ conflicting values. In contrast to the standard usage in numpy, NaNs
+ are compared like numbers, no assertion is raised if both objects have
+ NaNs in the same positions.
+
+ The usual caution for verifying equality with floating point numbers is
+ advised.
+
+ .. note:: When either `actual` or `desired` is already an instance of
+ `numpy.ndarray` and `desired` is not a ``dict``, the behavior of
+ ``assert_equal(actual, desired)`` is identical to the behavior of this
+ function. Otherwise, this function performs `np.asanyarray` on the
+ inputs before comparison, whereas `assert_equal` defines special
+ comparison rules for common Python types. For example, only
+ `assert_equal` can be used to compare nested Python lists. In new code,
+ consider using only `assert_equal`, explicitly converting either
+ `actual` or `desired` to arrays if the behavior of `assert_array_equal`
+ is desired.
+
+ Parameters
+ ----------
+ actual : array_like
+ The actual object to check.
+ desired : array_like
+ The desired, expected object.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+ strict : bool, optional
+ If True, raise an AssertionError when either the shape or the data
+ type of the array_like objects does not match. The special
+ handling for scalars mentioned in the Notes section is disabled.
+
+ .. versionadded:: 1.24.0
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired objects are not equal.
+
+ See Also
+ --------
+ assert_allclose: Compare two array_like objects for equality with desired
+ relative and/or absolute precision.
+ assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal
+
+ Notes
+ -----
+ When one of `actual` and `desired` is a scalar and the other is array_like,
+ the function checks that each element of the array_like object is equal to
+ the scalar. This behaviour can be disabled with the `strict` parameter.
+
+ Examples
+ --------
+ The first assert does not raise an exception:
+
+ >>> np.testing.assert_array_equal([1.0,2.33333,np.nan],
+ ... [np.exp(0),2.33333, np.nan])
+
+ Assert fails with numerical imprecision with floats:
+
+ >>> np.testing.assert_array_equal([1.0,np.pi,np.nan],
+ ... [1, np.sqrt(np.pi)**2, np.nan])
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not equal
+
+ Mismatched elements: 1 / 3 (33.3%)
+ Max absolute difference among violations: 4.4408921e-16
+ Max relative difference among violations: 1.41357986e-16
+ ACTUAL: array([1. , 3.141593, nan])
+ DESIRED: array([1. , 3.141593, nan])
+
+ Use `assert_allclose` or one of the nulp (number of floating point values)
+ functions for these cases instead:
+
+ >>> np.testing.assert_allclose([1.0,np.pi,np.nan],
+ ... [1, np.sqrt(np.pi)**2, np.nan],
+ ... rtol=1e-10, atol=0)
+
+ As mentioned in the Notes section, `assert_array_equal` has special
+ handling for scalars. Here the test checks that each value in `x` is 3:
+
+ >>> x = np.full((2, 5), fill_value=3)
+ >>> np.testing.assert_array_equal(x, 3)
+
+ Use `strict` to raise an AssertionError when comparing a scalar with an
+ array:
+
+ >>> np.testing.assert_array_equal(x, 3, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not equal
+
+ (shapes (2, 5), () mismatch)
+ ACTUAL: array([[3, 3, 3, 3, 3],
+ [3, 3, 3, 3, 3]])
+ DESIRED: array(3)
+
+ The `strict` parameter also ensures that the array data types match:
+
+ >>> x = np.array([2, 2, 2])
+ >>> y = np.array([2., 2., 2.], dtype=np.float32)
+ >>> np.testing.assert_array_equal(x, y, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not equal
+
+ (dtypes int64, float32 mismatch)
+ ACTUAL: array([2, 2, 2])
+ DESIRED: array([2., 2., 2.], dtype=float32)
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ assert_array_compare(operator.__eq__, actual, desired, err_msg=err_msg,
+ verbose=verbose, header='Arrays are not equal',
+ strict=strict)
+
+
+@_rename_parameter(['x', 'y'], ['actual', 'desired'], dep_version='2.0.0')
+def assert_array_almost_equal(actual, desired, decimal=6, err_msg='',
+ verbose=True):
+ """
+ Raises an AssertionError if two objects are not equal up to desired
+ precision.
+
+ .. note:: It is recommended to use one of `assert_allclose`,
+ `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
+ instead of this function for more consistent floating point
+ comparisons.
+
+ The test verifies identical shapes and that the elements of ``actual`` and
+ ``desired`` satisfy::
+
+ abs(desired-actual) < 1.5 * 10**(-decimal)
+
+ That is a looser test than originally documented, but agrees with what the
+ actual implementation did up to rounding vagaries. An exception is raised
+ at shape mismatch or conflicting values. In contrast to the standard usage
+ in numpy, NaNs are compared like numbers, no assertion is raised if both
+ objects have NaNs in the same positions.
+
+ Parameters
+ ----------
+ actual : array_like
+ The actual object to check.
+ desired : array_like
+ The desired, expected object.
+ decimal : int, optional
+ Desired precision, default is 6.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired are not equal up to specified precision.
+
+ See Also
+ --------
+ assert_allclose: Compare two array_like objects for equality with desired
+ relative and/or absolute precision.
+ assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal
+
+ Examples
+ --------
+ the first assert does not raise an exception
+
+ >>> np.testing.assert_array_almost_equal([1.0,2.333,np.nan],
+ ... [1.0,2.333,np.nan])
+
+ >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],
+ ... [1.0,2.33339,np.nan], decimal=5)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not almost equal to 5 decimals
+
+ Mismatched elements: 1 / 3 (33.3%)
+ Max absolute difference among violations: 6.e-05
+ Max relative difference among violations: 2.57136612e-05
+ ACTUAL: array([1. , 2.33333, nan])
+ DESIRED: array([1. , 2.33339, nan])
+
+ >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],
+ ... [1.0,2.33333, 5], decimal=5)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not almost equal to 5 decimals
+
+ nan location mismatch:
+ ACTUAL: array([1. , 2.33333, nan])
+ DESIRED: array([1. , 2.33333, 5. ])
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ from numpy._core import number, result_type
+ from numpy._core.numerictypes import issubdtype
+ from numpy._core.fromnumeric import any as npany
+
+ def compare(x, y):
+ try:
+ if npany(isinf(x)) or npany(isinf(y)):
+ xinfid = isinf(x)
+ yinfid = isinf(y)
+ if not (xinfid == yinfid).all():
+ return False
+ # if one item, x and y is +- inf
+ if x.size == y.size == 1:
+ return x == y
+ x = x[~xinfid]
+ y = y[~yinfid]
+ except (TypeError, NotImplementedError):
+ pass
+
+ # make sure y is an inexact type to avoid abs(MIN_INT); will cause
+ # casting of x later.
+ dtype = result_type(y, 1.)
+ y = np.asanyarray(y, dtype)
+ z = abs(x - y)
+
+ if not issubdtype(z.dtype, number):
+ z = z.astype(np.float64) # handle object arrays
+
+ return z < 1.5 * 10.0**(-decimal)
+
+ assert_array_compare(compare, actual, desired, err_msg=err_msg,
+ verbose=verbose,
+ header=('Arrays are not almost equal to %d decimals' % decimal),
+ precision=decimal)
+
+
+def assert_array_less(x, y, err_msg='', verbose=True, *, strict=False):
+ """
+ Raises an AssertionError if two array_like objects are not ordered by less
+ than.
+
+ Given two array_like objects `x` and `y`, check that the shape is equal and
+ all elements of `x` are strictly less than the corresponding elements of
+ `y` (but see the Notes for the special handling of a scalar). An exception
+ is raised at shape mismatch or values that are not correctly ordered. In
+ contrast to the standard usage in NumPy, no assertion is raised if both
+ objects have NaNs in the same positions.
+
+ Parameters
+ ----------
+ x : array_like
+ The smaller object to check.
+ y : array_like
+ The larger object to compare.
+ err_msg : string
+ The error message to be printed in case of failure.
+ verbose : bool
+ If True, the conflicting values are appended to the error message.
+ strict : bool, optional
+ If True, raise an AssertionError when either the shape or the data
+ type of the array_like objects does not match. The special
+ handling for scalars mentioned in the Notes section is disabled.
+
+ .. versionadded:: 2.0.0
+
+ Raises
+ ------
+ AssertionError
+ If x is not strictly smaller than y, element-wise.
+
+ See Also
+ --------
+ assert_array_equal: tests objects for equality
+ assert_array_almost_equal: test objects for equality up to precision
+
+ Notes
+ -----
+ When one of `x` and `y` is a scalar and the other is array_like, the
+ function performs the comparison as though the scalar were broadcasted
+ to the shape of the array. This behaviour can be disabled with the `strict`
+ parameter.
+
+ Examples
+ --------
+ The following assertion passes because each finite element of `x` is
+ strictly less than the corresponding element of `y`, and the NaNs are in
+ corresponding locations.
+
+ >>> x = [1.0, 1.0, np.nan]
+ >>> y = [1.1, 2.0, np.nan]
+ >>> np.testing.assert_array_less(x, y)
+
+ The following assertion fails because the zeroth element of `x` is no
+ longer strictly less than the zeroth element of `y`.
+
+ >>> y[0] = 1
+ >>> np.testing.assert_array_less(x, y)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not strictly ordered `x < y`
+
+ Mismatched elements: 1 / 3 (33.3%)
+ Max absolute difference among violations: 0.
+ Max relative difference among violations: 0.
+ x: array([ 1., 1., nan])
+ y: array([ 1., 2., nan])
+
+ Here, `y` is a scalar, so each element of `x` is compared to `y`, and
+ the assertion passes.
+
+ >>> x = [1.0, 4.0]
+ >>> y = 5.0
+ >>> np.testing.assert_array_less(x, y)
+
+ However, with ``strict=True``, the assertion will fail because the shapes
+ do not match.
+
+ >>> np.testing.assert_array_less(x, y, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not strictly ordered `x < y`
+
+ (shapes (2,), () mismatch)
+ x: array([1., 4.])
+ y: array(5.)
+
+ With ``strict=True``, the assertion also fails if the dtypes of the two
+ arrays do not match.
+
+ >>> y = [5, 5]
+ >>> np.testing.assert_array_less(x, y, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Arrays are not strictly ordered `x < y`
+
+ (dtypes float64, int64 mismatch)
+ x: array([1., 4.])
+ y: array([5, 5])
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ assert_array_compare(operator.__lt__, x, y, err_msg=err_msg,
+ verbose=verbose,
+ header='Arrays are not strictly ordered `x < y`',
+ equal_inf=False,
+ strict=strict,
+ names=('x', 'y'))
+
+
+def runstring(astr, dict):
+ exec(astr, dict)
+
+
+def assert_string_equal(actual, desired):
+ """
+ Test if two strings are equal.
+
+ If the given strings are equal, `assert_string_equal` does nothing.
+ If they are not equal, an AssertionError is raised, and the diff
+ between the strings is shown.
+
+ Parameters
+ ----------
+ actual : str
+ The string to test for equality against the expected string.
+ desired : str
+ The expected string.
+
+ Examples
+ --------
+ >>> np.testing.assert_string_equal('abc', 'abc')
+ >>> np.testing.assert_string_equal('abc', 'abcd')
+ Traceback (most recent call last):
+ File "", line 1, in
+ ...
+ AssertionError: Differences in strings:
+ - abc+ abcd? +
+
+ """
+ # delay import of difflib to reduce startup time
+ __tracebackhide__ = True # Hide traceback for py.test
+ import difflib
+
+ if not isinstance(actual, str):
+ raise AssertionError(repr(type(actual)))
+ if not isinstance(desired, str):
+ raise AssertionError(repr(type(desired)))
+ if desired == actual:
+ return
+
+ diff = list(difflib.Differ().compare(actual.splitlines(True),
+ desired.splitlines(True)))
+ diff_list = []
+ while diff:
+ d1 = diff.pop(0)
+ if d1.startswith(' '):
+ continue
+ if d1.startswith('- '):
+ l = [d1]
+ d2 = diff.pop(0)
+ if d2.startswith('? '):
+ l.append(d2)
+ d2 = diff.pop(0)
+ if not d2.startswith('+ '):
+ raise AssertionError(repr(d2))
+ l.append(d2)
+ if diff:
+ d3 = diff.pop(0)
+ if d3.startswith('? '):
+ l.append(d3)
+ else:
+ diff.insert(0, d3)
+ if d2[2:] == d1[2:]:
+ continue
+ diff_list.extend(l)
+ continue
+ raise AssertionError(repr(d1))
+ if not diff_list:
+ return
+ msg = f"Differences in strings:\n{''.join(diff_list).rstrip()}"
+ if actual != desired:
+ raise AssertionError(msg)
+
+
+def rundocs(filename=None, raise_on_error=True):
+ """
+ Run doctests found in the given file.
+
+ By default `rundocs` raises an AssertionError on failure.
+
+ Parameters
+ ----------
+ filename : str
+ The path to the file for which the doctests are run.
+ raise_on_error : bool
+ Whether to raise an AssertionError when a doctest fails. Default is
+ True.
+
+ Notes
+ -----
+ The doctests can be run by the user/developer by adding the ``doctests``
+ argument to the ``test()`` call. For example, to run all tests (including
+ doctests) for ``numpy.lib``:
+
+ >>> np.lib.test(doctests=True) # doctest: +SKIP
+ """
+ from numpy.distutils.misc_util import exec_mod_from_location
+ import doctest
+ if filename is None:
+ f = sys._getframe(1)
+ filename = f.f_globals['__file__']
+ name = os.path.splitext(os.path.basename(filename))[0]
+ m = exec_mod_from_location(name, filename)
+
+ tests = doctest.DocTestFinder().find(m)
+ runner = doctest.DocTestRunner(verbose=False)
+
+ msg = []
+ if raise_on_error:
+ out = lambda s: msg.append(s)
+ else:
+ out = None
+
+ for test in tests:
+ runner.run(test, out=out)
+
+ if runner.failures > 0 and raise_on_error:
+ raise AssertionError("Some doctests failed:\n%s" % "\n".join(msg))
+
+
+def check_support_sve(__cache=[]):
+ """
+ gh-22982
+ """
+
+ if __cache:
+ return __cache[0]
+
+ import subprocess
+ cmd = 'lscpu'
+ try:
+ output = subprocess.run(cmd, capture_output=True, text=True)
+ result = 'sve' in output.stdout
+ except (OSError, subprocess.SubprocessError):
+ result = False
+ __cache.append(result)
+ return __cache[0]
+
+
+#
+# assert_raises and assert_raises_regex are taken from unittest.
+#
+import unittest
+
+
+class _Dummy(unittest.TestCase):
+ def nop(self):
+ pass
+
+
+_d = _Dummy('nop')
+
+
+def assert_raises(*args, **kwargs):
+ """
+ assert_raises(exception_class, callable, *args, **kwargs)
+ assert_raises(exception_class)
+
+ Fail unless an exception of class exception_class is thrown
+ by callable when invoked with arguments args and keyword
+ arguments kwargs. If a different type of exception is
+ thrown, it will not be caught, and the test case will be
+ deemed to have suffered an error, exactly as for an
+ unexpected exception.
+
+ Alternatively, `assert_raises` can be used as a context manager:
+
+ >>> from numpy.testing import assert_raises
+ >>> with assert_raises(ZeroDivisionError):
+ ... 1 / 0
+
+ is equivalent to
+
+ >>> def div(x, y):
+ ... return x / y
+ >>> assert_raises(ZeroDivisionError, div, 1, 0)
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ return _d.assertRaises(*args, **kwargs)
+
+
+def assert_raises_regex(exception_class, expected_regexp, *args, **kwargs):
+ """
+ assert_raises_regex(exception_class, expected_regexp, callable, *args,
+ **kwargs)
+ assert_raises_regex(exception_class, expected_regexp)
+
+ Fail unless an exception of class exception_class and with message that
+ matches expected_regexp is thrown by callable when invoked with arguments
+ args and keyword arguments kwargs.
+
+ Alternatively, can be used as a context manager like `assert_raises`.
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ return _d.assertRaisesRegex(exception_class, expected_regexp, *args, **kwargs)
+
+
+def decorate_methods(cls, decorator, testmatch=None):
+ """
+ Apply a decorator to all methods in a class matching a regular expression.
+
+ The given decorator is applied to all public methods of `cls` that are
+ matched by the regular expression `testmatch`
+ (``testmatch.search(methodname)``). Methods that are private, i.e. start
+ with an underscore, are ignored.
+
+ Parameters
+ ----------
+ cls : class
+ Class whose methods to decorate.
+ decorator : function
+ Decorator to apply to methods
+ testmatch : compiled regexp or str, optional
+ The regular expression. Default value is None, in which case the
+ nose default (``re.compile(r'(?:^|[\\b_\\.%s-])[Tt]est' % os.sep)``)
+ is used.
+ If `testmatch` is a string, it is compiled to a regular expression
+ first.
+
+ """
+ if testmatch is None:
+ testmatch = re.compile(r'(?:^|[\\b_\\.%s-])[Tt]est' % os.sep)
+ else:
+ testmatch = re.compile(testmatch)
+ cls_attr = cls.__dict__
+
+ # delayed import to reduce startup time
+ from inspect import isfunction
+
+ methods = [_m for _m in cls_attr.values() if isfunction(_m)]
+ for function in methods:
+ try:
+ if hasattr(function, 'compat_func_name'):
+ funcname = function.compat_func_name
+ else:
+ funcname = function.__name__
+ except AttributeError:
+ # not a function
+ continue
+ if testmatch.search(funcname) and not funcname.startswith('_'):
+ setattr(cls, funcname, decorator(function))
+ return
+
+
+def measure(code_str, times=1, label=None):
+ """
+ Return elapsed time for executing code in the namespace of the caller.
+
+ The supplied code string is compiled with the Python builtin ``compile``.
+ The precision of the timing is 10 milli-seconds. If the code will execute
+ fast on this timescale, it can be executed many times to get reasonable
+ timing accuracy.
+
+ Parameters
+ ----------
+ code_str : str
+ The code to be timed.
+ times : int, optional
+ The number of times the code is executed. Default is 1. The code is
+ only compiled once.
+ label : str, optional
+ A label to identify `code_str` with. This is passed into ``compile``
+ as the second argument (for run-time error messages).
+
+ Returns
+ -------
+ elapsed : float
+ Total elapsed time in seconds for executing `code_str` `times` times.
+
+ Examples
+ --------
+ >>> times = 10
+ >>> etime = np.testing.measure('for i in range(1000): np.sqrt(i**2)', times=times)
+ >>> print("Time for a single execution : ", etime / times, "s") # doctest: +SKIP
+ Time for a single execution : 0.005 s
+
+ """
+ frame = sys._getframe(1)
+ locs, globs = frame.f_locals, frame.f_globals
+
+ code = compile(code_str, f'Test name: {label} ', 'exec')
+ i = 0
+ elapsed = jiffies()
+ while i < times:
+ i += 1
+ exec(code, globs, locs)
+ elapsed = jiffies() - elapsed
+ return 0.01 * elapsed
+
+
+def _assert_valid_refcount(op):
+ """
+ Check that ufuncs don't mishandle refcount of object `1`.
+ Used in a few regression tests.
+ """
+ if not HAS_REFCOUNT:
+ return True
+
+ import gc
+ import numpy as np
+
+ b = np.arange(100 * 100).reshape(100, 100)
+ c = b
+ i = 1
+
+ gc.disable()
+ try:
+ rc = sys.getrefcount(i)
+ for j in range(15):
+ d = op(b, c)
+ assert_(sys.getrefcount(i) >= rc)
+ finally:
+ gc.enable()
+ del d # for pyflakes
+
+
+def assert_allclose(actual, desired, rtol=1e-7, atol=0, equal_nan=True,
+ err_msg='', verbose=True, *, strict=False):
+ """
+ Raises an AssertionError if two objects are not equal up to desired
+ tolerance.
+
+ Given two array_like objects, check that their shapes and all elements
+ are equal (but see the Notes for the special handling of a scalar). An
+ exception is raised if the shapes mismatch or any values conflict. In
+ contrast to the standard usage in numpy, NaNs are compared like numbers,
+ no assertion is raised if both objects have NaNs in the same positions.
+
+ The test is equivalent to ``allclose(actual, desired, rtol, atol)`` (note
+ that ``allclose`` has different default values). It compares the difference
+ between `actual` and `desired` to ``atol + rtol * abs(desired)``.
+
+ Parameters
+ ----------
+ actual : array_like
+ Array obtained.
+ desired : array_like
+ Array desired.
+ rtol : float, optional
+ Relative tolerance.
+ atol : float, optional
+ Absolute tolerance.
+ equal_nan : bool, optional.
+ If True, NaNs will compare equal.
+ err_msg : str, optional
+ The error message to be printed in case of failure.
+ verbose : bool, optional
+ If True, the conflicting values are appended to the error message.
+ strict : bool, optional
+ If True, raise an ``AssertionError`` when either the shape or the data
+ type of the arguments does not match. The special handling of scalars
+ mentioned in the Notes section is disabled.
+
+ .. versionadded:: 2.0.0
+
+ Raises
+ ------
+ AssertionError
+ If actual and desired are not equal up to specified precision.
+
+ See Also
+ --------
+ assert_array_almost_equal_nulp, assert_array_max_ulp
+
+ Notes
+ -----
+ When one of `actual` and `desired` is a scalar and the other is
+ array_like, the function performs the comparison as if the scalar were
+ broadcasted to the shape of the array.
+ This behaviour can be disabled with the `strict` parameter.
+
+ Examples
+ --------
+ >>> x = [1e-5, 1e-3, 1e-1]
+ >>> y = np.arccos(np.cos(x))
+ >>> np.testing.assert_allclose(x, y, rtol=1e-5, atol=0)
+
+ As mentioned in the Notes section, `assert_allclose` has special
+ handling for scalars. Here, the test checks that the value of `numpy.sin`
+ is nearly zero at integer multiples of π.
+
+ >>> x = np.arange(3) * np.pi
+ >>> np.testing.assert_allclose(np.sin(x), 0, atol=1e-15)
+
+ Use `strict` to raise an ``AssertionError`` when comparing an array
+ with one or more dimensions against a scalar.
+
+ >>> np.testing.assert_allclose(np.sin(x), 0, atol=1e-15, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Not equal to tolerance rtol=1e-07, atol=1e-15
+
+ (shapes (3,), () mismatch)
+ ACTUAL: array([ 0.000000e+00, 1.224647e-16, -2.449294e-16])
+ DESIRED: array(0)
+
+ The `strict` parameter also ensures that the array data types match:
+
+ >>> y = np.zeros(3, dtype=np.float32)
+ >>> np.testing.assert_allclose(np.sin(x), y, atol=1e-15, strict=True)
+ Traceback (most recent call last):
+ ...
+ AssertionError:
+ Not equal to tolerance rtol=1e-07, atol=1e-15
+
+ (dtypes float64, float32 mismatch)
+ ACTUAL: array([ 0.000000e+00, 1.224647e-16, -2.449294e-16])
+ DESIRED: array([0., 0., 0.], dtype=float32)
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ import numpy as np
+
+ def compare(x, y):
+ return np._core.numeric.isclose(x, y, rtol=rtol, atol=atol,
+ equal_nan=equal_nan)
+
+ actual, desired = np.asanyarray(actual), np.asanyarray(desired)
+ header = f'Not equal to tolerance rtol={rtol:g}, atol={atol:g}'
+ assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
+ verbose=verbose, header=header, equal_nan=equal_nan,
+ strict=strict)
+
+
+def assert_array_almost_equal_nulp(x, y, nulp=1):
+ """
+ Compare two arrays relatively to their spacing.
+
+ This is a relatively robust method to compare two arrays whose amplitude
+ is variable.
+
+ Parameters
+ ----------
+ x, y : array_like
+ Input arrays.
+ nulp : int, optional
+ The maximum number of unit in the last place for tolerance (see Notes).
+ Default is 1.
+
+ Returns
+ -------
+ None
+
+ Raises
+ ------
+ AssertionError
+ If the spacing between `x` and `y` for one or more elements is larger
+ than `nulp`.
+
+ See Also
+ --------
+ assert_array_max_ulp : Check that all items of arrays differ in at most
+ N Units in the Last Place.
+ spacing : Return the distance between x and the nearest adjacent number.
+
+ Notes
+ -----
+ An assertion is raised if the following condition is not met::
+
+ abs(x - y) <= nulp * spacing(maximum(abs(x), abs(y)))
+
+ Examples
+ --------
+ >>> x = np.array([1., 1e-10, 1e-20])
+ >>> eps = np.finfo(x.dtype).eps
+ >>> np.testing.assert_array_almost_equal_nulp(x, x*eps/2 + x)
+
+ >>> np.testing.assert_array_almost_equal_nulp(x, x*eps + x)
+ Traceback (most recent call last):
+ ...
+ AssertionError: Arrays are not equal to 1 ULP (max is 2)
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ import numpy as np
+ ax = np.abs(x)
+ ay = np.abs(y)
+ ref = nulp * np.spacing(np.where(ax > ay, ax, ay))
+ if not np.all(np.abs(x - y) <= ref):
+ if np.iscomplexobj(x) or np.iscomplexobj(y):
+ msg = f"Arrays are not equal to {nulp} ULP"
+ else:
+ max_nulp = np.max(nulp_diff(x, y))
+ msg = f"Arrays are not equal to {nulp} ULP (max is {max_nulp:g})"
+ raise AssertionError(msg)
+
+
+def assert_array_max_ulp(a, b, maxulp=1, dtype=None):
+ """
+ Check that all items of arrays differ in at most N Units in the Last Place.
+
+ Parameters
+ ----------
+ a, b : array_like
+ Input arrays to be compared.
+ maxulp : int, optional
+ The maximum number of units in the last place that elements of `a` and
+ `b` can differ. Default is 1.
+ dtype : dtype, optional
+ Data-type to convert `a` and `b` to if given. Default is None.
+
+ Returns
+ -------
+ ret : ndarray
+ Array containing number of representable floating point numbers between
+ items in `a` and `b`.
+
+ Raises
+ ------
+ AssertionError
+ If one or more elements differ by more than `maxulp`.
+
+ Notes
+ -----
+ For computing the ULP difference, this API does not differentiate between
+ various representations of NAN (ULP difference between 0x7fc00000 and 0xffc00000
+ is zero).
+
+ See Also
+ --------
+ assert_array_almost_equal_nulp : Compare two arrays relatively to their
+ spacing.
+
+ Examples
+ --------
+ >>> a = np.linspace(0., 1., 100)
+ >>> res = np.testing.assert_array_max_ulp(a, np.arcsin(np.sin(a)))
+
+ """
+ __tracebackhide__ = True # Hide traceback for py.test
+ import numpy as np
+ ret = nulp_diff(a, b, dtype)
+ if not np.all(ret <= maxulp):
+ raise AssertionError("Arrays are not almost equal up to %g "
+ "ULP (max difference is %g ULP)" %
+ (maxulp, np.max(ret)))
+ return ret
+
+
+def nulp_diff(x, y, dtype=None):
+ """For each item in x and y, return the number of representable floating
+ points between them.
+
+ Parameters
+ ----------
+ x : array_like
+ first input array
+ y : array_like
+ second input array
+ dtype : dtype, optional
+ Data-type to convert `x` and `y` to if given. Default is None.
+
+ Returns
+ -------
+ nulp : array_like
+ number of representable floating point numbers between each item in x
+ and y.
+
+ Notes
+ -----
+ For computing the ULP difference, this API does not differentiate between
+ various representations of NAN (ULP difference between 0x7fc00000 and 0xffc00000
+ is zero).
+
+ Examples
+ --------
+ # By definition, epsilon is the smallest number such as 1 + eps != 1, so
+ # there should be exactly one ULP between 1 and 1 + eps
+ >>> nulp_diff(1, 1 + np.finfo(x.dtype).eps)
+ 1.0
+ """
+ import numpy as np
+ if dtype:
+ x = np.asarray(x, dtype=dtype)
+ y = np.asarray(y, dtype=dtype)
+ else:
+ x = np.asarray(x)
+ y = np.asarray(y)
+
+ t = np.common_type(x, y)
+ if np.iscomplexobj(x) or np.iscomplexobj(y):
+ raise NotImplementedError("_nulp not implemented for complex array")
+
+ x = np.array([x], dtype=t)
+ y = np.array([y], dtype=t)
+
+ x[np.isnan(x)] = np.nan
+ y[np.isnan(y)] = np.nan
+
+ if not x.shape == y.shape:
+ raise ValueError("Arrays do not have the same shape: %s - %s" %
+ (x.shape, y.shape))
+
+ def _diff(rx, ry, vdt):
+ diff = np.asarray(rx - ry, dtype=vdt)
+ return np.abs(diff)
+
+ rx = integer_repr(x)
+ ry = integer_repr(y)
+ return _diff(rx, ry, t)
+
+
+def _integer_repr(x, vdt, comp):
+ # Reinterpret binary representation of the float as sign-magnitude:
+ # take into account two-complement representation
+ # See also
+ # https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
+ rx = x.view(vdt)
+ if not (rx.size == 1):
+ rx[rx < 0] = comp - rx[rx < 0]
+ else:
+ if rx < 0:
+ rx = comp - rx
+
+ return rx
+
+
+def integer_repr(x):
+ """Return the signed-magnitude interpretation of the binary representation
+ of x."""
+ import numpy as np
+ if x.dtype == np.float16:
+ return _integer_repr(x, np.int16, np.int16(-2**15))
+ elif x.dtype == np.float32:
+ return _integer_repr(x, np.int32, np.int32(-2**31))
+ elif x.dtype == np.float64:
+ return _integer_repr(x, np.int64, np.int64(-2**63))
+ else:
+ raise ValueError(f'Unsupported dtype {x.dtype}')
+
+
+@contextlib.contextmanager
+def _assert_warns_context(warning_class, name=None):
+ __tracebackhide__ = True # Hide traceback for py.test
+ with suppress_warnings() as sup:
+ l = sup.record(warning_class)
+ yield
+ if not len(l) > 0:
+ name_str = f' when calling {name}' if name is not None else ''
+ raise AssertionError("No warning raised" + name_str)
+
+
+def assert_warns(warning_class, *args, **kwargs):
+ """
+ Fail unless the given callable throws the specified warning.
+
+ A warning of class warning_class should be thrown by the callable when
+ invoked with arguments args and keyword arguments kwargs.
+ If a different type of warning is thrown, it will not be caught.
+
+ If called with all arguments other than the warning class omitted, may be
+ used as a context manager::
+
+ with assert_warns(SomeWarning):
+ do_something()
+
+ The ability to be used as a context manager is new in NumPy v1.11.0.
+
+ Parameters
+ ----------
+ warning_class : class
+ The class defining the warning that `func` is expected to throw.
+ func : callable, optional
+ Callable to test
+ *args : Arguments
+ Arguments for `func`.
+ **kwargs : Kwargs
+ Keyword arguments for `func`.
+
+ Returns
+ -------
+ The value returned by `func`.
+
+ Examples
+ --------
+ >>> import warnings
+ >>> def deprecated_func(num):
+ ... warnings.warn("Please upgrade", DeprecationWarning)
+ ... return num*num
+ >>> with np.testing.assert_warns(DeprecationWarning):
+ ... assert deprecated_func(4) == 16
+ >>> # or passing a func
+ >>> ret = np.testing.assert_warns(DeprecationWarning, deprecated_func, 4)
+ >>> assert ret == 16
+ """
+ if not args and not kwargs:
+ return _assert_warns_context(warning_class)
+ elif len(args) < 1:
+ if "match" in kwargs:
+ raise RuntimeError(
+ "assert_warns does not use 'match' kwarg, "
+ "use pytest.warns instead"
+ )
+ raise RuntimeError("assert_warns(...) needs at least one arg")
+
+ func = args[0]
+ args = args[1:]
+ with _assert_warns_context(warning_class, name=func.__name__):
+ return func(*args, **kwargs)
+
+
+@contextlib.contextmanager
+def _assert_no_warnings_context(name=None):
+ __tracebackhide__ = True # Hide traceback for py.test
+ with warnings.catch_warnings(record=True) as l:
+ warnings.simplefilter('always')
+ yield
+ if len(l) > 0:
+ name_str = f' when calling {name}' if name is not None else ''
+ raise AssertionError(f'Got warnings{name_str}: {l}')
+
+
+def assert_no_warnings(*args, **kwargs):
+ """
+ Fail if the given callable produces any warnings.
+
+ If called with all arguments omitted, may be used as a context manager::
+
+ with assert_no_warnings():
+ do_something()
+
+ The ability to be used as a context manager is new in NumPy v1.11.0.
+
+ Parameters
+ ----------
+ func : callable
+ The callable to test.
+ \\*args : Arguments
+ Arguments passed to `func`.
+ \\*\\*kwargs : Kwargs
+ Keyword arguments passed to `func`.
+
+ Returns
+ -------
+ The value returned by `func`.
+
+ """
+ if not args:
+ return _assert_no_warnings_context()
+
+ func = args[0]
+ args = args[1:]
+ with _assert_no_warnings_context(name=func.__name__):
+ return func(*args, **kwargs)
+
+
+def _gen_alignment_data(dtype=float32, type='binary', max_size=24):
+ """
+ generator producing data with different alignment and offsets
+ to test simd vectorization
+
+ Parameters
+ ----------
+ dtype : dtype
+ data type to produce
+ type : string
+ 'unary': create data for unary operations, creates one input
+ and output array
+ 'binary': create data for unary operations, creates two input
+ and output array
+ max_size : integer
+ maximum size of data to produce
+
+ Returns
+ -------
+ if type is 'unary' yields one output, one input array and a message
+ containing information on the data
+ if type is 'binary' yields one output array, two input array and a message
+ containing information on the data
+
+ """
+ ufmt = 'unary offset=(%d, %d), size=%d, dtype=%r, %s'
+ bfmt = 'binary offset=(%d, %d, %d), size=%d, dtype=%r, %s'
+ for o in range(3):
+ for s in range(o + 2, max(o + 3, max_size)):
+ if type == 'unary':
+ inp = lambda: arange(s, dtype=dtype)[o:]
+ out = empty((s,), dtype=dtype)[o:]
+ yield out, inp(), ufmt % (o, o, s, dtype, 'out of place')
+ d = inp()
+ yield d, d, ufmt % (o, o, s, dtype, 'in place')
+ yield out[1:], inp()[:-1], ufmt % \
+ (o + 1, o, s - 1, dtype, 'out of place')
+ yield out[:-1], inp()[1:], ufmt % \
+ (o, o + 1, s - 1, dtype, 'out of place')
+ yield inp()[:-1], inp()[1:], ufmt % \
+ (o, o + 1, s - 1, dtype, 'aliased')
+ yield inp()[1:], inp()[:-1], ufmt % \
+ (o + 1, o, s - 1, dtype, 'aliased')
+ if type == 'binary':
+ inp1 = lambda: arange(s, dtype=dtype)[o:]
+ inp2 = lambda: arange(s, dtype=dtype)[o:]
+ out = empty((s,), dtype=dtype)[o:]
+ yield out, inp1(), inp2(), bfmt % \
+ (o, o, o, s, dtype, 'out of place')
+ d = inp1()
+ yield d, d, inp2(), bfmt % \
+ (o, o, o, s, dtype, 'in place1')
+ d = inp2()
+ yield d, inp1(), d, bfmt % \
+ (o, o, o, s, dtype, 'in place2')
+ yield out[1:], inp1()[:-1], inp2()[:-1], bfmt % \
+ (o + 1, o, o, s - 1, dtype, 'out of place')
+ yield out[:-1], inp1()[1:], inp2()[:-1], bfmt % \
+ (o, o + 1, o, s - 1, dtype, 'out of place')
+ yield out[:-1], inp1()[:-1], inp2()[1:], bfmt % \
+ (o, o, o + 1, s - 1, dtype, 'out of place')
+ yield inp1()[1:], inp1()[:-1], inp2()[:-1], bfmt % \
+ (o + 1, o, o, s - 1, dtype, 'aliased')
+ yield inp1()[:-1], inp1()[1:], inp2()[:-1], bfmt % \
+ (o, o + 1, o, s - 1, dtype, 'aliased')
+ yield inp1()[:-1], inp1()[:-1], inp2()[1:], bfmt % \
+ (o, o, o + 1, s - 1, dtype, 'aliased')
+
+
+class IgnoreException(Exception):
+ "Ignoring this exception due to disabled feature"
+ pass
+
+
+@contextlib.contextmanager
+def tempdir(*args, **kwargs):
+ """Context manager to provide a temporary test folder.
+
+ All arguments are passed as this to the underlying tempfile.mkdtemp
+ function.
+
+ """
+ tmpdir = mkdtemp(*args, **kwargs)
+ try:
+ yield tmpdir
+ finally:
+ shutil.rmtree(tmpdir)
+
+
+@contextlib.contextmanager
+def temppath(*args, **kwargs):
+ """Context manager for temporary files.
+
+ Context manager that returns the path to a closed temporary file. Its
+ parameters are the same as for tempfile.mkstemp and are passed directly
+ to that function. The underlying file is removed when the context is
+ exited, so it should be closed at that time.
+
+ Windows does not allow a temporary file to be opened if it is already
+ open, so the underlying file must be closed after opening before it
+ can be opened again.
+
+ """
+ fd, path = mkstemp(*args, **kwargs)
+ os.close(fd)
+ try:
+ yield path
+ finally:
+ os.remove(path)
+
+
+class clear_and_catch_warnings(warnings.catch_warnings):
+ """ Context manager that resets warning registry for catching warnings
+
+ Warnings can be slippery, because, whenever a warning is triggered, Python
+ adds a ``__warningregistry__`` member to the *calling* module. This makes
+ it impossible to retrigger the warning in this module, whatever you put in
+ the warnings filters. This context manager accepts a sequence of `modules`
+ as a keyword argument to its constructor and:
+
+ * stores and removes any ``__warningregistry__`` entries in given `modules`
+ on entry;
+ * resets ``__warningregistry__`` to its previous state on exit.
+
+ This makes it possible to trigger any warning afresh inside the context
+ manager without disturbing the state of warnings outside.
+
+ For compatibility with Python 3.0, please consider all arguments to be
+ keyword-only.
+
+ Parameters
+ ----------
+ record : bool, optional
+ Specifies whether warnings should be captured by a custom
+ implementation of ``warnings.showwarning()`` and be appended to a list
+ returned by the context manager. Otherwise None is returned by the
+ context manager. The objects appended to the list are arguments whose
+ attributes mirror the arguments to ``showwarning()``.
+ modules : sequence, optional
+ Sequence of modules for which to reset warnings registry on entry and
+ restore on exit. To work correctly, all 'ignore' filters should
+ filter by one of these modules.
+
+ Examples
+ --------
+ >>> import warnings
+ >>> with np.testing.clear_and_catch_warnings(
+ ... modules=[np._core.fromnumeric]):
+ ... warnings.simplefilter('always')
+ ... warnings.filterwarnings('ignore', module='np._core.fromnumeric')
+ ... # do something that raises a warning but ignore those in
+ ... # np._core.fromnumeric
+ """
+ class_modules = ()
+
+ def __init__(self, record=False, modules=()):
+ self.modules = set(modules).union(self.class_modules)
+ self._warnreg_copies = {}
+ super().__init__(record=record)
+
+ def __enter__(self):
+ for mod in self.modules:
+ if hasattr(mod, '__warningregistry__'):
+ mod_reg = mod.__warningregistry__
+ self._warnreg_copies[mod] = mod_reg.copy()
+ mod_reg.clear()
+ return super().__enter__()
+
+ def __exit__(self, *exc_info):
+ super().__exit__(*exc_info)
+ for mod in self.modules:
+ if hasattr(mod, '__warningregistry__'):
+ mod.__warningregistry__.clear()
+ if mod in self._warnreg_copies:
+ mod.__warningregistry__.update(self._warnreg_copies[mod])
+
+
+class suppress_warnings:
+ """
+ Context manager and decorator doing much the same as
+ ``warnings.catch_warnings``.
+
+ However, it also provides a filter mechanism to work around
+ https://bugs.python.org/issue4180.
+
+ This bug causes Python before 3.4 to not reliably show warnings again
+ after they have been ignored once (even within catch_warnings). It
+ means that no "ignore" filter can be used easily, since following
+ tests might need to see the warning. Additionally it allows easier
+ specificity for testing warnings and can be nested.
+
+ Parameters
+ ----------
+ forwarding_rule : str, optional
+ One of "always", "once", "module", or "location". Analogous to
+ the usual warnings module filter mode, it is useful to reduce
+ noise mostly on the outmost level. Unsuppressed and unrecorded
+ warnings will be forwarded based on this rule. Defaults to "always".
+ "location" is equivalent to the warnings "default", match by exact
+ location the warning warning originated from.
+
+ Notes
+ -----
+ Filters added inside the context manager will be discarded again
+ when leaving it. Upon entering all filters defined outside a
+ context will be applied automatically.
+
+ When a recording filter is added, matching warnings are stored in the
+ ``log`` attribute as well as in the list returned by ``record``.
+
+ If filters are added and the ``module`` keyword is given, the
+ warning registry of this module will additionally be cleared when
+ applying it, entering the context, or exiting it. This could cause
+ warnings to appear a second time after leaving the context if they
+ were configured to be printed once (default) and were already
+ printed before the context was entered.
+
+ Nesting this context manager will work as expected when the
+ forwarding rule is "always" (default). Unfiltered and unrecorded
+ warnings will be passed out and be matched by the outer level.
+ On the outmost level they will be printed (or caught by another
+ warnings context). The forwarding rule argument can modify this
+ behaviour.
+
+ Like ``catch_warnings`` this context manager is not threadsafe.
+
+ Examples
+ --------
+
+ With a context manager::
+
+ with np.testing.suppress_warnings() as sup:
+ sup.filter(DeprecationWarning, "Some text")
+ sup.filter(module=np.ma.core)
+ log = sup.record(FutureWarning, "Does this occur?")
+ command_giving_warnings()
+ # The FutureWarning was given once, the filtered warnings were
+ # ignored. All other warnings abide outside settings (may be
+ # printed/error)
+ assert_(len(log) == 1)
+ assert_(len(sup.log) == 1) # also stored in log attribute
+
+ Or as a decorator::
+
+ sup = np.testing.suppress_warnings()
+ sup.filter(module=np.ma.core) # module must match exactly
+ @sup
+ def some_function():
+ # do something which causes a warning in np.ma.core
+ pass
+ """
+ def __init__(self, forwarding_rule="always"):
+ self._entered = False
+
+ # Suppressions are either instance or defined inside one with block:
+ self._suppressions = []
+
+ if forwarding_rule not in {"always", "module", "once", "location"}:
+ raise ValueError("unsupported forwarding rule.")
+ self._forwarding_rule = forwarding_rule
+
+ def _clear_registries(self):
+ if hasattr(warnings, "_filters_mutated"):
+ # clearing the registry should not be necessary on new pythons,
+ # instead the filters should be mutated.
+ warnings._filters_mutated()
+ return
+ # Simply clear the registry, this should normally be harmless,
+ # note that on new pythons it would be invalidated anyway.
+ for module in self._tmp_modules:
+ if hasattr(module, "__warningregistry__"):
+ module.__warningregistry__.clear()
+
+ def _filter(self, category=Warning, message="", module=None, record=False):
+ if record:
+ record = [] # The log where to store warnings
+ else:
+ record = None
+ if self._entered:
+ if module is None:
+ warnings.filterwarnings(
+ "always", category=category, message=message)
+ else:
+ module_regex = module.__name__.replace('.', r'\.') + '$'
+ warnings.filterwarnings(
+ "always", category=category, message=message,
+ module=module_regex)
+ self._tmp_modules.add(module)
+ self._clear_registries()
+
+ self._tmp_suppressions.append(
+ (category, message, re.compile(message, re.I), module, record))
+ else:
+ self._suppressions.append(
+ (category, message, re.compile(message, re.I), module, record))
+
+ return record
+
+ def filter(self, category=Warning, message="", module=None):
+ """
+ Add a new suppressing filter or apply it if the state is entered.
+
+ Parameters
+ ----------
+ category : class, optional
+ Warning class to filter
+ message : string, optional
+ Regular expression matching the warning message.
+ module : module, optional
+ Module to filter for. Note that the module (and its file)
+ must match exactly and cannot be a submodule. This may make
+ it unreliable for external modules.
+
+ Notes
+ -----
+ When added within a context, filters are only added inside
+ the context and will be forgotten when the context is exited.
+ """
+ self._filter(category=category, message=message, module=module,
+ record=False)
+
+ def record(self, category=Warning, message="", module=None):
+ """
+ Append a new recording filter or apply it if the state is entered.
+
+ All warnings matching will be appended to the ``log`` attribute.
+
+ Parameters
+ ----------
+ category : class, optional
+ Warning class to filter
+ message : string, optional
+ Regular expression matching the warning message.
+ module : module, optional
+ Module to filter for. Note that the module (and its file)
+ must match exactly and cannot be a submodule. This may make
+ it unreliable for external modules.
+
+ Returns
+ -------
+ log : list
+ A list which will be filled with all matched warnings.
+
+ Notes
+ -----
+ When added within a context, filters are only added inside
+ the context and will be forgotten when the context is exited.
+ """
+ return self._filter(category=category, message=message, module=module,
+ record=True)
+
+ def __enter__(self):
+ if self._entered:
+ raise RuntimeError("cannot enter suppress_warnings twice.")
+
+ self._orig_show = warnings.showwarning
+ self._filters = warnings.filters
+ warnings.filters = self._filters[:]
+
+ self._entered = True
+ self._tmp_suppressions = []
+ self._tmp_modules = set()
+ self._forwarded = set()
+
+ self.log = [] # reset global log (no need to keep same list)
+
+ for cat, mess, _, mod, log in self._suppressions:
+ if log is not None:
+ del log[:] # clear the log
+ if mod is None:
+ warnings.filterwarnings(
+ "always", category=cat, message=mess)
+ else:
+ module_regex = mod.__name__.replace('.', r'\.') + '$'
+ warnings.filterwarnings(
+ "always", category=cat, message=mess,
+ module=module_regex)
+ self._tmp_modules.add(mod)
+ warnings.showwarning = self._showwarning
+ self._clear_registries()
+
+ return self
+
+ def __exit__(self, *exc_info):
+ warnings.showwarning = self._orig_show
+ warnings.filters = self._filters
+ self._clear_registries()
+ self._entered = False
+ del self._orig_show
+ del self._filters
+
+ def _showwarning(self, message, category, filename, lineno,
+ *args, use_warnmsg=None, **kwargs):
+ for cat, _, pattern, mod, rec in (
+ self._suppressions + self._tmp_suppressions)[::-1]:
+ if (issubclass(category, cat) and
+ pattern.match(message.args[0]) is not None):
+ if mod is None:
+ # Message and category match, either recorded or ignored
+ if rec is not None:
+ msg = WarningMessage(message, category, filename,
+ lineno, **kwargs)
+ self.log.append(msg)
+ rec.append(msg)
+ return
+ # Use startswith, because warnings strips the c or o from
+ # .pyc/.pyo files.
+ elif mod.__file__.startswith(filename):
+ # The message and module (filename) match
+ if rec is not None:
+ msg = WarningMessage(message, category, filename,
+ lineno, **kwargs)
+ self.log.append(msg)
+ rec.append(msg)
+ return
+
+ # There is no filter in place, so pass to the outside handler
+ # unless we should only pass it once
+ if self._forwarding_rule == "always":
+ if use_warnmsg is None:
+ self._orig_show(message, category, filename, lineno,
+ *args, **kwargs)
+ else:
+ self._orig_showmsg(use_warnmsg)
+ return
+
+ if self._forwarding_rule == "once":
+ signature = (message.args, category)
+ elif self._forwarding_rule == "module":
+ signature = (message.args, category, filename)
+ elif self._forwarding_rule == "location":
+ signature = (message.args, category, filename, lineno)
+
+ if signature in self._forwarded:
+ return
+ self._forwarded.add(signature)
+ if use_warnmsg is None:
+ self._orig_show(message, category, filename, lineno, *args,
+ **kwargs)
+ else:
+ self._orig_showmsg(use_warnmsg)
+
+ def __call__(self, func):
+ """
+ Function decorator to apply certain suppressions to a whole
+ function.
+ """
+ @wraps(func)
+ def new_func(*args, **kwargs):
+ with self:
+ return func(*args, **kwargs)
+
+ return new_func
+
+
+@contextlib.contextmanager
+def _assert_no_gc_cycles_context(name=None):
+ __tracebackhide__ = True # Hide traceback for py.test
+
+ # not meaningful to test if there is no refcounting
+ if not HAS_REFCOUNT:
+ yield
+ return
+
+ assert_(gc.isenabled())
+ gc.disable()
+ gc_debug = gc.get_debug()
+ try:
+ for i in range(100):
+ if gc.collect() == 0:
+ break
+ else:
+ raise RuntimeError(
+ "Unable to fully collect garbage - perhaps a __del__ method "
+ "is creating more reference cycles?")
+
+ gc.set_debug(gc.DEBUG_SAVEALL)
+ yield
+ # gc.collect returns the number of unreachable objects in cycles that
+ # were found -- we are checking that no cycles were created in the context
+ n_objects_in_cycles = gc.collect()
+ objects_in_cycles = gc.garbage[:]
+ finally:
+ del gc.garbage[:]
+ gc.set_debug(gc_debug)
+ gc.enable()
+
+ if n_objects_in_cycles:
+ name_str = f' when calling {name}' if name is not None else ''
+ raise AssertionError(
+ "Reference cycles were found{}: {} objects were collected, "
+ "of which {} are shown below:{}"
+ .format(
+ name_str,
+ n_objects_in_cycles,
+ len(objects_in_cycles),
+ ''.join(
+ "\n {} object with id={}:\n {}".format(
+ type(o).__name__,
+ id(o),
+ pprint.pformat(o).replace('\n', '\n ')
+ ) for o in objects_in_cycles
+ )
+ )
+ )
+
+
+def assert_no_gc_cycles(*args, **kwargs):
+ """
+ Fail if the given callable produces any reference cycles.
+
+ If called with all arguments omitted, may be used as a context manager::
+
+ with assert_no_gc_cycles():
+ do_something()
+
+ Parameters
+ ----------
+ func : callable
+ The callable to test.
+ \\*args : Arguments
+ Arguments passed to `func`.
+ \\*\\*kwargs : Kwargs
+ Keyword arguments passed to `func`.
+
+ Returns
+ -------
+ Nothing. The result is deliberately discarded to ensure that all cycles
+ are found.
+
+ """
+ if not args:
+ return _assert_no_gc_cycles_context()
+
+ func = args[0]
+ args = args[1:]
+ with _assert_no_gc_cycles_context(name=func.__name__):
+ func(*args, **kwargs)
+
+
+def break_cycles():
+ """
+ Break reference cycles by calling gc.collect
+ Objects can call other objects' methods (for instance, another object's
+ __del__) inside their own __del__. On PyPy, the interpreter only runs
+ between calls to gc.collect, so multiple calls are needed to completely
+ release all cycles.
+ """
+
+ gc.collect()
+ if IS_PYPY:
+ # a few more, just to make sure all the finalizers are called
+ gc.collect()
+ gc.collect()
+ gc.collect()
+ gc.collect()
+
+
+def requires_memory(free_bytes):
+ """Decorator to skip a test if not enough memory is available"""
+ import pytest
+
+ def decorator(func):
+ @wraps(func)
+ def wrapper(*a, **kw):
+ msg = check_free_memory(free_bytes)
+ if msg is not None:
+ pytest.skip(msg)
+
+ try:
+ return func(*a, **kw)
+ except MemoryError:
+ # Probably ran out of memory regardless: don't regard as failure
+ pytest.xfail("MemoryError raised")
+
+ return wrapper
+
+ return decorator
+
+
+def check_free_memory(free_bytes):
+ """
+ Check whether `free_bytes` amount of memory is currently free.
+ Returns: None if enough memory available, otherwise error message
+ """
+ env_var = 'NPY_AVAILABLE_MEM'
+ env_value = os.environ.get(env_var)
+ if env_value is not None:
+ try:
+ mem_free = _parse_size(env_value)
+ except ValueError as exc:
+ raise ValueError(f'Invalid environment variable {env_var}: {exc}')
+
+ msg = (f'{free_bytes / 1e9} GB memory required, but environment variable '
+ f'NPY_AVAILABLE_MEM={env_value} set')
+ else:
+ mem_free = _get_mem_available()
+
+ if mem_free is None:
+ msg = ("Could not determine available memory; set NPY_AVAILABLE_MEM "
+ "environment variable (e.g. NPY_AVAILABLE_MEM=16GB) to run "
+ "the test.")
+ mem_free = -1
+ else:
+ free_bytes_gb = free_bytes / 1e9
+ mem_free_gb = mem_free / 1e9
+ msg = f'{free_bytes_gb} GB memory required, but {mem_free_gb} GB available'
+
+ return msg if mem_free < free_bytes else None
+
+
+def _parse_size(size_str):
+ """Convert memory size strings ('12 GB' etc.) to float"""
+ suffixes = {'': 1, 'b': 1,
+ 'k': 1000, 'm': 1000**2, 'g': 1000**3, 't': 1000**4,
+ 'kb': 1000, 'mb': 1000**2, 'gb': 1000**3, 'tb': 1000**4,
+ 'kib': 1024, 'mib': 1024**2, 'gib': 1024**3, 'tib': 1024**4}
+
+ size_re = re.compile(r'^\s*(\d+|\d+\.\d+)\s*({0})\s*$'.format(
+ '|'.join(suffixes.keys())), re.I)
+
+ m = size_re.match(size_str.lower())
+ if not m or m.group(2) not in suffixes:
+ raise ValueError(f'value {size_str!r} not a valid size')
+ return int(float(m.group(1)) * suffixes[m.group(2)])
+
+
+def _get_mem_available():
+ """Return available memory in bytes, or None if unknown."""
+ try:
+ import psutil
+ return psutil.virtual_memory().available
+ except (ImportError, AttributeError):
+ pass
+
+ if sys.platform.startswith('linux'):
+ info = {}
+ with open('/proc/meminfo') as f:
+ for line in f:
+ p = line.split()
+ info[p[0].strip(':').lower()] = int(p[1]) * 1024
+
+ if 'memavailable' in info:
+ # Linux >= 3.14
+ return info['memavailable']
+ else:
+ return info['memfree'] + info['cached']
+
+ return None
+
+
+def _no_tracing(func):
+ """
+ Decorator to temporarily turn off tracing for the duration of a test.
+ Needed in tests that check refcounting, otherwise the tracing itself
+ influences the refcounts
+ """
+ if not hasattr(sys, 'gettrace'):
+ return func
+ else:
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ original_trace = sys.gettrace()
+ try:
+ sys.settrace(None)
+ return func(*args, **kwargs)
+ finally:
+ sys.settrace(original_trace)
+ return wrapper
+
+
+def _get_glibc_version():
+ try:
+ ver = os.confstr('CS_GNU_LIBC_VERSION').rsplit(' ')[1]
+ except Exception:
+ ver = '0.0'
+
+ return ver
+
+
+_glibcver = _get_glibc_version()
+_glibc_older_than = lambda x: (_glibcver != '0.0' and _glibcver < x)
+
+
+def run_threaded(func, max_workers=8, pass_count=False,
+ pass_barrier=False, outer_iterations=1,
+ prepare_args=None):
+ """Runs a function many times in parallel"""
+ for _ in range(outer_iterations):
+ with (concurrent.futures.ThreadPoolExecutor(max_workers=max_workers)
+ as tpe):
+ if prepare_args is None:
+ args = []
+ else:
+ args = prepare_args()
+ if pass_barrier:
+ barrier = threading.Barrier(max_workers)
+ args.append(barrier)
+ if pass_count:
+ all_args = [(func, i, *args) for i in range(max_workers)]
+ else:
+ all_args = [(func, *args) for i in range(max_workers)]
+ try:
+ futures = []
+ for arg in all_args:
+ futures.append(tpe.submit(*arg))
+ finally:
+ if len(futures) < max_workers and pass_barrier:
+ barrier.abort()
+ for f in futures:
+ f.result()
+
+
+def get_stringdtype_dtype(na_object, coerce=True):
+ # explicit is check for pd_NA because != with pd_NA returns pd_NA
+ if na_object is pd_NA or na_object != "unset":
+ return np.dtypes.StringDType(na_object=na_object, coerce=coerce)
+ else:
+ return np.dtypes.StringDType(coerce=coerce)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..75ea45d3a72118fa6d17298fe85ccf7078caaed3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/_private/utils.pyi
@@ -0,0 +1,496 @@
+import ast
+import sys
+import types
+import unittest
+import warnings
+from collections.abc import Callable, Iterable, Sequence
+from contextlib import _GeneratorContextManager
+from pathlib import Path
+from re import Pattern
+from typing import (
+ Any,
+ AnyStr,
+ ClassVar,
+ Final,
+ Generic,
+ NoReturn,
+ SupportsIndex,
+ TypeAlias,
+ overload,
+ type_check_only,
+)
+from typing import Literal as L
+from unittest.case import SkipTest
+
+from _typeshed import ConvertibleToFloat, GenericPath, StrOrBytesPath, StrPath
+from typing_extensions import ParamSpec, Self, TypeVar, TypeVarTuple, Unpack
+
+import numpy as np
+from numpy._typing import (
+ ArrayLike,
+ DTypeLike,
+ NDArray,
+ _ArrayLikeDT64_co,
+ _ArrayLikeNumber_co,
+ _ArrayLikeObject_co,
+ _ArrayLikeTD64_co,
+)
+
+__all__ = [ # noqa: RUF022
+ "IS_EDITABLE",
+ "IS_MUSL",
+ "IS_PYPY",
+ "IS_PYSTON",
+ "IS_WASM",
+ "HAS_LAPACK64",
+ "HAS_REFCOUNT",
+ "NOGIL_BUILD",
+ "assert_",
+ "assert_array_almost_equal_nulp",
+ "assert_raises_regex",
+ "assert_array_max_ulp",
+ "assert_warns",
+ "assert_no_warnings",
+ "assert_allclose",
+ "assert_equal",
+ "assert_almost_equal",
+ "assert_approx_equal",
+ "assert_array_equal",
+ "assert_array_less",
+ "assert_string_equal",
+ "assert_array_almost_equal",
+ "assert_raises",
+ "build_err_msg",
+ "decorate_methods",
+ "jiffies",
+ "memusage",
+ "print_assert_equal",
+ "rundocs",
+ "runstring",
+ "verbose",
+ "measure",
+ "IgnoreException",
+ "clear_and_catch_warnings",
+ "SkipTest",
+ "KnownFailureException",
+ "temppath",
+ "tempdir",
+ "suppress_warnings",
+ "assert_array_compare",
+ "assert_no_gc_cycles",
+ "break_cycles",
+ "check_support_sve",
+ "run_threaded",
+]
+
+###
+
+_T = TypeVar("_T")
+_Ts = TypeVarTuple("_Ts")
+_Tss = ParamSpec("_Tss")
+_ET = TypeVar("_ET", bound=BaseException, default=BaseException)
+_FT = TypeVar("_FT", bound=Callable[..., Any])
+_W_co = TypeVar("_W_co", bound=_WarnLog | None, default=_WarnLog | None, covariant=True)
+_T_or_bool = TypeVar("_T_or_bool", default=bool)
+
+_StrLike: TypeAlias = str | bytes
+_RegexLike: TypeAlias = _StrLike | Pattern[Any]
+_NumericArrayLike: TypeAlias = _ArrayLikeNumber_co | _ArrayLikeObject_co
+
+_ExceptionSpec: TypeAlias = type[_ET] | tuple[type[_ET], ...]
+_WarningSpec: TypeAlias = type[Warning]
+_WarnLog: TypeAlias = list[warnings.WarningMessage]
+_ToModules: TypeAlias = Iterable[types.ModuleType]
+
+# Must return a bool or an ndarray/generic type that is supported by `np.logical_and.reduce`
+_ComparisonFunc: TypeAlias = Callable[
+ [NDArray[Any], NDArray[Any]],
+ bool | np.bool | np.number | NDArray[np.bool | np.number | np.object_],
+]
+
+# Type-check only `clear_and_catch_warnings` subclasses for both values of the
+# `record` parameter. Copied from the stdlib `warnings` stubs.
+@type_check_only
+class _clear_and_catch_warnings_with_records(clear_and_catch_warnings):
+ def __enter__(self) -> list[warnings.WarningMessage]: ...
+
+@type_check_only
+class _clear_and_catch_warnings_without_records(clear_and_catch_warnings):
+ def __enter__(self) -> None: ...
+
+###
+
+verbose: int = 0
+NUMPY_ROOT: Final[Path] = ...
+IS_INSTALLED: Final[bool] = ...
+IS_EDITABLE: Final[bool] = ...
+IS_MUSL: Final[bool] = ...
+IS_PYPY: Final[bool] = ...
+IS_PYSTON: Final[bool] = ...
+IS_WASM: Final[bool] = ...
+HAS_REFCOUNT: Final[bool] = ...
+HAS_LAPACK64: Final[bool] = ...
+NOGIL_BUILD: Final[bool] = ...
+
+class KnownFailureException(Exception): ...
+class IgnoreException(Exception): ...
+
+# NOTE: `warnings.catch_warnings` is incorrectly defined as invariant in typeshed
+class clear_and_catch_warnings(warnings.catch_warnings[_W_co], Generic[_W_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments]
+ class_modules: ClassVar[tuple[types.ModuleType, ...]] = ()
+ modules: Final[set[types.ModuleType]]
+ @overload # record: True
+ def __init__(self: clear_and_catch_warnings[_WarnLog], /, record: L[True], modules: _ToModules = ()) -> None: ...
+ @overload # record: False (default)
+ def __init__(self: clear_and_catch_warnings[None], /, record: L[False] = False, modules: _ToModules = ()) -> None: ...
+ @overload # record; bool
+ def __init__(self, /, record: bool, modules: _ToModules = ()) -> None: ...
+
+class suppress_warnings:
+ log: Final[_WarnLog]
+ def __init__(self, /, forwarding_rule: L["always", "module", "once", "location"] = "always") -> None: ...
+ def __enter__(self) -> Self: ...
+ def __exit__(self, cls: type[BaseException] | None, exc: BaseException | None, tb: types.TracebackType | None, /) -> None: ...
+ def __call__(self, /, func: _FT) -> _FT: ...
+
+ #
+ def filter(self, /, category: type[Warning] = ..., message: str = "", module: types.ModuleType | None = None) -> None: ...
+ def record(self, /, category: type[Warning] = ..., message: str = "", module: types.ModuleType | None = None) -> _WarnLog: ...
+
+# Contrary to runtime we can't do `os.name` checks while type checking,
+# only `sys.platform` checks
+if sys.platform == "win32" or sys.platform == "cygwin":
+ def memusage(processName: str = ..., instance: int = ...) -> int: ...
+elif sys.platform == "linux":
+ def memusage(_proc_pid_stat: StrOrBytesPath = ...) -> int | None: ...
+else:
+ def memusage() -> NoReturn: ...
+
+if sys.platform == "linux":
+ def jiffies(_proc_pid_stat: StrOrBytesPath = ..., _load_time: list[float] = []) -> int: ...
+else:
+ def jiffies(_load_time: list[float] = []) -> int: ...
+
+#
+def build_err_msg(
+ arrays: Iterable[object],
+ err_msg: object,
+ header: str = ...,
+ verbose: bool = ...,
+ names: Sequence[str] = ...,
+ precision: SupportsIndex | None = ...,
+) -> str: ...
+
+#
+def print_assert_equal(test_string: str, actual: object, desired: object) -> None: ...
+
+#
+def assert_(val: object, msg: str | Callable[[], str] = "") -> None: ...
+
+#
+def assert_equal(
+ actual: object,
+ desired: object,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+
+def assert_almost_equal(
+ actual: _NumericArrayLike,
+ desired: _NumericArrayLike,
+ decimal: int = 7,
+ err_msg: object = "",
+ verbose: bool = True,
+) -> None: ...
+
+#
+def assert_approx_equal(
+ actual: ConvertibleToFloat,
+ desired: ConvertibleToFloat,
+ significant: int = 7,
+ err_msg: object = "",
+ verbose: bool = True,
+) -> None: ...
+
+#
+def assert_array_compare(
+ comparison: _ComparisonFunc,
+ x: ArrayLike,
+ y: ArrayLike,
+ err_msg: object = "",
+ verbose: bool = True,
+ header: str = "",
+ precision: SupportsIndex = 6,
+ equal_nan: bool = True,
+ equal_inf: bool = True,
+ *,
+ strict: bool = False,
+ names: tuple[str, str] = ("ACTUAL", "DESIRED"),
+) -> None: ...
+
+#
+def assert_array_equal(
+ actual: object,
+ desired: object,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+
+#
+def assert_array_almost_equal(
+ actual: _NumericArrayLike,
+ desired: _NumericArrayLike,
+ decimal: float = 6,
+ err_msg: object = "",
+ verbose: bool = True,
+) -> None: ...
+
+@overload
+def assert_array_less(
+ x: _ArrayLikeDT64_co,
+ y: _ArrayLikeDT64_co,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+@overload
+def assert_array_less(
+ x: _ArrayLikeTD64_co,
+ y: _ArrayLikeTD64_co,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+@overload
+def assert_array_less(
+ x: _NumericArrayLike,
+ y: _NumericArrayLike,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+
+#
+def assert_string_equal(actual: str, desired: str) -> None: ...
+
+#
+@overload
+def assert_raises(
+ exception_class: _ExceptionSpec[_ET],
+ /,
+ *,
+ msg: str | None = None,
+) -> unittest.case._AssertRaisesContext[_ET]: ...
+@overload
+def assert_raises(
+ exception_class: _ExceptionSpec,
+ callable: Callable[_Tss, Any],
+ /,
+ *args: _Tss.args,
+ **kwargs: _Tss.kwargs,
+) -> None: ...
+
+#
+@overload
+def assert_raises_regex(
+ exception_class: _ExceptionSpec[_ET],
+ expected_regexp: _RegexLike,
+ *,
+ msg: str | None = None,
+) -> unittest.case._AssertRaisesContext[_ET]: ...
+@overload
+def assert_raises_regex(
+ exception_class: _ExceptionSpec,
+ expected_regexp: _RegexLike,
+ callable: Callable[_Tss, Any],
+ *args: _Tss.args,
+ **kwargs: _Tss.kwargs,
+) -> None: ...
+
+#
+@overload
+def assert_allclose(
+ actual: _ArrayLikeTD64_co,
+ desired: _ArrayLikeTD64_co,
+ rtol: float = 1e-7,
+ atol: float = 0,
+ equal_nan: bool = True,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+@overload
+def assert_allclose(
+ actual: _NumericArrayLike,
+ desired: _NumericArrayLike,
+ rtol: float = 1e-7,
+ atol: float = 0,
+ equal_nan: bool = True,
+ err_msg: object = "",
+ verbose: bool = True,
+ *,
+ strict: bool = False,
+) -> None: ...
+
+#
+def assert_array_almost_equal_nulp(
+ x: _ArrayLikeNumber_co,
+ y: _ArrayLikeNumber_co,
+ nulp: float = 1,
+) -> None: ...
+
+#
+def assert_array_max_ulp(
+ a: _ArrayLikeNumber_co,
+ b: _ArrayLikeNumber_co,
+ maxulp: float = 1,
+ dtype: DTypeLike | None = None,
+) -> NDArray[Any]: ...
+
+#
+@overload
+def assert_warns(warning_class: _WarningSpec) -> _GeneratorContextManager[None]: ...
+@overload
+def assert_warns(warning_class: _WarningSpec, func: Callable[_Tss, _T], *args: _Tss.args, **kwargs: _Tss.kwargs) -> _T: ...
+
+#
+@overload
+def assert_no_warnings() -> _GeneratorContextManager[None]: ...
+@overload
+def assert_no_warnings(func: Callable[_Tss, _T], /, *args: _Tss.args, **kwargs: _Tss.kwargs) -> _T: ...
+
+#
+@overload
+def assert_no_gc_cycles() -> _GeneratorContextManager[None]: ...
+@overload
+def assert_no_gc_cycles(func: Callable[_Tss, Any], /, *args: _Tss.args, **kwargs: _Tss.kwargs) -> None: ...
+
+###
+
+#
+@overload
+def tempdir(
+ suffix: None = None,
+ prefix: None = None,
+ dir: None = None,
+) -> _GeneratorContextManager[str]: ...
+@overload
+def tempdir(
+ suffix: AnyStr | None = None,
+ prefix: AnyStr | None = None,
+ *,
+ dir: GenericPath[AnyStr],
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def tempdir(
+ suffix: AnyStr | None = None,
+ *,
+ prefix: AnyStr,
+ dir: GenericPath[AnyStr] | None = None,
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def tempdir(
+ suffix: AnyStr,
+ prefix: AnyStr | None = None,
+ dir: GenericPath[AnyStr] | None = None,
+) -> _GeneratorContextManager[AnyStr]: ...
+
+#
+@overload
+def temppath(
+ suffix: None = None,
+ prefix: None = None,
+ dir: None = None,
+ text: bool = False,
+) -> _GeneratorContextManager[str]: ...
+@overload
+def temppath(
+ suffix: AnyStr | None,
+ prefix: AnyStr | None,
+ dir: GenericPath[AnyStr],
+ text: bool = False,
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def temppath(
+ suffix: AnyStr | None = None,
+ prefix: AnyStr | None = None,
+ *,
+ dir: GenericPath[AnyStr],
+ text: bool = False,
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def temppath(
+ suffix: AnyStr | None,
+ prefix: AnyStr,
+ dir: GenericPath[AnyStr] | None = None,
+ text: bool = False,
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def temppath(
+ suffix: AnyStr | None = None,
+ *,
+ prefix: AnyStr,
+ dir: GenericPath[AnyStr] | None = None,
+ text: bool = False,
+) -> _GeneratorContextManager[AnyStr]: ...
+@overload
+def temppath(
+ suffix: AnyStr,
+ prefix: AnyStr | None = None,
+ dir: GenericPath[AnyStr] | None = None,
+ text: bool = False,
+) -> _GeneratorContextManager[AnyStr]: ...
+
+#
+def check_support_sve(__cache: list[_T_or_bool] = []) -> _T_or_bool: ... # noqa: PYI063
+
+#
+def decorate_methods(
+ cls: type,
+ decorator: Callable[[Callable[..., Any]], Any],
+ testmatch: _RegexLike | None = None,
+) -> None: ...
+
+#
+@overload
+def run_threaded(
+ func: Callable[[], None],
+ max_workers: int = 8,
+ pass_count: bool = False,
+ pass_barrier: bool = False,
+ outer_iterations: int = 1,
+ prepare_args: None = None,
+) -> None: ...
+@overload
+def run_threaded(
+ func: Callable[[Unpack[_Ts]], None],
+ max_workers: int,
+ pass_count: bool,
+ pass_barrier: bool,
+ outer_iterations: int,
+ prepare_args: tuple[Unpack[_Ts]],
+) -> None: ...
+@overload
+def run_threaded(
+ func: Callable[[Unpack[_Ts]], None],
+ max_workers: int = 8,
+ pass_count: bool = False,
+ pass_barrier: bool = False,
+ outer_iterations: int = 1,
+ *,
+ prepare_args: tuple[Unpack[_Ts]],
+) -> None: ...
+
+#
+def runstring(astr: _StrLike | types.CodeType, dict: dict[str, Any] | None) -> Any: ... # noqa: ANN401
+def rundocs(filename: StrPath | None = None, raise_on_error: bool = True) -> None: ...
+def measure(code_str: _StrLike | ast.AST, times: int = 1, label: str | None = None) -> float: ...
+def break_cycles() -> None: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e61534c323648f3def69c24e61d7d6e6c79d970
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.py
@@ -0,0 +1,83 @@
+"""Tools for testing implementations of __array_function__ and ufunc overrides
+
+
+"""
+
+from numpy._core.overrides import ARRAY_FUNCTIONS as _array_functions
+from numpy import ufunc as _ufunc
+import numpy._core.umath as _umath
+
+def get_overridable_numpy_ufuncs():
+ """List all numpy ufuncs overridable via `__array_ufunc__`
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ set
+ A set containing all overridable ufuncs in the public numpy API.
+ """
+ ufuncs = {obj for obj in _umath.__dict__.values()
+ if isinstance(obj, _ufunc)}
+ return ufuncs
+
+
+def allows_array_ufunc_override(func):
+ """Determine if a function can be overridden via `__array_ufunc__`
+
+ Parameters
+ ----------
+ func : callable
+ Function that may be overridable via `__array_ufunc__`
+
+ Returns
+ -------
+ bool
+ `True` if `func` is overridable via `__array_ufunc__` and
+ `False` otherwise.
+
+ Notes
+ -----
+ This function is equivalent to ``isinstance(func, np.ufunc)`` and
+ will work correctly for ufuncs defined outside of Numpy.
+
+ """
+ return isinstance(func, _ufunc)
+
+
+def get_overridable_numpy_array_functions():
+ """List all numpy functions overridable via `__array_function__`
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ set
+ A set containing all functions in the public numpy API that are
+ overridable via `__array_function__`.
+
+ """
+ # 'import numpy' doesn't import recfunctions, so make sure it's imported
+ # so ufuncs defined there show up in the ufunc listing
+ from numpy.lib import recfunctions # noqa: F401
+ return _array_functions.copy()
+
+def allows_array_function_override(func):
+ """Determine if a Numpy function can be overridden via `__array_function__`
+
+ Parameters
+ ----------
+ func : callable
+ Function that may be overridable via `__array_function__`
+
+ Returns
+ -------
+ bool
+ `True` if `func` is a function in the Numpy API that is
+ overridable via `__array_function__` and `False` otherwise.
+ """
+ return func in _array_functions
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..3fefc3f350dacbd223c1fcc94db1c634d1b6c6b1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/overrides.pyi
@@ -0,0 +1,11 @@
+from collections.abc import Callable, Hashable
+from typing import Any
+
+from typing_extensions import TypeIs
+
+import numpy as np
+
+def get_overridable_numpy_ufuncs() -> set[np.ufunc]: ...
+def get_overridable_numpy_array_functions() -> set[Callable[..., Any]]: ...
+def allows_array_ufunc_override(func: object) -> TypeIs[np.ufunc]: ...
+def allows_array_function_override(func: Hashable) -> bool: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.py
new file mode 100644
index 0000000000000000000000000000000000000000..649c1cd6bc21720ace7d4a6597061242a9d2ccde
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.py
@@ -0,0 +1,201 @@
+#!/usr/bin/env python3
+"""Prints type-coercion tables for the built-in NumPy types
+
+"""
+import numpy as np
+from numpy._core.numerictypes import obj2sctype
+from collections import namedtuple
+
+# Generic object that can be added, but doesn't do anything else
+class GenericObject:
+ def __init__(self, v):
+ self.v = v
+
+ def __add__(self, other):
+ return self
+
+ def __radd__(self, other):
+ return self
+
+ dtype = np.dtype('O')
+
+def print_cancast_table(ntypes):
+ print('X', end=' ')
+ for char in ntypes:
+ print(char, end=' ')
+ print()
+ for row in ntypes:
+ print(row, end=' ')
+ for col in ntypes:
+ if np.can_cast(row, col, "equiv"):
+ cast = "#"
+ elif np.can_cast(row, col, "safe"):
+ cast = "="
+ elif np.can_cast(row, col, "same_kind"):
+ cast = "~"
+ elif np.can_cast(row, col, "unsafe"):
+ cast = "."
+ else:
+ cast = " "
+ print(cast, end=' ')
+ print()
+
+def print_coercion_table(ntypes, inputfirstvalue, inputsecondvalue, firstarray, use_promote_types=False):
+ print('+', end=' ')
+ for char in ntypes:
+ print(char, end=' ')
+ print()
+ for row in ntypes:
+ if row == 'O':
+ rowtype = GenericObject
+ else:
+ rowtype = obj2sctype(row)
+
+ print(row, end=' ')
+ for col in ntypes:
+ if col == 'O':
+ coltype = GenericObject
+ else:
+ coltype = obj2sctype(col)
+ try:
+ if firstarray:
+ rowvalue = np.array([rowtype(inputfirstvalue)], dtype=rowtype)
+ else:
+ rowvalue = rowtype(inputfirstvalue)
+ colvalue = coltype(inputsecondvalue)
+ if use_promote_types:
+ char = np.promote_types(rowvalue.dtype, colvalue.dtype).char
+ else:
+ value = np.add(rowvalue, colvalue)
+ if isinstance(value, np.ndarray):
+ char = value.dtype.char
+ else:
+ char = np.dtype(type(value)).char
+ except ValueError:
+ char = '!'
+ except OverflowError:
+ char = '@'
+ except TypeError:
+ char = '#'
+ print(char, end=' ')
+ print()
+
+
+def print_new_cast_table(*, can_cast=True, legacy=False, flags=False):
+ """Prints new casts, the values given are default "can-cast" values, not
+ actual ones.
+ """
+ from numpy._core._multiarray_tests import get_all_cast_information
+
+ cast_table = {
+ -1: " ",
+ 0: "#", # No cast (classify as equivalent here)
+ 1: "#", # equivalent casting
+ 2: "=", # safe casting
+ 3: "~", # same-kind casting
+ 4: ".", # unsafe casting
+ }
+ flags_table = {
+ 0 : "▗", 7: "█",
+ 1: "▚", 2: "▐", 4: "▄",
+ 3: "▜", 5: "▙",
+ 6: "▟",
+ }
+
+ cast_info = namedtuple("cast_info", ["can_cast", "legacy", "flags"])
+ no_cast_info = cast_info(" ", " ", " ")
+
+ casts = get_all_cast_information()
+ table = {}
+ dtypes = set()
+ for cast in casts:
+ dtypes.add(cast["from"])
+ dtypes.add(cast["to"])
+
+ if cast["from"] not in table:
+ table[cast["from"]] = {}
+ to_dict = table[cast["from"]]
+
+ can_cast = cast_table[cast["casting"]]
+ legacy = "L" if cast["legacy"] else "."
+ flags = 0
+ if cast["requires_pyapi"]:
+ flags |= 1
+ if cast["supports_unaligned"]:
+ flags |= 2
+ if cast["no_floatingpoint_errors"]:
+ flags |= 4
+
+ flags = flags_table[flags]
+ to_dict[cast["to"]] = cast_info(can_cast=can_cast, legacy=legacy, flags=flags)
+
+ # The np.dtype(x.type) is a bit strange, because dtype classes do
+ # not expose much yet.
+ types = np.typecodes["All"]
+ def sorter(x):
+ # This is a bit weird hack, to get a table as close as possible to
+ # the one printing all typecodes (but expecting user-dtypes).
+ dtype = np.dtype(x.type)
+ try:
+ indx = types.index(dtype.char)
+ except ValueError:
+ indx = np.inf
+ return (indx, dtype.char)
+
+ dtypes = sorted(dtypes, key=sorter)
+
+ def print_table(field="can_cast"):
+ print('X', end=' ')
+ for dt in dtypes:
+ print(np.dtype(dt.type).char, end=' ')
+ print()
+ for from_dt in dtypes:
+ print(np.dtype(from_dt.type).char, end=' ')
+ row = table.get(from_dt, {})
+ for to_dt in dtypes:
+ print(getattr(row.get(to_dt, no_cast_info), field), end=' ')
+ print()
+
+ if can_cast:
+ # Print the actual table:
+ print()
+ print("Casting: # is equivalent, = is safe, ~ is same-kind, and . is unsafe")
+ print()
+ print_table("can_cast")
+
+ if legacy:
+ print()
+ print("L denotes a legacy cast . a non-legacy one.")
+ print()
+ print_table("legacy")
+
+ if flags:
+ print()
+ print(f"{flags_table[0]}: no flags, {flags_table[1]}: PyAPI, "
+ f"{flags_table[2]}: supports unaligned, {flags_table[4]}: no-float-errors")
+ print()
+ print_table("flags")
+
+
+if __name__ == '__main__':
+ print("can cast")
+ print_cancast_table(np.typecodes['All'])
+ print()
+ print("In these tables, ValueError is '!', OverflowError is '@', TypeError is '#'")
+ print()
+ print("scalar + scalar")
+ print_coercion_table(np.typecodes['All'], 0, 0, False)
+ print()
+ print("scalar + neg scalar")
+ print_coercion_table(np.typecodes['All'], 0, -1, False)
+ print()
+ print("array + scalar")
+ print_coercion_table(np.typecodes['All'], 0, 0, True)
+ print()
+ print("array + neg scalar")
+ print_coercion_table(np.typecodes['All'], 0, -1, True)
+ print()
+ print("promote_types")
+ print_coercion_table(np.typecodes['All'], 0, 0, False, True)
+ print("New casting type promotion:")
+ print_new_cast_table(can_cast=True, legacy=True, flags=True)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e6430304675e430753a8caa72ffcb2570736a618
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/print_coercion_tables.pyi
@@ -0,0 +1,27 @@
+from collections.abc import Iterable
+from typing import ClassVar, Generic
+
+from typing_extensions import Self, TypeVar
+
+import numpy as np
+
+_VT_co = TypeVar("_VT_co", default=object, covariant=True)
+
+# undocumented
+class GenericObject(Generic[_VT_co]):
+ dtype: ClassVar[np.dtype[np.object_]] = ...
+ v: _VT_co
+
+ def __init__(self, /, v: _VT_co) -> None: ...
+ def __add__(self, other: object, /) -> Self: ...
+ def __radd__(self, other: object, /) -> Self: ...
+
+def print_cancast_table(ntypes: Iterable[str]) -> None: ...
+def print_coercion_table(
+ ntypes: Iterable[str],
+ inputfirstvalue: int,
+ inputsecondvalue: int,
+ firstarray: bool,
+ use_promote_types: bool = False,
+) -> None: ...
+def print_new_cast_table(*, can_cast: bool = True, legacy: bool = False, flags: bool = False) -> None: ...
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/tests/test_utils.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/tests/test_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..df9fce8fd79afbcec85d94bb37ee034a9d1f4668
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/testing/tests/test_utils.py
@@ -0,0 +1,1929 @@
+import warnings
+import sys
+import os
+import itertools
+import pytest
+import weakref
+import re
+
+import numpy as np
+import numpy._core._multiarray_umath as ncu
+from numpy.testing import (
+ assert_equal, assert_array_equal, assert_almost_equal,
+ assert_array_almost_equal, assert_array_less, build_err_msg,
+ assert_raises, assert_warns, assert_no_warnings, assert_allclose,
+ assert_approx_equal, assert_array_almost_equal_nulp, assert_array_max_ulp,
+ clear_and_catch_warnings, suppress_warnings, assert_string_equal, assert_,
+ tempdir, temppath, assert_no_gc_cycles, HAS_REFCOUNT
+)
+
+
+class _GenericTest:
+
+ def _test_equal(self, a, b):
+ self._assert_func(a, b)
+
+ def _test_not_equal(self, a, b):
+ with assert_raises(AssertionError):
+ self._assert_func(a, b)
+
+ def test_array_rank1_eq(self):
+ """Test two equal array of rank 1 are found equal."""
+ a = np.array([1, 2])
+ b = np.array([1, 2])
+
+ self._test_equal(a, b)
+
+ def test_array_rank1_noteq(self):
+ """Test two different array of rank 1 are found not equal."""
+ a = np.array([1, 2])
+ b = np.array([2, 2])
+
+ self._test_not_equal(a, b)
+
+ def test_array_rank2_eq(self):
+ """Test two equal array of rank 2 are found equal."""
+ a = np.array([[1, 2], [3, 4]])
+ b = np.array([[1, 2], [3, 4]])
+
+ self._test_equal(a, b)
+
+ def test_array_diffshape(self):
+ """Test two arrays with different shapes are found not equal."""
+ a = np.array([1, 2])
+ b = np.array([[1, 2], [1, 2]])
+
+ self._test_not_equal(a, b)
+
+ def test_objarray(self):
+ """Test object arrays."""
+ a = np.array([1, 1], dtype=object)
+ self._test_equal(a, 1)
+
+ def test_array_likes(self):
+ self._test_equal([1, 2, 3], (1, 2, 3))
+
+
+class TestArrayEqual(_GenericTest):
+
+ def setup_method(self):
+ self._assert_func = assert_array_equal
+
+ def test_generic_rank1(self):
+ """Test rank 1 array for all dtypes."""
+ def foo(t):
+ a = np.empty(2, t)
+ a.fill(1)
+ b = a.copy()
+ c = a.copy()
+ c.fill(0)
+ self._test_equal(a, b)
+ self._test_not_equal(c, b)
+
+ # Test numeric types and object
+ for t in '?bhilqpBHILQPfdgFDG':
+ foo(t)
+
+ # Test strings
+ for t in ['S1', 'U1']:
+ foo(t)
+
+ def test_0_ndim_array(self):
+ x = np.array(473963742225900817127911193656584771)
+ y = np.array(18535119325151578301457182298393896)
+
+ with pytest.raises(AssertionError) as exc_info:
+ self._assert_func(x, y)
+ msg = str(exc_info.value)
+ assert_('Mismatched elements: 1 / 1 (100%)\n'
+ in msg)
+
+ y = x
+ self._assert_func(x, y)
+
+ x = np.array(4395065348745.5643764887869876)
+ y = np.array(0)
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: '
+ '4.39506535e+12\n'
+ 'Max relative difference among violations: inf\n')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ x = y
+ self._assert_func(x, y)
+
+ def test_generic_rank3(self):
+ """Test rank 3 array for all dtypes."""
+ def foo(t):
+ a = np.empty((4, 2, 3), t)
+ a.fill(1)
+ b = a.copy()
+ c = a.copy()
+ c.fill(0)
+ self._test_equal(a, b)
+ self._test_not_equal(c, b)
+
+ # Test numeric types and object
+ for t in '?bhilqpBHILQPfdgFDG':
+ foo(t)
+
+ # Test strings
+ for t in ['S1', 'U1']:
+ foo(t)
+
+ def test_nan_array(self):
+ """Test arrays with nan values in them."""
+ a = np.array([1, 2, np.nan])
+ b = np.array([1, 2, np.nan])
+
+ self._test_equal(a, b)
+
+ c = np.array([1, 2, 3])
+ self._test_not_equal(c, b)
+
+ def test_string_arrays(self):
+ """Test two arrays with different shapes are found not equal."""
+ a = np.array(['floupi', 'floupa'])
+ b = np.array(['floupi', 'floupa'])
+
+ self._test_equal(a, b)
+
+ c = np.array(['floupipi', 'floupa'])
+
+ self._test_not_equal(c, b)
+
+ def test_recarrays(self):
+ """Test record arrays."""
+ a = np.empty(2, [('floupi', float), ('floupa', float)])
+ a['floupi'] = [1, 2]
+ a['floupa'] = [1, 2]
+ b = a.copy()
+
+ self._test_equal(a, b)
+
+ c = np.empty(2, [('floupipi', float),
+ ('floupi', float), ('floupa', float)])
+ c['floupipi'] = a['floupi'].copy()
+ c['floupa'] = a['floupa'].copy()
+
+ with pytest.raises(TypeError):
+ self._test_not_equal(c, b)
+
+ def test_masked_nan_inf(self):
+ # Regression test for gh-11121
+ a = np.ma.MaskedArray([3., 4., 6.5], mask=[False, True, False])
+ b = np.array([3., np.nan, 6.5])
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+ a = np.ma.MaskedArray([3., 4., 6.5], mask=[True, False, False])
+ b = np.array([np.inf, 4., 6.5])
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+
+ def test_subclass_that_overrides_eq(self):
+ # While we cannot guarantee testing functions will always work for
+ # subclasses, the tests should ideally rely only on subclasses having
+ # comparison operators, not on them being able to store booleans
+ # (which, e.g., astropy Quantity cannot usefully do). See gh-8452.
+ class MyArray(np.ndarray):
+ def __eq__(self, other):
+ return bool(np.equal(self, other).all())
+
+ def __ne__(self, other):
+ return not self == other
+
+ a = np.array([1., 2.]).view(MyArray)
+ b = np.array([2., 3.]).view(MyArray)
+ assert_(type(a == a), bool)
+ assert_(a == a)
+ assert_(a != b)
+ self._test_equal(a, a)
+ self._test_not_equal(a, b)
+ self._test_not_equal(b, a)
+
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 1.\n'
+ 'Max relative difference among violations: 0.5')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._test_equal(a, b)
+
+ c = np.array([0., 2.9]).view(MyArray)
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 2.\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._test_equal(b, c)
+
+ def test_subclass_that_does_not_implement_npall(self):
+ class MyArray(np.ndarray):
+ def __array_function__(self, *args, **kwargs):
+ return NotImplemented
+
+ a = np.array([1., 2.]).view(MyArray)
+ b = np.array([2., 3.]).view(MyArray)
+ with assert_raises(TypeError):
+ np.all(a)
+ self._test_equal(a, a)
+ self._test_not_equal(a, b)
+ self._test_not_equal(b, a)
+
+ def test_suppress_overflow_warnings(self):
+ # Based on issue #18992
+ with pytest.raises(AssertionError):
+ with np.errstate(all="raise"):
+ np.testing.assert_array_equal(
+ np.array([1, 2, 3], np.float32),
+ np.array([1, 1e-40, 3], np.float32))
+
+ def test_array_vs_scalar_is_equal(self):
+ """Test comparing an array with a scalar when all values are equal."""
+ a = np.array([1., 1., 1.])
+ b = 1.
+
+ self._test_equal(a, b)
+
+ def test_array_vs_array_not_equal(self):
+ """Test comparing an array with a scalar when not all values equal."""
+ a = np.array([34986, 545676, 439655, 563766])
+ b = np.array([34986, 545676, 439655, 0])
+
+ expected_msg = ('Mismatched elements: 1 / 4 (25%)\n'
+ 'Max absolute difference among violations: 563766\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b)
+
+ a = np.array([34986, 545676, 439655.2, 563766])
+ expected_msg = ('Mismatched elements: 2 / 4 (50%)\n'
+ 'Max absolute difference among violations: '
+ '563766.\n'
+ 'Max relative difference among violations: '
+ '4.54902139e-07')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b)
+
+ def test_array_vs_scalar_strict(self):
+ """Test comparing an array with a scalar with strict option."""
+ a = np.array([1., 1., 1.])
+ b = 1.
+
+ with pytest.raises(AssertionError):
+ self._assert_func(a, b, strict=True)
+
+ def test_array_vs_array_strict(self):
+ """Test comparing two arrays with strict option."""
+ a = np.array([1., 1., 1.])
+ b = np.array([1., 1., 1.])
+
+ self._assert_func(a, b, strict=True)
+
+ def test_array_vs_float_array_strict(self):
+ """Test comparing two arrays with strict option."""
+ a = np.array([1, 1, 1])
+ b = np.array([1., 1., 1.])
+
+ with pytest.raises(AssertionError):
+ self._assert_func(a, b, strict=True)
+
+
+class TestBuildErrorMessage:
+
+ def test_build_err_msg_defaults(self):
+ x = np.array([1.00001, 2.00002, 3.00003])
+ y = np.array([1.00002, 2.00003, 3.00004])
+ err_msg = 'There is a mismatch'
+
+ a = build_err_msg([x, y], err_msg)
+ b = ('\nItems are not equal: There is a mismatch\n ACTUAL: array(['
+ '1.00001, 2.00002, 3.00003])\n DESIRED: array([1.00002, '
+ '2.00003, 3.00004])')
+ assert_equal(a, b)
+
+ def test_build_err_msg_no_verbose(self):
+ x = np.array([1.00001, 2.00002, 3.00003])
+ y = np.array([1.00002, 2.00003, 3.00004])
+ err_msg = 'There is a mismatch'
+
+ a = build_err_msg([x, y], err_msg, verbose=False)
+ b = '\nItems are not equal: There is a mismatch'
+ assert_equal(a, b)
+
+ def test_build_err_msg_custom_names(self):
+ x = np.array([1.00001, 2.00002, 3.00003])
+ y = np.array([1.00002, 2.00003, 3.00004])
+ err_msg = 'There is a mismatch'
+
+ a = build_err_msg([x, y], err_msg, names=('FOO', 'BAR'))
+ b = ('\nItems are not equal: There is a mismatch\n FOO: array(['
+ '1.00001, 2.00002, 3.00003])\n BAR: array([1.00002, 2.00003, '
+ '3.00004])')
+ assert_equal(a, b)
+
+ def test_build_err_msg_custom_precision(self):
+ x = np.array([1.000000001, 2.00002, 3.00003])
+ y = np.array([1.000000002, 2.00003, 3.00004])
+ err_msg = 'There is a mismatch'
+
+ a = build_err_msg([x, y], err_msg, precision=10)
+ b = ('\nItems are not equal: There is a mismatch\n ACTUAL: array(['
+ '1.000000001, 2.00002 , 3.00003 ])\n DESIRED: array(['
+ '1.000000002, 2.00003 , 3.00004 ])')
+ assert_equal(a, b)
+
+
+class TestEqual(TestArrayEqual):
+
+ def setup_method(self):
+ self._assert_func = assert_equal
+
+ def test_nan_items(self):
+ self._assert_func(np.nan, np.nan)
+ self._assert_func([np.nan], [np.nan])
+ self._test_not_equal(np.nan, [np.nan])
+ self._test_not_equal(np.nan, 1)
+
+ def test_inf_items(self):
+ self._assert_func(np.inf, np.inf)
+ self._assert_func([np.inf], [np.inf])
+ self._test_not_equal(np.inf, [np.inf])
+
+ def test_datetime(self):
+ self._test_equal(
+ np.datetime64("2017-01-01", "s"),
+ np.datetime64("2017-01-01", "s")
+ )
+ self._test_equal(
+ np.datetime64("2017-01-01", "s"),
+ np.datetime64("2017-01-01", "m")
+ )
+
+ # gh-10081
+ self._test_not_equal(
+ np.datetime64("2017-01-01", "s"),
+ np.datetime64("2017-01-02", "s")
+ )
+ self._test_not_equal(
+ np.datetime64("2017-01-01", "s"),
+ np.datetime64("2017-01-02", "m")
+ )
+
+ def test_nat_items(self):
+ # not a datetime
+ nadt_no_unit = np.datetime64("NaT")
+ nadt_s = np.datetime64("NaT", "s")
+ nadt_d = np.datetime64("NaT", "ns")
+ # not a timedelta
+ natd_no_unit = np.timedelta64("NaT")
+ natd_s = np.timedelta64("NaT", "s")
+ natd_d = np.timedelta64("NaT", "ns")
+
+ dts = [nadt_no_unit, nadt_s, nadt_d]
+ tds = [natd_no_unit, natd_s, natd_d]
+ for a, b in itertools.product(dts, dts):
+ self._assert_func(a, b)
+ self._assert_func([a], [b])
+ self._test_not_equal([a], b)
+
+ for a, b in itertools.product(tds, tds):
+ self._assert_func(a, b)
+ self._assert_func([a], [b])
+ self._test_not_equal([a], b)
+
+ for a, b in itertools.product(tds, dts):
+ self._test_not_equal(a, b)
+ self._test_not_equal(a, [b])
+ self._test_not_equal([a], [b])
+ self._test_not_equal([a], np.datetime64("2017-01-01", "s"))
+ self._test_not_equal([b], np.datetime64("2017-01-01", "s"))
+ self._test_not_equal([a], np.timedelta64(123, "s"))
+ self._test_not_equal([b], np.timedelta64(123, "s"))
+
+ def test_non_numeric(self):
+ self._assert_func('ab', 'ab')
+ self._test_not_equal('ab', 'abb')
+
+ def test_complex_item(self):
+ self._assert_func(complex(1, 2), complex(1, 2))
+ self._assert_func(complex(1, np.nan), complex(1, np.nan))
+ self._test_not_equal(complex(1, np.nan), complex(1, 2))
+ self._test_not_equal(complex(np.nan, 1), complex(1, np.nan))
+ self._test_not_equal(complex(np.nan, np.inf), complex(np.nan, 2))
+
+ def test_negative_zero(self):
+ self._test_not_equal(ncu.PZERO, ncu.NZERO)
+
+ def test_complex(self):
+ x = np.array([complex(1, 2), complex(1, np.nan)])
+ y = np.array([complex(1, 2), complex(1, 2)])
+ self._assert_func(x, x)
+ self._test_not_equal(x, y)
+
+ def test_object(self):
+ # gh-12942
+ import datetime
+ a = np.array([datetime.datetime(2000, 1, 1),
+ datetime.datetime(2000, 1, 2)])
+ self._test_not_equal(a, a[::-1])
+
+
+class TestArrayAlmostEqual(_GenericTest):
+
+ def setup_method(self):
+ self._assert_func = assert_array_almost_equal
+
+ def test_closeness(self):
+ # Note that in the course of time we ended up with
+ # `abs(x - y) < 1.5 * 10**(-decimal)`
+ # instead of the previously documented
+ # `abs(x - y) < 0.5 * 10**(-decimal)`
+ # so this check serves to preserve the wrongness.
+
+ # test scalars
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 1.5\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(1.5, 0.0, decimal=0)
+
+ # test arrays
+ self._assert_func([1.499999], [0.0], decimal=0)
+
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 1.5\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func([1.5], [0.0], decimal=0)
+
+ a = [1.4999999, 0.00003]
+ b = [1.49999991, 0]
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 3.e-05\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b, decimal=7)
+
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 3.e-05\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(b, a, decimal=7)
+
+ def test_simple(self):
+ x = np.array([1234.2222])
+ y = np.array([1234.2223])
+
+ self._assert_func(x, y, decimal=3)
+ self._assert_func(x, y, decimal=4)
+
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: '
+ '1.e-04\n'
+ 'Max relative difference among violations: '
+ '8.10226812e-08')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y, decimal=5)
+
+ def test_array_vs_scalar(self):
+ a = [5498.42354, 849.54345, 0.00]
+ b = 5498.42354
+ expected_msg = ('Mismatched elements: 2 / 3 (66.7%)\n'
+ 'Max absolute difference among violations: '
+ '5498.42354\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b, decimal=9)
+
+ expected_msg = ('Mismatched elements: 2 / 3 (66.7%)\n'
+ 'Max absolute difference among violations: '
+ '5498.42354\n'
+ 'Max relative difference among violations: 5.4722099')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(b, a, decimal=9)
+
+ a = [5498.42354, 0.00]
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: '
+ '5498.42354\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(b, a, decimal=7)
+
+ b = 0
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: '
+ '5498.42354\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b, decimal=7)
+
+ def test_nan(self):
+ anan = np.array([np.nan])
+ aone = np.array([1])
+ ainf = np.array([np.inf])
+ self._assert_func(anan, anan)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(anan, aone))
+ assert_raises(AssertionError,
+ lambda: self._assert_func(anan, ainf))
+ assert_raises(AssertionError,
+ lambda: self._assert_func(ainf, anan))
+
+ def test_inf(self):
+ a = np.array([[1., 2.], [3., 4.]])
+ b = a.copy()
+ a[0, 0] = np.inf
+ assert_raises(AssertionError,
+ lambda: self._assert_func(a, b))
+ b[0, 0] = -np.inf
+ assert_raises(AssertionError,
+ lambda: self._assert_func(a, b))
+
+ def test_subclass(self):
+ a = np.array([[1., 2.], [3., 4.]])
+ b = np.ma.masked_array([[1., 2.], [0., 4.]],
+ [[False, False], [True, False]])
+ self._assert_func(a, b)
+ self._assert_func(b, a)
+ self._assert_func(b, b)
+
+ # Test fully masked as well (see gh-11123).
+ a = np.ma.MaskedArray(3.5, mask=True)
+ b = np.array([3., 4., 6.5])
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+ a = np.ma.masked
+ b = np.array([3., 4., 6.5])
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+ a = np.ma.MaskedArray([3., 4., 6.5], mask=[True, True, True])
+ b = np.array([1., 2., 3.])
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+ a = np.ma.MaskedArray([3., 4., 6.5], mask=[True, True, True])
+ b = np.array(1.)
+ self._test_equal(a, b)
+ self._test_equal(b, a)
+
+ def test_subclass_2(self):
+ # While we cannot guarantee testing functions will always work for
+ # subclasses, the tests should ideally rely only on subclasses having
+ # comparison operators, not on them being able to store booleans
+ # (which, e.g., astropy Quantity cannot usefully do). See gh-8452.
+ class MyArray(np.ndarray):
+ def __eq__(self, other):
+ return super().__eq__(other).view(np.ndarray)
+
+ def __lt__(self, other):
+ return super().__lt__(other).view(np.ndarray)
+
+ def all(self, *args, **kwargs):
+ return all(self)
+
+ a = np.array([1., 2.]).view(MyArray)
+ self._assert_func(a, a)
+
+ z = np.array([True, True]).view(MyArray)
+ all(z)
+ b = np.array([1., 202]).view(MyArray)
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 200.\n'
+ 'Max relative difference among violations: 0.99009')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b)
+
+ def test_subclass_that_cannot_be_bool(self):
+ # While we cannot guarantee testing functions will always work for
+ # subclasses, the tests should ideally rely only on subclasses having
+ # comparison operators, not on them being able to store booleans
+ # (which, e.g., astropy Quantity cannot usefully do). See gh-8452.
+ class MyArray(np.ndarray):
+ def __eq__(self, other):
+ return super().__eq__(other).view(np.ndarray)
+
+ def __lt__(self, other):
+ return super().__lt__(other).view(np.ndarray)
+
+ def all(self, *args, **kwargs):
+ raise NotImplementedError
+
+ a = np.array([1., 2.]).view(MyArray)
+ self._assert_func(a, a)
+
+
+class TestAlmostEqual(_GenericTest):
+
+ def setup_method(self):
+ self._assert_func = assert_almost_equal
+
+ def test_closeness(self):
+ # Note that in the course of time we ended up with
+ # `abs(x - y) < 1.5 * 10**(-decimal)`
+ # instead of the previously documented
+ # `abs(x - y) < 0.5 * 10**(-decimal)`
+ # so this check serves to preserve the wrongness.
+
+ # test scalars
+ self._assert_func(1.499999, 0.0, decimal=0)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(1.5, 0.0, decimal=0))
+
+ # test arrays
+ self._assert_func([1.499999], [0.0], decimal=0)
+ assert_raises(AssertionError,
+ lambda: self._assert_func([1.5], [0.0], decimal=0))
+
+ def test_nan_item(self):
+ self._assert_func(np.nan, np.nan)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(np.nan, 1))
+ assert_raises(AssertionError,
+ lambda: self._assert_func(np.nan, np.inf))
+ assert_raises(AssertionError,
+ lambda: self._assert_func(np.inf, np.nan))
+
+ def test_inf_item(self):
+ self._assert_func(np.inf, np.inf)
+ self._assert_func(-np.inf, -np.inf)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(np.inf, 1))
+ assert_raises(AssertionError,
+ lambda: self._assert_func(-np.inf, np.inf))
+
+ def test_simple_item(self):
+ self._test_not_equal(1, 2)
+
+ def test_complex_item(self):
+ self._assert_func(complex(1, 2), complex(1, 2))
+ self._assert_func(complex(1, np.nan), complex(1, np.nan))
+ self._assert_func(complex(np.inf, np.nan), complex(np.inf, np.nan))
+ self._test_not_equal(complex(1, np.nan), complex(1, 2))
+ self._test_not_equal(complex(np.nan, 1), complex(1, np.nan))
+ self._test_not_equal(complex(np.nan, np.inf), complex(np.nan, 2))
+
+ def test_complex(self):
+ x = np.array([complex(1, 2), complex(1, np.nan)])
+ z = np.array([complex(1, 2), complex(np.nan, 1)])
+ y = np.array([complex(1, 2), complex(1, 2)])
+ self._assert_func(x, x)
+ self._test_not_equal(x, y)
+ self._test_not_equal(x, z)
+
+ def test_error_message(self):
+ """Check the message is formatted correctly for the decimal value.
+ Also check the message when input includes inf or nan (gh12200)"""
+ x = np.array([1.00000000001, 2.00000000002, 3.00003])
+ y = np.array([1.00000000002, 2.00000000003, 3.00004])
+
+ # Test with a different amount of decimal digits
+ expected_msg = ('Mismatched elements: 3 / 3 (100%)\n'
+ 'Max absolute difference among violations: 1.e-05\n'
+ 'Max relative difference among violations: '
+ '3.33328889e-06\n'
+ ' ACTUAL: array([1.00000000001, '
+ '2.00000000002, '
+ '3.00003 ])\n'
+ ' DESIRED: array([1.00000000002, 2.00000000003, '
+ '3.00004 ])')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y, decimal=12)
+
+ # With the default value of decimal digits, only the 3rd element
+ # differs. Note that we only check for the formatting of the arrays
+ # themselves.
+ expected_msg = ('Mismatched elements: 1 / 3 (33.3%)\n'
+ 'Max absolute difference among violations: 1.e-05\n'
+ 'Max relative difference among violations: '
+ '3.33328889e-06\n'
+ ' ACTUAL: array([1. , 2. , 3.00003])\n'
+ ' DESIRED: array([1. , 2. , 3.00004])')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ # Check the error message when input includes inf
+ x = np.array([np.inf, 0])
+ y = np.array([np.inf, 1])
+ expected_msg = ('Mismatched elements: 1 / 2 (50%)\n'
+ 'Max absolute difference among violations: 1.\n'
+ 'Max relative difference among violations: 1.\n'
+ ' ACTUAL: array([inf, 0.])\n'
+ ' DESIRED: array([inf, 1.])')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ # Check the error message when dividing by zero
+ x = np.array([1, 2])
+ y = np.array([0, 0])
+ expected_msg = ('Mismatched elements: 2 / 2 (100%)\n'
+ 'Max absolute difference among violations: 2\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ def test_error_message_2(self):
+ """Check the message is formatted correctly """
+ """when either x or y is a scalar."""
+ x = 2
+ y = np.ones(20)
+ expected_msg = ('Mismatched elements: 20 / 20 (100%)\n'
+ 'Max absolute difference among violations: 1.\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ y = 2
+ x = np.ones(20)
+ expected_msg = ('Mismatched elements: 20 / 20 (100%)\n'
+ 'Max absolute difference among violations: 1.\n'
+ 'Max relative difference among violations: 0.5')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ def test_subclass_that_cannot_be_bool(self):
+ # While we cannot guarantee testing functions will always work for
+ # subclasses, the tests should ideally rely only on subclasses having
+ # comparison operators, not on them being able to store booleans
+ # (which, e.g., astropy Quantity cannot usefully do). See gh-8452.
+ class MyArray(np.ndarray):
+ def __eq__(self, other):
+ return super().__eq__(other).view(np.ndarray)
+
+ def __lt__(self, other):
+ return super().__lt__(other).view(np.ndarray)
+
+ def all(self, *args, **kwargs):
+ raise NotImplementedError
+
+ a = np.array([1., 2.]).view(MyArray)
+ self._assert_func(a, a)
+
+
+class TestApproxEqual:
+
+ def setup_method(self):
+ self._assert_func = assert_approx_equal
+
+ def test_simple_0d_arrays(self):
+ x = np.array(1234.22)
+ y = np.array(1234.23)
+
+ self._assert_func(x, y, significant=5)
+ self._assert_func(x, y, significant=6)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(x, y, significant=7))
+
+ def test_simple_items(self):
+ x = 1234.22
+ y = 1234.23
+
+ self._assert_func(x, y, significant=4)
+ self._assert_func(x, y, significant=5)
+ self._assert_func(x, y, significant=6)
+ assert_raises(AssertionError,
+ lambda: self._assert_func(x, y, significant=7))
+
+ def test_nan_array(self):
+ anan = np.array(np.nan)
+ aone = np.array(1)
+ ainf = np.array(np.inf)
+ self._assert_func(anan, anan)
+ assert_raises(AssertionError, lambda: self._assert_func(anan, aone))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, anan))
+
+ def test_nan_items(self):
+ anan = np.array(np.nan)
+ aone = np.array(1)
+ ainf = np.array(np.inf)
+ self._assert_func(anan, anan)
+ assert_raises(AssertionError, lambda: self._assert_func(anan, aone))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, anan))
+
+
+class TestArrayAssertLess:
+
+ def setup_method(self):
+ self._assert_func = assert_array_less
+
+ def test_simple_arrays(self):
+ x = np.array([1.1, 2.2])
+ y = np.array([1.2, 2.3])
+
+ self._assert_func(x, y)
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ y = np.array([1.0, 2.3])
+
+ assert_raises(AssertionError, lambda: self._assert_func(x, y))
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ a = np.array([1, 3, 6, 20])
+ b = np.array([2, 4, 6, 8])
+
+ expected_msg = ('Mismatched elements: 2 / 4 (50%)\n'
+ 'Max absolute difference among violations: 12\n'
+ 'Max relative difference among violations: 1.5')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(a, b)
+
+ def test_rank2(self):
+ x = np.array([[1.1, 2.2], [3.3, 4.4]])
+ y = np.array([[1.2, 2.3], [3.4, 4.5]])
+
+ self._assert_func(x, y)
+ expected_msg = ('Mismatched elements: 4 / 4 (100%)\n'
+ 'Max absolute difference among violations: 0.1\n'
+ 'Max relative difference among violations: 0.09090909')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(y, x)
+
+ y = np.array([[1.0, 2.3], [3.4, 4.5]])
+ assert_raises(AssertionError, lambda: self._assert_func(x, y))
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ def test_rank3(self):
+ x = np.ones(shape=(2, 2, 2))
+ y = np.ones(shape=(2, 2, 2))+1
+
+ self._assert_func(x, y)
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ y[0, 0, 0] = 0
+ expected_msg = ('Mismatched elements: 1 / 8 (12.5%)\n'
+ 'Max absolute difference among violations: 1.\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ def test_simple_items(self):
+ x = 1.1
+ y = 2.2
+
+ self._assert_func(x, y)
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 1.1\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(y, x)
+
+ y = np.array([2.2, 3.3])
+
+ self._assert_func(x, y)
+ assert_raises(AssertionError, lambda: self._assert_func(y, x))
+
+ y = np.array([1.0, 3.3])
+
+ assert_raises(AssertionError, lambda: self._assert_func(x, y))
+
+ def test_simple_items_and_array(self):
+ x = np.array([[621.345454, 390.5436, 43.54657, 626.4535],
+ [54.54, 627.3399, 13., 405.5435],
+ [543.545, 8.34, 91.543, 333.3]])
+ y = 627.34
+ self._assert_func(x, y)
+
+ y = 8.339999
+ self._assert_func(y, x)
+
+ x = np.array([[3.4536, 2390.5436, 435.54657, 324525.4535],
+ [5449.54, 999090.54, 130303.54, 405.5435],
+ [543.545, 8.34, 91.543, 999090.53999]])
+ y = 999090.54
+
+ expected_msg = ('Mismatched elements: 1 / 12 (8.33%)\n'
+ 'Max absolute difference among violations: 0.\n'
+ 'Max relative difference among violations: 0.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ expected_msg = ('Mismatched elements: 12 / 12 (100%)\n'
+ 'Max absolute difference among violations: '
+ '999087.0864\n'
+ 'Max relative difference among violations: '
+ '289288.5934676')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(y, x)
+
+ def test_zeroes(self):
+ x = np.array([546456., 0, 15.455])
+ y = np.array(87654.)
+
+ expected_msg = ('Mismatched elements: 1 / 3 (33.3%)\n'
+ 'Max absolute difference among violations: 458802.\n'
+ 'Max relative difference among violations: 5.23423917')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ expected_msg = ('Mismatched elements: 2 / 3 (66.7%)\n'
+ 'Max absolute difference among violations: 87654.\n'
+ 'Max relative difference among violations: '
+ '5670.5626011')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(y, x)
+
+ y = 0
+
+ expected_msg = ('Mismatched elements: 3 / 3 (100%)\n'
+ 'Max absolute difference among violations: 546456.\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(x, y)
+
+ expected_msg = ('Mismatched elements: 1 / 3 (33.3%)\n'
+ 'Max absolute difference among violations: 0.\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ self._assert_func(y, x)
+
+ def test_nan_noncompare(self):
+ anan = np.array(np.nan)
+ aone = np.array(1)
+ ainf = np.array(np.inf)
+ self._assert_func(anan, anan)
+ assert_raises(AssertionError, lambda: self._assert_func(aone, anan))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, aone))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, anan))
+
+ def test_nan_noncompare_array(self):
+ x = np.array([1.1, 2.2, 3.3])
+ anan = np.array(np.nan)
+
+ assert_raises(AssertionError, lambda: self._assert_func(x, anan))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, x))
+
+ x = np.array([1.1, 2.2, np.nan])
+
+ assert_raises(AssertionError, lambda: self._assert_func(x, anan))
+ assert_raises(AssertionError, lambda: self._assert_func(anan, x))
+
+ y = np.array([1.0, 2.0, np.nan])
+
+ self._assert_func(y, x)
+ assert_raises(AssertionError, lambda: self._assert_func(x, y))
+
+ def test_inf_compare(self):
+ aone = np.array(1)
+ ainf = np.array(np.inf)
+
+ self._assert_func(aone, ainf)
+ self._assert_func(-ainf, aone)
+ self._assert_func(-ainf, ainf)
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, aone))
+ assert_raises(AssertionError, lambda: self._assert_func(aone, -ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, -ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(-ainf, -ainf))
+
+ def test_inf_compare_array(self):
+ x = np.array([1.1, 2.2, np.inf])
+ ainf = np.array(np.inf)
+
+ assert_raises(AssertionError, lambda: self._assert_func(x, ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(ainf, x))
+ assert_raises(AssertionError, lambda: self._assert_func(x, -ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(-x, -ainf))
+ assert_raises(AssertionError, lambda: self._assert_func(-ainf, -x))
+ self._assert_func(-ainf, x)
+
+ def test_strict(self):
+ """Test the behavior of the `strict` option."""
+ x = np.zeros(3)
+ y = np.ones(())
+ self._assert_func(x, y)
+ with pytest.raises(AssertionError):
+ self._assert_func(x, y, strict=True)
+ y = np.broadcast_to(y, x.shape)
+ self._assert_func(x, y)
+ with pytest.raises(AssertionError):
+ self._assert_func(x, y.astype(np.float32), strict=True)
+
+
+class TestWarns:
+
+ def test_warn(self):
+ def f():
+ warnings.warn("yo")
+ return 3
+
+ before_filters = sys.modules['warnings'].filters[:]
+ assert_equal(assert_warns(UserWarning, f), 3)
+ after_filters = sys.modules['warnings'].filters
+
+ assert_raises(AssertionError, assert_no_warnings, f)
+ assert_equal(assert_no_warnings(lambda x: x, 1), 1)
+
+ # Check that the warnings state is unchanged
+ assert_equal(before_filters, after_filters,
+ "assert_warns does not preserver warnings state")
+
+ def test_context_manager(self):
+
+ before_filters = sys.modules['warnings'].filters[:]
+ with assert_warns(UserWarning):
+ warnings.warn("yo")
+ after_filters = sys.modules['warnings'].filters
+
+ def no_warnings():
+ with assert_no_warnings():
+ warnings.warn("yo")
+
+ assert_raises(AssertionError, no_warnings)
+ assert_equal(before_filters, after_filters,
+ "assert_warns does not preserver warnings state")
+
+ def test_args(self):
+ def f(a=0, b=1):
+ warnings.warn("yo")
+ return a + b
+
+ assert assert_warns(UserWarning, f, b=20) == 20
+
+ with pytest.raises(RuntimeError) as exc:
+ # assert_warns cannot do regexp matching, use pytest.warns
+ with assert_warns(UserWarning, match="A"):
+ warnings.warn("B", UserWarning)
+ assert "assert_warns" in str(exc)
+ assert "pytest.warns" in str(exc)
+
+ with pytest.raises(RuntimeError) as exc:
+ # assert_warns cannot do regexp matching, use pytest.warns
+ with assert_warns(UserWarning, wrong="A"):
+ warnings.warn("B", UserWarning)
+ assert "assert_warns" in str(exc)
+ assert "pytest.warns" not in str(exc)
+
+ def test_warn_wrong_warning(self):
+ def f():
+ warnings.warn("yo", DeprecationWarning)
+
+ failed = False
+ with warnings.catch_warnings():
+ warnings.simplefilter("error", DeprecationWarning)
+ try:
+ # Should raise a DeprecationWarning
+ assert_warns(UserWarning, f)
+ failed = True
+ except DeprecationWarning:
+ pass
+
+ if failed:
+ raise AssertionError("wrong warning caught by assert_warn")
+
+
+class TestAssertAllclose:
+
+ def test_simple(self):
+ x = 1e-3
+ y = 1e-9
+
+ assert_allclose(x, y, atol=1)
+ assert_raises(AssertionError, assert_allclose, x, y)
+
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 0.001\n'
+ 'Max relative difference among violations: 999999.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(x, y)
+
+ z = 0
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 1.e-09\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(y, z)
+
+ expected_msg = ('Mismatched elements: 1 / 1 (100%)\n'
+ 'Max absolute difference among violations: 1.e-09\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(z, y)
+
+ a = np.array([x, y, x, y])
+ b = np.array([x, y, x, x])
+
+ assert_allclose(a, b, atol=1)
+ assert_raises(AssertionError, assert_allclose, a, b)
+
+ b[-1] = y * (1 + 1e-8)
+ assert_allclose(a, b)
+ assert_raises(AssertionError, assert_allclose, a, b, rtol=1e-9)
+
+ assert_allclose(6, 10, rtol=0.5)
+ assert_raises(AssertionError, assert_allclose, 10, 6, rtol=0.5)
+
+ b = np.array([x, y, x, x])
+ c = np.array([x, y, x, z])
+ expected_msg = ('Mismatched elements: 1 / 4 (25%)\n'
+ 'Max absolute difference among violations: 0.001\n'
+ 'Max relative difference among violations: inf')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(b, c)
+
+ expected_msg = ('Mismatched elements: 1 / 4 (25%)\n'
+ 'Max absolute difference among violations: 0.001\n'
+ 'Max relative difference among violations: 1.')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(c, b)
+
+ def test_min_int(self):
+ a = np.array([np.iinfo(np.int_).min], dtype=np.int_)
+ # Should not raise:
+ assert_allclose(a, a)
+
+ def test_report_fail_percentage(self):
+ a = np.array([1, 1, 1, 1])
+ b = np.array([1, 1, 1, 2])
+
+ expected_msg = ('Mismatched elements: 1 / 4 (25%)\n'
+ 'Max absolute difference among violations: 1\n'
+ 'Max relative difference among violations: 0.5')
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(a, b)
+
+ def test_equal_nan(self):
+ a = np.array([np.nan])
+ b = np.array([np.nan])
+ # Should not raise:
+ assert_allclose(a, b, equal_nan=True)
+
+ def test_not_equal_nan(self):
+ a = np.array([np.nan])
+ b = np.array([np.nan])
+ assert_raises(AssertionError, assert_allclose, a, b, equal_nan=False)
+
+ def test_equal_nan_default(self):
+ # Make sure equal_nan default behavior remains unchanged. (All
+ # of these functions use assert_array_compare under the hood.)
+ # None of these should raise.
+ a = np.array([np.nan])
+ b = np.array([np.nan])
+ assert_array_equal(a, b)
+ assert_array_almost_equal(a, b)
+ assert_array_less(a, b)
+ assert_allclose(a, b)
+
+ def test_report_max_relative_error(self):
+ a = np.array([0, 1])
+ b = np.array([0, 2])
+
+ expected_msg = 'Max relative difference among violations: 0.5'
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(a, b)
+
+ def test_timedelta(self):
+ # see gh-18286
+ a = np.array([[1, 2, 3, "NaT"]], dtype="m8[ns]")
+ assert_allclose(a, a)
+
+ def test_error_message_unsigned(self):
+ """Check the message is formatted correctly when overflow can occur
+ (gh21768)"""
+ # Ensure to test for potential overflow in the case of:
+ # x - y
+ # and
+ # y - x
+ x = np.asarray([0, 1, 8], dtype='uint8')
+ y = np.asarray([4, 4, 4], dtype='uint8')
+ expected_msg = 'Max absolute difference among violations: 4'
+ with pytest.raises(AssertionError, match=re.escape(expected_msg)):
+ assert_allclose(x, y, atol=3)
+
+ def test_strict(self):
+ """Test the behavior of the `strict` option."""
+ x = np.ones(3)
+ y = np.ones(())
+ assert_allclose(x, y)
+ with pytest.raises(AssertionError):
+ assert_allclose(x, y, strict=True)
+ assert_allclose(x, x)
+ with pytest.raises(AssertionError):
+ assert_allclose(x, x.astype(np.float32), strict=True)
+
+
+class TestArrayAlmostEqualNulp:
+
+ def test_float64_pass(self):
+ # The number of units of least precision
+ # In this case, use a few places above the lowest level (ie nulp=1)
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float64)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ # Addition
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ # Subtraction
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ def test_float64_fail(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float64)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ def test_float64_ignore_nan(self):
+ # Ignore ULP differences between various NAN's
+ # Note that MIPS may reverse quiet and signaling nans
+ # so we use the builtin version as a base.
+ offset = np.uint64(0xffffffff)
+ nan1_i64 = np.array(np.nan, dtype=np.float64).view(np.uint64)
+ nan2_i64 = nan1_i64 ^ offset # nan payload on MIPS is all ones.
+ nan1_f64 = nan1_i64.view(np.float64)
+ nan2_f64 = nan2_i64.view(np.float64)
+ assert_array_max_ulp(nan1_f64, nan2_f64, 0)
+
+ def test_float32_pass(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float32)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ def test_float32_fail(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float32)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ def test_float32_ignore_nan(self):
+ # Ignore ULP differences between various NAN's
+ # Note that MIPS may reverse quiet and signaling nans
+ # so we use the builtin version as a base.
+ offset = np.uint32(0xffff)
+ nan1_i32 = np.array(np.nan, dtype=np.float32).view(np.uint32)
+ nan2_i32 = nan1_i32 ^ offset # nan payload on MIPS is all ones.
+ nan1_f32 = nan1_i32.view(np.float32)
+ nan2_f32 = nan2_i32.view(np.float32)
+ assert_array_max_ulp(nan1_f32, nan2_f32, 0)
+
+ def test_float16_pass(self):
+ nulp = 5
+ x = np.linspace(-4, 4, 10, dtype=np.float16)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp/2.
+ assert_array_almost_equal_nulp(x, y, nulp)
+
+ def test_float16_fail(self):
+ nulp = 5
+ x = np.linspace(-4, 4, 10, dtype=np.float16)
+ x = 10**x
+ x = np.r_[-x, x]
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ x, y, nulp)
+
+ def test_float16_ignore_nan(self):
+ # Ignore ULP differences between various NAN's
+ # Note that MIPS may reverse quiet and signaling nans
+ # so we use the builtin version as a base.
+ offset = np.uint16(0xff)
+ nan1_i16 = np.array(np.nan, dtype=np.float16).view(np.uint16)
+ nan2_i16 = nan1_i16 ^ offset # nan payload on MIPS is all ones.
+ nan1_f16 = nan1_i16.view(np.float16)
+ nan2_f16 = nan2_i16.view(np.float16)
+ assert_array_max_ulp(nan1_f16, nan2_f16, 0)
+
+ def test_complex128_pass(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float64)
+ x = 10**x
+ x = np.r_[-x, x]
+ xi = x + x*1j
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp/2.
+ assert_array_almost_equal_nulp(xi, x + y*1j, nulp)
+ assert_array_almost_equal_nulp(xi, y + x*1j, nulp)
+ # The test condition needs to be at least a factor of sqrt(2) smaller
+ # because the real and imaginary parts both change
+ y = x + x*eps*nulp/4.
+ assert_array_almost_equal_nulp(xi, y + y*1j, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp/2.
+ assert_array_almost_equal_nulp(xi, x + y*1j, nulp)
+ assert_array_almost_equal_nulp(xi, y + x*1j, nulp)
+ y = x - x*epsneg*nulp/4.
+ assert_array_almost_equal_nulp(xi, y + y*1j, nulp)
+
+ def test_complex128_fail(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float64)
+ x = 10**x
+ x = np.r_[-x, x]
+ xi = x + x*1j
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, x + y*1j, nulp)
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + x*1j, nulp)
+ # The test condition needs to be at least a factor of sqrt(2) smaller
+ # because the real and imaginary parts both change
+ y = x + x*eps*nulp
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + y*1j, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, x + y*1j, nulp)
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + x*1j, nulp)
+ y = x - x*epsneg*nulp
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + y*1j, nulp)
+
+ def test_complex64_pass(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float32)
+ x = 10**x
+ x = np.r_[-x, x]
+ xi = x + x*1j
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp/2.
+ assert_array_almost_equal_nulp(xi, x + y*1j, nulp)
+ assert_array_almost_equal_nulp(xi, y + x*1j, nulp)
+ y = x + x*eps*nulp/4.
+ assert_array_almost_equal_nulp(xi, y + y*1j, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp/2.
+ assert_array_almost_equal_nulp(xi, x + y*1j, nulp)
+ assert_array_almost_equal_nulp(xi, y + x*1j, nulp)
+ y = x - x*epsneg*nulp/4.
+ assert_array_almost_equal_nulp(xi, y + y*1j, nulp)
+
+ def test_complex64_fail(self):
+ nulp = 5
+ x = np.linspace(-20, 20, 50, dtype=np.float32)
+ x = 10**x
+ x = np.r_[-x, x]
+ xi = x + x*1j
+
+ eps = np.finfo(x.dtype).eps
+ y = x + x*eps*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, x + y*1j, nulp)
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + x*1j, nulp)
+ y = x + x*eps*nulp
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + y*1j, nulp)
+
+ epsneg = np.finfo(x.dtype).epsneg
+ y = x - x*epsneg*nulp*2.
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, x + y*1j, nulp)
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + x*1j, nulp)
+ y = x - x*epsneg*nulp
+ assert_raises(AssertionError, assert_array_almost_equal_nulp,
+ xi, y + y*1j, nulp)
+
+
+class TestULP:
+
+ def test_equal(self):
+ x = np.random.randn(10)
+ assert_array_max_ulp(x, x, maxulp=0)
+
+ def test_single(self):
+ # Generate 1 + small deviation, check that adding eps gives a few UNL
+ x = np.ones(10).astype(np.float32)
+ x += 0.01 * np.random.randn(10).astype(np.float32)
+ eps = np.finfo(np.float32).eps
+ assert_array_max_ulp(x, x+eps, maxulp=20)
+
+ def test_double(self):
+ # Generate 1 + small deviation, check that adding eps gives a few UNL
+ x = np.ones(10).astype(np.float64)
+ x += 0.01 * np.random.randn(10).astype(np.float64)
+ eps = np.finfo(np.float64).eps
+ assert_array_max_ulp(x, x+eps, maxulp=200)
+
+ def test_inf(self):
+ for dt in [np.float32, np.float64]:
+ inf = np.array([np.inf]).astype(dt)
+ big = np.array([np.finfo(dt).max])
+ assert_array_max_ulp(inf, big, maxulp=200)
+
+ def test_nan(self):
+ # Test that nan is 'far' from small, tiny, inf, max and min
+ for dt in [np.float32, np.float64]:
+ if dt == np.float32:
+ maxulp = 1e6
+ else:
+ maxulp = 1e12
+ inf = np.array([np.inf]).astype(dt)
+ nan = np.array([np.nan]).astype(dt)
+ big = np.array([np.finfo(dt).max])
+ tiny = np.array([np.finfo(dt).tiny])
+ zero = np.array([0.0]).astype(dt)
+ nzero = np.array([-0.0]).astype(dt)
+ assert_raises(AssertionError,
+ lambda: assert_array_max_ulp(nan, inf,
+ maxulp=maxulp))
+ assert_raises(AssertionError,
+ lambda: assert_array_max_ulp(nan, big,
+ maxulp=maxulp))
+ assert_raises(AssertionError,
+ lambda: assert_array_max_ulp(nan, tiny,
+ maxulp=maxulp))
+ assert_raises(AssertionError,
+ lambda: assert_array_max_ulp(nan, zero,
+ maxulp=maxulp))
+ assert_raises(AssertionError,
+ lambda: assert_array_max_ulp(nan, nzero,
+ maxulp=maxulp))
+
+
+class TestStringEqual:
+ def test_simple(self):
+ assert_string_equal("hello", "hello")
+ assert_string_equal("hello\nmultiline", "hello\nmultiline")
+
+ with pytest.raises(AssertionError) as exc_info:
+ assert_string_equal("foo\nbar", "hello\nbar")
+ msg = str(exc_info.value)
+ assert_equal(msg, "Differences in strings:\n- foo\n+ hello")
+
+ assert_raises(AssertionError,
+ lambda: assert_string_equal("foo", "hello"))
+
+ def test_regex(self):
+ assert_string_equal("a+*b", "a+*b")
+
+ assert_raises(AssertionError,
+ lambda: assert_string_equal("aaa", "a+b"))
+
+
+def assert_warn_len_equal(mod, n_in_context):
+ try:
+ mod_warns = mod.__warningregistry__
+ except AttributeError:
+ # the lack of a __warningregistry__
+ # attribute means that no warning has
+ # occurred; this can be triggered in
+ # a parallel test scenario, while in
+ # a serial test scenario an initial
+ # warning (and therefore the attribute)
+ # are always created first
+ mod_warns = {}
+
+ num_warns = len(mod_warns)
+
+ if 'version' in mod_warns:
+ # Python 3 adds a 'version' entry to the registry,
+ # do not count it.
+ num_warns -= 1
+
+ assert_equal(num_warns, n_in_context)
+
+
+def test_warn_len_equal_call_scenarios():
+ # assert_warn_len_equal is called under
+ # varying circumstances depending on serial
+ # vs. parallel test scenarios; this test
+ # simply aims to probe both code paths and
+ # check that no assertion is uncaught
+
+ # parallel scenario -- no warning issued yet
+ class mod:
+ pass
+
+ mod_inst = mod()
+
+ assert_warn_len_equal(mod=mod_inst,
+ n_in_context=0)
+
+ # serial test scenario -- the __warningregistry__
+ # attribute should be present
+ class mod:
+ def __init__(self):
+ self.__warningregistry__ = {'warning1': 1,
+ 'warning2': 2}
+
+ mod_inst = mod()
+ assert_warn_len_equal(mod=mod_inst,
+ n_in_context=2)
+
+
+def _get_fresh_mod():
+ # Get this module, with warning registry empty
+ my_mod = sys.modules[__name__]
+ try:
+ my_mod.__warningregistry__.clear()
+ except AttributeError:
+ # will not have a __warningregistry__ unless warning has been
+ # raised in the module at some point
+ pass
+ return my_mod
+
+
+def test_clear_and_catch_warnings():
+ # Initial state of module, no warnings
+ my_mod = _get_fresh_mod()
+ assert_equal(getattr(my_mod, '__warningregistry__', {}), {})
+ with clear_and_catch_warnings(modules=[my_mod]):
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+ assert_equal(my_mod.__warningregistry__, {})
+ # Without specified modules, don't clear warnings during context.
+ # catch_warnings doesn't make an entry for 'ignore'.
+ with clear_and_catch_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+
+ # Manually adding two warnings to the registry:
+ my_mod.__warningregistry__ = {'warning1': 1,
+ 'warning2': 2}
+
+ # Confirm that specifying module keeps old warning, does not add new
+ with clear_and_catch_warnings(modules=[my_mod]):
+ warnings.simplefilter('ignore')
+ warnings.warn('Another warning')
+ assert_warn_len_equal(my_mod, 2)
+
+ # Another warning, no module spec it clears up registry
+ with clear_and_catch_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Another warning')
+ assert_warn_len_equal(my_mod, 0)
+
+
+def test_suppress_warnings_module():
+ # Initial state of module, no warnings
+ my_mod = _get_fresh_mod()
+ assert_equal(getattr(my_mod, '__warningregistry__', {}), {})
+
+ def warn_other_module():
+ # Apply along axis is implemented in python; stacklevel=2 means
+ # we end up inside its module, not ours.
+ def warn(arr):
+ warnings.warn("Some warning 2", stacklevel=2)
+ return arr
+ np.apply_along_axis(warn, 0, [0])
+
+ # Test module based warning suppression:
+ assert_warn_len_equal(my_mod, 0)
+ with suppress_warnings() as sup:
+ sup.record(UserWarning)
+ # suppress warning from other module (may have .pyc ending),
+ # if apply_along_axis is moved, had to be changed.
+ sup.filter(module=np.lib._shape_base_impl)
+ warnings.warn("Some warning")
+ warn_other_module()
+ # Check that the suppression did test the file correctly (this module
+ # got filtered)
+ assert_equal(len(sup.log), 1)
+ assert_equal(sup.log[0].message.args[0], "Some warning")
+ assert_warn_len_equal(my_mod, 0)
+ sup = suppress_warnings()
+ # Will have to be changed if apply_along_axis is moved:
+ sup.filter(module=my_mod)
+ with sup:
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+ # And test repeat works:
+ sup.filter(module=my_mod)
+ with sup:
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+
+ # Without specified modules
+ with suppress_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+
+
+def test_suppress_warnings_type():
+ # Initial state of module, no warnings
+ my_mod = _get_fresh_mod()
+ assert_equal(getattr(my_mod, '__warningregistry__', {}), {})
+
+ # Test module based warning suppression:
+ with suppress_warnings() as sup:
+ sup.filter(UserWarning)
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+ sup = suppress_warnings()
+ sup.filter(UserWarning)
+ with sup:
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+ # And test repeat works:
+ sup.filter(module=my_mod)
+ with sup:
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+
+ # Without specified modules
+ with suppress_warnings():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+ assert_warn_len_equal(my_mod, 0)
+
+
+def test_suppress_warnings_decorate_no_record():
+ sup = suppress_warnings()
+ sup.filter(UserWarning)
+
+ @sup
+ def warn(category):
+ warnings.warn('Some warning', category)
+
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter("always")
+ warn(UserWarning) # should be suppressed
+ warn(RuntimeWarning)
+ assert_equal(len(w), 1)
+
+
+def test_suppress_warnings_record():
+ sup = suppress_warnings()
+ log1 = sup.record()
+
+ with sup:
+ log2 = sup.record(message='Some other warning 2')
+ sup.filter(message='Some warning')
+ warnings.warn('Some warning')
+ warnings.warn('Some other warning')
+ warnings.warn('Some other warning 2')
+
+ assert_equal(len(sup.log), 2)
+ assert_equal(len(log1), 1)
+ assert_equal(len(log2), 1)
+ assert_equal(log2[0].message.args[0], 'Some other warning 2')
+
+ # Do it again, with the same context to see if some warnings survived:
+ with sup:
+ log2 = sup.record(message='Some other warning 2')
+ sup.filter(message='Some warning')
+ warnings.warn('Some warning')
+ warnings.warn('Some other warning')
+ warnings.warn('Some other warning 2')
+
+ assert_equal(len(sup.log), 2)
+ assert_equal(len(log1), 1)
+ assert_equal(len(log2), 1)
+ assert_equal(log2[0].message.args[0], 'Some other warning 2')
+
+ # Test nested:
+ with suppress_warnings() as sup:
+ sup.record()
+ with suppress_warnings() as sup2:
+ sup2.record(message='Some warning')
+ warnings.warn('Some warning')
+ warnings.warn('Some other warning')
+ assert_equal(len(sup2.log), 1)
+ assert_equal(len(sup.log), 1)
+
+
+def test_suppress_warnings_forwarding():
+ def warn_other_module():
+ # Apply along axis is implemented in python; stacklevel=2 means
+ # we end up inside its module, not ours.
+ def warn(arr):
+ warnings.warn("Some warning", stacklevel=2)
+ return arr
+ np.apply_along_axis(warn, 0, [0])
+
+ with suppress_warnings() as sup:
+ sup.record()
+ with suppress_warnings("always"):
+ for i in range(2):
+ warnings.warn("Some warning")
+
+ assert_equal(len(sup.log), 2)
+
+ with suppress_warnings() as sup:
+ sup.record()
+ with suppress_warnings("location"):
+ for i in range(2):
+ warnings.warn("Some warning")
+ warnings.warn("Some warning")
+
+ assert_equal(len(sup.log), 2)
+
+ with suppress_warnings() as sup:
+ sup.record()
+ with suppress_warnings("module"):
+ for i in range(2):
+ warnings.warn("Some warning")
+ warnings.warn("Some warning")
+ warn_other_module()
+
+ assert_equal(len(sup.log), 2)
+
+ with suppress_warnings() as sup:
+ sup.record()
+ with suppress_warnings("once"):
+ for i in range(2):
+ warnings.warn("Some warning")
+ warnings.warn("Some other warning")
+ warn_other_module()
+
+ assert_equal(len(sup.log), 2)
+
+
+def test_tempdir():
+ with tempdir() as tdir:
+ fpath = os.path.join(tdir, 'tmp')
+ with open(fpath, 'w'):
+ pass
+ assert_(not os.path.isdir(tdir))
+
+ raised = False
+ try:
+ with tempdir() as tdir:
+ raise ValueError
+ except ValueError:
+ raised = True
+ assert_(raised)
+ assert_(not os.path.isdir(tdir))
+
+
+def test_temppath():
+ with temppath() as fpath:
+ with open(fpath, 'w'):
+ pass
+ assert_(not os.path.isfile(fpath))
+
+ raised = False
+ try:
+ with temppath() as fpath:
+ raise ValueError
+ except ValueError:
+ raised = True
+ assert_(raised)
+ assert_(not os.path.isfile(fpath))
+
+
+class my_cacw(clear_and_catch_warnings):
+
+ class_modules = (sys.modules[__name__],)
+
+
+def test_clear_and_catch_warnings_inherit():
+ # Test can subclass and add default modules
+ my_mod = _get_fresh_mod()
+ with my_cacw():
+ warnings.simplefilter('ignore')
+ warnings.warn('Some warning')
+ assert_equal(my_mod.__warningregistry__, {})
+
+
+@pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")
+class TestAssertNoGcCycles:
+ """ Test assert_no_gc_cycles """
+
+ def test_passes(self):
+ def no_cycle():
+ b = []
+ b.append([])
+ return b
+
+ with assert_no_gc_cycles():
+ no_cycle()
+
+ assert_no_gc_cycles(no_cycle)
+
+ def test_asserts(self):
+ def make_cycle():
+ a = []
+ a.append(a)
+ a.append(a)
+ return a
+
+ with assert_raises(AssertionError):
+ with assert_no_gc_cycles():
+ make_cycle()
+
+ with assert_raises(AssertionError):
+ assert_no_gc_cycles(make_cycle)
+
+ @pytest.mark.slow
+ def test_fails(self):
+ """
+ Test that in cases where the garbage cannot be collected, we raise an
+ error, instead of hanging forever trying to clear it.
+ """
+
+ class ReferenceCycleInDel:
+ """
+ An object that not only contains a reference cycle, but creates new
+ cycles whenever it's garbage-collected and its __del__ runs
+ """
+ make_cycle = True
+
+ def __init__(self):
+ self.cycle = self
+
+ def __del__(self):
+ # break the current cycle so that `self` can be freed
+ self.cycle = None
+
+ if ReferenceCycleInDel.make_cycle:
+ # but create a new one so that the garbage collector has more
+ # work to do.
+ ReferenceCycleInDel()
+
+ try:
+ w = weakref.ref(ReferenceCycleInDel())
+ try:
+ with assert_raises(RuntimeError):
+ # this will be unable to get a baseline empty garbage
+ assert_no_gc_cycles(lambda: None)
+ except AssertionError:
+ # the above test is only necessary if the GC actually tried to free
+ # our object anyway, which python 2.7 does not.
+ if w() is not None:
+ pytest.skip("GC does not call __del__ on cyclic objects")
+ raise
+
+ finally:
+ # make sure that we stop creating reference cycles
+ ReferenceCycleInDel.make_cycle = False
+
+
+@pytest.mark.parametrize('assert_func', [assert_array_equal,
+ assert_array_almost_equal])
+def test_xy_rename(assert_func):
+ # Test that keywords `x` and `y` have been renamed to `actual` and
+ # `desired`, respectively. These tests and use of `_rename_parameter`
+ # decorator can be removed before the release of NumPy 2.2.0.
+ assert_func(1, 1)
+ assert_func(actual=1, desired=1)
+
+ assert_message = "Arrays are not..."
+ with pytest.raises(AssertionError, match=assert_message):
+ assert_func(1, 2)
+ with pytest.raises(AssertionError, match=assert_message):
+ assert_func(actual=1, desired=2)
+
+ dep_message = 'Use of keyword argument...'
+ with pytest.warns(DeprecationWarning, match=dep_message):
+ assert_func(x=1, desired=1)
+ with pytest.warns(DeprecationWarning, match=dep_message):
+ assert_func(1, y=1)
+
+ type_message = '...got multiple values for argument'
+ with (pytest.warns(DeprecationWarning, match=dep_message),
+ pytest.raises(TypeError, match=type_message)):
+ assert_func(1, x=1)
+ assert_func(1, 2, y=2)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test__all__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test__all__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e44bda3d58ab92e614905f6f20f102242d6d6b0c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test__all__.py
@@ -0,0 +1,9 @@
+
+import collections
+import numpy as np
+
+
+def test_no_duplicates_in_np__all__():
+ # Regression test for gh-10198.
+ dups = {k: v for k, v in collections.Counter(np.__all__).items() if v > 1}
+ assert len(dups) == 0
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_configtool.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_configtool.py
new file mode 100644
index 0000000000000000000000000000000000000000..5215057f644a5573a0ef8938f19f9876b04de2c1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_configtool.py
@@ -0,0 +1,43 @@
+import os
+import subprocess
+import sysconfig
+
+import pytest
+import numpy as np
+
+from numpy.testing import IS_WASM
+
+
+is_editable = not bool(np.__path__)
+numpy_in_sitepackages = sysconfig.get_path('platlib') in np.__file__
+# We only expect to have a `numpy-config` available if NumPy was installed via
+# a build frontend (and not `spin` for example)
+if not (numpy_in_sitepackages or is_editable):
+ pytest.skip("`numpy-config` not expected to be installed",
+ allow_module_level=True)
+
+
+def check_numpyconfig(arg):
+ p = subprocess.run(['numpy-config', arg], capture_output=True, text=True)
+ p.check_returncode()
+ return p.stdout.strip()
+
+@pytest.mark.skipif(IS_WASM, reason="wasm interpreter cannot start subprocess")
+def test_configtool_version():
+ stdout = check_numpyconfig('--version')
+ assert stdout == np.__version__
+
+@pytest.mark.skipif(IS_WASM, reason="wasm interpreter cannot start subprocess")
+def test_configtool_cflags():
+ stdout = check_numpyconfig('--cflags')
+ assert stdout.endswith(os.path.join('numpy', '_core', 'include'))
+
+@pytest.mark.skipif(IS_WASM, reason="wasm interpreter cannot start subprocess")
+def test_configtool_pkgconfigdir():
+ stdout = check_numpyconfig('--pkgconfigdir')
+ assert stdout.endswith(os.path.join('numpy', '_core', 'lib', 'pkgconfig'))
+
+ if not is_editable:
+ # Also check that the .pc file actually exists (unless we're using an
+ # editable install, then it'll be hiding in the build dir)
+ assert os.path.exists(os.path.join(stdout, 'numpy.pc'))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_ctypeslib.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_ctypeslib.py
new file mode 100644
index 0000000000000000000000000000000000000000..2fd0c042f2caa7af8922c47d4d7d75ec9df549c0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_ctypeslib.py
@@ -0,0 +1,377 @@
+import sys
+import sysconfig
+import weakref
+from pathlib import Path
+
+import pytest
+
+import numpy as np
+from numpy.ctypeslib import ndpointer, load_library, as_array
+from numpy.testing import assert_, assert_array_equal, assert_raises, assert_equal
+
+try:
+ import ctypes
+except ImportError:
+ ctypes = None
+else:
+ cdll = None
+ test_cdll = None
+ if hasattr(sys, 'gettotalrefcount'):
+ try:
+ cdll = load_library(
+ '_multiarray_umath_d', np._core._multiarray_umath.__file__
+ )
+ except OSError:
+ pass
+ try:
+ test_cdll = load_library(
+ '_multiarray_tests', np._core._multiarray_tests.__file__
+ )
+ except OSError:
+ pass
+ if cdll is None:
+ cdll = load_library(
+ '_multiarray_umath', np._core._multiarray_umath.__file__)
+ if test_cdll is None:
+ test_cdll = load_library(
+ '_multiarray_tests', np._core._multiarray_tests.__file__
+ )
+
+ c_forward_pointer = test_cdll.forward_pointer
+
+
+@pytest.mark.skipif(ctypes is None,
+ reason="ctypes not available in this python")
+@pytest.mark.skipif(sys.platform == 'cygwin',
+ reason="Known to fail on cygwin")
+class TestLoadLibrary:
+ def test_basic(self):
+ loader_path = np._core._multiarray_umath.__file__
+
+ out1 = load_library('_multiarray_umath', loader_path)
+ out2 = load_library(Path('_multiarray_umath'), loader_path)
+ out3 = load_library('_multiarray_umath', Path(loader_path))
+ out4 = load_library(b'_multiarray_umath', loader_path)
+
+ assert isinstance(out1, ctypes.CDLL)
+ assert out1 is out2 is out3 is out4
+
+ def test_basic2(self):
+ # Regression for #801: load_library with a full library name
+ # (including extension) does not work.
+ try:
+ so_ext = sysconfig.get_config_var('EXT_SUFFIX')
+ load_library('_multiarray_umath%s' % so_ext,
+ np._core._multiarray_umath.__file__)
+ except ImportError as e:
+ msg = ("ctypes is not available on this python: skipping the test"
+ " (import error was: %s)" % str(e))
+ print(msg)
+
+
+class TestNdpointer:
+ def test_dtype(self):
+ dt = np.intc
+ p = ndpointer(dtype=dt)
+ assert_(p.from_param(np.array([1], dt)))
+ dt = 'i4')
+ p = ndpointer(dtype=dt)
+ p.from_param(np.array([1], dt))
+ assert_raises(TypeError, p.from_param,
+ np.array([1], dt.newbyteorder('swap')))
+ dtnames = ['x', 'y']
+ dtformats = [np.intc, np.float64]
+ dtdescr = {'names': dtnames, 'formats': dtformats}
+ dt = np.dtype(dtdescr)
+ p = ndpointer(dtype=dt)
+ assert_(p.from_param(np.zeros((10,), dt)))
+ samedt = np.dtype(dtdescr)
+ p = ndpointer(dtype=samedt)
+ assert_(p.from_param(np.zeros((10,), dt)))
+ dt2 = np.dtype(dtdescr, align=True)
+ if dt.itemsize != dt2.itemsize:
+ assert_raises(TypeError, p.from_param, np.zeros((10,), dt2))
+ else:
+ assert_(p.from_param(np.zeros((10,), dt2)))
+
+ def test_ndim(self):
+ p = ndpointer(ndim=0)
+ assert_(p.from_param(np.array(1)))
+ assert_raises(TypeError, p.from_param, np.array([1]))
+ p = ndpointer(ndim=1)
+ assert_raises(TypeError, p.from_param, np.array(1))
+ assert_(p.from_param(np.array([1])))
+ p = ndpointer(ndim=2)
+ assert_(p.from_param(np.array([[1]])))
+
+ def test_shape(self):
+ p = ndpointer(shape=(1, 2))
+ assert_(p.from_param(np.array([[1, 2]])))
+ assert_raises(TypeError, p.from_param, np.array([[1], [2]]))
+ p = ndpointer(shape=())
+ assert_(p.from_param(np.array(1)))
+
+ def test_flags(self):
+ x = np.array([[1, 2], [3, 4]], order='F')
+ p = ndpointer(flags='FORTRAN')
+ assert_(p.from_param(x))
+ p = ndpointer(flags='CONTIGUOUS')
+ assert_raises(TypeError, p.from_param, x)
+ p = ndpointer(flags=x.flags.num)
+ assert_(p.from_param(x))
+ assert_raises(TypeError, p.from_param, np.array([[1, 2], [3, 4]]))
+
+ def test_cache(self):
+ assert_(ndpointer(dtype=np.float64) is ndpointer(dtype=np.float64))
+
+ # shapes are normalized
+ assert_(ndpointer(shape=2) is ndpointer(shape=(2,)))
+
+ # 1.12 <= v < 1.16 had a bug that made these fail
+ assert_(ndpointer(shape=2) is not ndpointer(ndim=2))
+ assert_(ndpointer(ndim=2) is not ndpointer(shape=2))
+
+@pytest.mark.skipif(ctypes is None,
+ reason="ctypes not available on this python installation")
+class TestNdpointerCFunc:
+ def test_arguments(self):
+ """ Test that arguments are coerced from arrays """
+ c_forward_pointer.restype = ctypes.c_void_p
+ c_forward_pointer.argtypes = (ndpointer(ndim=2),)
+
+ c_forward_pointer(np.zeros((2, 3)))
+ # too many dimensions
+ assert_raises(
+ ctypes.ArgumentError, c_forward_pointer, np.zeros((2, 3, 4)))
+
+ @pytest.mark.parametrize(
+ 'dt', [
+ float,
+ np.dtype(dict(
+ formats=['u2')
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_equal(ct, ctypes.c_uint16.__ctype_be__)
+
+ dt = np.dtype('u2')
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_equal(ct, ctypes.c_uint16)
+
+ def test_subarray(self):
+ dt = np.dtype((np.int32, (2, 3)))
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_equal(ct, 2 * (3 * ctypes.c_int32))
+
+ def test_structure(self):
+ dt = np.dtype([
+ ('a', np.uint16),
+ ('b', np.uint32),
+ ])
+
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_(issubclass(ct, ctypes.Structure))
+ assert_equal(ctypes.sizeof(ct), dt.itemsize)
+ assert_equal(ct._fields_, [
+ ('a', ctypes.c_uint16),
+ ('b', ctypes.c_uint32),
+ ])
+
+ def test_structure_aligned(self):
+ dt = np.dtype([
+ ('a', np.uint16),
+ ('b', np.uint32),
+ ], align=True)
+
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_(issubclass(ct, ctypes.Structure))
+ assert_equal(ctypes.sizeof(ct), dt.itemsize)
+ assert_equal(ct._fields_, [
+ ('a', ctypes.c_uint16),
+ ('', ctypes.c_char * 2), # padding
+ ('b', ctypes.c_uint32),
+ ])
+
+ def test_union(self):
+ dt = np.dtype(dict(
+ names=['a', 'b'],
+ offsets=[0, 0],
+ formats=[np.uint16, np.uint32]
+ ))
+
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_(issubclass(ct, ctypes.Union))
+ assert_equal(ctypes.sizeof(ct), dt.itemsize)
+ assert_equal(ct._fields_, [
+ ('a', ctypes.c_uint16),
+ ('b', ctypes.c_uint32),
+ ])
+
+ def test_padded_union(self):
+ dt = np.dtype(dict(
+ names=['a', 'b'],
+ offsets=[0, 0],
+ formats=[np.uint16, np.uint32],
+ itemsize=5,
+ ))
+
+ ct = np.ctypeslib.as_ctypes_type(dt)
+ assert_(issubclass(ct, ctypes.Union))
+ assert_equal(ctypes.sizeof(ct), dt.itemsize)
+ assert_equal(ct._fields_, [
+ ('a', ctypes.c_uint16),
+ ('b', ctypes.c_uint32),
+ ('', ctypes.c_char * 5), # padding
+ ])
+
+ def test_overlapping(self):
+ dt = np.dtype(dict(
+ names=['a', 'b'],
+ offsets=[0, 2],
+ formats=[np.uint32, np.uint32]
+ ))
+ assert_raises(NotImplementedError, np.ctypeslib.as_ctypes_type, dt)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_lazyloading.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_lazyloading.py
new file mode 100644
index 0000000000000000000000000000000000000000..1298fadc5618069776c02f192afcaf742679f860
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_lazyloading.py
@@ -0,0 +1,37 @@
+import sys
+from importlib.util import LazyLoader, find_spec, module_from_spec
+import pytest
+
+
+# Warning raised by _reload_guard() in numpy/__init__.py
+@pytest.mark.filterwarnings("ignore:The NumPy module was reloaded")
+def test_lazy_load():
+ # gh-22045. lazyload doesn't import submodule names into the namespace
+ # muck with sys.modules to test the importing system
+ old_numpy = sys.modules.pop("numpy")
+
+ numpy_modules = {}
+ for mod_name, mod in list(sys.modules.items()):
+ if mod_name[:6] == "numpy.":
+ numpy_modules[mod_name] = mod
+ sys.modules.pop(mod_name)
+
+ try:
+ # create lazy load of numpy as np
+ spec = find_spec("numpy")
+ module = module_from_spec(spec)
+ sys.modules["numpy"] = module
+ loader = LazyLoader(spec.loader)
+ loader.exec_module(module)
+ np = module
+
+ # test a subpackage import
+ from numpy.lib import recfunctions # noqa: F401
+
+ # test triggering the import of the package
+ np.ndarray
+
+ finally:
+ if old_numpy:
+ sys.modules["numpy"] = old_numpy
+ sys.modules.update(numpy_modules)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_matlib.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_matlib.py
new file mode 100644
index 0000000000000000000000000000000000000000..0e93c4848d75432c97189273f4f2e0cbc6c04e20
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_matlib.py
@@ -0,0 +1,58 @@
+import numpy as np
+import numpy.matlib
+from numpy.testing import assert_array_equal, assert_
+
+def test_empty():
+ x = numpy.matlib.empty((2,))
+ assert_(isinstance(x, np.matrix))
+ assert_(x.shape, (1, 2))
+
+def test_ones():
+ assert_array_equal(numpy.matlib.ones((2, 3)),
+ np.matrix([[ 1., 1., 1.],
+ [ 1., 1., 1.]]))
+
+ assert_array_equal(numpy.matlib.ones(2), np.matrix([[ 1., 1.]]))
+
+def test_zeros():
+ assert_array_equal(numpy.matlib.zeros((2, 3)),
+ np.matrix([[ 0., 0., 0.],
+ [ 0., 0., 0.]]))
+
+ assert_array_equal(numpy.matlib.zeros(2), np.matrix([[ 0., 0.]]))
+
+def test_identity():
+ x = numpy.matlib.identity(2, dtype=int)
+ assert_array_equal(x, np.matrix([[1, 0], [0, 1]]))
+
+def test_eye():
+ xc = numpy.matlib.eye(3, k=1, dtype=int)
+ assert_array_equal(xc, np.matrix([[ 0, 1, 0],
+ [ 0, 0, 1],
+ [ 0, 0, 0]]))
+ assert xc.flags.c_contiguous
+ assert not xc.flags.f_contiguous
+
+ xf = numpy.matlib.eye(3, 4, dtype=int, order='F')
+ assert_array_equal(xf, np.matrix([[ 1, 0, 0, 0],
+ [ 0, 1, 0, 0],
+ [ 0, 0, 1, 0]]))
+ assert not xf.flags.c_contiguous
+ assert xf.flags.f_contiguous
+
+def test_rand():
+ x = numpy.matlib.rand(3)
+ # check matrix type, array would have shape (3,)
+ assert_(x.ndim == 2)
+
+def test_randn():
+ x = np.matlib.randn(3)
+ # check matrix type, array would have shape (3,)
+ assert_(x.ndim == 2)
+
+def test_repmat():
+ a1 = np.arange(4)
+ x = numpy.matlib.repmat(a1, 2, 2)
+ y = np.array([[0, 1, 2, 3, 0, 1, 2, 3],
+ [0, 1, 2, 3, 0, 1, 2, 3]])
+ assert_array_equal(x, y)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_config.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..0e225b2bd7b4c0136e813ce8baf1063d4692ba84
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_config.py
@@ -0,0 +1,44 @@
+"""
+Check the numpy config is valid.
+"""
+import numpy as np
+import pytest
+from unittest.mock import patch
+
+pytestmark = pytest.mark.skipif(
+ not hasattr(np.__config__, "_built_with_meson"),
+ reason="Requires Meson builds",
+)
+
+
+class TestNumPyConfigs:
+ REQUIRED_CONFIG_KEYS = [
+ "Compilers",
+ "Machine Information",
+ "Python Information",
+ ]
+
+ @patch("numpy.__config__._check_pyyaml")
+ def test_pyyaml_not_found(self, mock_yaml_importer):
+ mock_yaml_importer.side_effect = ModuleNotFoundError()
+ with pytest.warns(UserWarning):
+ np.show_config()
+
+ def test_dict_mode(self):
+ config = np.show_config(mode="dicts")
+
+ assert isinstance(config, dict)
+ assert all(key in config for key in self.REQUIRED_CONFIG_KEYS), (
+ "Required key missing,"
+ " see index of `False` with `REQUIRED_CONFIG_KEYS`"
+ )
+
+ def test_invalid_mode(self):
+ with pytest.raises(AttributeError):
+ np.show_config(mode="foo")
+
+ def test_warn_to_add_tests(self):
+ assert len(np.__config__.DisplayModes) == 2, (
+ "New mode detected,"
+ " please add UT if applicable and increment this count"
+ )
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_version.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_version.py
new file mode 100644
index 0000000000000000000000000000000000000000..d3abcb92c1c3d8b16651b0d05d47021912915855
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_numpy_version.py
@@ -0,0 +1,54 @@
+"""
+Check the numpy version is valid.
+
+Note that a development version is marked by the presence of 'dev0' or '+'
+in the version string, all else is treated as a release. The version string
+itself is set from the output of ``git describe`` which relies on tags.
+
+Examples
+--------
+
+Valid Development: 1.22.0.dev0 1.22.0.dev0+5-g7999db4df2 1.22.0+5-g7999db4df2
+Valid Release: 1.21.0.rc1, 1.21.0.b1, 1.21.0
+Invalid: 1.22.0.dev, 1.22.0.dev0-5-g7999db4dfB, 1.21.0.d1, 1.21.a
+
+Note that a release is determined by the version string, which in turn
+is controlled by the result of the ``git describe`` command.
+"""
+import re
+
+import numpy as np
+from numpy.testing import assert_
+
+
+def test_valid_numpy_version():
+ # Verify that the numpy version is a valid one (no .post suffix or other
+ # nonsense). See gh-6431 for an issue caused by an invalid version.
+ version_pattern = r"^[0-9]+\.[0-9]+\.[0-9]+(a[0-9]|b[0-9]|rc[0-9])?"
+ dev_suffix = r"(\.dev[0-9]+(\+git[0-9]+\.[0-9a-f]+)?)?"
+ res = re.match(version_pattern + dev_suffix + '$', np.__version__)
+
+ assert_(res is not None, np.__version__)
+
+
+def test_short_version():
+ # Check numpy.short_version actually exists
+ if np.version.release:
+ assert_(np.__version__ == np.version.short_version,
+ "short_version mismatch in release version")
+ else:
+ assert_(np.__version__.split("+")[0] == np.version.short_version,
+ "short_version mismatch in development version")
+
+
+def test_version_module():
+ contents = set([s for s in dir(np.version) if not s.startswith('_')])
+ expected = set([
+ 'full_version',
+ 'git_revision',
+ 'release',
+ 'short_version',
+ 'version',
+ ])
+
+ assert contents == expected
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_public_api.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_public_api.py
new file mode 100644
index 0000000000000000000000000000000000000000..b25818c62d3176026d2a91072bf39e932083b47f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_public_api.py
@@ -0,0 +1,810 @@
+import functools
+import sys
+import sysconfig
+import subprocess
+import pkgutil
+import types
+import importlib
+import inspect
+import warnings
+
+import numpy as np
+import numpy
+from numpy.testing import IS_WASM
+
+import pytest
+
+try:
+ import ctypes
+except ImportError:
+ ctypes = None
+
+
+def check_dir(module, module_name=None):
+ """Returns a mapping of all objects with the wrong __module__ attribute."""
+ if module_name is None:
+ module_name = module.__name__
+ results = {}
+ for name in dir(module):
+ if name == "core":
+ continue
+ item = getattr(module, name)
+ if (hasattr(item, '__module__') and hasattr(item, '__name__')
+ and item.__module__ != module_name):
+ results[name] = item.__module__ + '.' + item.__name__
+ return results
+
+
+def test_numpy_namespace():
+ # We override dir to not show these members
+ allowlist = {
+ 'recarray': 'numpy.rec.recarray',
+ }
+ bad_results = check_dir(np)
+ # pytest gives better error messages with the builtin assert than with
+ # assert_equal
+ assert bad_results == allowlist
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start subprocess")
+@pytest.mark.parametrize('name', ['testing'])
+def test_import_lazy_import(name):
+ """Make sure we can actually use the modules we lazy load.
+
+ While not exported as part of the public API, it was accessible. With the
+ use of __getattr__ and __dir__, this isn't always true It can happen that
+ an infinite recursion may happen.
+
+ This is the only way I found that would force the failure to appear on the
+ badly implemented code.
+
+ We also test for the presence of the lazily imported modules in dir
+
+ """
+ exe = (sys.executable, '-c', "import numpy; numpy." + name)
+ result = subprocess.check_output(exe)
+ assert not result
+
+ # Make sure they are still in the __dir__
+ assert name in dir(np)
+
+
+def test_dir_testing():
+ """Assert that output of dir has only one "testing/tester"
+ attribute without duplicate"""
+ assert len(dir(np)) == len(set(dir(np)))
+
+
+def test_numpy_linalg():
+ bad_results = check_dir(np.linalg)
+ assert bad_results == {}
+
+
+def test_numpy_fft():
+ bad_results = check_dir(np.fft)
+ assert bad_results == {}
+
+
+@pytest.mark.skipif(ctypes is None,
+ reason="ctypes not available in this python")
+def test_NPY_NO_EXPORT():
+ cdll = ctypes.CDLL(np._core._multiarray_tests.__file__)
+ # Make sure an arbitrary NPY_NO_EXPORT function is actually hidden
+ f = getattr(cdll, 'test_not_exported', None)
+ assert f is None, ("'test_not_exported' is mistakenly exported, "
+ "NPY_NO_EXPORT does not work")
+
+
+# Historically NumPy has not used leading underscores for private submodules
+# much. This has resulted in lots of things that look like public modules
+# (i.e. things that can be imported as `import numpy.somesubmodule.somefile`),
+# but were never intended to be public. The PUBLIC_MODULES list contains
+# modules that are either public because they were meant to be, or because they
+# contain public functions/objects that aren't present in any other namespace
+# for whatever reason and therefore should be treated as public.
+#
+# The PRIVATE_BUT_PRESENT_MODULES list contains modules that look public (lack
+# of underscores) but should not be used. For many of those modules the
+# current status is fine. For others it may make sense to work on making them
+# private, to clean up our public API and avoid confusion.
+PUBLIC_MODULES = ['numpy.' + s for s in [
+ "ctypeslib",
+ "dtypes",
+ "exceptions",
+ "f2py",
+ "fft",
+ "lib",
+ "lib.array_utils",
+ "lib.format",
+ "lib.introspect",
+ "lib.mixins",
+ "lib.npyio",
+ "lib.recfunctions", # note: still needs cleaning, was forgotten for 2.0
+ "lib.scimath",
+ "lib.stride_tricks",
+ "linalg",
+ "ma",
+ "ma.extras",
+ "ma.mrecords",
+ "polynomial",
+ "polynomial.chebyshev",
+ "polynomial.hermite",
+ "polynomial.hermite_e",
+ "polynomial.laguerre",
+ "polynomial.legendre",
+ "polynomial.polynomial",
+ "random",
+ "strings",
+ "testing",
+ "testing.overrides",
+ "typing",
+ "typing.mypy_plugin",
+ "version",
+]]
+if sys.version_info < (3, 12):
+ PUBLIC_MODULES += [
+ 'numpy.' + s for s in [
+ "distutils",
+ "distutils.cpuinfo",
+ "distutils.exec_command",
+ "distutils.misc_util",
+ "distutils.log",
+ "distutils.system_info",
+ ]
+ ]
+
+
+
+PUBLIC_ALIASED_MODULES = [
+ "numpy.char",
+ "numpy.emath",
+ "numpy.rec",
+]
+
+
+PRIVATE_BUT_PRESENT_MODULES = ['numpy.' + s for s in [
+ "compat",
+ "compat.py3k",
+ "conftest",
+ "core",
+ "core.multiarray",
+ "core.numeric",
+ "core.umath",
+ "core.arrayprint",
+ "core.defchararray",
+ "core.einsumfunc",
+ "core.fromnumeric",
+ "core.function_base",
+ "core.getlimits",
+ "core.numerictypes",
+ "core.overrides",
+ "core.records",
+ "core.shape_base",
+ "f2py.auxfuncs",
+ "f2py.capi_maps",
+ "f2py.cb_rules",
+ "f2py.cfuncs",
+ "f2py.common_rules",
+ "f2py.crackfortran",
+ "f2py.diagnose",
+ "f2py.f2py2e",
+ "f2py.f90mod_rules",
+ "f2py.func2subr",
+ "f2py.rules",
+ "f2py.symbolic",
+ "f2py.use_rules",
+ "fft.helper",
+ "lib.user_array", # note: not in np.lib, but probably should just be deleted
+ "linalg.lapack_lite",
+ "linalg.linalg",
+ "ma.core",
+ "ma.testutils",
+ "ma.timer_comparison",
+ "matlib",
+ "matrixlib",
+ "matrixlib.defmatrix",
+ "polynomial.polyutils",
+ "random.mtrand",
+ "random.bit_generator",
+ "testing.print_coercion_tables",
+]]
+if sys.version_info < (3, 12):
+ PRIVATE_BUT_PRESENT_MODULES += [
+ 'numpy.' + s for s in [
+ "distutils.armccompiler",
+ "distutils.fujitsuccompiler",
+ "distutils.ccompiler",
+ 'distutils.ccompiler_opt',
+ "distutils.command",
+ "distutils.command.autodist",
+ "distutils.command.bdist_rpm",
+ "distutils.command.build",
+ "distutils.command.build_clib",
+ "distutils.command.build_ext",
+ "distutils.command.build_py",
+ "distutils.command.build_scripts",
+ "distutils.command.build_src",
+ "distutils.command.config",
+ "distutils.command.config_compiler",
+ "distutils.command.develop",
+ "distutils.command.egg_info",
+ "distutils.command.install",
+ "distutils.command.install_clib",
+ "distutils.command.install_data",
+ "distutils.command.install_headers",
+ "distutils.command.sdist",
+ "distutils.conv_template",
+ "distutils.core",
+ "distutils.extension",
+ "distutils.fcompiler",
+ "distutils.fcompiler.absoft",
+ "distutils.fcompiler.arm",
+ "distutils.fcompiler.compaq",
+ "distutils.fcompiler.environment",
+ "distutils.fcompiler.g95",
+ "distutils.fcompiler.gnu",
+ "distutils.fcompiler.hpux",
+ "distutils.fcompiler.ibm",
+ "distutils.fcompiler.intel",
+ "distutils.fcompiler.lahey",
+ "distutils.fcompiler.mips",
+ "distutils.fcompiler.nag",
+ "distutils.fcompiler.none",
+ "distutils.fcompiler.pathf95",
+ "distutils.fcompiler.pg",
+ "distutils.fcompiler.nv",
+ "distutils.fcompiler.sun",
+ "distutils.fcompiler.vast",
+ "distutils.fcompiler.fujitsu",
+ "distutils.from_template",
+ "distutils.intelccompiler",
+ "distutils.lib2def",
+ "distutils.line_endings",
+ "distutils.mingw32ccompiler",
+ "distutils.msvccompiler",
+ "distutils.npy_pkg_config",
+ "distutils.numpy_distribution",
+ "distutils.pathccompiler",
+ "distutils.unixccompiler",
+ ]
+ ]
+
+
+def is_unexpected(name):
+ """Check if this needs to be considered."""
+ if '._' in name or '.tests' in name or '.setup' in name:
+ return False
+
+ if name in PUBLIC_MODULES:
+ return False
+
+ if name in PUBLIC_ALIASED_MODULES:
+ return False
+
+ if name in PRIVATE_BUT_PRESENT_MODULES:
+ return False
+
+ return True
+
+
+if sys.version_info < (3, 12):
+ SKIP_LIST = ["numpy.distutils.msvc9compiler"]
+else:
+ SKIP_LIST = []
+
+
+# suppressing warnings from deprecated modules
+@pytest.mark.filterwarnings("ignore:.*np.compat.*:DeprecationWarning")
+def test_all_modules_are_expected():
+ """
+ Test that we don't add anything that looks like a new public module by
+ accident. Check is based on filenames.
+ """
+
+ modnames = []
+ for _, modname, ispkg in pkgutil.walk_packages(path=np.__path__,
+ prefix=np.__name__ + '.',
+ onerror=None):
+ if is_unexpected(modname) and modname not in SKIP_LIST:
+ # We have a name that is new. If that's on purpose, add it to
+ # PUBLIC_MODULES. We don't expect to have to add anything to
+ # PRIVATE_BUT_PRESENT_MODULES. Use an underscore in the name!
+ modnames.append(modname)
+
+ if modnames:
+ raise AssertionError(f'Found unexpected modules: {modnames}')
+
+
+# Stuff that clearly shouldn't be in the API and is detected by the next test
+# below
+SKIP_LIST_2 = [
+ 'numpy.lib.math',
+ 'numpy.matlib.char',
+ 'numpy.matlib.rec',
+ 'numpy.matlib.emath',
+ 'numpy.matlib.exceptions',
+ 'numpy.matlib.math',
+ 'numpy.matlib.linalg',
+ 'numpy.matlib.fft',
+ 'numpy.matlib.random',
+ 'numpy.matlib.ctypeslib',
+ 'numpy.matlib.ma',
+]
+if sys.version_info < (3, 12):
+ SKIP_LIST_2 += [
+ 'numpy.distutils.log.sys',
+ 'numpy.distutils.log.logging',
+ 'numpy.distutils.log.warnings',
+ ]
+
+
+def test_all_modules_are_expected_2():
+ """
+ Method checking all objects. The pkgutil-based method in
+ `test_all_modules_are_expected` does not catch imports into a namespace,
+ only filenames. So this test is more thorough, and checks this like:
+
+ import .lib.scimath as emath
+
+ To check if something in a module is (effectively) public, one can check if
+ there's anything in that namespace that's a public function/object but is
+ not exposed in a higher-level namespace. For example for a `numpy.lib`
+ submodule::
+
+ mod = np.lib.mixins
+ for obj in mod.__all__:
+ if obj in np.__all__:
+ continue
+ elif obj in np.lib.__all__:
+ continue
+
+ else:
+ print(obj)
+
+ """
+
+ def find_unexpected_members(mod_name):
+ members = []
+ module = importlib.import_module(mod_name)
+ if hasattr(module, '__all__'):
+ objnames = module.__all__
+ else:
+ objnames = dir(module)
+
+ for objname in objnames:
+ if not objname.startswith('_'):
+ fullobjname = mod_name + '.' + objname
+ if isinstance(getattr(module, objname), types.ModuleType):
+ if is_unexpected(fullobjname):
+ if fullobjname not in SKIP_LIST_2:
+ members.append(fullobjname)
+
+ return members
+
+ unexpected_members = find_unexpected_members("numpy")
+ for modname in PUBLIC_MODULES:
+ unexpected_members.extend(find_unexpected_members(modname))
+
+ if unexpected_members:
+ raise AssertionError("Found unexpected object(s) that look like "
+ "modules: {}".format(unexpected_members))
+
+
+def test_api_importable():
+ """
+ Check that all submodules listed higher up in this file can be imported
+
+ Note that if a PRIVATE_BUT_PRESENT_MODULES entry goes missing, it may
+ simply need to be removed from the list (deprecation may or may not be
+ needed - apply common sense).
+ """
+ def check_importable(module_name):
+ try:
+ importlib.import_module(module_name)
+ except (ImportError, AttributeError):
+ return False
+
+ return True
+
+ module_names = []
+ for module_name in PUBLIC_MODULES:
+ if not check_importable(module_name):
+ module_names.append(module_name)
+
+ if module_names:
+ raise AssertionError("Modules in the public API that cannot be "
+ "imported: {}".format(module_names))
+
+ for module_name in PUBLIC_ALIASED_MODULES:
+ try:
+ eval(module_name)
+ except AttributeError:
+ module_names.append(module_name)
+
+ if module_names:
+ raise AssertionError("Modules in the public API that were not "
+ "found: {}".format(module_names))
+
+ with warnings.catch_warnings(record=True) as w:
+ warnings.filterwarnings('always', category=DeprecationWarning)
+ warnings.filterwarnings('always', category=ImportWarning)
+ for module_name in PRIVATE_BUT_PRESENT_MODULES:
+ if not check_importable(module_name):
+ module_names.append(module_name)
+
+ if module_names:
+ raise AssertionError("Modules that are not really public but looked "
+ "public and can not be imported: "
+ "{}".format(module_names))
+
+
+@pytest.mark.xfail(
+ sysconfig.get_config_var("Py_DEBUG") not in (None, 0, "0"),
+ reason=(
+ "NumPy possibly built with `USE_DEBUG=True ./tools/travis-test.sh`, "
+ "which does not expose the `array_api` entry point. "
+ "See https://github.com/numpy/numpy/pull/19800"
+ ),
+)
+def test_array_api_entry_point():
+ """
+ Entry point for Array API implementation can be found with importlib and
+ returns the main numpy namespace.
+ """
+ # For a development install that did not go through meson-python,
+ # the entrypoint will not have been installed. So ensure this test fails
+ # only if numpy is inside site-packages.
+ numpy_in_sitepackages = sysconfig.get_path('platlib') in np.__file__
+
+ eps = importlib.metadata.entry_points()
+ try:
+ xp_eps = eps.select(group="array_api")
+ except AttributeError:
+ # The select interface for entry_points was introduced in py3.10,
+ # deprecating its dict interface. We fallback to dict keys for finding
+ # Array API entry points so that running this test in <=3.9 will
+ # still work - see https://github.com/numpy/numpy/pull/19800.
+ xp_eps = eps.get("array_api", [])
+ if len(xp_eps) == 0:
+ if numpy_in_sitepackages:
+ msg = "No entry points for 'array_api' found"
+ raise AssertionError(msg) from None
+ return
+
+ try:
+ ep = next(ep for ep in xp_eps if ep.name == "numpy")
+ except StopIteration:
+ if numpy_in_sitepackages:
+ msg = "'numpy' not in array_api entry points"
+ raise AssertionError(msg) from None
+ return
+
+ if ep.value == 'numpy.array_api':
+ # Looks like the entrypoint for the current numpy build isn't
+ # installed, but an older numpy is also installed and hence the
+ # entrypoint is pointing to the old (no longer existing) location.
+ # This isn't a problem except for when running tests with `spin` or an
+ # in-place build.
+ return
+
+ xp = ep.load()
+ msg = (
+ f"numpy entry point value '{ep.value}' "
+ "does not point to our Array API implementation"
+ )
+ assert xp is numpy, msg
+
+
+def test_main_namespace_all_dir_coherence():
+ """
+ Checks if `dir(np)` and `np.__all__` are consistent and return
+ the same content, excluding exceptions and private members.
+ """
+ def _remove_private_members(member_set):
+ return {m for m in member_set if not m.startswith('_')}
+
+ def _remove_exceptions(member_set):
+ return member_set.difference({
+ "bool" # included only in __dir__
+ })
+
+ all_members = _remove_private_members(np.__all__)
+ all_members = _remove_exceptions(all_members)
+
+ dir_members = _remove_private_members(np.__dir__())
+ dir_members = _remove_exceptions(dir_members)
+
+ assert all_members == dir_members, (
+ "Members that break symmetry: "
+ f"{all_members.symmetric_difference(dir_members)}"
+ )
+
+
+@pytest.mark.filterwarnings(
+ r"ignore:numpy.core(\.\w+)? is deprecated:DeprecationWarning"
+)
+def test_core_shims_coherence():
+ """
+ Check that all "semi-public" members of `numpy._core` are also accessible
+ from `numpy.core` shims.
+ """
+ import numpy.core as core
+
+ for member_name in dir(np._core):
+ # Skip private and test members. Also if a module is aliased,
+ # no need to add it to np.core
+ if (
+ member_name.startswith("_")
+ or member_name in ["tests", "strings"]
+ or f"numpy.{member_name}" in PUBLIC_ALIASED_MODULES
+ ):
+ continue
+
+ member = getattr(np._core, member_name)
+
+ # np.core is a shim and all submodules of np.core are shims
+ # but we should be able to import everything in those shims
+ # that are available in the "real" modules in np._core
+ if inspect.ismodule(member):
+ submodule = member
+ submodule_name = member_name
+ for submodule_member_name in dir(submodule):
+ # ignore dunder names
+ if submodule_member_name.startswith("__"):
+ continue
+ submodule_member = getattr(submodule, submodule_member_name)
+
+ core_submodule = __import__(
+ f"numpy.core.{submodule_name}",
+ fromlist=[submodule_member_name]
+ )
+
+ assert submodule_member is getattr(
+ core_submodule, submodule_member_name
+ )
+
+ else:
+ assert member is getattr(core, member_name)
+
+
+def test_functions_single_location():
+ """
+ Check that each public function is available from one location only.
+
+ Test performs BFS search traversing NumPy's public API. It flags
+ any function-like object that is accessible from more that one place.
+ """
+ from typing import Any, Callable, Dict, List, Set, Tuple
+ from numpy._core._multiarray_umath import (
+ _ArrayFunctionDispatcher as dispatched_function
+ )
+
+ visited_modules: Set[types.ModuleType] = {np}
+ visited_functions: Set[Callable[..., Any]] = set()
+ # Functions often have `__name__` overridden, therefore we need
+ # to keep track of locations where functions have been found.
+ functions_original_paths: Dict[Callable[..., Any], str] = dict()
+
+ # Here we aggregate functions with more than one location.
+ # It must be empty for the test to pass.
+ duplicated_functions: List[Tuple] = []
+
+ modules_queue = [np]
+
+ while len(modules_queue) > 0:
+
+ module = modules_queue.pop()
+
+ for member_name in dir(module):
+ member = getattr(module, member_name)
+
+ # first check if we got a module
+ if (
+ inspect.ismodule(member) and # it's a module
+ "numpy" in member.__name__ and # inside NumPy
+ not member_name.startswith("_") and # not private
+ "numpy._core" not in member.__name__ and # outside _core
+ # not a legacy or testing module
+ member_name not in ["f2py", "ma", "testing", "tests"] and
+ member not in visited_modules # not visited yet
+ ):
+ modules_queue.append(member)
+ visited_modules.add(member)
+
+ # else check if we got a function-like object
+ elif (
+ inspect.isfunction(member) or
+ isinstance(member, (dispatched_function, np.ufunc))
+ ):
+ if member in visited_functions:
+
+ # skip main namespace functions with aliases
+ if (
+ member.__name__ in [
+ "absolute", # np.abs
+ "arccos", # np.acos
+ "arccosh", # np.acosh
+ "arcsin", # np.asin
+ "arcsinh", # np.asinh
+ "arctan", # np.atan
+ "arctan2", # np.atan2
+ "arctanh", # np.atanh
+ "left_shift", # np.bitwise_left_shift
+ "right_shift", # np.bitwise_right_shift
+ "conjugate", # np.conj
+ "invert", # np.bitwise_not & np.bitwise_invert
+ "remainder", # np.mod
+ "divide", # np.true_divide
+ "concatenate", # np.concat
+ "power", # np.pow
+ "transpose", # np.permute_dims
+ ] and
+ module.__name__ == "numpy"
+ ):
+ continue
+ # skip trimcoef from numpy.polynomial as it is
+ # duplicated by design.
+ if (
+ member.__name__ == "trimcoef" and
+ module.__name__.startswith("numpy.polynomial")
+ ):
+ continue
+
+ # skip ufuncs that are exported in np.strings as well
+ if member.__name__ in (
+ "add",
+ "equal",
+ "not_equal",
+ "greater",
+ "greater_equal",
+ "less",
+ "less_equal",
+ ) and module.__name__ == "numpy.strings":
+ continue
+
+ # numpy.char reexports all numpy.strings functions for
+ # backwards-compatibility
+ if module.__name__ == "numpy.char":
+ continue
+
+ # function is present in more than one location!
+ duplicated_functions.append(
+ (member.__name__,
+ module.__name__,
+ functions_original_paths[member])
+ )
+ else:
+ visited_functions.add(member)
+ functions_original_paths[member] = module.__name__
+
+ del visited_functions, visited_modules, functions_original_paths
+
+ assert len(duplicated_functions) == 0, duplicated_functions
+
+
+def test___module___attribute():
+ modules_queue = [np]
+ visited_modules = {np}
+ visited_functions = set()
+ incorrect_entries = []
+
+ while len(modules_queue) > 0:
+ module = modules_queue.pop()
+ for member_name in dir(module):
+ member = getattr(module, member_name)
+ # first check if we got a module
+ if (
+ inspect.ismodule(member) and # it's a module
+ "numpy" in member.__name__ and # inside NumPy
+ not member_name.startswith("_") and # not private
+ "numpy._core" not in member.__name__ and # outside _core
+ # not in a skip module list
+ member_name not in [
+ "char", "core", "ctypeslib", "f2py", "ma", "lapack_lite",
+ "mrecords", "testing", "tests", "polynomial", "typing",
+ "mtrand", "bit_generator",
+ ] and
+ member not in visited_modules # not visited yet
+ ):
+ modules_queue.append(member)
+ visited_modules.add(member)
+ elif (
+ not inspect.ismodule(member) and
+ hasattr(member, "__name__") and
+ not member.__name__.startswith("_") and
+ member.__module__ != module.__name__ and
+ member not in visited_functions
+ ):
+ # skip ufuncs that are exported in np.strings as well
+ if member.__name__ in (
+ "add", "equal", "not_equal", "greater", "greater_equal",
+ "less", "less_equal",
+ ) and module.__name__ == "numpy.strings":
+ continue
+
+ # recarray and record are exported in np and np.rec
+ if (
+ (member.__name__ == "recarray" and module.__name__ == "numpy") or
+ (member.__name__ == "record" and module.__name__ == "numpy.rec")
+ ):
+ continue
+
+ # skip cdef classes
+ if member.__name__ in (
+ "BitGenerator", "Generator", "MT19937", "PCG64", "PCG64DXSM",
+ "Philox", "RandomState", "SFC64", "SeedSequence",
+ ):
+ continue
+
+ incorrect_entries.append(
+ dict(
+ Func=member.__name__,
+ actual=member.__module__,
+ expected=module.__name__,
+ )
+ )
+ visited_functions.add(member)
+
+ if incorrect_entries:
+ assert len(incorrect_entries) == 0, incorrect_entries
+
+
+def _check___qualname__(obj) -> bool:
+ qualname = obj.__qualname__
+ name = obj.__name__
+ module_name = obj.__module__
+ assert name == qualname.split(".")[-1]
+
+ module = sys.modules[module_name]
+ actual_obj = functools.reduce(getattr, qualname.split("."), module)
+ return (
+ actual_obj is obj or
+ (
+ # for bound methods check qualname match
+ module_name.startswith("numpy.random") and
+ actual_obj.__qualname__ == qualname
+ )
+ )
+
+
+def test___qualname___attribute():
+ modules_queue = [np]
+ visited_modules = {np}
+ visited_functions = set()
+ incorrect_entries = []
+
+ while len(modules_queue) > 0:
+ module = modules_queue.pop()
+ for member_name in dir(module):
+ member = getattr(module, member_name)
+ # first check if we got a module
+ if (
+ inspect.ismodule(member) and # it's a module
+ "numpy" in member.__name__ and # inside NumPy
+ not member_name.startswith("_") and # not private
+ member_name not in [
+ "f2py", "ma", "tests", "testing", "typing",
+ "bit_generator", "ctypeslib", "lapack_lite",
+ ] and # skip modules
+ "numpy._core" not in member.__name__ and # outside _core
+ member not in visited_modules # not visited yet
+ ):
+ modules_queue.append(member)
+ visited_modules.add(member)
+ elif (
+ not inspect.ismodule(member) and
+ hasattr(member, "__name__") and
+ not member.__name__.startswith("_") and
+ not member_name.startswith("_") and
+ not _check___qualname__(member) and
+ member not in visited_functions
+ ):
+ incorrect_entries.append(
+ dict(
+ actual=member.__qualname__, expected=member.__name__,
+ )
+ )
+ visited_functions.add(member)
+
+ if incorrect_entries:
+ assert len(incorrect_entries) == 0, incorrect_entries
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_reloading.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_reloading.py
new file mode 100644
index 0000000000000000000000000000000000000000..22bff7212e59288ffe5179655a23985cd29d3b5c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_reloading.py
@@ -0,0 +1,74 @@
+import sys
+import subprocess
+import textwrap
+from importlib import reload
+import pickle
+
+import pytest
+
+import numpy.exceptions as ex
+from numpy.testing import (
+ assert_raises,
+ assert_warns,
+ assert_,
+ assert_equal,
+ IS_WASM,
+)
+
+
+def test_numpy_reloading():
+ # gh-7844. Also check that relevant globals retain their identity.
+ import numpy as np
+ import numpy._globals
+
+ _NoValue = np._NoValue
+ VisibleDeprecationWarning = ex.VisibleDeprecationWarning
+ ModuleDeprecationWarning = ex.ModuleDeprecationWarning
+
+ with assert_warns(UserWarning):
+ reload(np)
+ assert_(_NoValue is np._NoValue)
+ assert_(ModuleDeprecationWarning is ex.ModuleDeprecationWarning)
+ assert_(VisibleDeprecationWarning is ex.VisibleDeprecationWarning)
+
+ assert_raises(RuntimeError, reload, numpy._globals)
+ with assert_warns(UserWarning):
+ reload(np)
+ assert_(_NoValue is np._NoValue)
+ assert_(ModuleDeprecationWarning is ex.ModuleDeprecationWarning)
+ assert_(VisibleDeprecationWarning is ex.VisibleDeprecationWarning)
+
+def test_novalue():
+ import numpy as np
+ for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
+ assert_equal(repr(np._NoValue), '')
+ assert_(pickle.loads(pickle.dumps(np._NoValue,
+ protocol=proto)) is np._NoValue)
+
+
+@pytest.mark.skipif(IS_WASM, reason="can't start subprocess")
+def test_full_reimport():
+ """At the time of writing this, it is *not* truly supported, but
+ apparently enough users rely on it, for it to be an annoying change
+ when it started failing previously.
+ """
+ # Test within a new process, to ensure that we do not mess with the
+ # global state during the test run (could lead to cryptic test failures).
+ # This is generally unsafe, especially, since we also reload the C-modules.
+ code = textwrap.dedent(r"""
+ import sys
+ from pytest import warns
+ import numpy as np
+
+ for k in list(sys.modules.keys()):
+ if "numpy" in k:
+ del sys.modules[k]
+
+ with warns(UserWarning):
+ import numpy as np
+ """)
+ p = subprocess.run([sys.executable, '-c', code], capture_output=True)
+ if p.returncode:
+ raise AssertionError(
+ f"Non-zero return code: {p.returncode!r}\n\n{p.stderr.decode()}"
+ )
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_scripts.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_scripts.py
new file mode 100644
index 0000000000000000000000000000000000000000..892c04eef0bed4b9d92408419c547f8258a005e3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_scripts.py
@@ -0,0 +1,47 @@
+""" Test scripts
+
+Test that we can run executable scripts that have been installed with numpy.
+"""
+import sys
+import os
+import pytest
+from os.path import join as pathjoin, isfile, dirname
+import subprocess
+
+import numpy as np
+from numpy.testing import assert_equal, IS_WASM
+
+is_inplace = isfile(pathjoin(dirname(np.__file__), '..', 'setup.py'))
+
+
+def find_f2py_commands():
+ if sys.platform == 'win32':
+ exe_dir = dirname(sys.executable)
+ if exe_dir.endswith('Scripts'): # virtualenv
+ return [os.path.join(exe_dir, 'f2py')]
+ else:
+ return [os.path.join(exe_dir, "Scripts", 'f2py')]
+ else:
+ # Three scripts are installed in Unix-like systems:
+ # 'f2py', 'f2py{major}', and 'f2py{major.minor}'. For example,
+ # if installed with python3.9 the scripts would be named
+ # 'f2py', 'f2py3', and 'f2py3.9'.
+ version = sys.version_info
+ major = str(version.major)
+ minor = str(version.minor)
+ return ['f2py', 'f2py' + major, 'f2py' + major + '.' + minor]
+
+
+@pytest.mark.skipif(is_inplace, reason="Cannot test f2py command inplace")
+@pytest.mark.xfail(reason="Test is unreliable")
+@pytest.mark.parametrize('f2py_cmd', find_f2py_commands())
+def test_f2py(f2py_cmd):
+ # test that we can run f2py script
+ stdout = subprocess.check_output([f2py_cmd, '-v'])
+ assert_equal(stdout.strip(), np.__version__.encode('ascii'))
+
+
+@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")
+def test_pep338():
+ stdout = subprocess.check_output([sys.executable, '-mnumpy.f2py', '-v'])
+ assert_equal(stdout.strip(), np.__version__.encode('ascii'))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_warnings.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_warnings.py
new file mode 100644
index 0000000000000000000000000000000000000000..9304c1346cbff578eb57da65f034499cd665ba41
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/tests/test_warnings.py
@@ -0,0 +1,76 @@
+"""
+Tests which scan for certain occurrences in the code, they may not find
+all of these occurrences but should catch almost all.
+"""
+import pytest
+
+from pathlib import Path
+import ast
+import tokenize
+import numpy
+
+class ParseCall(ast.NodeVisitor):
+ def __init__(self):
+ self.ls = []
+
+ def visit_Attribute(self, node):
+ ast.NodeVisitor.generic_visit(self, node)
+ self.ls.append(node.attr)
+
+ def visit_Name(self, node):
+ self.ls.append(node.id)
+
+
+class FindFuncs(ast.NodeVisitor):
+ def __init__(self, filename):
+ super().__init__()
+ self.__filename = filename
+
+ def visit_Call(self, node):
+ p = ParseCall()
+ p.visit(node.func)
+ ast.NodeVisitor.generic_visit(self, node)
+
+ if p.ls[-1] == 'simplefilter' or p.ls[-1] == 'filterwarnings':
+ if node.args[0].value == "ignore":
+ raise AssertionError(
+ "warnings should have an appropriate stacklevel; found in "
+ "{} on line {}".format(self.__filename, node.lineno))
+
+ if p.ls[-1] == 'warn' and (
+ len(p.ls) == 1 or p.ls[-2] == 'warnings'):
+
+ if "testing/tests/test_warnings.py" == self.__filename:
+ # This file
+ return
+
+ # See if stacklevel exists:
+ if len(node.args) == 3:
+ return
+ args = {kw.arg for kw in node.keywords}
+ if "stacklevel" in args:
+ return
+ raise AssertionError(
+ "warnings should have an appropriate stacklevel; found in "
+ "{} on line {}".format(self.__filename, node.lineno))
+
+
+@pytest.mark.slow
+def test_warning_calls():
+ # combined "ignore" and stacklevel error
+ base = Path(numpy.__file__).parent
+
+ for path in base.rglob("*.py"):
+ if base / "testing" in path.parents:
+ continue
+ if path == base / "__init__.py":
+ continue
+ if path == base / "random" / "__init__.py":
+ continue
+ if path == base / "conftest.py":
+ continue
+ # use tokenize to auto-detect encoding on systems where no
+ # default encoding is defined (e.g. LANG='C')
+ with tokenize.open(str(path)) as file:
+ tree = ast.parse(file.read())
+ FindFuncs(path).visit(tree)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..b247921818e27d603dc653098b51f53d8e3187e1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/__init__.py
@@ -0,0 +1,175 @@
+"""
+============================
+Typing (:mod:`numpy.typing`)
+============================
+
+.. versionadded:: 1.20
+
+Large parts of the NumPy API have :pep:`484`-style type annotations. In
+addition a number of type aliases are available to users, most prominently
+the two below:
+
+- `ArrayLike`: objects that can be converted to arrays
+- `DTypeLike`: objects that can be converted to dtypes
+
+.. _typing-extensions: https://pypi.org/project/typing-extensions/
+
+Mypy plugin
+-----------
+
+.. versionadded:: 1.21
+
+.. automodule:: numpy.typing.mypy_plugin
+
+.. currentmodule:: numpy.typing
+
+Differences from the runtime NumPy API
+--------------------------------------
+
+NumPy is very flexible. Trying to describe the full range of
+possibilities statically would result in types that are not very
+helpful. For that reason, the typed NumPy API is often stricter than
+the runtime NumPy API. This section describes some notable
+differences.
+
+ArrayLike
+~~~~~~~~~
+
+The `ArrayLike` type tries to avoid creating object arrays. For
+example,
+
+.. code-block:: python
+
+ >>> np.array(x**2 for x in range(10))
+ array( at ...>, dtype=object)
+
+is valid NumPy code which will create a 0-dimensional object
+array. Type checkers will complain about the above example when using
+the NumPy types however. If you really intended to do the above, then
+you can either use a ``# type: ignore`` comment:
+
+.. code-block:: python
+
+ >>> np.array(x**2 for x in range(10)) # type: ignore
+
+or explicitly type the array like object as `~typing.Any`:
+
+.. code-block:: python
+
+ >>> from typing import Any
+ >>> array_like: Any = (x**2 for x in range(10))
+ >>> np.array(array_like)
+ array( at ...>, dtype=object)
+
+ndarray
+~~~~~~~
+
+It's possible to mutate the dtype of an array at runtime. For example,
+the following code is valid:
+
+.. code-block:: python
+
+ >>> x = np.array([1, 2])
+ >>> x.dtype = np.bool
+
+This sort of mutation is not allowed by the types. Users who want to
+write statically typed code should instead use the `numpy.ndarray.view`
+method to create a view of the array with a different dtype.
+
+DTypeLike
+~~~~~~~~~
+
+The `DTypeLike` type tries to avoid creation of dtype objects using
+dictionary of fields like below:
+
+.. code-block:: python
+
+ >>> x = np.dtype({"field1": (float, 1), "field2": (int, 3)})
+
+Although this is valid NumPy code, the type checker will complain about it,
+since its usage is discouraged.
+Please see : :ref:`Data type objects `
+
+Number precision
+~~~~~~~~~~~~~~~~
+
+The precision of `numpy.number` subclasses is treated as a invariant generic
+parameter (see :class:`~NBitBase`), simplifying the annotating of processes
+involving precision-based casting.
+
+.. code-block:: python
+
+ >>> from typing import TypeVar
+ >>> import numpy as np
+ >>> import numpy.typing as npt
+
+ >>> T = TypeVar("T", bound=npt.NBitBase)
+ >>> def func(a: "np.floating[T]", b: "np.floating[T]") -> "np.floating[T]":
+ ... ...
+
+Consequently, the likes of `~numpy.float16`, `~numpy.float32` and
+`~numpy.float64` are still sub-types of `~numpy.floating`, but, contrary to
+runtime, they're not necessarily considered as sub-classes.
+
+Timedelta64
+~~~~~~~~~~~
+
+The `~numpy.timedelta64` class is not considered a subclass of
+`~numpy.signedinteger`, the former only inheriting from `~numpy.generic`
+while static type checking.
+
+0D arrays
+~~~~~~~~~
+
+During runtime numpy aggressively casts any passed 0D arrays into their
+corresponding `~numpy.generic` instance. Until the introduction of shape
+typing (see :pep:`646`) it is unfortunately not possible to make the
+necessary distinction between 0D and >0D arrays. While thus not strictly
+correct, all operations are that can potentially perform a 0D-array -> scalar
+cast are currently annotated as exclusively returning an `~numpy.ndarray`.
+
+If it is known in advance that an operation *will* perform a
+0D-array -> scalar cast, then one can consider manually remedying the
+situation with either `typing.cast` or a ``# type: ignore`` comment.
+
+Record array dtypes
+~~~~~~~~~~~~~~~~~~~
+
+The dtype of `numpy.recarray`, and the :ref:`routines.array-creation.rec`
+functions in general, can be specified in one of two ways:
+
+* Directly via the ``dtype`` argument.
+* With up to five helper arguments that operate via `numpy.rec.format_parser`:
+ ``formats``, ``names``, ``titles``, ``aligned`` and ``byteorder``.
+
+These two approaches are currently typed as being mutually exclusive,
+*i.e.* if ``dtype`` is specified than one may not specify ``formats``.
+While this mutual exclusivity is not (strictly) enforced during runtime,
+combining both dtype specifiers can lead to unexpected or even downright
+buggy behavior.
+
+API
+---
+
+"""
+# NOTE: The API section will be appended with additional entries
+# further down in this file
+
+from numpy._typing import (
+ ArrayLike,
+ DTypeLike,
+ NBitBase,
+ NDArray,
+)
+
+__all__ = ["ArrayLike", "DTypeLike", "NBitBase", "NDArray"]
+
+if __doc__ is not None:
+ from numpy._typing._add_docstring import _docstrings
+ __doc__ += _docstrings
+ __doc__ += '\n.. autoclass:: numpy.typing.NBitBase\n'
+ del _docstrings
+
+from numpy._pytesttester import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/mypy_plugin.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/mypy_plugin.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce9b0d9582ad164d3c6d2747dc941e841907eba6
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/mypy_plugin.py
@@ -0,0 +1,199 @@
+"""A mypy_ plugin for managing a number of platform-specific annotations.
+Its functionality can be split into three distinct parts:
+
+* Assigning the (platform-dependent) precisions of certain `~numpy.number`
+ subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and
+ `~numpy.longlong`. See the documentation on
+ :ref:`scalar types ` for a comprehensive overview
+ of the affected classes. Without the plugin the precision of all relevant
+ classes will be inferred as `~typing.Any`.
+* Removing all extended-precision `~numpy.number` subclasses that are
+ unavailable for the platform in question. Most notably this includes the
+ likes of `~numpy.float128` and `~numpy.complex256`. Without the plugin *all*
+ extended-precision types will, as far as mypy is concerned, be available
+ to all platforms.
+* Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
+ Without the plugin the type will default to `ctypes.c_int64`.
+
+ .. versionadded:: 1.22
+
+Examples
+--------
+To enable the plugin, one must add it to their mypy `configuration file`_:
+
+.. code-block:: ini
+
+ [mypy]
+ plugins = numpy.typing.mypy_plugin
+
+.. _mypy: https://mypy-lang.org/
+.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html
+
+"""
+
+from __future__ import annotations
+
+from typing import Final, TYPE_CHECKING, Callable
+
+import numpy as np
+
+if TYPE_CHECKING:
+ from collections.abc import Iterable
+
+try:
+ import mypy.types
+ from mypy.types import Type
+ from mypy.plugin import Plugin, AnalyzeTypeContext
+ from mypy.nodes import MypyFile, ImportFrom, Statement
+ from mypy.build import PRI_MED
+
+ _HookFunc = Callable[[AnalyzeTypeContext], Type]
+ MYPY_EX: None | ModuleNotFoundError = None
+except ModuleNotFoundError as ex:
+ MYPY_EX = ex
+
+__all__: list[str] = []
+
+
+def _get_precision_dict() -> dict[str, str]:
+ names = [
+ ("_NBitByte", np.byte),
+ ("_NBitShort", np.short),
+ ("_NBitIntC", np.intc),
+ ("_NBitIntP", np.intp),
+ ("_NBitInt", np.int_),
+ ("_NBitLong", np.long),
+ ("_NBitLongLong", np.longlong),
+
+ ("_NBitHalf", np.half),
+ ("_NBitSingle", np.single),
+ ("_NBitDouble", np.double),
+ ("_NBitLongDouble", np.longdouble),
+ ]
+ ret = {}
+ module = "numpy._typing"
+ for name, typ in names:
+ n: int = 8 * typ().dtype.itemsize
+ ret[f'{module}._nbit.{name}'] = f"{module}._nbit_base._{n}Bit"
+ return ret
+
+
+def _get_extended_precision_list() -> list[str]:
+ extended_names = [
+ "uint128",
+ "uint256",
+ "int128",
+ "int256",
+ "float80",
+ "float96",
+ "float128",
+ "float256",
+ "complex160",
+ "complex192",
+ "complex256",
+ "complex512",
+ ]
+ return [i for i in extended_names if hasattr(np, i)]
+
+def _get_c_intp_name() -> str:
+ # Adapted from `np.core._internal._getintp_ctype`
+ char = np.dtype('n').char
+ if char == 'i':
+ return "c_int"
+ elif char == 'l':
+ return "c_long"
+ elif char == 'q':
+ return "c_longlong"
+ else:
+ return "c_long"
+
+
+#: A dictionary mapping type-aliases in `numpy._typing._nbit` to
+#: concrete `numpy.typing.NBitBase` subclasses.
+_PRECISION_DICT: Final = _get_precision_dict()
+
+#: A list with the names of all extended precision `np.number` subclasses.
+_EXTENDED_PRECISION_LIST: Final = _get_extended_precision_list()
+
+#: The name of the ctypes equivalent of `np.intp`
+_C_INTP: Final = _get_c_intp_name()
+
+
+def _hook(ctx: AnalyzeTypeContext) -> Type:
+ """Replace a type-alias with a concrete ``NBitBase`` subclass."""
+ typ, _, api = ctx
+ name = typ.name.split(".")[-1]
+ name_new = _PRECISION_DICT[f"numpy._typing._nbit.{name}"]
+ return api.named_type(name_new)
+
+
+if TYPE_CHECKING or MYPY_EX is None:
+ def _index(iterable: Iterable[Statement], id: str) -> int:
+ """Identify the first ``ImportFrom`` instance the specified `id`."""
+ for i, value in enumerate(iterable):
+ if getattr(value, "id", None) == id:
+ return i
+ raise ValueError("Failed to identify a `ImportFrom` instance "
+ f"with the following id: {id!r}")
+
+ def _override_imports(
+ file: MypyFile,
+ module: str,
+ imports: list[tuple[str, None | str]],
+ ) -> None:
+ """Override the first `module`-based import with new `imports`."""
+ # Construct a new `from module import y` statement
+ import_obj = ImportFrom(module, 0, names=imports)
+ import_obj.is_top_level = True
+
+ # Replace the first `module`-based import statement with `import_obj`
+ for lst in [file.defs, file.imports]: # type: list[Statement]
+ i = _index(lst, module)
+ lst[i] = import_obj
+
+ class _NumpyPlugin(Plugin):
+ """A mypy plugin for handling versus numpy-specific typing tasks."""
+
+ def get_type_analyze_hook(self, fullname: str) -> None | _HookFunc:
+ """Set the precision of platform-specific `numpy.number`
+ subclasses.
+
+ For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.
+ """
+ if fullname in _PRECISION_DICT:
+ return _hook
+ return None
+
+ def get_additional_deps(
+ self, file: MypyFile
+ ) -> list[tuple[int, str, int]]:
+ """Handle all import-based overrides.
+
+ * Import platform-specific extended-precision `numpy.number`
+ subclasses (*e.g.* `numpy.float96`, `numpy.float128` and
+ `numpy.complex256`).
+ * Import the appropriate `ctypes` equivalent to `numpy.intp`.
+
+ """
+ ret = [(PRI_MED, file.fullname, -1)]
+
+ if file.fullname == "numpy":
+ _override_imports(
+ file, "numpy._typing._extended_precision",
+ imports=[(v, v) for v in _EXTENDED_PRECISION_LIST],
+ )
+ elif file.fullname == "numpy.ctypeslib":
+ _override_imports(
+ file, "ctypes",
+ imports=[(_C_INTP, "_c_intp")],
+ )
+ return ret
+
+ def plugin(version: str) -> type[_NumpyPlugin]:
+ """An entry-point for mypy."""
+ return _NumpyPlugin
+
+else:
+ def plugin(version: str) -> type[_NumpyPlugin]:
+ """An entry-point for mypy."""
+ raise MYPY_EX
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..29f3ab4e28d36b02b537880d4d5656d6cb4e5481
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arithmetic.pyi
@@ -0,0 +1,128 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+b_ = np.bool()
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+AR_b: npt.NDArray[np.bool]
+AR_u: npt.NDArray[np.uint32]
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.longdouble]
+AR_c: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+
+ANY: Any
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_m: list[np.timedelta64]
+AR_LIKE_M: list[np.datetime64]
+
+# Array subtraction
+
+# NOTE: mypys `NoReturn` errors are, unfortunately, not that great
+_1 = AR_b - AR_LIKE_b # E: Need type annotation
+_2 = AR_LIKE_b - AR_b # E: Need type annotation
+AR_i - bytes() # E: No overload variant
+
+AR_f - AR_LIKE_m # E: Unsupported operand types
+AR_f - AR_LIKE_M # E: Unsupported operand types
+AR_c - AR_LIKE_m # E: Unsupported operand types
+AR_c - AR_LIKE_M # E: Unsupported operand types
+
+AR_m - AR_LIKE_f # E: Unsupported operand types
+AR_M - AR_LIKE_f # E: Unsupported operand types
+AR_m - AR_LIKE_c # E: Unsupported operand types
+AR_M - AR_LIKE_c # E: Unsupported operand types
+
+AR_m - AR_LIKE_M # E: Unsupported operand types
+AR_LIKE_m - AR_M # E: Unsupported operand types
+
+# array floor division
+
+AR_M // AR_LIKE_b # E: Unsupported operand types
+AR_M // AR_LIKE_u # E: Unsupported operand types
+AR_M // AR_LIKE_i # E: Unsupported operand types
+AR_M // AR_LIKE_f # E: Unsupported operand types
+AR_M // AR_LIKE_c # E: Unsupported operand types
+AR_M // AR_LIKE_m # E: Unsupported operand types
+AR_M // AR_LIKE_M # E: Unsupported operand types
+
+AR_b // AR_LIKE_M # E: Unsupported operand types
+AR_u // AR_LIKE_M # E: Unsupported operand types
+AR_i // AR_LIKE_M # E: Unsupported operand types
+AR_f // AR_LIKE_M # E: Unsupported operand types
+AR_c // AR_LIKE_M # E: Unsupported operand types
+AR_m // AR_LIKE_M # E: Unsupported operand types
+AR_M // AR_LIKE_M # E: Unsupported operand types
+
+_3 = AR_m // AR_LIKE_b # E: Need type annotation
+AR_m // AR_LIKE_c # E: Unsupported operand types
+
+AR_b // AR_LIKE_m # E: Unsupported operand types
+AR_u // AR_LIKE_m # E: Unsupported operand types
+AR_i // AR_LIKE_m # E: Unsupported operand types
+AR_f // AR_LIKE_m # E: Unsupported operand types
+AR_c // AR_LIKE_m # E: Unsupported operand types
+
+# regression tests for https://github.com/numpy/numpy/issues/28957
+AR_c // 2 # type: ignore[operator]
+AR_c // AR_i # type: ignore[operator]
+AR_c // AR_c # type: ignore[operator]
+
+# Array multiplication
+
+AR_b *= AR_LIKE_u # E: incompatible type
+AR_b *= AR_LIKE_i # E: incompatible type
+AR_b *= AR_LIKE_f # E: incompatible type
+AR_b *= AR_LIKE_c # E: incompatible type
+AR_b *= AR_LIKE_m # E: incompatible type
+
+AR_u *= AR_LIKE_i # E: incompatible type
+AR_u *= AR_LIKE_f # E: incompatible type
+AR_u *= AR_LIKE_c # E: incompatible type
+AR_u *= AR_LIKE_m # E: incompatible type
+
+AR_i *= AR_LIKE_f # E: incompatible type
+AR_i *= AR_LIKE_c # E: incompatible type
+AR_i *= AR_LIKE_m # E: incompatible type
+
+AR_f *= AR_LIKE_c # E: incompatible type
+AR_f *= AR_LIKE_m # E: incompatible type
+
+# Array power
+
+AR_b **= AR_LIKE_b # E: Invalid self argument
+AR_b **= AR_LIKE_u # E: Invalid self argument
+AR_b **= AR_LIKE_i # E: Invalid self argument
+AR_b **= AR_LIKE_f # E: Invalid self argument
+AR_b **= AR_LIKE_c # E: Invalid self argument
+
+AR_u **= AR_LIKE_i # E: incompatible type
+AR_u **= AR_LIKE_f # E: incompatible type
+AR_u **= AR_LIKE_c # E: incompatible type
+
+AR_i **= AR_LIKE_f # E: incompatible type
+AR_i **= AR_LIKE_c # E: incompatible type
+
+AR_f **= AR_LIKE_c # E: incompatible type
+
+# Scalars
+
+b_ - b_ # E: No overload variant
+
+dt + dt # E: Unsupported operand types
+td - dt # E: Unsupported operand types
+td % 1 # E: Unsupported operand types
+td / dt # E: No overload
+td % dt # E: Unsupported operand types
+
+-b_ # E: Unsupported operand type
++b_ # E: Unsupported operand type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..27eefe3c918d87c871d018f5d29246d681ed4033
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_constructors.pyi
@@ -0,0 +1,34 @@
+import numpy as np
+import numpy.typing as npt
+
+a: npt.NDArray[np.float64]
+generator = (i for i in range(10))
+
+np.require(a, requirements=1) # E: No overload variant
+np.require(a, requirements="TEST") # E: incompatible type
+
+np.zeros("test") # E: incompatible type
+np.zeros() # E: require at least one argument
+
+np.ones("test") # E: incompatible type
+np.ones() # E: require at least one argument
+
+np.array(0, float, True) # E: No overload variant
+
+np.linspace(None, 'bob') # E: No overload variant
+np.linspace(0, 2, num=10.0) # E: No overload variant
+np.linspace(0, 2, endpoint='True') # E: No overload variant
+np.linspace(0, 2, retstep=b'False') # E: No overload variant
+np.linspace(0, 2, dtype=0) # E: No overload variant
+np.linspace(0, 2, axis=None) # E: No overload variant
+
+np.logspace(None, 'bob') # E: No overload variant
+np.logspace(0, 2, base=None) # E: No overload variant
+
+np.geomspace(None, 'bob') # E: No overload variant
+
+np.stack(generator) # E: No overload variant
+np.hstack({1, 2}) # E: No overload variant
+np.vstack(1) # E: No overload variant
+
+np.array([1], like=1) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_like.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_like.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a21101a993c768210f0befbba319ca21ca50723b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_like.pyi
@@ -0,0 +1,18 @@
+import numpy as np
+from numpy._typing import ArrayLike
+
+
+class A:
+ pass
+
+
+x1: ArrayLike = (i for i in range(10)) # E: Incompatible types in assignment
+x2: ArrayLike = A() # E: Incompatible types in assignment
+x3: ArrayLike = {1: "foo", 2: "bar"} # E: Incompatible types in assignment
+
+scalar = np.int64(1)
+scalar.__array__(dtype=np.float64) # E: No overload variant
+array = np.array([1])
+array.__array__(dtype=np.float64) # E: No overload variant
+
+array.setfield(np.eye(1), np.int32, (0, 1)) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_pad.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_pad.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2be51a87181dcc14068d7036fe44d1d3cc9d9d6f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/array_pad.pyi
@@ -0,0 +1,6 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+
+np.pad(AR_i8, 2, mode="bob") # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..486c11e79868f8d88ac093d789633ec5fb0953d4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi
@@ -0,0 +1,16 @@
+from collections.abc import Callable
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+AR: npt.NDArray[np.float64]
+func1: Callable[[Any], str]
+func2: Callable[[np.integer], str]
+
+np.array2string(AR, style=None) # E: No overload variant
+np.array2string(AR, legacy="1.14") # E: No overload variant
+np.array2string(AR, sign="*") # E: No overload variant
+np.array2string(AR, floatmode="default") # E: No overload variant
+np.array2string(AR, formatter={"A": func1}) # E: No overload variant
+np.array2string(AR, formatter={"float": func2}) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..00280b3a6a2c523ff0f92ed5f2110a103a2a8740
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/arrayterator.pyi
@@ -0,0 +1,14 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+np.lib.Arrayterator(np.int64()) # E: incompatible type
+ar_iter.shape = (10, 5) # E: is read-only
+ar_iter[None] # E: Invalid index type
+ar_iter[None, 1] # E: Invalid index type
+ar_iter[np.intp()] # E: Invalid index type
+ar_iter[np.intp(), ...] # E: Invalid index type
+ar_iter[AR_i8] # E: Invalid index type
+ar_iter[AR_i8, :] # E: Invalid index type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..13b47c485b417fdf2008f09706b98ed3311bb8f7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi
@@ -0,0 +1,21 @@
+import numpy as np
+
+i8 = np.int64()
+i4 = np.int32()
+u8 = np.uint64()
+b_ = np.bool()
+i = int()
+
+f8 = np.float64()
+
+b_ >> f8 # E: No overload variant
+i8 << f8 # E: No overload variant
+i | f8 # E: Unsupported operand types
+i8 ^ f8 # E: No overload variant
+u8 & f8 # E: No overload variant
+~f8 # E: Unsupported operand type
+# TODO: Certain mixes like i4 << u8 go to float and thus should fail
+
+# mypys' error message for `NoReturn` is unfortunately pretty bad
+# TODO: Re-enable this once we add support for numerical precision for `number`s
+# a = u8 | 0 # E: Need type annotation
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/char.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/char.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..542a273baef54c802d0033019926b7a50861c21f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/char.pyi
@@ -0,0 +1,69 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+
+np.char.equal(AR_U, AR_S) # E: incompatible type
+
+np.char.not_equal(AR_U, AR_S) # E: incompatible type
+
+np.char.greater_equal(AR_U, AR_S) # E: incompatible type
+
+np.char.less_equal(AR_U, AR_S) # E: incompatible type
+
+np.char.greater(AR_U, AR_S) # E: incompatible type
+
+np.char.less(AR_U, AR_S) # E: incompatible type
+
+np.char.encode(AR_S) # E: incompatible type
+np.char.decode(AR_U) # E: incompatible type
+
+np.char.join(AR_U, b"_") # E: incompatible type
+np.char.join(AR_S, "_") # E: incompatible type
+
+np.char.ljust(AR_U, 5, fillchar=b"a") # E: incompatible type
+np.char.ljust(AR_S, 5, fillchar="a") # E: incompatible type
+np.char.rjust(AR_U, 5, fillchar=b"a") # E: incompatible type
+np.char.rjust(AR_S, 5, fillchar="a") # E: incompatible type
+
+np.char.lstrip(AR_U, chars=b"a") # E: incompatible type
+np.char.lstrip(AR_S, chars="a") # E: incompatible type
+np.char.strip(AR_U, chars=b"a") # E: incompatible type
+np.char.strip(AR_S, chars="a") # E: incompatible type
+np.char.rstrip(AR_U, chars=b"a") # E: incompatible type
+np.char.rstrip(AR_S, chars="a") # E: incompatible type
+
+np.char.partition(AR_U, b"a") # E: incompatible type
+np.char.partition(AR_S, "a") # E: incompatible type
+np.char.rpartition(AR_U, b"a") # E: incompatible type
+np.char.rpartition(AR_S, "a") # E: incompatible type
+
+np.char.replace(AR_U, b"_", b"-") # E: incompatible type
+np.char.replace(AR_S, "_", "-") # E: incompatible type
+
+np.char.split(AR_U, b"_") # E: incompatible type
+np.char.split(AR_S, "_") # E: incompatible type
+np.char.rsplit(AR_U, b"_") # E: incompatible type
+np.char.rsplit(AR_S, "_") # E: incompatible type
+
+np.char.count(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.count(AR_S, "a", end=9) # E: incompatible type
+
+np.char.endswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.endswith(AR_S, "a", end=9) # E: incompatible type
+np.char.startswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.startswith(AR_S, "a", end=9) # E: incompatible type
+
+np.char.find(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.find(AR_S, "a", end=9) # E: incompatible type
+np.char.rfind(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.rfind(AR_S, "a", end=9) # E: incompatible type
+
+np.char.index(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.index(AR_S, "a", end=9) # E: incompatible type
+np.char.rindex(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.char.rindex(AR_S, "a", end=9) # E: incompatible type
+
+np.char.isdecimal(AR_S) # E: incompatible type
+np.char.isnumeric(AR_S) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/chararray.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/chararray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e484b644e4b8ec75cdc8ea404a457cf9d1a78b58
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/chararray.pyi
@@ -0,0 +1,61 @@
+import numpy as np
+
+AR_U: np.char.chararray[tuple[int, ...], np.dtype[np.str_]]
+AR_S: np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]]
+
+AR_S.encode() # E: Invalid self argument
+AR_U.decode() # E: Invalid self argument
+
+AR_U.join(b"_") # E: incompatible type
+AR_S.join("_") # E: incompatible type
+
+AR_U.ljust(5, fillchar=b"a") # E: incompatible type
+AR_S.ljust(5, fillchar="a") # E: incompatible type
+AR_U.rjust(5, fillchar=b"a") # E: incompatible type
+AR_S.rjust(5, fillchar="a") # E: incompatible type
+
+AR_U.lstrip(chars=b"a") # E: incompatible type
+AR_S.lstrip(chars="a") # E: incompatible type
+AR_U.strip(chars=b"a") # E: incompatible type
+AR_S.strip(chars="a") # E: incompatible type
+AR_U.rstrip(chars=b"a") # E: incompatible type
+AR_S.rstrip(chars="a") # E: incompatible type
+
+AR_U.partition(b"a") # E: incompatible type
+AR_S.partition("a") # E: incompatible type
+AR_U.rpartition(b"a") # E: incompatible type
+AR_S.rpartition("a") # E: incompatible type
+
+AR_U.replace(b"_", b"-") # E: incompatible type
+AR_S.replace("_", "-") # E: incompatible type
+
+AR_U.split(b"_") # E: incompatible type
+AR_S.split("_") # E: incompatible type
+AR_S.split(1) # E: incompatible type
+AR_U.rsplit(b"_") # E: incompatible type
+AR_S.rsplit("_") # E: incompatible type
+
+AR_U.count(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.count("a", end=9) # E: incompatible type
+
+AR_U.endswith(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.endswith("a", end=9) # E: incompatible type
+AR_U.startswith(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.startswith("a", end=9) # E: incompatible type
+
+AR_U.find(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.find("a", end=9) # E: incompatible type
+AR_U.rfind(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.rfind("a", end=9) # E: incompatible type
+
+AR_U.index(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.index("a", end=9) # E: incompatible type
+AR_U.rindex(b"a", start=[1, 2, 3]) # E: incompatible type
+AR_S.rindex("a", end=9) # E: incompatible type
+
+AR_U == AR_S # E: Unsupported operand types
+AR_U != AR_S # E: Unsupported operand types
+AR_U >= AR_S # E: Unsupported operand types
+AR_U <= AR_S # E: Unsupported operand types
+AR_U > AR_S # E: Unsupported operand types
+AR_U < AR_S # E: Unsupported operand types
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/comparisons.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/comparisons.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1ae8149082b6b726989a1e2dd01933388f49eece
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/comparisons.pyi
@@ -0,0 +1,27 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_c: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+
+AR_f > AR_m # E: Unsupported operand types
+AR_c > AR_m # E: Unsupported operand types
+
+AR_m > AR_f # E: Unsupported operand types
+AR_m > AR_c # E: Unsupported operand types
+
+AR_i > AR_M # E: Unsupported operand types
+AR_f > AR_M # E: Unsupported operand types
+AR_m > AR_M # E: Unsupported operand types
+
+AR_M > AR_i # E: Unsupported operand types
+AR_M > AR_f # E: Unsupported operand types
+AR_M > AR_m # E: Unsupported operand types
+
+AR_i > str() # E: No overload variant
+AR_i > bytes() # E: No overload variant
+str() > AR_M # E: Unsupported operand types
+bytes() > AR_M # E: Unsupported operand types
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/constants.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/constants.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b5d6d27eae46086e8241b276895516f8bad226c5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/constants.pyi
@@ -0,0 +1,3 @@
+import numpy as np
+
+np.little_endian = np.little_endian # E: Cannot assign to final
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/datasource.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/datasource.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..44f4fa27307addb3ee54ebfe840ccbfa1e4cc72d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/datasource.pyi
@@ -0,0 +1,15 @@
+from pathlib import Path
+import numpy as np
+
+path: Path
+d1: np.lib.npyio.DataSource
+
+d1.abspath(path) # E: incompatible type
+d1.abspath(b"...") # E: incompatible type
+
+d1.exists(path) # E: incompatible type
+d1.exists(b"...") # E: incompatible type
+
+d1.open(path, "r") # E: incompatible type
+d1.open(b"...", encoding="utf8") # E: incompatible type
+d1.open(None, newline="/n") # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/dtype.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/dtype.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0f3810f3c014aafac0e149cfc6da0ec38c61f165
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/dtype.pyi
@@ -0,0 +1,20 @@
+import numpy as np
+
+
+class Test1:
+ not_dtype = np.dtype(float)
+
+
+class Test2:
+ dtype = float
+
+
+np.dtype(Test1()) # E: No overload variant of "dtype" matches
+np.dtype(Test2()) # E: incompatible type
+
+np.dtype( # E: No overload variant of "dtype" matches
+ {
+ "field1": (float, 1),
+ "field2": (int, 3),
+ }
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e51f72e47b25b798c9655b749fc01911c824c2dd
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi
@@ -0,0 +1,12 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_m: npt.NDArray[np.timedelta64]
+AR_U: npt.NDArray[np.str_]
+
+np.einsum("i,i->i", AR_i, AR_m) # E: incompatible type
+np.einsum("i,i->i", AR_f, AR_f, dtype=np.int32) # E: incompatible type
+np.einsum("i,i->i", AR_i, AR_i, out=AR_U) # E: Value of type variable "_ArrayType" of "einsum" cannot be
+np.einsum("i,i->i", AR_i, AR_i, out=AR_U, casting="unsafe") # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/flatiter.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/flatiter.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b0c3b023f16b3b36a28421938fe4eda4d411a68b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/flatiter.pyi
@@ -0,0 +1,25 @@
+from typing import Any
+
+import numpy as np
+import numpy._typing as npt
+
+
+class Index:
+ def __index__(self) -> int:
+ ...
+
+
+a: np.flatiter[npt.NDArray[np.float64]]
+supports_array: npt._SupportsArray[np.dtype[np.float64]]
+
+a.base = Any # E: Property "base" defined in "flatiter" is read-only
+a.coords = Any # E: Property "coords" defined in "flatiter" is read-only
+a.index = Any # E: Property "index" defined in "flatiter" is read-only
+a.copy(order='C') # E: Unexpected keyword argument
+
+# NOTE: Contrary to `ndarray.__getitem__` its counterpart in `flatiter`
+# does not accept objects with the `__array__` or `__index__` protocols;
+# boolean indexing is just plain broken (gh-17175)
+a[np.bool()] # E: No overload variant of "__getitem__"
+a[Index()] # E: No overload variant of "__getitem__"
+a[supports_array] # E: No overload variant of "__getitem__"
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..fb666986a7e03fc6eb7aceeba235299ec9bfa14f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi
@@ -0,0 +1,165 @@
+"""Tests for :mod:`numpy._core.fromnumeric`."""
+
+import numpy as np
+import numpy.typing as npt
+
+A = np.array(True, ndmin=2, dtype=bool)
+A.setflags(write=False)
+AR_U: npt.NDArray[np.str_]
+AR_M: npt.NDArray[np.datetime64]
+
+a = np.bool(True)
+
+np.take(a, None) # E: No overload variant
+np.take(a, axis=1.0) # E: No overload variant
+np.take(A, out=1) # E: No overload variant
+np.take(A, mode="bob") # E: No overload variant
+
+np.reshape(a, None) # E: No overload variant
+np.reshape(A, 1, order="bob") # E: No overload variant
+
+np.choose(a, None) # E: No overload variant
+np.choose(a, out=1.0) # E: No overload variant
+np.choose(A, mode="bob") # E: No overload variant
+
+np.repeat(a, None) # E: No overload variant
+np.repeat(A, 1, axis=1.0) # E: No overload variant
+
+np.swapaxes(A, None, 1) # E: No overload variant
+np.swapaxes(A, 1, [0]) # E: No overload variant
+
+np.transpose(A, axes=1.0) # E: No overload variant
+
+np.partition(a, None) # E: No overload variant
+np.partition( # E: No overload variant
+ a, 0, axis="bob"
+)
+np.partition( # E: No overload variant
+ A, 0, kind="bob"
+)
+np.partition(
+ A, 0, order=range(5) # E: Argument "order" to "partition" has incompatible type
+)
+
+np.argpartition(
+ a, None # E: incompatible type
+)
+np.argpartition(
+ a, 0, axis="bob" # E: incompatible type
+)
+np.argpartition(
+ A, 0, kind="bob" # E: incompatible type
+)
+np.argpartition(
+ A, 0, order=range(5) # E: Argument "order" to "argpartition" has incompatible type
+)
+
+np.sort(A, axis="bob") # E: No overload variant
+np.sort(A, kind="bob") # E: No overload variant
+np.sort(A, order=range(5)) # E: Argument "order" to "sort" has incompatible type
+
+np.argsort(A, axis="bob") # E: Argument "axis" to "argsort" has incompatible type
+np.argsort(A, kind="bob") # E: Argument "kind" to "argsort" has incompatible type
+np.argsort(A, order=range(5)) # E: Argument "order" to "argsort" has incompatible type
+
+np.argmax(A, axis="bob") # E: No overload variant of "argmax" matches argument type
+np.argmax(A, kind="bob") # E: No overload variant of "argmax" matches argument type
+
+np.argmin(A, axis="bob") # E: No overload variant of "argmin" matches argument type
+np.argmin(A, kind="bob") # E: No overload variant of "argmin" matches argument type
+
+np.searchsorted( # E: No overload variant of "searchsorted" matches argument type
+ A[0], 0, side="bob"
+)
+np.searchsorted( # E: No overload variant of "searchsorted" matches argument type
+ A[0], 0, sorter=1.0
+)
+
+np.resize(A, 1.0) # E: No overload variant
+
+np.squeeze(A, 1.0) # E: No overload variant of "squeeze" matches argument type
+
+np.diagonal(A, offset=None) # E: No overload variant
+np.diagonal(A, axis1="bob") # E: No overload variant
+np.diagonal(A, axis2=[]) # E: No overload variant
+
+np.trace(A, offset=None) # E: No overload variant
+np.trace(A, axis1="bob") # E: No overload variant
+np.trace(A, axis2=[]) # E: No overload variant
+
+np.ravel(a, order="bob") # E: No overload variant
+
+np.nonzero(0) # E: No overload variant
+
+np.compress( # E: No overload variant
+ [True], A, axis=1.0
+)
+
+np.clip(a, 1, 2, out=1) # E: No overload variant of "clip" matches argument type
+
+np.sum(a, axis=1.0) # E: No overload variant
+np.sum(a, keepdims=1.0) # E: No overload variant
+np.sum(a, initial=[1]) # E: No overload variant
+
+np.all(a, axis=1.0) # E: No overload variant
+np.all(a, keepdims=1.0) # E: No overload variant
+np.all(a, out=1.0) # E: No overload variant
+
+np.any(a, axis=1.0) # E: No overload variant
+np.any(a, keepdims=1.0) # E: No overload variant
+np.any(a, out=1.0) # E: No overload variant
+
+np.cumsum(a, axis=1.0) # E: No overload variant
+np.cumsum(a, dtype=1.0) # E: No overload variant
+np.cumsum(a, out=1.0) # E: No overload variant
+
+np.ptp(a, axis=1.0) # E: No overload variant
+np.ptp(a, keepdims=1.0) # E: No overload variant
+np.ptp(a, out=1.0) # E: No overload variant
+
+np.amax(a, axis=1.0) # E: No overload variant
+np.amax(a, keepdims=1.0) # E: No overload variant
+np.amax(a, out=1.0) # E: No overload variant
+np.amax(a, initial=[1.0]) # E: No overload variant
+np.amax(a, where=[1.0]) # E: incompatible type
+
+np.amin(a, axis=1.0) # E: No overload variant
+np.amin(a, keepdims=1.0) # E: No overload variant
+np.amin(a, out=1.0) # E: No overload variant
+np.amin(a, initial=[1.0]) # E: No overload variant
+np.amin(a, where=[1.0]) # E: incompatible type
+
+np.prod(a, axis=1.0) # E: No overload variant
+np.prod(a, out=False) # E: No overload variant
+np.prod(a, keepdims=1.0) # E: No overload variant
+np.prod(a, initial=int) # E: No overload variant
+np.prod(a, where=1.0) # E: No overload variant
+np.prod(AR_U) # E: incompatible type
+
+np.cumprod(a, axis=1.0) # E: No overload variant
+np.cumprod(a, out=False) # E: No overload variant
+np.cumprod(AR_U) # E: incompatible type
+
+np.size(a, axis=1.0) # E: Argument "axis" to "size" has incompatible type
+
+np.around(a, decimals=1.0) # E: No overload variant
+np.around(a, out=type) # E: No overload variant
+np.around(AR_U) # E: incompatible type
+
+np.mean(a, axis=1.0) # E: No overload variant
+np.mean(a, out=False) # E: No overload variant
+np.mean(a, keepdims=1.0) # E: No overload variant
+np.mean(AR_U) # E: incompatible type
+np.mean(AR_M) # E: incompatible type
+
+np.std(a, axis=1.0) # E: No overload variant
+np.std(a, out=False) # E: No overload variant
+np.std(a, ddof='test') # E: No overload variant
+np.std(a, keepdims=1.0) # E: No overload variant
+np.std(AR_U) # E: incompatible type
+
+np.var(a, axis=1.0) # E: No overload variant
+np.var(a, out=False) # E: No overload variant
+np.var(a, ddof='test') # E: No overload variant
+np.var(a, keepdims=1.0) # E: No overload variant
+np.var(AR_U) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/histograms.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/histograms.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..22499d39175ac4252d6ebc7a8c9c63421d64faee
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/histograms.pyi
@@ -0,0 +1,12 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+np.histogram_bin_edges(AR_i8, range=(0, 1, 2)) # E: incompatible type
+
+np.histogram(AR_i8, range=(0, 1, 2)) # E: incompatible type
+
+np.histogramdd(AR_i8, range=(0, 1)) # E: incompatible type
+np.histogramdd(AR_i8, range=[(0, 1, 2)]) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..22f6f4a61e8e11079e40d3755b0c01200ffdf762
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi
@@ -0,0 +1,14 @@
+import numpy as np
+
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+
+np.ndindex([1, 2, 3]) # E: No overload variant
+np.unravel_index(AR_LIKE_f, (1, 2, 3)) # E: incompatible type
+np.ravel_multi_index(AR_LIKE_i, (1, 2, 3), mode="bob") # E: No overload variant
+np.mgrid[1] # E: Invalid index type
+np.mgrid[...] # E: Invalid index type
+np.ogrid[1] # E: Invalid index type
+np.ogrid[...] # E: Invalid index type
+np.fill_diagonal(AR_LIKE_f, 2) # E: incompatible type
+np.diag_indices(1.0) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..de4e56b07ba1ed189300ae9cbdf585144bb0d880
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_function_base.pyi
@@ -0,0 +1,62 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+AR_b_list: list[npt.NDArray[np.bool]]
+
+def fn_none_i(a: None, /) -> npt.NDArray[Any]: ...
+def fn_ar_i(a: npt.NDArray[np.float64], posarg: int, /) -> npt.NDArray[Any]: ...
+
+np.average(AR_m) # E: incompatible type
+np.select(1, [AR_f8]) # E: incompatible type
+np.angle(AR_m) # E: incompatible type
+np.unwrap(AR_m) # E: incompatible type
+np.unwrap(AR_c16) # E: incompatible type
+np.trim_zeros(1) # E: incompatible type
+np.place(1, [True], 1.5) # E: incompatible type
+np.vectorize(1) # E: incompatible type
+np.place(AR_f8, slice(None), 5) # E: incompatible type
+
+np.piecewise(AR_f8, True, [fn_ar_i], 42) # E: No overload variants
+# TODO: enable these once mypy actually supports ParamSpec (released in 2021)
+# NOTE: pyright correctly reports errors for these (`reportCallIssue`)
+# np.piecewise(AR_f8, AR_b_list, [fn_none_i]) # E: No overload variants
+# np.piecewise(AR_f8, AR_b_list, [fn_ar_i]) # E: No overload variant
+# np.piecewise(AR_f8, AR_b_list, [fn_ar_i], 3.14) # E: No overload variant
+# np.piecewise(AR_f8, AR_b_list, [fn_ar_i], 42, None) # E: No overload variant
+# np.piecewise(AR_f8, AR_b_list, [fn_ar_i], 42, _=None) # E: No overload variant
+
+np.interp(AR_f8, AR_c16, AR_f8) # E: incompatible type
+np.interp(AR_c16, AR_f8, AR_f8) # E: incompatible type
+np.interp(AR_f8, AR_f8, AR_f8, period=AR_c16) # E: No overload variant
+np.interp(AR_f8, AR_f8, AR_O) # E: incompatible type
+
+np.cov(AR_m) # E: incompatible type
+np.cov(AR_O) # E: incompatible type
+np.corrcoef(AR_m) # E: incompatible type
+np.corrcoef(AR_O) # E: incompatible type
+np.corrcoef(AR_f8, bias=True) # E: No overload variant
+np.corrcoef(AR_f8, ddof=2) # E: No overload variant
+np.blackman(1j) # E: incompatible type
+np.bartlett(1j) # E: incompatible type
+np.hanning(1j) # E: incompatible type
+np.hamming(1j) # E: incompatible type
+np.hamming(AR_c16) # E: incompatible type
+np.kaiser(1j, 1) # E: incompatible type
+np.sinc(AR_O) # E: incompatible type
+np.median(AR_M) # E: incompatible type
+
+np.percentile(AR_f8, 50j) # E: No overload variant
+np.percentile(AR_f8, 50, interpolation="bob") # E: No overload variant
+np.quantile(AR_f8, 0.5j) # E: No overload variant
+np.quantile(AR_f8, 0.5, interpolation="bob") # E: No overload variant
+np.meshgrid(AR_f8, AR_f8, indexing="bob") # E: incompatible type
+np.delete(AR_f8, AR_f8) # E: incompatible type
+np.insert(AR_f8, AR_f8, 1.5) # E: incompatible type
+np.digitize(AR_f8, 1j) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e51b6b58e30751bef821a44127e96be71483005b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_polynomial.pyi
@@ -0,0 +1,29 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+AR_U: npt.NDArray[np.str_]
+
+poly_obj: np.poly1d
+
+np.polymul(AR_f8, AR_U) # E: incompatible type
+np.polydiv(AR_f8, AR_U) # E: incompatible type
+
+5**poly_obj # E: No overload variant
+
+np.polyint(AR_U) # E: incompatible type
+np.polyint(AR_f8, m=1j) # E: No overload variant
+
+np.polyder(AR_U) # E: incompatible type
+np.polyder(AR_f8, m=1j) # E: No overload variant
+
+np.polyfit(AR_O, AR_f8, 1) # E: incompatible type
+np.polyfit(AR_f8, AR_f8, 1, rcond=1j) # E: No overload variant
+np.polyfit(AR_f8, AR_f8, 1, w=AR_c16) # E: incompatible type
+np.polyfit(AR_f8, AR_f8, 1, cov="bob") # E: No overload variant
+
+np.polyval(AR_f8, AR_U) # E: incompatible type
+np.polyadd(AR_f8, AR_U) # E: incompatible type
+np.polysub(AR_f8, AR_U) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8b8482eeff6d93510dcabeece5bf7d6f85f627aa
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi
@@ -0,0 +1,3 @@
+import numpy.lib.array_utils as array_utils
+
+array_utils.byte_bounds(1) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_version.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_version.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2758cfe4043883eaaa3651efe726bd31b853e603
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/lib_version.pyi
@@ -0,0 +1,6 @@
+from numpy.lib import NumpyVersion
+
+version: NumpyVersion
+
+NumpyVersion(b"1.8.0") # E: incompatible type
+version >= b"1.8.0" # E: Unsupported operand types
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/linalg.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/linalg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..da9390328bd7ca1ebcab5a1ce0736f7f4df57d96
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/linalg.pyi
@@ -0,0 +1,48 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+AR_O: npt.NDArray[np.object_]
+AR_M: npt.NDArray[np.datetime64]
+
+np.linalg.tensorsolve(AR_O, AR_O) # E: incompatible type
+
+np.linalg.solve(AR_O, AR_O) # E: incompatible type
+
+np.linalg.tensorinv(AR_O) # E: incompatible type
+
+np.linalg.inv(AR_O) # E: incompatible type
+
+np.linalg.matrix_power(AR_M, 5) # E: incompatible type
+
+np.linalg.cholesky(AR_O) # E: incompatible type
+
+np.linalg.qr(AR_O) # E: incompatible type
+np.linalg.qr(AR_f8, mode="bob") # E: No overload variant
+
+np.linalg.eigvals(AR_O) # E: incompatible type
+
+np.linalg.eigvalsh(AR_O) # E: incompatible type
+np.linalg.eigvalsh(AR_O, UPLO="bob") # E: No overload variant
+
+np.linalg.eig(AR_O) # E: incompatible type
+
+np.linalg.eigh(AR_O) # E: incompatible type
+np.linalg.eigh(AR_O, UPLO="bob") # E: No overload variant
+
+np.linalg.svd(AR_O) # E: incompatible type
+
+np.linalg.cond(AR_O) # E: incompatible type
+np.linalg.cond(AR_f8, p="bob") # E: incompatible type
+
+np.linalg.matrix_rank(AR_O) # E: incompatible type
+
+np.linalg.pinv(AR_O) # E: incompatible type
+
+np.linalg.slogdet(AR_O) # E: incompatible type
+
+np.linalg.det(AR_O) # E: incompatible type
+
+np.linalg.norm(AR_f8, ord="bob") # E: No overload variant
+
+np.linalg.multi_dot([AR_M]) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/memmap.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/memmap.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..434870b60e41948afc6fb3f593742deb2cc11e3e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/memmap.pyi
@@ -0,0 +1,5 @@
+import numpy as np
+
+with open("file.txt", "r") as f:
+ np.memmap(f) # E: No overload variant
+np.memmap("test.txt", shape=[10, 5]) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/modules.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/modules.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..541be15b24ae3a20c7ce24d474e9af6adc804c69
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/modules.pyi
@@ -0,0 +1,17 @@
+import numpy as np
+
+np.testing.bob # E: Module has no attribute
+np.bob # E: Module has no attribute
+
+# Stdlib modules in the namespace by accident
+np.warnings # E: Module has no attribute
+np.sys # E: Module has no attribute
+np.os # E: Module "numpy" does not explicitly export
+np.math # E: Module has no attribute
+
+# Public sub-modules that are not imported to their parent module by default;
+# e.g. one must first execute `import numpy.lib.recfunctions`
+np.lib.recfunctions # E: Module has no attribute
+
+np.__deprecated_attrs__ # E: Module has no attribute
+np.__expired_functions__ # E: Module has no attribute
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/multiarray.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/multiarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0ee6c11c6dfff268efd1af3083210d430699f04c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/multiarray.pyi
@@ -0,0 +1,53 @@
+import numpy as np
+import numpy.typing as npt
+
+i8: np.int64
+
+AR_b: npt.NDArray[np.bool]
+AR_u1: npt.NDArray[np.uint8]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_M: npt.NDArray[np.datetime64]
+
+M: np.datetime64
+
+AR_LIKE_f: list[float]
+
+def func(a: int) -> None: ...
+
+np.where(AR_b, 1) # E: No overload variant
+
+np.can_cast(AR_f8, 1) # E: incompatible type
+
+np.vdot(AR_M, AR_M) # E: incompatible type
+
+np.copyto(AR_LIKE_f, AR_f8) # E: incompatible type
+
+np.putmask(AR_LIKE_f, [True, True, False], 1.5) # E: incompatible type
+
+np.packbits(AR_f8) # E: incompatible type
+np.packbits(AR_u1, bitorder=">") # E: incompatible type
+
+np.unpackbits(AR_i8) # E: incompatible type
+np.unpackbits(AR_u1, bitorder=">") # E: incompatible type
+
+np.shares_memory(1, 1, max_work=i8) # E: incompatible type
+np.may_share_memory(1, 1, max_work=i8) # E: incompatible type
+
+np.arange(M) # E: No overload variant
+np.arange(stop=10) # E: No overload variant
+
+np.datetime_data(int) # E: incompatible type
+
+np.busday_offset("2012", 10) # E: No overload variant
+
+np.datetime_as_string("2012") # E: No overload variant
+
+np.char.compare_chararrays("a", b"a", "==", False) # E: No overload variant
+
+np.nested_iters([AR_i8, AR_i8]) # E: Missing positional argument
+np.nested_iters([AR_i8, AR_i8], 0) # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [0]) # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], flags=["test"]) # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_flags=[["test"]]) # E: incompatible type
+np.nested_iters([AR_i8, AR_i8], [[0], [1]], buffersize=1.0) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5ecae02e6178c3ced44031358a6f24047552651e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray.pyi
@@ -0,0 +1,11 @@
+import numpy as np
+
+# Ban setting dtype since mutating the type of the array in place
+# makes having ndarray be generic over dtype impossible. Generally
+# users should use `ndarray.view` in this situation anyway. See
+#
+# https://github.com/numpy/numpy-stubs/issues/7
+#
+# for more context.
+float_array = np.array([1.0])
+float_array.dtype = np.bool # E: Property "dtype" defined in "ndarray" is read-only
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..489aefca7ffcc3d2673f23b80ea5da16742d189e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray_misc.pyi
@@ -0,0 +1,36 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+import numpy as np
+import numpy.typing as npt
+
+f8: np.float64
+AR_f8: npt.NDArray[np.float64]
+AR_M: npt.NDArray[np.datetime64]
+AR_b: npt.NDArray[np.bool]
+
+ctypes_obj = AR_f8.ctypes
+
+f8.argpartition(0) # E: has no attribute
+f8.diagonal() # E: has no attribute
+f8.dot(1) # E: has no attribute
+f8.nonzero() # E: has no attribute
+f8.partition(0) # E: has no attribute
+f8.put(0, 2) # E: has no attribute
+f8.setfield(2, np.float64) # E: has no attribute
+f8.sort() # E: has no attribute
+f8.trace() # E: has no attribute
+
+AR_M.__complex__() # E: Invalid self argument
+AR_b.__index__() # E: Invalid self argument
+
+AR_f8[1.5] # E: No overload variant
+AR_f8["field_a"] # E: No overload variant
+AR_f8[["field_a", "field_b"]] # E: Invalid index type
+
+AR_f8.__array_finalize__(object()) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nditer.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nditer.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1e8e37ee5fe09373a6be5e8a2b2ddb9f84725eb0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nditer.pyi
@@ -0,0 +1,8 @@
+import numpy as np
+
+class Test(np.nditer): ... # E: Cannot inherit from final class
+
+np.nditer([0, 1], flags=["test"]) # E: incompatible type
+np.nditer([0, 1], op_flags=[["test"]]) # E: incompatible type
+np.nditer([0, 1], itershape=(1.0,)) # E: incompatible type
+np.nditer([0, 1], buffersize=1.0) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6301e51769fee30db50bfaf1e2777bf894166de8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi
@@ -0,0 +1,17 @@
+from collections.abc import Sequence
+from numpy._typing import _NestedSequence
+
+a: Sequence[float]
+b: list[complex]
+c: tuple[str, ...]
+d: int
+e: str
+
+def func(a: _NestedSequence[int]) -> None:
+ ...
+
+reveal_type(func(a)) # E: incompatible type
+reveal_type(func(b)) # E: incompatible type
+reveal_type(func(c)) # E: incompatible type
+reveal_type(func(d)) # E: incompatible type
+reveal_type(func(e)) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/npyio.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/npyio.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6ba6a6be17978fbb68a300f2d67c56a22b80a4a8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/npyio.pyi
@@ -0,0 +1,25 @@
+import pathlib
+from typing import IO
+
+import numpy.typing as npt
+import numpy as np
+
+str_path: str
+bytes_path: bytes
+pathlib_path: pathlib.Path
+str_file: IO[str]
+AR_i8: npt.NDArray[np.int64]
+
+np.load(str_file) # E: incompatible type
+
+np.save(bytes_path, AR_i8) # E: No overload variant
+# https://github.com/python/mypy/issues/16111
+# np.save(str_path, AR_i8, fix_imports=True) # W: deprecated
+
+np.savez(bytes_path, AR_i8) # E: incompatible type
+
+np.savez_compressed(bytes_path, AR_i8) # E: incompatible type
+
+np.loadtxt(bytes_path) # E: incompatible type
+
+np.fromregex(bytes_path, ".", np.int64) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..29a3cf30dd959d7e05ce688413741b9ccc0060a3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi
@@ -0,0 +1,5 @@
+import numpy as np
+
+np.isdtype(1, np.int64) # E: incompatible type
+
+np.issubdtype(1, np.int64) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/random.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/random.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..aa1eae4424e2ba07b6f662ccc5e2f523fcb6dcf8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/random.pyi
@@ -0,0 +1,62 @@
+import numpy as np
+import numpy.typing as npt
+
+SEED_FLOAT: float = 457.3
+SEED_ARR_FLOAT: npt.NDArray[np.float64] = np.array([1.0, 2, 3, 4])
+SEED_ARRLIKE_FLOAT: list[float] = [1.0, 2.0, 3.0, 4.0]
+SEED_SEED_SEQ: np.random.SeedSequence = np.random.SeedSequence(0)
+SEED_STR: str = "String seeding not allowed"
+
+# default rng
+np.random.default_rng(SEED_FLOAT) # E: incompatible type
+np.random.default_rng(SEED_ARR_FLOAT) # E: incompatible type
+np.random.default_rng(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.default_rng(SEED_STR) # E: incompatible type
+
+# Seed Sequence
+np.random.SeedSequence(SEED_FLOAT) # E: incompatible type
+np.random.SeedSequence(SEED_ARR_FLOAT) # E: incompatible type
+np.random.SeedSequence(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.SeedSequence(SEED_SEED_SEQ) # E: incompatible type
+np.random.SeedSequence(SEED_STR) # E: incompatible type
+
+seed_seq: np.random.bit_generator.SeedSequence = np.random.SeedSequence()
+seed_seq.spawn(11.5) # E: incompatible type
+seed_seq.generate_state(3.14) # E: incompatible type
+seed_seq.generate_state(3, np.uint8) # E: incompatible type
+seed_seq.generate_state(3, "uint8") # E: incompatible type
+seed_seq.generate_state(3, "u1") # E: incompatible type
+seed_seq.generate_state(3, np.uint16) # E: incompatible type
+seed_seq.generate_state(3, "uint16") # E: incompatible type
+seed_seq.generate_state(3, "u2") # E: incompatible type
+seed_seq.generate_state(3, np.int32) # E: incompatible type
+seed_seq.generate_state(3, "int32") # E: incompatible type
+seed_seq.generate_state(3, "i4") # E: incompatible type
+
+# Bit Generators
+np.random.MT19937(SEED_FLOAT) # E: incompatible type
+np.random.MT19937(SEED_ARR_FLOAT) # E: incompatible type
+np.random.MT19937(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.MT19937(SEED_STR) # E: incompatible type
+
+np.random.PCG64(SEED_FLOAT) # E: incompatible type
+np.random.PCG64(SEED_ARR_FLOAT) # E: incompatible type
+np.random.PCG64(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.PCG64(SEED_STR) # E: incompatible type
+
+np.random.Philox(SEED_FLOAT) # E: incompatible type
+np.random.Philox(SEED_ARR_FLOAT) # E: incompatible type
+np.random.Philox(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.Philox(SEED_STR) # E: incompatible type
+
+np.random.SFC64(SEED_FLOAT) # E: incompatible type
+np.random.SFC64(SEED_ARR_FLOAT) # E: incompatible type
+np.random.SFC64(SEED_ARRLIKE_FLOAT) # E: incompatible type
+np.random.SFC64(SEED_STR) # E: incompatible type
+
+# Generator
+np.random.Generator(None) # E: incompatible type
+np.random.Generator(12333283902830213) # E: incompatible type
+np.random.Generator("OxFEEDF00D") # E: incompatible type
+np.random.Generator([123, 234]) # E: incompatible type
+np.random.Generator(np.array([123, 234], dtype="u4")) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/rec.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/rec.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a57f1ba27d74504ff59232a4a5929ccaf55dd445
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/rec.pyi
@@ -0,0 +1,17 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_i8: npt.NDArray[np.int64]
+
+np.rec.fromarrays(1) # E: No overload variant
+np.rec.fromarrays([1, 2, 3], dtype=[("f8", "f8")], formats=["f8", "f8"]) # E: No overload variant
+
+np.rec.fromrecords(AR_i8) # E: incompatible type
+np.rec.fromrecords([(1.5,)], dtype=[("f8", "f8")], formats=["f8", "f8"]) # E: No overload variant
+
+np.rec.fromstring("string", dtype=[("f8", "f8")]) # E: No overload variant
+np.rec.fromstring(b"bytes") # E: No overload variant
+np.rec.fromstring(b"(1.5,)", dtype=[("f8", "f8")], formats=["f8", "f8"]) # E: No overload variant
+
+with open("test", "r") as f:
+ np.rec.fromfile(f, dtype=[("f8", "f8")]) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/scalars.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/scalars.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e847d8d6c45a0158818aa5f90da756ec36080b5d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/scalars.pyi
@@ -0,0 +1,89 @@
+import sys
+import numpy as np
+
+f2: np.float16
+f8: np.float64
+c8: np.complex64
+
+# Construction
+
+np.float32(3j) # E: incompatible type
+
+# Technically the following examples are valid NumPy code. But they
+# are not considered a best practice, and people who wish to use the
+# stubs should instead do
+#
+# np.array([1.0, 0.0, 0.0], dtype=np.float32)
+# np.array([], dtype=np.complex64)
+#
+# See e.g. the discussion on the mailing list
+#
+# https://mail.python.org/pipermail/numpy-discussion/2020-April/080566.html
+#
+# and the issue
+#
+# https://github.com/numpy/numpy-stubs/issues/41
+#
+# for more context.
+np.float32([1.0, 0.0, 0.0]) # E: incompatible type
+np.complex64([]) # E: incompatible type
+
+# TODO: protocols (can't check for non-existent protocols w/ __getattr__)
+
+np.datetime64(0) # E: No overload variant
+
+class A:
+ def __float__(self):
+ return 1.0
+
+
+np.int8(A()) # E: incompatible type
+np.int16(A()) # E: incompatible type
+np.int32(A()) # E: incompatible type
+np.int64(A()) # E: incompatible type
+np.uint8(A()) # E: incompatible type
+np.uint16(A()) # E: incompatible type
+np.uint32(A()) # E: incompatible type
+np.uint64(A()) # E: incompatible type
+
+np.void("test") # E: No overload variant
+np.void("test", dtype=None) # E: No overload variant
+
+np.generic(1) # E: Cannot instantiate abstract class
+np.number(1) # E: Cannot instantiate abstract class
+np.integer(1) # E: Cannot instantiate abstract class
+np.inexact(1) # E: Cannot instantiate abstract class
+np.character("test") # E: Cannot instantiate abstract class
+np.flexible(b"test") # E: Cannot instantiate abstract class
+
+np.float64(value=0.0) # E: Unexpected keyword argument
+np.int64(value=0) # E: Unexpected keyword argument
+np.uint64(value=0) # E: Unexpected keyword argument
+np.complex128(value=0.0j) # E: No overload variant
+np.str_(value='bob') # E: No overload variant
+np.bytes_(value=b'test') # E: No overload variant
+np.void(value=b'test') # E: No overload variant
+np.bool(value=True) # E: Unexpected keyword argument
+np.datetime64(value="2019") # E: No overload variant
+np.timedelta64(value=0) # E: Unexpected keyword argument
+
+np.bytes_(b"hello", encoding='utf-8') # E: No overload variant
+np.str_("hello", encoding='utf-8') # E: No overload variant
+
+f8.item(1) # E: incompatible type
+f8.item((0, 1)) # E: incompatible type
+f8.squeeze(axis=1) # E: incompatible type
+f8.squeeze(axis=(0, 1)) # E: incompatible type
+f8.transpose(1) # E: incompatible type
+
+def func(a: np.float32) -> None: ...
+
+func(f2) # E: incompatible type
+func(f8) # E: incompatible type
+
+c8.__getnewargs__() # E: Invalid self argument
+f2.__getnewargs__() # E: Invalid self argument
+f2.hex() # E: Invalid self argument
+np.float16.fromhex("0x0.0p+0") # E: Invalid self argument
+f2.__trunc__() # E: Invalid self argument
+f2.__getformat__("float") # E: Invalid self argument
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..3dd6d14f4222de8872f85bde7d69cc3a65aef4a7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape.pyi
@@ -0,0 +1,6 @@
+from typing import Any
+import numpy as np
+
+# test bounds of _ShapeType_co
+
+np.ndarray[tuple[str, str], Any] # E: Value of type variable
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e709741b7935ec7269affd836f5256a0842ddd0a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/shape_base.pyi
@@ -0,0 +1,8 @@
+import numpy as np
+
+class DTypeLike:
+ dtype: np.dtype[np.int_]
+
+dtype_like: DTypeLike
+
+np.expand_dims(dtype_like, (5, 10)) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f2bfba7432a89b41e095377e1d7e0e5f87d07109
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/stride_tricks.pyi
@@ -0,0 +1,9 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+
+np.lib.stride_tricks.as_strided(AR_f8, shape=8) # E: No overload variant
+np.lib.stride_tricks.as_strided(AR_f8, strides=8) # E: No overload variant
+
+np.lib.stride_tricks.sliding_window_view(AR_f8, axis=(1,)) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/strings.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/strings.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..25c3c2ecc0d76c6bbd2ec897ef9f8b09b4078715
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/strings.pyi
@@ -0,0 +1,59 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+
+np.strings.equal(AR_U, AR_S) # E: incompatible type
+
+np.strings.not_equal(AR_U, AR_S) # E: incompatible type
+
+np.strings.greater_equal(AR_U, AR_S) # E: incompatible type
+
+np.strings.less_equal(AR_U, AR_S) # E: incompatible type
+
+np.strings.greater(AR_U, AR_S) # E: incompatible type
+
+np.strings.less(AR_U, AR_S) # E: incompatible type
+
+np.strings.encode(AR_S) # E: incompatible type
+np.strings.decode(AR_U) # E: incompatible type
+
+np.strings.join(AR_U, b"_") # E: incompatible type
+np.strings.join(AR_S, "_") # E: incompatible type
+
+np.strings.lstrip(AR_U, b"a") # E: incompatible type
+np.strings.lstrip(AR_S, "a") # E: incompatible type
+np.strings.strip(AR_U, b"a") # E: incompatible type
+np.strings.strip(AR_S, "a") # E: incompatible type
+np.strings.rstrip(AR_U, b"a") # E: incompatible type
+np.strings.rstrip(AR_S, "a") # E: incompatible type
+
+np.strings.partition(AR_U, b"a") # E: incompatible type
+np.strings.partition(AR_S, "a") # E: incompatible type
+np.strings.rpartition(AR_U, b"a") # E: incompatible type
+np.strings.rpartition(AR_S, "a") # E: incompatible type
+
+np.strings.count(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
+np.strings.count(AR_S, "a", 0, 9) # E: incompatible type
+
+np.strings.endswith(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
+np.strings.endswith(AR_S, "a", 0, 9) # E: incompatible type
+np.strings.startswith(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
+np.strings.startswith(AR_S, "a", 0, 9) # E: incompatible type
+
+np.strings.find(AR_U, b"a", [1, 2, 3], [1, 2, 3]) # E: incompatible type
+np.strings.find(AR_S, "a", 0, 9) # E: incompatible type
+np.strings.rfind(AR_U, b"a", [1, 2, 3], [1, 2 , 3]) # E: incompatible type
+np.strings.rfind(AR_S, "a", 0, 9) # E: incompatible type
+
+np.strings.index(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.strings.index(AR_S, "a", end=9) # E: incompatible type
+np.strings.rindex(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
+np.strings.rindex(AR_S, "a", end=9) # E: incompatible type
+
+np.strings.isdecimal(AR_S) # E: incompatible type
+np.strings.isnumeric(AR_S) # E: incompatible type
+
+np.strings.replace(AR_U, b"_", b"-", 10) # E: incompatible type
+np.strings.replace(AR_S, "_", "-", 1) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/testing.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/testing.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f7eaa7d20836946144d7e1f7aa2d40a6d0f00948
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/testing.pyi
@@ -0,0 +1,28 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_U: npt.NDArray[np.str_]
+
+def func(x: object) -> bool: ...
+
+np.testing.assert_(True, msg=1) # E: incompatible type
+np.testing.build_err_msg(1, "test") # E: incompatible type
+np.testing.assert_almost_equal(AR_U, AR_U) # E: incompatible type
+np.testing.assert_approx_equal([1, 2, 3], [1, 2, 3]) # E: incompatible type
+np.testing.assert_array_almost_equal(AR_U, AR_U) # E: incompatible type
+np.testing.assert_array_less(AR_U, AR_U) # E: incompatible type
+np.testing.assert_string_equal(b"a", b"a") # E: incompatible type
+
+np.testing.assert_raises(expected_exception=TypeError, callable=func) # E: No overload variant
+np.testing.assert_raises_regex(expected_exception=TypeError, expected_regex="T", callable=func) # E: No overload variant
+
+np.testing.assert_allclose(AR_U, AR_U) # E: incompatible type
+np.testing.assert_array_almost_equal_nulp(AR_U, AR_U) # E: incompatible type
+np.testing.assert_array_max_ulp(AR_U, AR_U) # E: incompatible type
+
+np.testing.assert_warns(RuntimeWarning, func) # E: No overload variant
+np.testing.assert_no_warnings(func=func) # E: No overload variant
+np.testing.assert_no_warnings(func) # E: Too many arguments
+np.testing.assert_no_warnings(func, y=None) # E: No overload variant
+
+np.testing.assert_no_gc_cycles(func=func) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..76186285669b34e42f0e387e94435f593954781f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi
@@ -0,0 +1,37 @@
+from typing import Any, TypeVar
+
+import numpy as np
+import numpy.typing as npt
+
+
+def func1(ar: npt.NDArray[Any], a: int) -> npt.NDArray[np.str_]:
+ pass
+
+
+def func2(ar: npt.NDArray[Any], a: float) -> float:
+ pass
+
+
+AR_b: npt.NDArray[np.bool]
+AR_m: npt.NDArray[np.timedelta64]
+
+AR_LIKE_b: list[bool]
+
+np.eye(10, M=20.0) # E: No overload variant
+np.eye(10, k=2.5, dtype=int) # E: No overload variant
+
+np.diag(AR_b, k=0.5) # E: No overload variant
+np.diagflat(AR_b, k=0.5) # E: No overload variant
+
+np.tri(10, M=20.0) # E: No overload variant
+np.tri(10, k=2.5, dtype=int) # E: No overload variant
+
+np.tril(AR_b, k=0.5) # E: No overload variant
+np.triu(AR_b, k=0.5) # E: No overload variant
+
+np.vander(AR_m) # E: incompatible type
+
+np.histogram2d(AR_m) # E: No overload variant
+
+np.mask_indices(10, func1) # E: incompatible type
+np.mask_indices(10, func2, 10.5) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/type_check.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/type_check.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..95f52bfbd260914c429cbf0ca57f1ff4b03cbb1d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/type_check.pyi
@@ -0,0 +1,13 @@
+import numpy as np
+import numpy.typing as npt
+
+DTYPE_i8: np.dtype[np.int64]
+
+np.mintypecode(DTYPE_i8) # E: incompatible type
+np.iscomplexobj(DTYPE_i8) # E: incompatible type
+np.isrealobj(DTYPE_i8) # E: incompatible type
+
+np.typename(DTYPE_i8) # E: No overload variant
+np.typename("invalid") # E: No overload variant
+
+np.common_type(np.timedelta64()) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b080804b0fcf21a09cedb2abeba9f2baa9592dde
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi
@@ -0,0 +1,21 @@
+"""Typing tests for `numpy._core._ufunc_config`."""
+
+import numpy as np
+
+def func1(a: str, b: int, c: float) -> None: ...
+def func2(a: str, *, b: int) -> None: ...
+
+class Write1:
+ def write1(self, a: str) -> None: ...
+
+class Write2:
+ def write(self, a: str, b: str) -> None: ...
+
+class Write3:
+ def write(self, *, a: str) -> None: ...
+
+np.seterrcall(func1) # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(func2) # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write1()) # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write2()) # E: Argument 1 to "seterrcall" has incompatible type
+np.seterrcall(Write3()) # E: Argument 1 to "seterrcall" has incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..be5e6a1530c2e5415042840ee83ed4a9c8182daf
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi
@@ -0,0 +1,21 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_c: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+
+np.fix(AR_c) # E: incompatible type
+np.fix(AR_m) # E: incompatible type
+np.fix(AR_M) # E: incompatible type
+
+np.isposinf(AR_c) # E: incompatible type
+np.isposinf(AR_m) # E: incompatible type
+np.isposinf(AR_M) # E: incompatible type
+np.isposinf(AR_O) # E: incompatible type
+
+np.isneginf(AR_c) # E: incompatible type
+np.isneginf(AR_m) # E: incompatible type
+np.isneginf(AR_M) # E: incompatible type
+np.isneginf(AR_O) # E: incompatible type
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..bbab0dfe3fc2fe363dc50a7a1f3c0b11f3d22f97
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi
@@ -0,0 +1,17 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64]
+
+np.sin.nin + "foo" # E: Unsupported operand types
+np.sin(1, foo="bar") # E: No overload variant
+
+np.abs(None) # E: No overload variant
+
+np.add(1, 1, 1) # E: No overload variant
+np.add(1, 1, axis=0) # E: No overload variant
+
+np.matmul(AR_f8, AR_f8, where=True) # E: No overload variant
+
+np.frexp(AR_f8, out=None) # E: No overload variant
+np.frexp(AR_f8, out=AR_f8) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..fae96d6bf01641d0cf7dc8f7883f09c9492cb383
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi
@@ -0,0 +1,5 @@
+import numpy.exceptions as ex
+
+ex.AxisError(1.0) # E: No overload variant
+ex.AxisError(1, ndim=2.0) # E: No overload variant
+ex.AxisError(2, msg_prefix=404) # E: No overload variant
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..78d8d93c6560616c3495dcdf801befce51997c00
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi
@@ -0,0 +1,25 @@
+import sys
+
+import numpy as np
+from numpy._typing import _80Bit, _96Bit, _128Bit, _256Bit
+
+if sys.version_info >= (3, 11):
+ from typing import assert_type
+else:
+ from typing_extensions import assert_type
+
+assert_type(np.uint128(), np.unsignedinteger[_128Bit])
+assert_type(np.uint256(), np.unsignedinteger[_256Bit])
+
+assert_type(np.int128(), np.signedinteger[_128Bit])
+assert_type(np.int256(), np.signedinteger[_256Bit])
+
+assert_type(np.float80(), np.floating[_80Bit])
+assert_type(np.float96(), np.floating[_96Bit])
+assert_type(np.float128(), np.floating[_128Bit])
+assert_type(np.float256(), np.floating[_256Bit])
+
+assert_type(np.complex160(), np.complexfloating[_80Bit, _80Bit])
+assert_type(np.complex192(), np.complexfloating[_96Bit, _96Bit])
+assert_type(np.complex256(), np.complexfloating[_128Bit, _128Bit])
+assert_type(np.complex512(), np.complexfloating[_256Bit, _256Bit])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/mypy.ini b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/mypy.ini
new file mode 100644
index 0000000000000000000000000000000000000000..3bd7887c12091fc77cf4b872a61ec364d77d3eb5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/mypy.ini
@@ -0,0 +1,10 @@
+[mypy]
+plugins = numpy.typing.mypy_plugin
+show_absolute_path = True
+implicit_reexport = False
+pretty = True
+disallow_any_unimported = True
+disallow_any_generics = True
+; https://github.com/python/mypy/issues/15313
+disable_bytearray_promotion = true
+disable_memoryview_promotion = true
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arithmetic.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arithmetic.py
new file mode 100644
index 0000000000000000000000000000000000000000..93fda1d291c043b109ac2d8d151b83e45bd0f43a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arithmetic.py
@@ -0,0 +1,596 @@
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+import numpy.typing as npt
+import pytest
+
+c16 = np.complex128(1)
+f8 = np.float64(1)
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+c8 = np.complex64(1)
+f4 = np.float32(1)
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+dt = np.datetime64(1, "D")
+td = np.timedelta64(1, "D")
+
+b_ = np.bool(1)
+
+b = bool(1)
+c = complex(1)
+f = float(1)
+i = int(1)
+
+
+class Object:
+ def __array__(self, dtype: np.typing.DTypeLike = None,
+ copy: bool | None = None) -> np.ndarray[Any, np.dtype[np.object_]]:
+ ret = np.empty((), dtype=object)
+ ret[()] = self
+ return ret
+
+ def __sub__(self, value: Any) -> Object:
+ return self
+
+ def __rsub__(self, value: Any) -> Object:
+ return self
+
+ def __floordiv__(self, value: Any) -> Object:
+ return self
+
+ def __rfloordiv__(self, value: Any) -> Object:
+ return self
+
+ def __mul__(self, value: Any) -> Object:
+ return self
+
+ def __rmul__(self, value: Any) -> Object:
+ return self
+
+ def __pow__(self, value: Any) -> Object:
+ return self
+
+ def __rpow__(self, value: Any) -> Object:
+ return self
+
+
+AR_b: npt.NDArray[np.bool] = np.array([True])
+AR_u: npt.NDArray[np.uint32] = np.array([1], dtype=np.uint32)
+AR_i: npt.NDArray[np.int64] = np.array([1])
+AR_f: npt.NDArray[np.float64] = np.array([1.0])
+AR_c: npt.NDArray[np.complex128] = np.array([1j])
+AR_m: npt.NDArray[np.timedelta64] = np.array([np.timedelta64(1, "D")])
+AR_M: npt.NDArray[np.datetime64] = np.array([np.datetime64(1, "D")])
+AR_O: npt.NDArray[np.object_] = np.array([Object()])
+
+AR_LIKE_b = [True]
+AR_LIKE_u = [np.uint32(1)]
+AR_LIKE_i = [1]
+AR_LIKE_f = [1.0]
+AR_LIKE_c = [1j]
+AR_LIKE_m = [np.timedelta64(1, "D")]
+AR_LIKE_M = [np.datetime64(1, "D")]
+AR_LIKE_O = [Object()]
+
+# Array subtractions
+
+AR_b - AR_LIKE_u
+AR_b - AR_LIKE_i
+AR_b - AR_LIKE_f
+AR_b - AR_LIKE_c
+AR_b - AR_LIKE_m
+AR_b - AR_LIKE_O
+
+AR_LIKE_u - AR_b
+AR_LIKE_i - AR_b
+AR_LIKE_f - AR_b
+AR_LIKE_c - AR_b
+AR_LIKE_m - AR_b
+AR_LIKE_M - AR_b
+AR_LIKE_O - AR_b
+
+AR_u - AR_LIKE_b
+AR_u - AR_LIKE_u
+AR_u - AR_LIKE_i
+AR_u - AR_LIKE_f
+AR_u - AR_LIKE_c
+AR_u - AR_LIKE_m
+AR_u - AR_LIKE_O
+
+AR_LIKE_b - AR_u
+AR_LIKE_u - AR_u
+AR_LIKE_i - AR_u
+AR_LIKE_f - AR_u
+AR_LIKE_c - AR_u
+AR_LIKE_m - AR_u
+AR_LIKE_M - AR_u
+AR_LIKE_O - AR_u
+
+AR_i - AR_LIKE_b
+AR_i - AR_LIKE_u
+AR_i - AR_LIKE_i
+AR_i - AR_LIKE_f
+AR_i - AR_LIKE_c
+AR_i - AR_LIKE_m
+AR_i - AR_LIKE_O
+
+AR_LIKE_b - AR_i
+AR_LIKE_u - AR_i
+AR_LIKE_i - AR_i
+AR_LIKE_f - AR_i
+AR_LIKE_c - AR_i
+AR_LIKE_m - AR_i
+AR_LIKE_M - AR_i
+AR_LIKE_O - AR_i
+
+AR_f - AR_LIKE_b
+AR_f - AR_LIKE_u
+AR_f - AR_LIKE_i
+AR_f - AR_LIKE_f
+AR_f - AR_LIKE_c
+AR_f - AR_LIKE_O
+
+AR_LIKE_b - AR_f
+AR_LIKE_u - AR_f
+AR_LIKE_i - AR_f
+AR_LIKE_f - AR_f
+AR_LIKE_c - AR_f
+AR_LIKE_O - AR_f
+
+AR_c - AR_LIKE_b
+AR_c - AR_LIKE_u
+AR_c - AR_LIKE_i
+AR_c - AR_LIKE_f
+AR_c - AR_LIKE_c
+AR_c - AR_LIKE_O
+
+AR_LIKE_b - AR_c
+AR_LIKE_u - AR_c
+AR_LIKE_i - AR_c
+AR_LIKE_f - AR_c
+AR_LIKE_c - AR_c
+AR_LIKE_O - AR_c
+
+AR_m - AR_LIKE_b
+AR_m - AR_LIKE_u
+AR_m - AR_LIKE_i
+AR_m - AR_LIKE_m
+
+AR_LIKE_b - AR_m
+AR_LIKE_u - AR_m
+AR_LIKE_i - AR_m
+AR_LIKE_m - AR_m
+AR_LIKE_M - AR_m
+
+AR_M - AR_LIKE_b
+AR_M - AR_LIKE_u
+AR_M - AR_LIKE_i
+AR_M - AR_LIKE_m
+AR_M - AR_LIKE_M
+
+AR_LIKE_M - AR_M
+
+AR_O - AR_LIKE_b
+AR_O - AR_LIKE_u
+AR_O - AR_LIKE_i
+AR_O - AR_LIKE_f
+AR_O - AR_LIKE_c
+AR_O - AR_LIKE_O
+
+AR_LIKE_b - AR_O
+AR_LIKE_u - AR_O
+AR_LIKE_i - AR_O
+AR_LIKE_f - AR_O
+AR_LIKE_c - AR_O
+AR_LIKE_O - AR_O
+
+AR_u += AR_b
+AR_u += AR_u
+AR_u += 1 # Allowed during runtime as long as the object is 0D and >=0
+
+# Array floor division
+
+AR_b // AR_LIKE_b
+AR_b // AR_LIKE_u
+AR_b // AR_LIKE_i
+AR_b // AR_LIKE_f
+AR_b // AR_LIKE_O
+
+AR_LIKE_b // AR_b
+AR_LIKE_u // AR_b
+AR_LIKE_i // AR_b
+AR_LIKE_f // AR_b
+AR_LIKE_O // AR_b
+
+AR_u // AR_LIKE_b
+AR_u // AR_LIKE_u
+AR_u // AR_LIKE_i
+AR_u // AR_LIKE_f
+AR_u // AR_LIKE_O
+
+AR_LIKE_b // AR_u
+AR_LIKE_u // AR_u
+AR_LIKE_i // AR_u
+AR_LIKE_f // AR_u
+AR_LIKE_m // AR_u
+AR_LIKE_O // AR_u
+
+AR_i // AR_LIKE_b
+AR_i // AR_LIKE_u
+AR_i // AR_LIKE_i
+AR_i // AR_LIKE_f
+AR_i // AR_LIKE_O
+
+AR_LIKE_b // AR_i
+AR_LIKE_u // AR_i
+AR_LIKE_i // AR_i
+AR_LIKE_f // AR_i
+AR_LIKE_m // AR_i
+AR_LIKE_O // AR_i
+
+AR_f // AR_LIKE_b
+AR_f // AR_LIKE_u
+AR_f // AR_LIKE_i
+AR_f // AR_LIKE_f
+AR_f // AR_LIKE_O
+
+AR_LIKE_b // AR_f
+AR_LIKE_u // AR_f
+AR_LIKE_i // AR_f
+AR_LIKE_f // AR_f
+AR_LIKE_m // AR_f
+AR_LIKE_O // AR_f
+
+AR_m // AR_LIKE_u
+AR_m // AR_LIKE_i
+AR_m // AR_LIKE_f
+AR_m // AR_LIKE_m
+
+AR_LIKE_m // AR_m
+
+AR_O // AR_LIKE_b
+AR_O // AR_LIKE_u
+AR_O // AR_LIKE_i
+AR_O // AR_LIKE_f
+AR_O // AR_LIKE_O
+
+AR_LIKE_b // AR_O
+AR_LIKE_u // AR_O
+AR_LIKE_i // AR_O
+AR_LIKE_f // AR_O
+AR_LIKE_O // AR_O
+
+# Inplace multiplication
+
+AR_b *= AR_LIKE_b
+
+AR_u *= AR_LIKE_b
+AR_u *= AR_LIKE_u
+
+AR_i *= AR_LIKE_b
+AR_i *= AR_LIKE_u
+AR_i *= AR_LIKE_i
+
+AR_f *= AR_LIKE_b
+AR_f *= AR_LIKE_u
+AR_f *= AR_LIKE_i
+AR_f *= AR_LIKE_f
+
+AR_c *= AR_LIKE_b
+AR_c *= AR_LIKE_u
+AR_c *= AR_LIKE_i
+AR_c *= AR_LIKE_f
+AR_c *= AR_LIKE_c
+
+AR_m *= AR_LIKE_b
+AR_m *= AR_LIKE_u
+AR_m *= AR_LIKE_i
+AR_m *= AR_LIKE_f
+
+AR_O *= AR_LIKE_b
+AR_O *= AR_LIKE_u
+AR_O *= AR_LIKE_i
+AR_O *= AR_LIKE_f
+AR_O *= AR_LIKE_c
+AR_O *= AR_LIKE_O
+
+# Inplace power
+
+AR_u **= AR_LIKE_b
+AR_u **= AR_LIKE_u
+
+AR_i **= AR_LIKE_b
+AR_i **= AR_LIKE_u
+AR_i **= AR_LIKE_i
+
+AR_f **= AR_LIKE_b
+AR_f **= AR_LIKE_u
+AR_f **= AR_LIKE_i
+AR_f **= AR_LIKE_f
+
+AR_c **= AR_LIKE_b
+AR_c **= AR_LIKE_u
+AR_c **= AR_LIKE_i
+AR_c **= AR_LIKE_f
+AR_c **= AR_LIKE_c
+
+AR_O **= AR_LIKE_b
+AR_O **= AR_LIKE_u
+AR_O **= AR_LIKE_i
+AR_O **= AR_LIKE_f
+AR_O **= AR_LIKE_c
+AR_O **= AR_LIKE_O
+
+# unary ops
+
+-c16
+-c8
+-f8
+-f4
+-i8
+-i4
+with pytest.warns(RuntimeWarning):
+ -u8
+ -u4
+-td
+-AR_f
+
++c16
++c8
++f8
++f4
++i8
++i4
++u8
++u4
++td
++AR_f
+
+abs(c16)
+abs(c8)
+abs(f8)
+abs(f4)
+abs(i8)
+abs(i4)
+abs(u8)
+abs(u4)
+abs(td)
+abs(b_)
+abs(AR_f)
+
+# Time structures
+
+dt + td
+dt + i
+dt + i4
+dt + i8
+dt - dt
+dt - i
+dt - i4
+dt - i8
+
+td + td
+td + i
+td + i4
+td + i8
+td - td
+td - i
+td - i4
+td - i8
+td / f
+td / f4
+td / f8
+td / td
+td // td
+td % td
+
+
+# boolean
+
+b_ / b
+b_ / b_
+b_ / i
+b_ / i8
+b_ / i4
+b_ / u8
+b_ / u4
+b_ / f
+b_ / f8
+b_ / f4
+b_ / c
+b_ / c16
+b_ / c8
+
+b / b_
+b_ / b_
+i / b_
+i8 / b_
+i4 / b_
+u8 / b_
+u4 / b_
+f / b_
+f8 / b_
+f4 / b_
+c / b_
+c16 / b_
+c8 / b_
+
+# Complex
+
+c16 + c16
+c16 + f8
+c16 + i8
+c16 + c8
+c16 + f4
+c16 + i4
+c16 + b_
+c16 + b
+c16 + c
+c16 + f
+c16 + i
+c16 + AR_f
+
+c16 + c16
+f8 + c16
+i8 + c16
+c8 + c16
+f4 + c16
+i4 + c16
+b_ + c16
+b + c16
+c + c16
+f + c16
+i + c16
+AR_f + c16
+
+c8 + c16
+c8 + f8
+c8 + i8
+c8 + c8
+c8 + f4
+c8 + i4
+c8 + b_
+c8 + b
+c8 + c
+c8 + f
+c8 + i
+c8 + AR_f
+
+c16 + c8
+f8 + c8
+i8 + c8
+c8 + c8
+f4 + c8
+i4 + c8
+b_ + c8
+b + c8
+c + c8
+f + c8
+i + c8
+AR_f + c8
+
+# Float
+
+f8 + f8
+f8 + i8
+f8 + f4
+f8 + i4
+f8 + b_
+f8 + b
+f8 + c
+f8 + f
+f8 + i
+f8 + AR_f
+
+f8 + f8
+i8 + f8
+f4 + f8
+i4 + f8
+b_ + f8
+b + f8
+c + f8
+f + f8
+i + f8
+AR_f + f8
+
+f4 + f8
+f4 + i8
+f4 + f4
+f4 + i4
+f4 + b_
+f4 + b
+f4 + c
+f4 + f
+f4 + i
+f4 + AR_f
+
+f8 + f4
+i8 + f4
+f4 + f4
+i4 + f4
+b_ + f4
+b + f4
+c + f4
+f + f4
+i + f4
+AR_f + f4
+
+# Int
+
+i8 + i8
+i8 + u8
+i8 + i4
+i8 + u4
+i8 + b_
+i8 + b
+i8 + c
+i8 + f
+i8 + i
+i8 + AR_f
+
+u8 + u8
+u8 + i4
+u8 + u4
+u8 + b_
+u8 + b
+u8 + c
+u8 + f
+u8 + i
+u8 + AR_f
+
+i8 + i8
+u8 + i8
+i4 + i8
+u4 + i8
+b_ + i8
+b + i8
+c + i8
+f + i8
+i + i8
+AR_f + i8
+
+u8 + u8
+i4 + u8
+u4 + u8
+b_ + u8
+b + u8
+c + u8
+f + u8
+i + u8
+AR_f + u8
+
+i4 + i8
+i4 + i4
+i4 + i
+i4 + b_
+i4 + b
+i4 + AR_f
+
+u4 + i8
+u4 + i4
+u4 + u8
+u4 + u4
+u4 + i
+u4 + b_
+u4 + b
+u4 + AR_f
+
+i8 + i4
+i4 + i4
+i + i4
+b_ + i4
+b + i4
+AR_f + i4
+
+i8 + u4
+i4 + u4
+u8 + u4
+u4 + u4
+b_ + u4
+b + u4
+i + u4
+AR_f + u4
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_constructors.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_constructors.py
new file mode 100644
index 0000000000000000000000000000000000000000..17b6fab93ad877b5eff31e65afadabcda8bd1c9e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_constructors.py
@@ -0,0 +1,137 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+class Index:
+ def __index__(self) -> int:
+ return 0
+
+
+class SubClass(npt.NDArray[np.float64]):
+ pass
+
+
+def func(i: int, j: int, **kwargs: Any) -> SubClass:
+ return B
+
+
+i8 = np.int64(1)
+
+A = np.array([1])
+B = A.view(SubClass).copy()
+B_stack = np.array([[1], [1]]).view(SubClass)
+C = [1]
+
+np.ndarray(Index())
+np.ndarray([Index()])
+
+np.array(1, dtype=float)
+np.array(1, copy=None)
+np.array(1, order='F')
+np.array(1, order=None)
+np.array(1, subok=True)
+np.array(1, ndmin=3)
+np.array(1, str, copy=True, order='C', subok=False, ndmin=2)
+
+np.asarray(A)
+np.asarray(B)
+np.asarray(C)
+
+np.asanyarray(A)
+np.asanyarray(B)
+np.asanyarray(B, dtype=int)
+np.asanyarray(C)
+
+np.ascontiguousarray(A)
+np.ascontiguousarray(B)
+np.ascontiguousarray(C)
+
+np.asfortranarray(A)
+np.asfortranarray(B)
+np.asfortranarray(C)
+
+np.require(A)
+np.require(B)
+np.require(B, dtype=int)
+np.require(B, requirements=None)
+np.require(B, requirements="E")
+np.require(B, requirements=["ENSUREARRAY"])
+np.require(B, requirements={"F", "E"})
+np.require(B, requirements=["C", "OWNDATA"])
+np.require(B, requirements="W")
+np.require(B, requirements="A")
+np.require(C)
+
+np.linspace(0, 2)
+np.linspace(0.5, [0, 1, 2])
+np.linspace([0, 1, 2], 3)
+np.linspace(0j, 2)
+np.linspace(0, 2, num=10)
+np.linspace(0, 2, endpoint=True)
+np.linspace(0, 2, retstep=True)
+np.linspace(0j, 2j, retstep=True)
+np.linspace(0, 2, dtype=bool)
+np.linspace([0, 1], [2, 3], axis=Index())
+
+np.logspace(0, 2, base=2)
+np.logspace(0, 2, base=2)
+np.logspace(0, 2, base=[1j, 2j], num=2)
+
+np.geomspace(1, 2)
+
+np.zeros_like(A)
+np.zeros_like(C)
+np.zeros_like(B)
+np.zeros_like(B, dtype=np.int64)
+
+np.ones_like(A)
+np.ones_like(C)
+np.ones_like(B)
+np.ones_like(B, dtype=np.int64)
+
+np.empty_like(A)
+np.empty_like(C)
+np.empty_like(B)
+np.empty_like(B, dtype=np.int64)
+
+np.full_like(A, i8)
+np.full_like(C, i8)
+np.full_like(B, i8)
+np.full_like(B, i8, dtype=np.int64)
+
+np.ones(1)
+np.ones([1, 1, 1])
+
+np.full(1, i8)
+np.full([1, 1, 1], i8)
+
+np.indices([1, 2, 3])
+np.indices([1, 2, 3], sparse=True)
+
+np.fromfunction(func, (3, 5))
+
+np.identity(10)
+
+np.atleast_1d(C)
+np.atleast_1d(A)
+np.atleast_1d(C, C)
+np.atleast_1d(C, A)
+np.atleast_1d(A, A)
+
+np.atleast_2d(C)
+
+np.atleast_3d(C)
+
+np.vstack([C, C])
+np.vstack([C, A])
+np.vstack([A, A])
+
+np.hstack([C, C])
+
+np.stack([C, C])
+np.stack([C, C], axis=0)
+np.stack([C, C], out=B_stack)
+
+np.block([[C, C], [C, C]])
+np.block(A)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_like.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_like.py
new file mode 100644
index 0000000000000000000000000000000000000000..730eb46d1c925474508e863a133e256007bd734b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/array_like.py
@@ -0,0 +1,45 @@
+from __future__ import annotations
+
+from typing import Any, TYPE_CHECKING
+
+import numpy as np
+
+if TYPE_CHECKING:
+ from numpy._typing import NDArray, ArrayLike, _SupportsArray
+
+x1: ArrayLike = True
+x2: ArrayLike = 5
+x3: ArrayLike = 1.0
+x4: ArrayLike = 1 + 1j
+x5: ArrayLike = np.int8(1)
+x6: ArrayLike = np.float64(1)
+x7: ArrayLike = np.complex128(1)
+x8: ArrayLike = np.array([1, 2, 3])
+x9: ArrayLike = [1, 2, 3]
+x10: ArrayLike = (1, 2, 3)
+x11: ArrayLike = "foo"
+x12: ArrayLike = memoryview(b'foo')
+
+
+class A:
+ def __array__(
+ self, dtype: None | np.dtype[Any] = None
+ ) -> NDArray[np.float64]:
+ return np.array([1.0, 2.0, 3.0])
+
+
+x13: ArrayLike = A()
+
+scalar: _SupportsArray[np.dtype[np.int64]] = np.int64(1)
+scalar.__array__()
+array: _SupportsArray[np.dtype[np.int_]] = np.array(1)
+array.__array__()
+
+a: _SupportsArray[np.dtype[np.float64]] = A()
+a.__array__()
+a.__array__()
+
+# Escape hatch for when you mean to make something like an object
+# array.
+object_array_scalar: object = (i for i in range(10))
+np.array(object_array_scalar)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayprint.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayprint.py
new file mode 100644
index 0000000000000000000000000000000000000000..6c704c755570d1508424af92a0eb5aa1353666a0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayprint.py
@@ -0,0 +1,37 @@
+import numpy as np
+
+AR = np.arange(10)
+AR.setflags(write=False)
+
+with np.printoptions():
+ np.set_printoptions(
+ precision=1,
+ threshold=2,
+ edgeitems=3,
+ linewidth=4,
+ suppress=False,
+ nanstr="Bob",
+ infstr="Bill",
+ formatter={},
+ sign="+",
+ floatmode="unique",
+ )
+ np.get_printoptions()
+ str(AR)
+
+ np.array2string(
+ AR,
+ max_line_width=5,
+ precision=2,
+ suppress_small=True,
+ separator=";",
+ prefix="test",
+ threshold=5,
+ floatmode="fixed",
+ suffix="?",
+ legacy="1.13",
+ )
+ np.format_float_scientific(1, precision=5)
+ np.format_float_positional(1, trim="k")
+ np.array_repr(AR)
+ np.array_str(AR)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayterator.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayterator.py
new file mode 100644
index 0000000000000000000000000000000000000000..572be5e2fe29ba978b78c8b65b116b5b54a4d01a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/arrayterator.py
@@ -0,0 +1,27 @@
+
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+
+AR_i8: np.ndarray[Any, np.dtype[np.int_]] = np.arange(10)
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+ar_iter.var
+ar_iter.buf_size
+ar_iter.start
+ar_iter.stop
+ar_iter.step
+ar_iter.shape
+ar_iter.flat
+
+ar_iter.__array__()
+
+for i in ar_iter:
+ pass
+
+ar_iter[0]
+ar_iter[...]
+ar_iter[:]
+ar_iter[0, 0, 0]
+ar_iter[..., 0, :]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py
new file mode 100644
index 0000000000000000000000000000000000000000..22a245d2180979e6e0fa0cb5780713aa3ac86439
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/bitwise_ops.py
@@ -0,0 +1,131 @@
+import numpy as np
+
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+b_ = np.bool(1)
+
+b = bool(1)
+i = int(1)
+
+AR = np.array([0, 1, 2], dtype=np.int32)
+AR.setflags(write=False)
+
+
+i8 << i8
+i8 >> i8
+i8 | i8
+i8 ^ i8
+i8 & i8
+
+i << AR
+i >> AR
+i | AR
+i ^ AR
+i & AR
+
+i8 << AR
+i8 >> AR
+i8 | AR
+i8 ^ AR
+i8 & AR
+
+i4 << i4
+i4 >> i4
+i4 | i4
+i4 ^ i4
+i4 & i4
+
+i8 << i4
+i8 >> i4
+i8 | i4
+i8 ^ i4
+i8 & i4
+
+i8 << i
+i8 >> i
+i8 | i
+i8 ^ i
+i8 & i
+
+i8 << b_
+i8 >> b_
+i8 | b_
+i8 ^ b_
+i8 & b_
+
+i8 << b
+i8 >> b
+i8 | b
+i8 ^ b
+i8 & b
+
+u8 << u8
+u8 >> u8
+u8 | u8
+u8 ^ u8
+u8 & u8
+
+u4 << u4
+u4 >> u4
+u4 | u4
+u4 ^ u4
+u4 & u4
+
+u4 << i4
+u4 >> i4
+u4 | i4
+u4 ^ i4
+u4 & i4
+
+u4 << i
+u4 >> i
+u4 | i
+u4 ^ i
+u4 & i
+
+u8 << b_
+u8 >> b_
+u8 | b_
+u8 ^ b_
+u8 & b_
+
+u8 << b
+u8 >> b
+u8 | b
+u8 ^ b
+u8 & b
+
+b_ << b_
+b_ >> b_
+b_ | b_
+b_ ^ b_
+b_ & b_
+
+b_ << AR
+b_ >> AR
+b_ | AR
+b_ ^ AR
+b_ & AR
+
+b_ << b
+b_ >> b
+b_ | b
+b_ ^ b
+b_ & b
+
+b_ << i
+b_ >> i
+b_ | i
+b_ ^ i
+b_ & i
+
+~i8
+~i4
+~u8
+~u4
+~b_
+~AR
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/comparisons.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/comparisons.py
new file mode 100644
index 0000000000000000000000000000000000000000..a461d8b660da6f38ca6ddd416d4857d7b865aa9e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/comparisons.py
@@ -0,0 +1,315 @@
+from __future__ import annotations
+
+from typing import cast, Any
+import numpy as np
+
+c16 = np.complex128()
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+c8 = np.complex64()
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+b_ = np.bool()
+
+b = bool()
+c = complex()
+f = float()
+i = int()
+
+SEQ = (0, 1, 2, 3, 4)
+
+AR_b: np.ndarray[Any, np.dtype[np.bool]] = np.array([True])
+AR_u: np.ndarray[Any, np.dtype[np.uint32]] = np.array([1], dtype=np.uint32)
+AR_i: np.ndarray[Any, np.dtype[np.int_]] = np.array([1])
+AR_f: np.ndarray[Any, np.dtype[np.float64]] = np.array([1.0])
+AR_c: np.ndarray[Any, np.dtype[np.complex128]] = np.array([1.0j])
+AR_S: np.ndarray[Any, np.dtype[np.bytes_]] = np.array([b"a"], "S")
+AR_T = cast(np.ndarray[Any, np.dtypes.StringDType], np.array(["a"], "T"))
+AR_U: np.ndarray[Any, np.dtype[np.str_]] = np.array(["a"], "U")
+AR_m: np.ndarray[Any, np.dtype[np.timedelta64]] = np.array([np.timedelta64("1")])
+AR_M: np.ndarray[Any, np.dtype[np.datetime64]] = np.array([np.datetime64("1")])
+AR_O: np.ndarray[Any, np.dtype[np.object_]] = np.array([1], dtype=object)
+
+# Arrays
+
+AR_b > AR_b
+AR_b > AR_u
+AR_b > AR_i
+AR_b > AR_f
+AR_b > AR_c
+
+AR_u > AR_b
+AR_u > AR_u
+AR_u > AR_i
+AR_u > AR_f
+AR_u > AR_c
+
+AR_i > AR_b
+AR_i > AR_u
+AR_i > AR_i
+AR_i > AR_f
+AR_i > AR_c
+
+AR_f > AR_b
+AR_f > AR_u
+AR_f > AR_i
+AR_f > AR_f
+AR_f > AR_c
+
+AR_c > AR_b
+AR_c > AR_u
+AR_c > AR_i
+AR_c > AR_f
+AR_c > AR_c
+
+AR_S > AR_S
+AR_S > b""
+
+AR_T > AR_T
+AR_T > AR_U
+AR_T > ""
+
+AR_U > AR_U
+AR_U > AR_T
+AR_U > ""
+
+AR_m > AR_b
+AR_m > AR_u
+AR_m > AR_i
+AR_b > AR_m
+AR_u > AR_m
+AR_i > AR_m
+
+AR_M > AR_M
+
+AR_O > AR_O
+1 > AR_O
+AR_O > 1
+
+# Time structures
+
+dt > dt
+
+td > td
+td > i
+td > i4
+td > i8
+td > AR_i
+td > SEQ
+
+# boolean
+
+b_ > b
+b_ > b_
+b_ > i
+b_ > i8
+b_ > i4
+b_ > u8
+b_ > u4
+b_ > f
+b_ > f8
+b_ > f4
+b_ > c
+b_ > c16
+b_ > c8
+b_ > AR_i
+b_ > SEQ
+
+# Complex
+
+c16 > c16
+c16 > f8
+c16 > i8
+c16 > c8
+c16 > f4
+c16 > i4
+c16 > b_
+c16 > b
+c16 > c
+c16 > f
+c16 > i
+c16 > AR_i
+c16 > SEQ
+
+c16 > c16
+f8 > c16
+i8 > c16
+c8 > c16
+f4 > c16
+i4 > c16
+b_ > c16
+b > c16
+c > c16
+f > c16
+i > c16
+AR_i > c16
+SEQ > c16
+
+c8 > c16
+c8 > f8
+c8 > i8
+c8 > c8
+c8 > f4
+c8 > i4
+c8 > b_
+c8 > b
+c8 > c
+c8 > f
+c8 > i
+c8 > AR_i
+c8 > SEQ
+
+c16 > c8
+f8 > c8
+i8 > c8
+c8 > c8
+f4 > c8
+i4 > c8
+b_ > c8
+b > c8
+c > c8
+f > c8
+i > c8
+AR_i > c8
+SEQ > c8
+
+# Float
+
+f8 > f8
+f8 > i8
+f8 > f4
+f8 > i4
+f8 > b_
+f8 > b
+f8 > c
+f8 > f
+f8 > i
+f8 > AR_i
+f8 > SEQ
+
+f8 > f8
+i8 > f8
+f4 > f8
+i4 > f8
+b_ > f8
+b > f8
+c > f8
+f > f8
+i > f8
+AR_i > f8
+SEQ > f8
+
+f4 > f8
+f4 > i8
+f4 > f4
+f4 > i4
+f4 > b_
+f4 > b
+f4 > c
+f4 > f
+f4 > i
+f4 > AR_i
+f4 > SEQ
+
+f8 > f4
+i8 > f4
+f4 > f4
+i4 > f4
+b_ > f4
+b > f4
+c > f4
+f > f4
+i > f4
+AR_i > f4
+SEQ > f4
+
+# Int
+
+i8 > i8
+i8 > u8
+i8 > i4
+i8 > u4
+i8 > b_
+i8 > b
+i8 > c
+i8 > f
+i8 > i
+i8 > AR_i
+i8 > SEQ
+
+u8 > u8
+u8 > i4
+u8 > u4
+u8 > b_
+u8 > b
+u8 > c
+u8 > f
+u8 > i
+u8 > AR_i
+u8 > SEQ
+
+i8 > i8
+u8 > i8
+i4 > i8
+u4 > i8
+b_ > i8
+b > i8
+c > i8
+f > i8
+i > i8
+AR_i > i8
+SEQ > i8
+
+u8 > u8
+i4 > u8
+u4 > u8
+b_ > u8
+b > u8
+c > u8
+f > u8
+i > u8
+AR_i > u8
+SEQ > u8
+
+i4 > i8
+i4 > i4
+i4 > i
+i4 > b_
+i4 > b
+i4 > AR_i
+i4 > SEQ
+
+u4 > i8
+u4 > i4
+u4 > u8
+u4 > u4
+u4 > i
+u4 > b_
+u4 > b
+u4 > AR_i
+u4 > SEQ
+
+i8 > i4
+i4 > i4
+i > i4
+b_ > i4
+b > i4
+AR_i > i4
+SEQ > i4
+
+i8 > u4
+i4 > u4
+u8 > u4
+u4 > u4
+b_ > u4
+b > u4
+i > u4
+AR_i > u4
+SEQ > u4
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/dtype.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/dtype.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f11518276c842f2601e3f1420020f00e3b775fb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/dtype.py
@@ -0,0 +1,57 @@
+import numpy as np
+
+dtype_obj = np.dtype(np.str_)
+void_dtype_obj = np.dtype([("f0", np.float64), ("f1", np.float32)])
+
+np.dtype(dtype=np.int64)
+np.dtype(int)
+np.dtype("int")
+np.dtype(None)
+
+np.dtype((int, 2))
+np.dtype((int, (1,)))
+
+np.dtype({"names": ["a", "b"], "formats": [int, float]})
+np.dtype({"names": ["a"], "formats": [int], "titles": [object]})
+np.dtype({"names": ["a"], "formats": [int], "titles": [object()]})
+
+np.dtype([("name", np.str_, 16), ("grades", np.float64, (2,)), ("age", "int32")])
+
+np.dtype(
+ {
+ "names": ["a", "b"],
+ "formats": [int, float],
+ "itemsize": 9,
+ "aligned": False,
+ "titles": ["x", "y"],
+ "offsets": [0, 1],
+ }
+)
+
+np.dtype((np.float64, float))
+
+
+class Test:
+ dtype = np.dtype(float)
+
+
+np.dtype(Test())
+
+# Methods and attributes
+dtype_obj.base
+dtype_obj.subdtype
+dtype_obj.newbyteorder()
+dtype_obj.type
+dtype_obj.name
+dtype_obj.names
+
+dtype_obj * 0
+dtype_obj * 2
+
+0 * dtype_obj
+2 * dtype_obj
+
+void_dtype_obj["f0"]
+void_dtype_obj[0]
+void_dtype_obj[["f0", "f1"]]
+void_dtype_obj[["f0"]]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/einsumfunc.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/einsumfunc.py
new file mode 100644
index 0000000000000000000000000000000000000000..429764e67eccc7855d363da20d432fdb45e66971
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/einsumfunc.py
@@ -0,0 +1,36 @@
+from __future__ import annotations
+
+from typing import Any
+
+import numpy as np
+
+AR_LIKE_b = [True, True, True]
+AR_LIKE_u = [np.uint32(1), np.uint32(2), np.uint32(3)]
+AR_LIKE_i = [1, 2, 3]
+AR_LIKE_f = [1.0, 2.0, 3.0]
+AR_LIKE_c = [1j, 2j, 3j]
+AR_LIKE_U = ["1", "2", "3"]
+
+OUT_f: np.ndarray[Any, np.dtype[np.float64]] = np.empty(3, dtype=np.float64)
+OUT_c: np.ndarray[Any, np.dtype[np.complex128]] = np.empty(3, dtype=np.complex128)
+
+np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_b)
+np.einsum("i,i->i", AR_LIKE_u, AR_LIKE_u)
+np.einsum("i,i->i", AR_LIKE_i, AR_LIKE_i)
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f)
+np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c)
+np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_i)
+np.einsum("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c)
+
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, dtype="c16")
+np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe")
+np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, out=OUT_c)
+np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=int, casting="unsafe", out=OUT_f)
+
+np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_b)
+np.einsum_path("i,i->i", AR_LIKE_u, AR_LIKE_u)
+np.einsum_path("i,i->i", AR_LIKE_i, AR_LIKE_i)
+np.einsum_path("i,i->i", AR_LIKE_f, AR_LIKE_f)
+np.einsum_path("i,i->i", AR_LIKE_c, AR_LIKE_c)
+np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_i)
+np.einsum_path("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/flatiter.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/flatiter.py
new file mode 100644
index 0000000000000000000000000000000000000000..63c839af4b23f0ba3bea8c56f2bbb7c03e7bc44a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/flatiter.py
@@ -0,0 +1,16 @@
+import numpy as np
+
+a = np.empty((2, 2)).flat
+
+a.base
+a.copy()
+a.coords
+a.index
+iter(a)
+next(a)
+a[0]
+a[[0, 1, 2]]
+a[...]
+a[:]
+a.__array__()
+a.__array__(np.dtype(np.float64))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/fromnumeric.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/fromnumeric.py
new file mode 100644
index 0000000000000000000000000000000000000000..7cc2bcfd8b50f235081e737c3420e1db34191637
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/fromnumeric.py
@@ -0,0 +1,272 @@
+"""Tests for :mod:`numpy._core.fromnumeric`."""
+
+import numpy as np
+
+A = np.array(True, ndmin=2, dtype=bool)
+B = np.array(1.0, ndmin=2, dtype=np.float32)
+A.setflags(write=False)
+B.setflags(write=False)
+
+a = np.bool(True)
+b = np.float32(1.0)
+c = 1.0
+d = np.array(1.0, dtype=np.float32) # writeable
+
+np.take(a, 0)
+np.take(b, 0)
+np.take(c, 0)
+np.take(A, 0)
+np.take(B, 0)
+np.take(A, [0])
+np.take(B, [0])
+
+np.reshape(a, 1)
+np.reshape(b, 1)
+np.reshape(c, 1)
+np.reshape(A, 1)
+np.reshape(B, 1)
+
+np.choose(a, [True, True])
+np.choose(A, [1.0, 1.0])
+
+np.repeat(a, 1)
+np.repeat(b, 1)
+np.repeat(c, 1)
+np.repeat(A, 1)
+np.repeat(B, 1)
+
+np.swapaxes(A, 0, 0)
+np.swapaxes(B, 0, 0)
+
+np.transpose(a)
+np.transpose(b)
+np.transpose(c)
+np.transpose(A)
+np.transpose(B)
+
+np.partition(a, 0, axis=None)
+np.partition(b, 0, axis=None)
+np.partition(c, 0, axis=None)
+np.partition(A, 0)
+np.partition(B, 0)
+
+np.argpartition(a, 0)
+np.argpartition(b, 0)
+np.argpartition(c, 0)
+np.argpartition(A, 0)
+np.argpartition(B, 0)
+
+np.sort(A, 0)
+np.sort(B, 0)
+
+np.argsort(A, 0)
+np.argsort(B, 0)
+
+np.argmax(A)
+np.argmax(B)
+np.argmax(A, axis=0)
+np.argmax(B, axis=0)
+
+np.argmin(A)
+np.argmin(B)
+np.argmin(A, axis=0)
+np.argmin(B, axis=0)
+
+np.searchsorted(A[0], 0)
+np.searchsorted(B[0], 0)
+np.searchsorted(A[0], [0])
+np.searchsorted(B[0], [0])
+
+np.resize(a, (5, 5))
+np.resize(b, (5, 5))
+np.resize(c, (5, 5))
+np.resize(A, (5, 5))
+np.resize(B, (5, 5))
+
+np.squeeze(a)
+np.squeeze(b)
+np.squeeze(c)
+np.squeeze(A)
+np.squeeze(B)
+
+np.diagonal(A)
+np.diagonal(B)
+
+np.trace(A)
+np.trace(B)
+
+np.ravel(a)
+np.ravel(b)
+np.ravel(c)
+np.ravel(A)
+np.ravel(B)
+
+np.nonzero(A)
+np.nonzero(B)
+
+np.shape(a)
+np.shape(b)
+np.shape(c)
+np.shape(A)
+np.shape(B)
+
+np.compress([True], a)
+np.compress([True], b)
+np.compress([True], c)
+np.compress([True], A)
+np.compress([True], B)
+
+np.clip(a, 0, 1.0)
+np.clip(b, -1, 1)
+np.clip(a, 0, None)
+np.clip(b, None, 1)
+np.clip(c, 0, 1)
+np.clip(A, 0, 1)
+np.clip(B, 0, 1)
+np.clip(B, [0, 1], [1, 2])
+
+np.sum(a)
+np.sum(b)
+np.sum(c)
+np.sum(A)
+np.sum(B)
+np.sum(A, axis=0)
+np.sum(B, axis=0)
+
+np.all(a)
+np.all(b)
+np.all(c)
+np.all(A)
+np.all(B)
+np.all(A, axis=0)
+np.all(B, axis=0)
+np.all(A, keepdims=True)
+np.all(B, keepdims=True)
+
+np.any(a)
+np.any(b)
+np.any(c)
+np.any(A)
+np.any(B)
+np.any(A, axis=0)
+np.any(B, axis=0)
+np.any(A, keepdims=True)
+np.any(B, keepdims=True)
+
+np.cumsum(a)
+np.cumsum(b)
+np.cumsum(c)
+np.cumsum(A)
+np.cumsum(B)
+
+np.cumulative_sum(a)
+np.cumulative_sum(b)
+np.cumulative_sum(c)
+np.cumulative_sum(A, axis=0)
+np.cumulative_sum(B, axis=0)
+
+np.ptp(b)
+np.ptp(c)
+np.ptp(B)
+np.ptp(B, axis=0)
+np.ptp(B, keepdims=True)
+
+np.amax(a)
+np.amax(b)
+np.amax(c)
+np.amax(A)
+np.amax(B)
+np.amax(A, axis=0)
+np.amax(B, axis=0)
+np.amax(A, keepdims=True)
+np.amax(B, keepdims=True)
+
+np.amin(a)
+np.amin(b)
+np.amin(c)
+np.amin(A)
+np.amin(B)
+np.amin(A, axis=0)
+np.amin(B, axis=0)
+np.amin(A, keepdims=True)
+np.amin(B, keepdims=True)
+
+np.prod(a)
+np.prod(b)
+np.prod(c)
+np.prod(A)
+np.prod(B)
+np.prod(a, dtype=None)
+np.prod(A, dtype=None)
+np.prod(A, axis=0)
+np.prod(B, axis=0)
+np.prod(A, keepdims=True)
+np.prod(B, keepdims=True)
+np.prod(b, out=d)
+np.prod(B, out=d)
+
+np.cumprod(a)
+np.cumprod(b)
+np.cumprod(c)
+np.cumprod(A)
+np.cumprod(B)
+
+np.cumulative_prod(a)
+np.cumulative_prod(b)
+np.cumulative_prod(c)
+np.cumulative_prod(A, axis=0)
+np.cumulative_prod(B, axis=0)
+
+np.ndim(a)
+np.ndim(b)
+np.ndim(c)
+np.ndim(A)
+np.ndim(B)
+
+np.size(a)
+np.size(b)
+np.size(c)
+np.size(A)
+np.size(B)
+
+np.around(a)
+np.around(b)
+np.around(c)
+np.around(A)
+np.around(B)
+
+np.mean(a)
+np.mean(b)
+np.mean(c)
+np.mean(A)
+np.mean(B)
+np.mean(A, axis=0)
+np.mean(B, axis=0)
+np.mean(A, keepdims=True)
+np.mean(B, keepdims=True)
+np.mean(b, out=d)
+np.mean(B, out=d)
+
+np.std(a)
+np.std(b)
+np.std(c)
+np.std(A)
+np.std(B)
+np.std(A, axis=0)
+np.std(B, axis=0)
+np.std(A, keepdims=True)
+np.std(B, keepdims=True)
+np.std(b, out=d)
+np.std(B, out=d)
+
+np.var(a)
+np.var(b)
+np.var(c)
+np.var(A)
+np.var(B)
+np.var(A, axis=0)
+np.var(B, axis=0)
+np.var(A, keepdims=True)
+np.var(B, keepdims=True)
+np.var(b, out=d)
+np.var(B, out=d)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/index_tricks.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/index_tricks.py
new file mode 100644
index 0000000000000000000000000000000000000000..dfc4ff2f314aa2417cd5205a86386d4bd6211273
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/index_tricks.py
@@ -0,0 +1,60 @@
+from __future__ import annotations
+from typing import Any
+import numpy as np
+
+AR_LIKE_b = [[True, True], [True, True]]
+AR_LIKE_i = [[1, 2], [3, 4]]
+AR_LIKE_f = [[1.0, 2.0], [3.0, 4.0]]
+AR_LIKE_U = [["1", "2"], ["3", "4"]]
+
+AR_i8: np.ndarray[Any, np.dtype[np.int64]] = np.array(AR_LIKE_i, dtype=np.int64)
+
+np.ndenumerate(AR_i8)
+np.ndenumerate(AR_LIKE_f)
+np.ndenumerate(AR_LIKE_U)
+
+next(np.ndenumerate(AR_i8))
+next(np.ndenumerate(AR_LIKE_f))
+next(np.ndenumerate(AR_LIKE_U))
+
+iter(np.ndenumerate(AR_i8))
+iter(np.ndenumerate(AR_LIKE_f))
+iter(np.ndenumerate(AR_LIKE_U))
+
+iter(np.ndindex(1, 2, 3))
+next(np.ndindex(1, 2, 3))
+
+np.unravel_index([22, 41, 37], (7, 6))
+np.unravel_index([31, 41, 13], (7, 6), order='F')
+np.unravel_index(1621, (6, 7, 8, 9))
+
+np.ravel_multi_index(AR_LIKE_i, (7, 6))
+np.ravel_multi_index(AR_LIKE_i, (7, 6), order='F')
+np.ravel_multi_index(AR_LIKE_i, (4, 6), mode='clip')
+np.ravel_multi_index(AR_LIKE_i, (4, 4), mode=('clip', 'wrap'))
+np.ravel_multi_index((3, 1, 4, 1), (6, 7, 8, 9))
+
+np.mgrid[1:1:2]
+np.mgrid[1:1:2, None:10]
+
+np.ogrid[1:1:2]
+np.ogrid[1:1:2, None:10]
+
+np.index_exp[0:1]
+np.index_exp[0:1, None:3]
+np.index_exp[0, 0:1, ..., [0, 1, 3]]
+
+np.s_[0:1]
+np.s_[0:1, None:3]
+np.s_[0, 0:1, ..., [0, 1, 3]]
+
+np.ix_(AR_LIKE_b[0])
+np.ix_(AR_LIKE_i[0], AR_LIKE_f[0])
+np.ix_(AR_i8[0])
+
+np.fill_diagonal(AR_i8, 5)
+
+np.diag_indices(4)
+np.diag_indices(2, 3)
+
+np.diag_indices_from(AR_i8)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_user_array.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_user_array.py
new file mode 100644
index 0000000000000000000000000000000000000000..62b7e85d7ff1e49fecbbe88a921c931a5b8ae745
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_user_array.py
@@ -0,0 +1,22 @@
+"""Based on the `if __name__ == "__main__"` test code in `lib/_user_array_impl.py`."""
+
+from __future__ import annotations
+
+import numpy as np
+from numpy.lib.user_array import container
+
+N = 10_000
+W = H = int(N**0.5)
+
+a: np.ndarray[tuple[int, int], np.dtype[np.int32]]
+ua: container[tuple[int, int], np.dtype[np.int32]]
+
+a = np.arange(N, dtype=np.int32).reshape(W, H)
+ua = container(a)
+
+ua_small: container[tuple[int, int], np.dtype[np.int32]] = ua[:3, :5]
+ua_small[0, 0] = 10
+
+ua_bool: container[tuple[int, int], np.dtype[np.bool]] = ua_small > 1
+
+# shape: tuple[int, int] = np.shape(ua)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_utils.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..f9b3381e13d26adf44130fc62aa8bfaacfe6a658
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_utils.py
@@ -0,0 +1,19 @@
+from __future__ import annotations
+
+from io import StringIO
+
+import numpy as np
+import numpy.lib.array_utils as array_utils
+
+FILE = StringIO()
+AR = np.arange(10, dtype=np.float64)
+
+
+def func(a: int) -> bool:
+ return True
+
+
+array_utils.byte_bounds(AR)
+array_utils.byte_bounds(np.float64())
+
+np.info(1, output=FILE)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_version.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_version.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3825eca524795f4d9742873a773cd7749636e2a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/lib_version.py
@@ -0,0 +1,18 @@
+from numpy.lib import NumpyVersion
+
+version = NumpyVersion("1.8.0")
+
+version.vstring
+version.version
+version.major
+version.minor
+version.bugfix
+version.pre_release
+version.is_devversion
+
+version == version
+version != version
+version < "1.8.0"
+version <= version
+version > version
+version >= "1.8.0"
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/literal.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/literal.py
new file mode 100644
index 0000000000000000000000000000000000000000..2238618eb67c904335d731332d5afa5eb988d7f1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/literal.py
@@ -0,0 +1,51 @@
+from __future__ import annotations
+
+from typing import Any, TYPE_CHECKING
+from functools import partial
+
+import pytest
+import numpy as np
+
+if TYPE_CHECKING:
+ from collections.abc import Callable
+
+AR = np.array(0)
+AR.setflags(write=False)
+
+KACF = frozenset({None, "K", "A", "C", "F"})
+ACF = frozenset({None, "A", "C", "F"})
+CF = frozenset({None, "C", "F"})
+
+order_list: list[tuple[frozenset[str | None], Callable[..., Any]]] = [
+ (KACF, partial(np.ndarray, 1)),
+ (KACF, AR.tobytes),
+ (KACF, partial(AR.astype, int)),
+ (KACF, AR.copy),
+ (ACF, partial(AR.reshape, 1)),
+ (KACF, AR.flatten),
+ (KACF, AR.ravel),
+ (KACF, partial(np.array, 1)),
+ # NOTE: __call__ is needed due to mypy 1.11 bugs (#17620, #17631)
+ (CF, partial(np.zeros.__call__, 1)),
+ (CF, partial(np.ones.__call__, 1)),
+ (CF, partial(np.empty.__call__, 1)),
+ (CF, partial(np.full, 1, 1)),
+ (KACF, partial(np.zeros_like, AR)),
+ (KACF, partial(np.ones_like, AR)),
+ (KACF, partial(np.empty_like, AR)),
+ (KACF, partial(np.full_like, AR, 1)),
+ (KACF, partial(np.add.__call__, 1, 1)), # i.e. np.ufunc.__call__
+ (ACF, partial(np.reshape, AR, 1)),
+ (KACF, partial(np.ravel, AR)),
+ (KACF, partial(np.asarray, 1)),
+ (KACF, partial(np.asanyarray, 1)),
+]
+
+for order_set, func in order_list:
+ for order in order_set:
+ func(order=order)
+
+ invalid_orders = KACF - order_set
+ for order in invalid_orders:
+ with pytest.raises(ValueError):
+ func(order=order)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ma.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ma.py
new file mode 100644
index 0000000000000000000000000000000000000000..6b3b138119bbd01a8241a68f4f172ce1d26b5833
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ma.py
@@ -0,0 +1,8 @@
+from typing import Any
+
+import numpy as np
+import numpy.ma
+
+
+m : np.ma.MaskedArray[Any, np.dtype[np.float64]] = np.ma.masked_array([1.5, 2, 3], mask=[True, False, True])
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/mod.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/mod.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b7e6cd85c73cfce452c3bd8bf91f174f134966c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/mod.py
@@ -0,0 +1,149 @@
+import numpy as np
+
+f8 = np.float64(1)
+i8 = np.int64(1)
+u8 = np.uint64(1)
+
+f4 = np.float32(1)
+i4 = np.int32(1)
+u4 = np.uint32(1)
+
+td = np.timedelta64(1, "D")
+b_ = np.bool(1)
+
+b = bool(1)
+f = float(1)
+i = int(1)
+
+AR = np.array([1], dtype=np.bool)
+AR.setflags(write=False)
+
+AR2 = np.array([1], dtype=np.timedelta64)
+AR2.setflags(write=False)
+
+# Time structures
+
+td % td
+td % AR2
+AR2 % td
+
+divmod(td, td)
+divmod(td, AR2)
+divmod(AR2, td)
+
+# Bool
+
+b_ % b
+b_ % i
+b_ % f
+b_ % b_
+b_ % i8
+b_ % u8
+b_ % f8
+b_ % AR
+
+divmod(b_, b)
+divmod(b_, i)
+divmod(b_, f)
+divmod(b_, b_)
+divmod(b_, i8)
+divmod(b_, u8)
+divmod(b_, f8)
+divmod(b_, AR)
+
+b % b_
+i % b_
+f % b_
+b_ % b_
+i8 % b_
+u8 % b_
+f8 % b_
+AR % b_
+
+divmod(b, b_)
+divmod(i, b_)
+divmod(f, b_)
+divmod(b_, b_)
+divmod(i8, b_)
+divmod(u8, b_)
+divmod(f8, b_)
+divmod(AR, b_)
+
+# int
+
+i8 % b
+i8 % i
+i8 % f
+i8 % i8
+i8 % f8
+i4 % i8
+i4 % f8
+i4 % i4
+i4 % f4
+i8 % AR
+
+divmod(i8, b)
+divmod(i8, i)
+divmod(i8, f)
+divmod(i8, i8)
+divmod(i8, f8)
+divmod(i8, i4)
+divmod(i8, f4)
+divmod(i4, i4)
+divmod(i4, f4)
+divmod(i8, AR)
+
+b % i8
+i % i8
+f % i8
+i8 % i8
+f8 % i8
+i8 % i4
+f8 % i4
+i4 % i4
+f4 % i4
+AR % i8
+
+divmod(b, i8)
+divmod(i, i8)
+divmod(f, i8)
+divmod(i8, i8)
+divmod(f8, i8)
+divmod(i4, i8)
+divmod(f4, i8)
+divmod(i4, i4)
+divmod(f4, i4)
+divmod(AR, i8)
+
+# float
+
+f8 % b
+f8 % i
+f8 % f
+i8 % f4
+f4 % f4
+f8 % AR
+
+divmod(f8, b)
+divmod(f8, i)
+divmod(f8, f)
+divmod(f8, f8)
+divmod(f8, f4)
+divmod(f4, f4)
+divmod(f8, AR)
+
+b % f8
+i % f8
+f % f8
+f8 % f8
+f8 % f8
+f4 % f4
+AR % f8
+
+divmod(b, f8)
+divmod(i, f8)
+divmod(f, f8)
+divmod(f8, f8)
+divmod(f4, f8)
+divmod(f4, f4)
+divmod(AR, f8)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/modules.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/modules.py
new file mode 100644
index 0000000000000000000000000000000000000000..0c2fd4b7e7c3a2d0ed1be39928edf5b2d591e16c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/modules.py
@@ -0,0 +1,45 @@
+import numpy as np
+from numpy import f2py
+
+np.char
+np.ctypeslib
+np.emath
+np.fft
+np.lib
+np.linalg
+np.ma
+np.matrixlib
+np.polynomial
+np.random
+np.rec
+np.strings
+np.testing
+np.version
+
+np.lib.format
+np.lib.mixins
+np.lib.scimath
+np.lib.stride_tricks
+np.lib.array_utils
+np.ma.extras
+np.polynomial.chebyshev
+np.polynomial.hermite
+np.polynomial.hermite_e
+np.polynomial.laguerre
+np.polynomial.legendre
+np.polynomial.polynomial
+
+np.__path__
+np.__version__
+
+np.__all__
+np.char.__all__
+np.ctypeslib.__all__
+np.emath.__all__
+np.lib.__all__
+np.ma.__all__
+np.random.__all__
+np.rec.__all__
+np.strings.__all__
+np.testing.__all__
+f2py.__all__
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/multiarray.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/multiarray.py
new file mode 100644
index 0000000000000000000000000000000000000000..26cedfd77566e7b7865345e0775af88153e74ffc
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/multiarray.py
@@ -0,0 +1,76 @@
+import numpy as np
+import numpy.typing as npt
+
+AR_f8: npt.NDArray[np.float64] = np.array([1.0])
+AR_i4 = np.array([1], dtype=np.int32)
+AR_u1 = np.array([1], dtype=np.uint8)
+
+AR_LIKE_f = [1.5]
+AR_LIKE_i = [1]
+
+b_f8 = np.broadcast(AR_f8)
+b_i4_f8_f8 = np.broadcast(AR_i4, AR_f8, AR_f8)
+
+next(b_f8)
+b_f8.reset()
+b_f8.index
+b_f8.iters
+b_f8.nd
+b_f8.ndim
+b_f8.numiter
+b_f8.shape
+b_f8.size
+
+next(b_i4_f8_f8)
+b_i4_f8_f8.reset()
+b_i4_f8_f8.ndim
+b_i4_f8_f8.index
+b_i4_f8_f8.iters
+b_i4_f8_f8.nd
+b_i4_f8_f8.numiter
+b_i4_f8_f8.shape
+b_i4_f8_f8.size
+
+np.inner(AR_f8, AR_i4)
+
+np.where([True, True, False])
+np.where([True, True, False], 1, 0)
+
+np.lexsort([0, 1, 2])
+
+np.can_cast(np.dtype("i8"), int)
+np.can_cast(AR_f8, "f8")
+np.can_cast(AR_f8, np.complex128, casting="unsafe")
+
+np.min_scalar_type([1])
+np.min_scalar_type(AR_f8)
+
+np.result_type(int, AR_i4)
+np.result_type(AR_f8, AR_u1)
+np.result_type(AR_f8, np.complex128)
+
+np.dot(AR_LIKE_f, AR_i4)
+np.dot(AR_u1, 1)
+np.dot(1.5j, 1)
+np.dot(AR_u1, 1, out=AR_f8)
+
+np.vdot(AR_LIKE_f, AR_i4)
+np.vdot(AR_u1, 1)
+np.vdot(1.5j, 1)
+
+np.bincount(AR_i4)
+
+np.copyto(AR_f8, [1.6])
+
+np.putmask(AR_f8, [True], 1.5)
+
+np.packbits(AR_i4)
+np.packbits(AR_u1)
+
+np.unpackbits(AR_u1)
+
+np.shares_memory(1, 2)
+np.shares_memory(AR_f8, AR_f8, max_work=1)
+
+np.may_share_memory(1, 2)
+np.may_share_memory(AR_f8, AR_f8, max_work=1)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py
new file mode 100644
index 0000000000000000000000000000000000000000..76da1dadd327861fdb576f1f492fbc44a4881168
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_conversion.py
@@ -0,0 +1,87 @@
+import os
+import tempfile
+
+import numpy as np
+
+nd = np.array([[1, 2], [3, 4]])
+scalar_array = np.array(1)
+
+# item
+scalar_array.item()
+nd.item(1)
+nd.item(0, 1)
+nd.item((0, 1))
+
+# tobytes
+nd.tobytes()
+nd.tobytes("C")
+nd.tobytes(None)
+
+# tofile
+if os.name != "nt":
+ with tempfile.NamedTemporaryFile(suffix=".txt") as tmp:
+ nd.tofile(tmp.name)
+ nd.tofile(tmp.name, "")
+ nd.tofile(tmp.name, sep="")
+
+ nd.tofile(tmp.name, "", "%s")
+ nd.tofile(tmp.name, format="%s")
+
+ nd.tofile(tmp)
+
+# dump is pretty simple
+# dumps is pretty simple
+
+# astype
+nd.astype("float")
+nd.astype(float)
+
+nd.astype(float, "K")
+nd.astype(float, order="K")
+
+nd.astype(float, "K", "unsafe")
+nd.astype(float, casting="unsafe")
+
+nd.astype(float, "K", "unsafe", True)
+nd.astype(float, subok=True)
+
+nd.astype(float, "K", "unsafe", True, True)
+nd.astype(float, copy=True)
+
+# byteswap
+nd.byteswap()
+nd.byteswap(True)
+
+# copy
+nd.copy()
+nd.copy("C")
+
+# view
+nd.view()
+nd.view(np.int64)
+nd.view(dtype=np.int64)
+nd.view(np.int64, np.matrix)
+nd.view(type=np.matrix)
+
+# getfield
+complex_array = np.array([[1 + 1j, 0], [0, 1 - 1j]], dtype=np.complex128)
+
+complex_array.getfield("float")
+complex_array.getfield(float)
+
+complex_array.getfield("float", 8)
+complex_array.getfield(float, offset=8)
+
+# setflags
+nd.setflags()
+
+nd.setflags(True)
+nd.setflags(write=True)
+
+nd.setflags(True, True)
+nd.setflags(write=True, align=True)
+
+nd.setflags(True, True, False)
+nd.setflags(write=True, align=True, uic=False)
+
+# fill is pretty simple
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py
new file mode 100644
index 0000000000000000000000000000000000000000..758626e18dd69077380ea177cc698e7a535e7937
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py
@@ -0,0 +1,196 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+from __future__ import annotations
+
+import operator
+from typing import cast, Any
+
+import numpy as np
+import numpy.typing as npt
+
+class SubClass(npt.NDArray[np.float64]): ...
+
+i4 = np.int32(1)
+A: np.ndarray[Any, np.dtype[np.int32]] = np.array([[1]], dtype=np.int32)
+B0 = np.empty((), dtype=np.int32).view(SubClass)
+B1 = np.empty((1,), dtype=np.int32).view(SubClass)
+B2 = np.empty((1, 1), dtype=np.int32).view(SubClass)
+C: np.ndarray[Any, np.dtype[np.int32]] = np.array([0, 1, 2], dtype=np.int32)
+D = np.ones(3).view(SubClass)
+
+ctypes_obj = A.ctypes
+
+i4.all()
+A.all()
+A.all(axis=0)
+A.all(keepdims=True)
+A.all(out=B0)
+
+i4.any()
+A.any()
+A.any(axis=0)
+A.any(keepdims=True)
+A.any(out=B0)
+
+i4.argmax()
+A.argmax()
+A.argmax(axis=0)
+A.argmax(out=B0)
+
+i4.argmin()
+A.argmin()
+A.argmin(axis=0)
+A.argmin(out=B0)
+
+i4.argsort()
+A.argsort()
+
+i4.choose([()])
+_choices = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]], dtype=np.int32)
+C.choose(_choices)
+C.choose(_choices, out=D)
+
+i4.clip(1)
+A.clip(1)
+A.clip(None, 1)
+A.clip(1, out=B2)
+A.clip(None, 1, out=B2)
+
+i4.compress([1])
+A.compress([1])
+A.compress([1], out=B1)
+
+i4.conj()
+A.conj()
+B0.conj()
+
+i4.conjugate()
+A.conjugate()
+B0.conjugate()
+
+i4.cumprod()
+A.cumprod()
+A.cumprod(out=B1)
+
+i4.cumsum()
+A.cumsum()
+A.cumsum(out=B1)
+
+i4.max()
+A.max()
+A.max(axis=0)
+A.max(keepdims=True)
+A.max(out=B0)
+
+i4.mean()
+A.mean()
+A.mean(axis=0)
+A.mean(keepdims=True)
+A.mean(out=B0)
+
+i4.min()
+A.min()
+A.min(axis=0)
+A.min(keepdims=True)
+A.min(out=B0)
+
+i4.prod()
+A.prod()
+A.prod(axis=0)
+A.prod(keepdims=True)
+A.prod(out=B0)
+
+i4.round()
+A.round()
+A.round(out=B2)
+
+i4.repeat(1)
+A.repeat(1)
+B0.repeat(1)
+
+i4.std()
+A.std()
+A.std(axis=0)
+A.std(keepdims=True)
+A.std(out=B0.astype(np.float64))
+
+i4.sum()
+A.sum()
+A.sum(axis=0)
+A.sum(keepdims=True)
+A.sum(out=B0)
+
+i4.take(0)
+A.take(0)
+A.take([0])
+A.take(0, out=B0)
+A.take([0], out=B1)
+
+i4.var()
+A.var()
+A.var(axis=0)
+A.var(keepdims=True)
+A.var(out=B0)
+
+A.argpartition([0])
+
+A.diagonal()
+
+A.dot(1)
+A.dot(1, out=B2)
+
+A.nonzero()
+
+C.searchsorted(1)
+
+A.trace()
+A.trace(out=B0)
+
+void = cast(np.void, np.array(1, dtype=[("f", np.float64)]).take(0))
+void.setfield(10, np.float64)
+
+A.item(0)
+C.item(0)
+
+A.ravel()
+C.ravel()
+
+A.flatten()
+C.flatten()
+
+A.reshape(1)
+C.reshape(3)
+
+int(np.array(1.0, dtype=np.float64))
+int(np.array("1", dtype=np.str_))
+
+float(np.array(1.0, dtype=np.float64))
+float(np.array("1", dtype=np.str_))
+
+complex(np.array(1.0, dtype=np.float64))
+
+operator.index(np.array(1, dtype=np.int64))
+
+# this fails on numpy 2.2.1
+# https://github.com/scipy/scipy/blob/a755ee77ec47a64849abe42c349936475a6c2f24/scipy/io/arff/tests/test_arffread.py#L41-L44
+A_float = np.array([[1, 5], [2, 4], [np.nan, np.nan]])
+A_void: npt.NDArray[np.void] = np.empty(3, [("yop", float), ("yap", float)])
+A_void["yop"] = A_float[:, 0]
+A_void["yap"] = A_float[:, 1]
+
+# deprecated
+
+with np.testing.assert_warns(DeprecationWarning):
+ ctypes_obj.get_data() # pyright: ignore[reportDeprecated]
+with np.testing.assert_warns(DeprecationWarning):
+ ctypes_obj.get_shape() # pyright: ignore[reportDeprecated]
+with np.testing.assert_warns(DeprecationWarning):
+ ctypes_obj.get_strides() # pyright: ignore[reportDeprecated]
+with np.testing.assert_warns(DeprecationWarning):
+ ctypes_obj.get_as_parameter() # pyright: ignore[reportDeprecated]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py
new file mode 100644
index 0000000000000000000000000000000000000000..0ca3dff392e12a4122740ade2ceb71b3d6e7bb08
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ndarray_shape_manipulation.py
@@ -0,0 +1,47 @@
+import numpy as np
+
+nd1 = np.array([[1, 2], [3, 4]])
+
+# reshape
+nd1.reshape(4)
+nd1.reshape(2, 2)
+nd1.reshape((2, 2))
+
+nd1.reshape((2, 2), order="C")
+nd1.reshape(4, order="C")
+
+# resize
+nd1.resize()
+nd1.resize(4)
+nd1.resize(2, 2)
+nd1.resize((2, 2))
+
+nd1.resize((2, 2), refcheck=True)
+nd1.resize(4, refcheck=True)
+
+nd2 = np.array([[1, 2], [3, 4]])
+
+# transpose
+nd2.transpose()
+nd2.transpose(1, 0)
+nd2.transpose((1, 0))
+
+# swapaxes
+nd2.swapaxes(0, 1)
+
+# flatten
+nd2.flatten()
+nd2.flatten("C")
+
+# ravel
+nd2.ravel()
+nd2.ravel("C")
+
+# squeeze
+nd2.squeeze()
+
+nd3 = np.array([[1, 2]])
+nd3.squeeze(0)
+
+nd4 = np.array([[[1, 2]]])
+nd4.squeeze((0, 1))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/nditer.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/nditer.py
new file mode 100644
index 0000000000000000000000000000000000000000..25a5b44d7aecf6486be76ae0dca0e3e8ef60699b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/nditer.py
@@ -0,0 +1,4 @@
+import numpy as np
+
+arr = np.array([1])
+np.nditer([arr, None])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numeric.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numeric.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e12fb5d70e60eb1d9a29f7d79e8e1ca4fd47efa
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numeric.py
@@ -0,0 +1,95 @@
+"""
+Tests for :mod:`numpy._core.numeric`.
+
+Does not include tests which fall under ``array_constructors``.
+
+"""
+
+from __future__ import annotations
+from typing import cast
+
+import numpy as np
+import numpy.typing as npt
+
+class SubClass(npt.NDArray[np.float64]):
+ ...
+
+i8 = np.int64(1)
+
+A = cast(
+ np.ndarray[tuple[int, int, int], np.dtype[np.intp]],
+ np.arange(27).reshape(3, 3, 3),
+)
+B: list[list[list[int]]] = A.tolist()
+C = np.empty((27, 27)).view(SubClass)
+
+np.count_nonzero(i8)
+np.count_nonzero(A)
+np.count_nonzero(B)
+np.count_nonzero(A, keepdims=True)
+np.count_nonzero(A, axis=0)
+
+np.isfortran(i8)
+np.isfortran(A)
+
+np.argwhere(i8)
+np.argwhere(A)
+
+np.flatnonzero(i8)
+np.flatnonzero(A)
+
+np.correlate(B[0][0], A.ravel(), mode="valid")
+np.correlate(A.ravel(), A.ravel(), mode="same")
+
+np.convolve(B[0][0], A.ravel(), mode="valid")
+np.convolve(A.ravel(), A.ravel(), mode="same")
+
+np.outer(i8, A)
+np.outer(B, A)
+np.outer(A, A)
+np.outer(A, A, out=C)
+
+np.tensordot(B, A)
+np.tensordot(A, A)
+np.tensordot(A, A, axes=0)
+np.tensordot(A, A, axes=(0, 1))
+
+np.isscalar(i8)
+np.isscalar(A)
+np.isscalar(B)
+
+np.roll(A, 1)
+np.roll(A, (1, 2))
+np.roll(B, 1)
+
+np.rollaxis(A, 0, 1)
+
+np.moveaxis(A, 0, 1)
+np.moveaxis(A, (0, 1), (1, 2))
+
+np.cross(B, A)
+np.cross(A, A)
+
+np.indices([0, 1, 2])
+np.indices([0, 1, 2], sparse=False)
+np.indices([0, 1, 2], sparse=True)
+
+np.binary_repr(1)
+
+np.base_repr(1)
+
+np.allclose(i8, A)
+np.allclose(B, A)
+np.allclose(A, A)
+
+np.isclose(i8, A)
+np.isclose(B, A)
+np.isclose(A, A)
+
+np.array_equal(i8, A)
+np.array_equal(B, A)
+np.array_equal(A, A)
+
+np.array_equiv(i8, A)
+np.array_equiv(B, A)
+np.array_equiv(A, A)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numerictypes.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numerictypes.py
new file mode 100644
index 0000000000000000000000000000000000000000..24e1a9986d88ab320bdfab54a050ed27aec4d8b5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/numerictypes.py
@@ -0,0 +1,17 @@
+import numpy as np
+
+np.isdtype(np.float64, (np.int64, np.float64))
+np.isdtype(np.int64, "signed integer")
+
+np.issubdtype("S1", np.bytes_)
+np.issubdtype(np.float64, np.float32)
+
+np.ScalarType
+np.ScalarType[0]
+np.ScalarType[3]
+np.ScalarType[8]
+np.ScalarType[10]
+
+np.typecodes["Character"]
+np.typecodes["Complex"]
+np.typecodes["All"]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/random.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/random.py
new file mode 100644
index 0000000000000000000000000000000000000000..bce204a7378e8a8c8761d02a08686206f59ca6ce
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/random.py
@@ -0,0 +1,1497 @@
+from __future__ import annotations
+
+from typing import Any
+import numpy as np
+
+SEED_NONE = None
+SEED_INT = 4579435749574957634658964293569
+SEED_ARR: np.ndarray[Any, np.dtype[np.int64]] = np.array([1, 2, 3, 4], dtype=np.int64)
+SEED_ARRLIKE: list[int] = [1, 2, 3, 4]
+SEED_SEED_SEQ: np.random.SeedSequence = np.random.SeedSequence(0)
+SEED_MT19937: np.random.MT19937 = np.random.MT19937(0)
+SEED_PCG64: np.random.PCG64 = np.random.PCG64(0)
+SEED_PHILOX: np.random.Philox = np.random.Philox(0)
+SEED_SFC64: np.random.SFC64 = np.random.SFC64(0)
+
+# default rng
+np.random.default_rng()
+np.random.default_rng(SEED_NONE)
+np.random.default_rng(SEED_INT)
+np.random.default_rng(SEED_ARR)
+np.random.default_rng(SEED_ARRLIKE)
+np.random.default_rng(SEED_SEED_SEQ)
+np.random.default_rng(SEED_MT19937)
+np.random.default_rng(SEED_PCG64)
+np.random.default_rng(SEED_PHILOX)
+np.random.default_rng(SEED_SFC64)
+
+# Seed Sequence
+np.random.SeedSequence(SEED_NONE)
+np.random.SeedSequence(SEED_INT)
+np.random.SeedSequence(SEED_ARR)
+np.random.SeedSequence(SEED_ARRLIKE)
+
+# Bit Generators
+np.random.MT19937(SEED_NONE)
+np.random.MT19937(SEED_INT)
+np.random.MT19937(SEED_ARR)
+np.random.MT19937(SEED_ARRLIKE)
+np.random.MT19937(SEED_SEED_SEQ)
+
+np.random.PCG64(SEED_NONE)
+np.random.PCG64(SEED_INT)
+np.random.PCG64(SEED_ARR)
+np.random.PCG64(SEED_ARRLIKE)
+np.random.PCG64(SEED_SEED_SEQ)
+
+np.random.Philox(SEED_NONE)
+np.random.Philox(SEED_INT)
+np.random.Philox(SEED_ARR)
+np.random.Philox(SEED_ARRLIKE)
+np.random.Philox(SEED_SEED_SEQ)
+
+np.random.SFC64(SEED_NONE)
+np.random.SFC64(SEED_INT)
+np.random.SFC64(SEED_ARR)
+np.random.SFC64(SEED_ARRLIKE)
+np.random.SFC64(SEED_SEED_SEQ)
+
+seed_seq: np.random.bit_generator.SeedSequence = np.random.SeedSequence(SEED_NONE)
+seed_seq.spawn(10)
+seed_seq.generate_state(3)
+seed_seq.generate_state(3, "u4")
+seed_seq.generate_state(3, "uint32")
+seed_seq.generate_state(3, "u8")
+seed_seq.generate_state(3, "uint64")
+seed_seq.generate_state(3, np.uint32)
+seed_seq.generate_state(3, np.uint64)
+
+
+def_gen: np.random.Generator = np.random.default_rng()
+
+D_arr_0p1: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.1])
+D_arr_0p5: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.5])
+D_arr_0p9: np.ndarray[Any, np.dtype[np.float64]] = np.array([0.9])
+D_arr_1p5: np.ndarray[Any, np.dtype[np.float64]] = np.array([1.5])
+I_arr_10: np.ndarray[Any, np.dtype[np.int_]] = np.array([10], dtype=np.int_)
+I_arr_20: np.ndarray[Any, np.dtype[np.int_]] = np.array([20], dtype=np.int_)
+D_arr_like_0p1: list[float] = [0.1]
+D_arr_like_0p5: list[float] = [0.5]
+D_arr_like_0p9: list[float] = [0.9]
+D_arr_like_1p5: list[float] = [1.5]
+I_arr_like_10: list[int] = [10]
+I_arr_like_20: list[int] = [20]
+D_2D_like: list[list[float]] = [[1, 2], [2, 3], [3, 4], [4, 5.1]]
+D_2D: np.ndarray[Any, np.dtype[np.float64]] = np.array(D_2D_like)
+
+S_out: np.ndarray[Any, np.dtype[np.float32]] = np.empty(1, dtype=np.float32)
+D_out: np.ndarray[Any, np.dtype[np.float64]] = np.empty(1)
+
+def_gen.standard_normal()
+def_gen.standard_normal(dtype=np.float32)
+def_gen.standard_normal(dtype="float32")
+def_gen.standard_normal(dtype="double")
+def_gen.standard_normal(dtype=np.float64)
+def_gen.standard_normal(size=None)
+def_gen.standard_normal(size=1)
+def_gen.standard_normal(size=1, dtype=np.float32)
+def_gen.standard_normal(size=1, dtype="f4")
+def_gen.standard_normal(size=1, dtype="float32", out=S_out)
+def_gen.standard_normal(dtype=np.float32, out=S_out)
+def_gen.standard_normal(size=1, dtype=np.float64)
+def_gen.standard_normal(size=1, dtype="float64")
+def_gen.standard_normal(size=1, dtype="f8")
+def_gen.standard_normal(out=D_out)
+def_gen.standard_normal(size=1, dtype="float64")
+def_gen.standard_normal(size=1, dtype="float64", out=D_out)
+
+def_gen.random()
+def_gen.random(dtype=np.float32)
+def_gen.random(dtype="float32")
+def_gen.random(dtype="double")
+def_gen.random(dtype=np.float64)
+def_gen.random(size=None)
+def_gen.random(size=1)
+def_gen.random(size=1, dtype=np.float32)
+def_gen.random(size=1, dtype="f4")
+def_gen.random(size=1, dtype="float32", out=S_out)
+def_gen.random(dtype=np.float32, out=S_out)
+def_gen.random(size=1, dtype=np.float64)
+def_gen.random(size=1, dtype="float64")
+def_gen.random(size=1, dtype="f8")
+def_gen.random(out=D_out)
+def_gen.random(size=1, dtype="float64")
+def_gen.random(size=1, dtype="float64", out=D_out)
+
+def_gen.standard_cauchy()
+def_gen.standard_cauchy(size=None)
+def_gen.standard_cauchy(size=1)
+
+def_gen.standard_exponential()
+def_gen.standard_exponential(method="inv")
+def_gen.standard_exponential(dtype=np.float32)
+def_gen.standard_exponential(dtype="float32")
+def_gen.standard_exponential(dtype="double")
+def_gen.standard_exponential(dtype=np.float64)
+def_gen.standard_exponential(size=None)
+def_gen.standard_exponential(size=None, method="inv")
+def_gen.standard_exponential(size=1, method="inv")
+def_gen.standard_exponential(size=1, dtype=np.float32)
+def_gen.standard_exponential(size=1, dtype="f4", method="inv")
+def_gen.standard_exponential(size=1, dtype="float32", out=S_out)
+def_gen.standard_exponential(dtype=np.float32, out=S_out)
+def_gen.standard_exponential(size=1, dtype=np.float64, method="inv")
+def_gen.standard_exponential(size=1, dtype="float64")
+def_gen.standard_exponential(size=1, dtype="f8")
+def_gen.standard_exponential(out=D_out)
+def_gen.standard_exponential(size=1, dtype="float64")
+def_gen.standard_exponential(size=1, dtype="float64", out=D_out)
+
+def_gen.zipf(1.5)
+def_gen.zipf(1.5, size=None)
+def_gen.zipf(1.5, size=1)
+def_gen.zipf(D_arr_1p5)
+def_gen.zipf(D_arr_1p5, size=1)
+def_gen.zipf(D_arr_like_1p5)
+def_gen.zipf(D_arr_like_1p5, size=1)
+
+def_gen.weibull(0.5)
+def_gen.weibull(0.5, size=None)
+def_gen.weibull(0.5, size=1)
+def_gen.weibull(D_arr_0p5)
+def_gen.weibull(D_arr_0p5, size=1)
+def_gen.weibull(D_arr_like_0p5)
+def_gen.weibull(D_arr_like_0p5, size=1)
+
+def_gen.standard_t(0.5)
+def_gen.standard_t(0.5, size=None)
+def_gen.standard_t(0.5, size=1)
+def_gen.standard_t(D_arr_0p5)
+def_gen.standard_t(D_arr_0p5, size=1)
+def_gen.standard_t(D_arr_like_0p5)
+def_gen.standard_t(D_arr_like_0p5, size=1)
+
+def_gen.poisson(0.5)
+def_gen.poisson(0.5, size=None)
+def_gen.poisson(0.5, size=1)
+def_gen.poisson(D_arr_0p5)
+def_gen.poisson(D_arr_0p5, size=1)
+def_gen.poisson(D_arr_like_0p5)
+def_gen.poisson(D_arr_like_0p5, size=1)
+
+def_gen.power(0.5)
+def_gen.power(0.5, size=None)
+def_gen.power(0.5, size=1)
+def_gen.power(D_arr_0p5)
+def_gen.power(D_arr_0p5, size=1)
+def_gen.power(D_arr_like_0p5)
+def_gen.power(D_arr_like_0p5, size=1)
+
+def_gen.pareto(0.5)
+def_gen.pareto(0.5, size=None)
+def_gen.pareto(0.5, size=1)
+def_gen.pareto(D_arr_0p5)
+def_gen.pareto(D_arr_0p5, size=1)
+def_gen.pareto(D_arr_like_0p5)
+def_gen.pareto(D_arr_like_0p5, size=1)
+
+def_gen.chisquare(0.5)
+def_gen.chisquare(0.5, size=None)
+def_gen.chisquare(0.5, size=1)
+def_gen.chisquare(D_arr_0p5)
+def_gen.chisquare(D_arr_0p5, size=1)
+def_gen.chisquare(D_arr_like_0p5)
+def_gen.chisquare(D_arr_like_0p5, size=1)
+
+def_gen.exponential(0.5)
+def_gen.exponential(0.5, size=None)
+def_gen.exponential(0.5, size=1)
+def_gen.exponential(D_arr_0p5)
+def_gen.exponential(D_arr_0p5, size=1)
+def_gen.exponential(D_arr_like_0p5)
+def_gen.exponential(D_arr_like_0p5, size=1)
+
+def_gen.geometric(0.5)
+def_gen.geometric(0.5, size=None)
+def_gen.geometric(0.5, size=1)
+def_gen.geometric(D_arr_0p5)
+def_gen.geometric(D_arr_0p5, size=1)
+def_gen.geometric(D_arr_like_0p5)
+def_gen.geometric(D_arr_like_0p5, size=1)
+
+def_gen.logseries(0.5)
+def_gen.logseries(0.5, size=None)
+def_gen.logseries(0.5, size=1)
+def_gen.logseries(D_arr_0p5)
+def_gen.logseries(D_arr_0p5, size=1)
+def_gen.logseries(D_arr_like_0p5)
+def_gen.logseries(D_arr_like_0p5, size=1)
+
+def_gen.rayleigh(0.5)
+def_gen.rayleigh(0.5, size=None)
+def_gen.rayleigh(0.5, size=1)
+def_gen.rayleigh(D_arr_0p5)
+def_gen.rayleigh(D_arr_0p5, size=1)
+def_gen.rayleigh(D_arr_like_0p5)
+def_gen.rayleigh(D_arr_like_0p5, size=1)
+
+def_gen.standard_gamma(0.5)
+def_gen.standard_gamma(0.5, size=None)
+def_gen.standard_gamma(0.5, dtype="float32")
+def_gen.standard_gamma(0.5, size=None, dtype="float32")
+def_gen.standard_gamma(0.5, size=1)
+def_gen.standard_gamma(D_arr_0p5)
+def_gen.standard_gamma(D_arr_0p5, dtype="f4")
+def_gen.standard_gamma(0.5, size=1, dtype="float32", out=S_out)
+def_gen.standard_gamma(D_arr_0p5, dtype=np.float32, out=S_out)
+def_gen.standard_gamma(D_arr_0p5, size=1)
+def_gen.standard_gamma(D_arr_like_0p5)
+def_gen.standard_gamma(D_arr_like_0p5, size=1)
+def_gen.standard_gamma(0.5, out=D_out)
+def_gen.standard_gamma(D_arr_like_0p5, out=D_out)
+def_gen.standard_gamma(D_arr_like_0p5, size=1)
+def_gen.standard_gamma(D_arr_like_0p5, size=1, out=D_out, dtype=np.float64)
+
+def_gen.vonmises(0.5, 0.5)
+def_gen.vonmises(0.5, 0.5, size=None)
+def_gen.vonmises(0.5, 0.5, size=1)
+def_gen.vonmises(D_arr_0p5, 0.5)
+def_gen.vonmises(0.5, D_arr_0p5)
+def_gen.vonmises(D_arr_0p5, 0.5, size=1)
+def_gen.vonmises(0.5, D_arr_0p5, size=1)
+def_gen.vonmises(D_arr_like_0p5, 0.5)
+def_gen.vonmises(0.5, D_arr_like_0p5)
+def_gen.vonmises(D_arr_0p5, D_arr_0p5)
+def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.vonmises(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.wald(0.5, 0.5)
+def_gen.wald(0.5, 0.5, size=None)
+def_gen.wald(0.5, 0.5, size=1)
+def_gen.wald(D_arr_0p5, 0.5)
+def_gen.wald(0.5, D_arr_0p5)
+def_gen.wald(D_arr_0p5, 0.5, size=1)
+def_gen.wald(0.5, D_arr_0p5, size=1)
+def_gen.wald(D_arr_like_0p5, 0.5)
+def_gen.wald(0.5, D_arr_like_0p5)
+def_gen.wald(D_arr_0p5, D_arr_0p5)
+def_gen.wald(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.wald(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.wald(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.uniform(0.5, 0.5)
+def_gen.uniform(0.5, 0.5, size=None)
+def_gen.uniform(0.5, 0.5, size=1)
+def_gen.uniform(D_arr_0p5, 0.5)
+def_gen.uniform(0.5, D_arr_0p5)
+def_gen.uniform(D_arr_0p5, 0.5, size=1)
+def_gen.uniform(0.5, D_arr_0p5, size=1)
+def_gen.uniform(D_arr_like_0p5, 0.5)
+def_gen.uniform(0.5, D_arr_like_0p5)
+def_gen.uniform(D_arr_0p5, D_arr_0p5)
+def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.uniform(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.beta(0.5, 0.5)
+def_gen.beta(0.5, 0.5, size=None)
+def_gen.beta(0.5, 0.5, size=1)
+def_gen.beta(D_arr_0p5, 0.5)
+def_gen.beta(0.5, D_arr_0p5)
+def_gen.beta(D_arr_0p5, 0.5, size=1)
+def_gen.beta(0.5, D_arr_0p5, size=1)
+def_gen.beta(D_arr_like_0p5, 0.5)
+def_gen.beta(0.5, D_arr_like_0p5)
+def_gen.beta(D_arr_0p5, D_arr_0p5)
+def_gen.beta(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.beta(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.beta(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.f(0.5, 0.5)
+def_gen.f(0.5, 0.5, size=None)
+def_gen.f(0.5, 0.5, size=1)
+def_gen.f(D_arr_0p5, 0.5)
+def_gen.f(0.5, D_arr_0p5)
+def_gen.f(D_arr_0p5, 0.5, size=1)
+def_gen.f(0.5, D_arr_0p5, size=1)
+def_gen.f(D_arr_like_0p5, 0.5)
+def_gen.f(0.5, D_arr_like_0p5)
+def_gen.f(D_arr_0p5, D_arr_0p5)
+def_gen.f(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.f(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.f(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.gamma(0.5, 0.5)
+def_gen.gamma(0.5, 0.5, size=None)
+def_gen.gamma(0.5, 0.5, size=1)
+def_gen.gamma(D_arr_0p5, 0.5)
+def_gen.gamma(0.5, D_arr_0p5)
+def_gen.gamma(D_arr_0p5, 0.5, size=1)
+def_gen.gamma(0.5, D_arr_0p5, size=1)
+def_gen.gamma(D_arr_like_0p5, 0.5)
+def_gen.gamma(0.5, D_arr_like_0p5)
+def_gen.gamma(D_arr_0p5, D_arr_0p5)
+def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.gamma(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.gumbel(0.5, 0.5)
+def_gen.gumbel(0.5, 0.5, size=None)
+def_gen.gumbel(0.5, 0.5, size=1)
+def_gen.gumbel(D_arr_0p5, 0.5)
+def_gen.gumbel(0.5, D_arr_0p5)
+def_gen.gumbel(D_arr_0p5, 0.5, size=1)
+def_gen.gumbel(0.5, D_arr_0p5, size=1)
+def_gen.gumbel(D_arr_like_0p5, 0.5)
+def_gen.gumbel(0.5, D_arr_like_0p5)
+def_gen.gumbel(D_arr_0p5, D_arr_0p5)
+def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.gumbel(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.laplace(0.5, 0.5)
+def_gen.laplace(0.5, 0.5, size=None)
+def_gen.laplace(0.5, 0.5, size=1)
+def_gen.laplace(D_arr_0p5, 0.5)
+def_gen.laplace(0.5, D_arr_0p5)
+def_gen.laplace(D_arr_0p5, 0.5, size=1)
+def_gen.laplace(0.5, D_arr_0p5, size=1)
+def_gen.laplace(D_arr_like_0p5, 0.5)
+def_gen.laplace(0.5, D_arr_like_0p5)
+def_gen.laplace(D_arr_0p5, D_arr_0p5)
+def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.laplace(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.logistic(0.5, 0.5)
+def_gen.logistic(0.5, 0.5, size=None)
+def_gen.logistic(0.5, 0.5, size=1)
+def_gen.logistic(D_arr_0p5, 0.5)
+def_gen.logistic(0.5, D_arr_0p5)
+def_gen.logistic(D_arr_0p5, 0.5, size=1)
+def_gen.logistic(0.5, D_arr_0p5, size=1)
+def_gen.logistic(D_arr_like_0p5, 0.5)
+def_gen.logistic(0.5, D_arr_like_0p5)
+def_gen.logistic(D_arr_0p5, D_arr_0p5)
+def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.logistic(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.lognormal(0.5, 0.5)
+def_gen.lognormal(0.5, 0.5, size=None)
+def_gen.lognormal(0.5, 0.5, size=1)
+def_gen.lognormal(D_arr_0p5, 0.5)
+def_gen.lognormal(0.5, D_arr_0p5)
+def_gen.lognormal(D_arr_0p5, 0.5, size=1)
+def_gen.lognormal(0.5, D_arr_0p5, size=1)
+def_gen.lognormal(D_arr_like_0p5, 0.5)
+def_gen.lognormal(0.5, D_arr_like_0p5)
+def_gen.lognormal(D_arr_0p5, D_arr_0p5)
+def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.lognormal(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.noncentral_chisquare(0.5, 0.5)
+def_gen.noncentral_chisquare(0.5, 0.5, size=None)
+def_gen.noncentral_chisquare(0.5, 0.5, size=1)
+def_gen.noncentral_chisquare(D_arr_0p5, 0.5)
+def_gen.noncentral_chisquare(0.5, D_arr_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, 0.5, size=1)
+def_gen.noncentral_chisquare(0.5, D_arr_0p5, size=1)
+def_gen.noncentral_chisquare(D_arr_like_0p5, 0.5)
+def_gen.noncentral_chisquare(0.5, D_arr_like_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5)
+def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.normal(0.5, 0.5)
+def_gen.normal(0.5, 0.5, size=None)
+def_gen.normal(0.5, 0.5, size=1)
+def_gen.normal(D_arr_0p5, 0.5)
+def_gen.normal(0.5, D_arr_0p5)
+def_gen.normal(D_arr_0p5, 0.5, size=1)
+def_gen.normal(0.5, D_arr_0p5, size=1)
+def_gen.normal(D_arr_like_0p5, 0.5)
+def_gen.normal(0.5, D_arr_like_0p5)
+def_gen.normal(D_arr_0p5, D_arr_0p5)
+def_gen.normal(D_arr_like_0p5, D_arr_like_0p5)
+def_gen.normal(D_arr_0p5, D_arr_0p5, size=1)
+def_gen.normal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+def_gen.triangular(0.1, 0.5, 0.9)
+def_gen.triangular(0.1, 0.5, 0.9, size=None)
+def_gen.triangular(0.1, 0.5, 0.9, size=1)
+def_gen.triangular(D_arr_0p1, 0.5, 0.9)
+def_gen.triangular(0.1, D_arr_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+def_gen.triangular(0.1, D_arr_0p5, 0.9, size=1)
+def_gen.triangular(D_arr_like_0p1, 0.5, D_arr_0p9)
+def_gen.triangular(0.5, D_arr_like_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, D_arr_0p5, 0.9)
+def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+def_gen.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+def_gen.noncentral_f(0.1, 0.5, 0.9)
+def_gen.noncentral_f(0.1, 0.5, 0.9, size=None)
+def_gen.noncentral_f(0.1, 0.5, 0.9, size=1)
+def_gen.noncentral_f(D_arr_0p1, 0.5, 0.9)
+def_gen.noncentral_f(0.1, D_arr_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+def_gen.noncentral_f(0.1, D_arr_0p5, 0.9, size=1)
+def_gen.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9)
+def_gen.noncentral_f(0.5, D_arr_like_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9)
+def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+def_gen.binomial(10, 0.5)
+def_gen.binomial(10, 0.5, size=None)
+def_gen.binomial(10, 0.5, size=1)
+def_gen.binomial(I_arr_10, 0.5)
+def_gen.binomial(10, D_arr_0p5)
+def_gen.binomial(I_arr_10, 0.5, size=1)
+def_gen.binomial(10, D_arr_0p5, size=1)
+def_gen.binomial(I_arr_like_10, 0.5)
+def_gen.binomial(10, D_arr_like_0p5)
+def_gen.binomial(I_arr_10, D_arr_0p5)
+def_gen.binomial(I_arr_like_10, D_arr_like_0p5)
+def_gen.binomial(I_arr_10, D_arr_0p5, size=1)
+def_gen.binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+def_gen.negative_binomial(10, 0.5)
+def_gen.negative_binomial(10, 0.5, size=None)
+def_gen.negative_binomial(10, 0.5, size=1)
+def_gen.negative_binomial(I_arr_10, 0.5)
+def_gen.negative_binomial(10, D_arr_0p5)
+def_gen.negative_binomial(I_arr_10, 0.5, size=1)
+def_gen.negative_binomial(10, D_arr_0p5, size=1)
+def_gen.negative_binomial(I_arr_like_10, 0.5)
+def_gen.negative_binomial(10, D_arr_like_0p5)
+def_gen.negative_binomial(I_arr_10, D_arr_0p5)
+def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5)
+def_gen.negative_binomial(I_arr_10, D_arr_0p5, size=1)
+def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+def_gen.hypergeometric(20, 20, 10)
+def_gen.hypergeometric(20, 20, 10, size=None)
+def_gen.hypergeometric(20, 20, 10, size=1)
+def_gen.hypergeometric(I_arr_20, 20, 10)
+def_gen.hypergeometric(20, I_arr_20, 10)
+def_gen.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1)
+def_gen.hypergeometric(20, I_arr_20, 10, size=1)
+def_gen.hypergeometric(I_arr_like_20, 20, I_arr_10)
+def_gen.hypergeometric(20, I_arr_like_20, 10)
+def_gen.hypergeometric(I_arr_20, I_arr_20, 10)
+def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, 10)
+def_gen.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1)
+def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1)
+
+I_int64_100: np.ndarray[Any, np.dtype[np.int64]] = np.array([100], dtype=np.int64)
+
+def_gen.integers(0, 100)
+def_gen.integers(100)
+def_gen.integers([100])
+def_gen.integers(0, [100])
+
+I_bool_low: np.ndarray[Any, np.dtype[np.bool]] = np.array([0], dtype=np.bool)
+I_bool_low_like: list[int] = [0]
+I_bool_high_open: np.ndarray[Any, np.dtype[np.bool]] = np.array([1], dtype=np.bool)
+I_bool_high_closed: np.ndarray[Any, np.dtype[np.bool]] = np.array([1], dtype=np.bool)
+
+def_gen.integers(2, dtype=bool)
+def_gen.integers(0, 2, dtype=bool)
+def_gen.integers(1, dtype=bool, endpoint=True)
+def_gen.integers(0, 1, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_low_like, 1, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_high_open, dtype=bool)
+def_gen.integers(I_bool_low, I_bool_high_open, dtype=bool)
+def_gen.integers(0, I_bool_high_open, dtype=bool)
+def_gen.integers(I_bool_high_closed, dtype=bool, endpoint=True)
+def_gen.integers(I_bool_low, I_bool_high_closed, dtype=bool, endpoint=True)
+def_gen.integers(0, I_bool_high_closed, dtype=bool, endpoint=True)
+
+def_gen.integers(2, dtype=np.bool)
+def_gen.integers(0, 2, dtype=np.bool)
+def_gen.integers(1, dtype=np.bool, endpoint=True)
+def_gen.integers(0, 1, dtype=np.bool, endpoint=True)
+def_gen.integers(I_bool_low_like, 1, dtype=np.bool, endpoint=True)
+def_gen.integers(I_bool_high_open, dtype=np.bool)
+def_gen.integers(I_bool_low, I_bool_high_open, dtype=np.bool)
+def_gen.integers(0, I_bool_high_open, dtype=np.bool)
+def_gen.integers(I_bool_high_closed, dtype=np.bool, endpoint=True)
+def_gen.integers(I_bool_low, I_bool_high_closed, dtype=np.bool, endpoint=True)
+def_gen.integers(0, I_bool_high_closed, dtype=np.bool, endpoint=True)
+
+I_u1_low: np.ndarray[Any, np.dtype[np.uint8]] = np.array([0], dtype=np.uint8)
+I_u1_low_like: list[int] = [0]
+I_u1_high_open: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+I_u1_high_closed: np.ndarray[Any, np.dtype[np.uint8]] = np.array([255], dtype=np.uint8)
+
+def_gen.integers(256, dtype="u1")
+def_gen.integers(0, 256, dtype="u1")
+def_gen.integers(255, dtype="u1", endpoint=True)
+def_gen.integers(0, 255, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_high_open, dtype="u1")
+def_gen.integers(I_u1_low, I_u1_high_open, dtype="u1")
+def_gen.integers(0, I_u1_high_open, dtype="u1")
+def_gen.integers(I_u1_high_closed, dtype="u1", endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype="u1", endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype="u1", endpoint=True)
+
+def_gen.integers(256, dtype="uint8")
+def_gen.integers(0, 256, dtype="uint8")
+def_gen.integers(255, dtype="uint8", endpoint=True)
+def_gen.integers(0, 255, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_high_open, dtype="uint8")
+def_gen.integers(I_u1_low, I_u1_high_open, dtype="uint8")
+def_gen.integers(0, I_u1_high_open, dtype="uint8")
+def_gen.integers(I_u1_high_closed, dtype="uint8", endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype="uint8", endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype="uint8", endpoint=True)
+
+def_gen.integers(256, dtype=np.uint8)
+def_gen.integers(0, 256, dtype=np.uint8)
+def_gen.integers(255, dtype=np.uint8, endpoint=True)
+def_gen.integers(0, 255, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_low_like, 255, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_high_open, dtype=np.uint8)
+def_gen.integers(I_u1_low, I_u1_high_open, dtype=np.uint8)
+def_gen.integers(0, I_u1_high_open, dtype=np.uint8)
+def_gen.integers(I_u1_high_closed, dtype=np.uint8, endpoint=True)
+def_gen.integers(I_u1_low, I_u1_high_closed, dtype=np.uint8, endpoint=True)
+def_gen.integers(0, I_u1_high_closed, dtype=np.uint8, endpoint=True)
+
+I_u2_low: np.ndarray[Any, np.dtype[np.uint16]] = np.array([0], dtype=np.uint16)
+I_u2_low_like: list[int] = [0]
+I_u2_high_open: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+I_u2_high_closed: np.ndarray[Any, np.dtype[np.uint16]] = np.array([65535], dtype=np.uint16)
+
+def_gen.integers(65536, dtype="u2")
+def_gen.integers(0, 65536, dtype="u2")
+def_gen.integers(65535, dtype="u2", endpoint=True)
+def_gen.integers(0, 65535, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_high_open, dtype="u2")
+def_gen.integers(I_u2_low, I_u2_high_open, dtype="u2")
+def_gen.integers(0, I_u2_high_open, dtype="u2")
+def_gen.integers(I_u2_high_closed, dtype="u2", endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype="u2", endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype="u2", endpoint=True)
+
+def_gen.integers(65536, dtype="uint16")
+def_gen.integers(0, 65536, dtype="uint16")
+def_gen.integers(65535, dtype="uint16", endpoint=True)
+def_gen.integers(0, 65535, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_high_open, dtype="uint16")
+def_gen.integers(I_u2_low, I_u2_high_open, dtype="uint16")
+def_gen.integers(0, I_u2_high_open, dtype="uint16")
+def_gen.integers(I_u2_high_closed, dtype="uint16", endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype="uint16", endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype="uint16", endpoint=True)
+
+def_gen.integers(65536, dtype=np.uint16)
+def_gen.integers(0, 65536, dtype=np.uint16)
+def_gen.integers(65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(0, 65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_low_like, 65535, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_high_open, dtype=np.uint16)
+def_gen.integers(I_u2_low, I_u2_high_open, dtype=np.uint16)
+def_gen.integers(0, I_u2_high_open, dtype=np.uint16)
+def_gen.integers(I_u2_high_closed, dtype=np.uint16, endpoint=True)
+def_gen.integers(I_u2_low, I_u2_high_closed, dtype=np.uint16, endpoint=True)
+def_gen.integers(0, I_u2_high_closed, dtype=np.uint16, endpoint=True)
+
+I_u4_low: np.ndarray[Any, np.dtype[np.uint32]] = np.array([0], dtype=np.uint32)
+I_u4_low_like: list[int] = [0]
+I_u4_high_open: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+I_u4_high_closed: np.ndarray[Any, np.dtype[np.uint32]] = np.array([4294967295], dtype=np.uint32)
+
+def_gen.integers(4294967296, dtype="u4")
+def_gen.integers(0, 4294967296, dtype="u4")
+def_gen.integers(4294967295, dtype="u4", endpoint=True)
+def_gen.integers(0, 4294967295, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_high_open, dtype="u4")
+def_gen.integers(I_u4_low, I_u4_high_open, dtype="u4")
+def_gen.integers(0, I_u4_high_open, dtype="u4")
+def_gen.integers(I_u4_high_closed, dtype="u4", endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype="u4", endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype="u4", endpoint=True)
+
+def_gen.integers(4294967296, dtype="uint32")
+def_gen.integers(0, 4294967296, dtype="uint32")
+def_gen.integers(4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(0, 4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_high_open, dtype="uint32")
+def_gen.integers(I_u4_low, I_u4_high_open, dtype="uint32")
+def_gen.integers(0, I_u4_high_open, dtype="uint32")
+def_gen.integers(I_u4_high_closed, dtype="uint32", endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype="uint32", endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype="uint32", endpoint=True)
+
+def_gen.integers(4294967296, dtype=np.uint32)
+def_gen.integers(0, 4294967296, dtype=np.uint32)
+def_gen.integers(4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(0, 4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_high_open, dtype=np.uint32)
+def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint32)
+def_gen.integers(0, I_u4_high_open, dtype=np.uint32)
+def_gen.integers(I_u4_high_closed, dtype=np.uint32, endpoint=True)
+def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint32, endpoint=True)
+def_gen.integers(0, I_u4_high_closed, dtype=np.uint32, endpoint=True)
+
+I_u8_low: np.ndarray[Any, np.dtype[np.uint64]] = np.array([0], dtype=np.uint64)
+I_u8_low_like: list[int] = [0]
+I_u8_high_open: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+I_u8_high_closed: np.ndarray[Any, np.dtype[np.uint64]] = np.array([18446744073709551615], dtype=np.uint64)
+
+def_gen.integers(18446744073709551616, dtype="u8")
+def_gen.integers(0, 18446744073709551616, dtype="u8")
+def_gen.integers(18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_high_open, dtype="u8")
+def_gen.integers(I_u8_low, I_u8_high_open, dtype="u8")
+def_gen.integers(0, I_u8_high_open, dtype="u8")
+def_gen.integers(I_u8_high_closed, dtype="u8", endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype="u8", endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype="u8", endpoint=True)
+
+def_gen.integers(18446744073709551616, dtype="uint64")
+def_gen.integers(0, 18446744073709551616, dtype="uint64")
+def_gen.integers(18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_high_open, dtype="uint64")
+def_gen.integers(I_u8_low, I_u8_high_open, dtype="uint64")
+def_gen.integers(0, I_u8_high_open, dtype="uint64")
+def_gen.integers(I_u8_high_closed, dtype="uint64", endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype="uint64", endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype="uint64", endpoint=True)
+
+def_gen.integers(18446744073709551616, dtype=np.uint64)
+def_gen.integers(0, 18446744073709551616, dtype=np.uint64)
+def_gen.integers(18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(0, 18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_low_like, 18446744073709551615, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_high_open, dtype=np.uint64)
+def_gen.integers(I_u8_low, I_u8_high_open, dtype=np.uint64)
+def_gen.integers(0, I_u8_high_open, dtype=np.uint64)
+def_gen.integers(I_u8_high_closed, dtype=np.uint64, endpoint=True)
+def_gen.integers(I_u8_low, I_u8_high_closed, dtype=np.uint64, endpoint=True)
+def_gen.integers(0, I_u8_high_closed, dtype=np.uint64, endpoint=True)
+
+I_i1_low: np.ndarray[Any, np.dtype[np.int8]] = np.array([-128], dtype=np.int8)
+I_i1_low_like: list[int] = [-128]
+I_i1_high_open: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+I_i1_high_closed: np.ndarray[Any, np.dtype[np.int8]] = np.array([127], dtype=np.int8)
+
+def_gen.integers(128, dtype="i1")
+def_gen.integers(-128, 128, dtype="i1")
+def_gen.integers(127, dtype="i1", endpoint=True)
+def_gen.integers(-128, 127, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_high_open, dtype="i1")
+def_gen.integers(I_i1_low, I_i1_high_open, dtype="i1")
+def_gen.integers(-128, I_i1_high_open, dtype="i1")
+def_gen.integers(I_i1_high_closed, dtype="i1", endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype="i1", endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype="i1", endpoint=True)
+
+def_gen.integers(128, dtype="int8")
+def_gen.integers(-128, 128, dtype="int8")
+def_gen.integers(127, dtype="int8", endpoint=True)
+def_gen.integers(-128, 127, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_high_open, dtype="int8")
+def_gen.integers(I_i1_low, I_i1_high_open, dtype="int8")
+def_gen.integers(-128, I_i1_high_open, dtype="int8")
+def_gen.integers(I_i1_high_closed, dtype="int8", endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype="int8", endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype="int8", endpoint=True)
+
+def_gen.integers(128, dtype=np.int8)
+def_gen.integers(-128, 128, dtype=np.int8)
+def_gen.integers(127, dtype=np.int8, endpoint=True)
+def_gen.integers(-128, 127, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_low_like, 127, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_high_open, dtype=np.int8)
+def_gen.integers(I_i1_low, I_i1_high_open, dtype=np.int8)
+def_gen.integers(-128, I_i1_high_open, dtype=np.int8)
+def_gen.integers(I_i1_high_closed, dtype=np.int8, endpoint=True)
+def_gen.integers(I_i1_low, I_i1_high_closed, dtype=np.int8, endpoint=True)
+def_gen.integers(-128, I_i1_high_closed, dtype=np.int8, endpoint=True)
+
+I_i2_low: np.ndarray[Any, np.dtype[np.int16]] = np.array([-32768], dtype=np.int16)
+I_i2_low_like: list[int] = [-32768]
+I_i2_high_open: np.ndarray[Any, np.dtype[np.int16]] = np.array([32767], dtype=np.int16)
+I_i2_high_closed: np.ndarray[Any, np.dtype[np.int16]] = np.array([32767], dtype=np.int16)
+
+def_gen.integers(32768, dtype="i2")
+def_gen.integers(-32768, 32768, dtype="i2")
+def_gen.integers(32767, dtype="i2", endpoint=True)
+def_gen.integers(-32768, 32767, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_high_open, dtype="i2")
+def_gen.integers(I_i2_low, I_i2_high_open, dtype="i2")
+def_gen.integers(-32768, I_i2_high_open, dtype="i2")
+def_gen.integers(I_i2_high_closed, dtype="i2", endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype="i2", endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype="i2", endpoint=True)
+
+def_gen.integers(32768, dtype="int16")
+def_gen.integers(-32768, 32768, dtype="int16")
+def_gen.integers(32767, dtype="int16", endpoint=True)
+def_gen.integers(-32768, 32767, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_high_open, dtype="int16")
+def_gen.integers(I_i2_low, I_i2_high_open, dtype="int16")
+def_gen.integers(-32768, I_i2_high_open, dtype="int16")
+def_gen.integers(I_i2_high_closed, dtype="int16", endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype="int16", endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype="int16", endpoint=True)
+
+def_gen.integers(32768, dtype=np.int16)
+def_gen.integers(-32768, 32768, dtype=np.int16)
+def_gen.integers(32767, dtype=np.int16, endpoint=True)
+def_gen.integers(-32768, 32767, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_low_like, 32767, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_high_open, dtype=np.int16)
+def_gen.integers(I_i2_low, I_i2_high_open, dtype=np.int16)
+def_gen.integers(-32768, I_i2_high_open, dtype=np.int16)
+def_gen.integers(I_i2_high_closed, dtype=np.int16, endpoint=True)
+def_gen.integers(I_i2_low, I_i2_high_closed, dtype=np.int16, endpoint=True)
+def_gen.integers(-32768, I_i2_high_closed, dtype=np.int16, endpoint=True)
+
+I_i4_low: np.ndarray[Any, np.dtype[np.int32]] = np.array([-2147483648], dtype=np.int32)
+I_i4_low_like: list[int] = [-2147483648]
+I_i4_high_open: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+I_i4_high_closed: np.ndarray[Any, np.dtype[np.int32]] = np.array([2147483647], dtype=np.int32)
+
+def_gen.integers(2147483648, dtype="i4")
+def_gen.integers(-2147483648, 2147483648, dtype="i4")
+def_gen.integers(2147483647, dtype="i4", endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_high_open, dtype="i4")
+def_gen.integers(I_i4_low, I_i4_high_open, dtype="i4")
+def_gen.integers(-2147483648, I_i4_high_open, dtype="i4")
+def_gen.integers(I_i4_high_closed, dtype="i4", endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype="i4", endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype="i4", endpoint=True)
+
+def_gen.integers(2147483648, dtype="int32")
+def_gen.integers(-2147483648, 2147483648, dtype="int32")
+def_gen.integers(2147483647, dtype="int32", endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_high_open, dtype="int32")
+def_gen.integers(I_i4_low, I_i4_high_open, dtype="int32")
+def_gen.integers(-2147483648, I_i4_high_open, dtype="int32")
+def_gen.integers(I_i4_high_closed, dtype="int32", endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype="int32", endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype="int32", endpoint=True)
+
+def_gen.integers(2147483648, dtype=np.int32)
+def_gen.integers(-2147483648, 2147483648, dtype=np.int32)
+def_gen.integers(2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(-2147483648, 2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_low_like, 2147483647, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_high_open, dtype=np.int32)
+def_gen.integers(I_i4_low, I_i4_high_open, dtype=np.int32)
+def_gen.integers(-2147483648, I_i4_high_open, dtype=np.int32)
+def_gen.integers(I_i4_high_closed, dtype=np.int32, endpoint=True)
+def_gen.integers(I_i4_low, I_i4_high_closed, dtype=np.int32, endpoint=True)
+def_gen.integers(-2147483648, I_i4_high_closed, dtype=np.int32, endpoint=True)
+
+I_i8_low: np.ndarray[Any, np.dtype[np.int64]] = np.array([-9223372036854775808], dtype=np.int64)
+I_i8_low_like: list[int] = [-9223372036854775808]
+I_i8_high_open: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+I_i8_high_closed: np.ndarray[Any, np.dtype[np.int64]] = np.array([9223372036854775807], dtype=np.int64)
+
+def_gen.integers(9223372036854775808, dtype="i8")
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="i8")
+def_gen.integers(9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_high_open, dtype="i8")
+def_gen.integers(I_i8_low, I_i8_high_open, dtype="i8")
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="i8")
+def_gen.integers(I_i8_high_closed, dtype="i8", endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype="i8", endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="i8", endpoint=True)
+
+def_gen.integers(9223372036854775808, dtype="int64")
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="int64")
+def_gen.integers(9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_high_open, dtype="int64")
+def_gen.integers(I_i8_low, I_i8_high_open, dtype="int64")
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="int64")
+def_gen.integers(I_i8_high_closed, dtype="int64", endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype="int64", endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="int64", endpoint=True)
+
+def_gen.integers(9223372036854775808, dtype=np.int64)
+def_gen.integers(-9223372036854775808, 9223372036854775808, dtype=np.int64)
+def_gen.integers(9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(-9223372036854775808, 9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_low_like, 9223372036854775807, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_high_open, dtype=np.int64)
+def_gen.integers(I_i8_low, I_i8_high_open, dtype=np.int64)
+def_gen.integers(-9223372036854775808, I_i8_high_open, dtype=np.int64)
+def_gen.integers(I_i8_high_closed, dtype=np.int64, endpoint=True)
+def_gen.integers(I_i8_low, I_i8_high_closed, dtype=np.int64, endpoint=True)
+def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype=np.int64, endpoint=True)
+
+
+def_gen.bit_generator
+
+def_gen.bytes(2)
+
+def_gen.choice(5)
+def_gen.choice(5, 3)
+def_gen.choice(5, 3, replace=True)
+def_gen.choice(5, 3, p=[1 / 5] * 5)
+def_gen.choice(5, 3, p=[1 / 5] * 5, replace=False)
+
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"])
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True)
+def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4]))
+
+def_gen.dirichlet([0.5, 0.5])
+def_gen.dirichlet(np.array([0.5, 0.5]))
+def_gen.dirichlet(np.array([0.5, 0.5]), size=3)
+
+def_gen.multinomial(20, [1 / 6.0] * 6)
+def_gen.multinomial(20, np.array([0.5, 0.5]))
+def_gen.multinomial(20, [1 / 6.0] * 6, size=2)
+def_gen.multinomial([[10], [20]], [1 / 6.0] * 6, size=(2, 2))
+def_gen.multinomial(np.array([[10], [20]]), np.array([0.5, 0.5]), size=(2, 2))
+
+def_gen.multivariate_hypergeometric([3, 5, 7], 2)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=4)
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=(4, 7))
+def_gen.multivariate_hypergeometric([3, 5, 7], 2, method="count")
+def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, method="marginals")
+
+def_gen.multivariate_normal([0.0], [[1.0]])
+def_gen.multivariate_normal([0.0], np.array([[1.0]]))
+def_gen.multivariate_normal(np.array([0.0]), [[1.0]])
+def_gen.multivariate_normal([0.0], np.array([[1.0]]))
+
+def_gen.permutation(10)
+def_gen.permutation([1, 2, 3, 4])
+def_gen.permutation(np.array([1, 2, 3, 4]))
+def_gen.permutation(D_2D, axis=1)
+def_gen.permuted(D_2D)
+def_gen.permuted(D_2D_like)
+def_gen.permuted(D_2D, axis=1)
+def_gen.permuted(D_2D, out=D_2D)
+def_gen.permuted(D_2D_like, out=D_2D)
+def_gen.permuted(D_2D_like, out=D_2D)
+def_gen.permuted(D_2D, axis=1, out=D_2D)
+
+def_gen.shuffle(np.arange(10))
+def_gen.shuffle([1, 2, 3, 4, 5])
+def_gen.shuffle(D_2D, axis=1)
+
+def_gen.__str__()
+def_gen.__repr__()
+def_gen.__setstate__(dict(def_gen.bit_generator.state))
+
+# RandomState
+random_st: np.random.RandomState = np.random.RandomState()
+
+random_st.standard_normal()
+random_st.standard_normal(size=None)
+random_st.standard_normal(size=1)
+
+random_st.random()
+random_st.random(size=None)
+random_st.random(size=1)
+
+random_st.standard_cauchy()
+random_st.standard_cauchy(size=None)
+random_st.standard_cauchy(size=1)
+
+random_st.standard_exponential()
+random_st.standard_exponential(size=None)
+random_st.standard_exponential(size=1)
+
+random_st.zipf(1.5)
+random_st.zipf(1.5, size=None)
+random_st.zipf(1.5, size=1)
+random_st.zipf(D_arr_1p5)
+random_st.zipf(D_arr_1p5, size=1)
+random_st.zipf(D_arr_like_1p5)
+random_st.zipf(D_arr_like_1p5, size=1)
+
+random_st.weibull(0.5)
+random_st.weibull(0.5, size=None)
+random_st.weibull(0.5, size=1)
+random_st.weibull(D_arr_0p5)
+random_st.weibull(D_arr_0p5, size=1)
+random_st.weibull(D_arr_like_0p5)
+random_st.weibull(D_arr_like_0p5, size=1)
+
+random_st.standard_t(0.5)
+random_st.standard_t(0.5, size=None)
+random_st.standard_t(0.5, size=1)
+random_st.standard_t(D_arr_0p5)
+random_st.standard_t(D_arr_0p5, size=1)
+random_st.standard_t(D_arr_like_0p5)
+random_st.standard_t(D_arr_like_0p5, size=1)
+
+random_st.poisson(0.5)
+random_st.poisson(0.5, size=None)
+random_st.poisson(0.5, size=1)
+random_st.poisson(D_arr_0p5)
+random_st.poisson(D_arr_0p5, size=1)
+random_st.poisson(D_arr_like_0p5)
+random_st.poisson(D_arr_like_0p5, size=1)
+
+random_st.power(0.5)
+random_st.power(0.5, size=None)
+random_st.power(0.5, size=1)
+random_st.power(D_arr_0p5)
+random_st.power(D_arr_0p5, size=1)
+random_st.power(D_arr_like_0p5)
+random_st.power(D_arr_like_0p5, size=1)
+
+random_st.pareto(0.5)
+random_st.pareto(0.5, size=None)
+random_st.pareto(0.5, size=1)
+random_st.pareto(D_arr_0p5)
+random_st.pareto(D_arr_0p5, size=1)
+random_st.pareto(D_arr_like_0p5)
+random_st.pareto(D_arr_like_0p5, size=1)
+
+random_st.chisquare(0.5)
+random_st.chisquare(0.5, size=None)
+random_st.chisquare(0.5, size=1)
+random_st.chisquare(D_arr_0p5)
+random_st.chisquare(D_arr_0p5, size=1)
+random_st.chisquare(D_arr_like_0p5)
+random_st.chisquare(D_arr_like_0p5, size=1)
+
+random_st.exponential(0.5)
+random_st.exponential(0.5, size=None)
+random_st.exponential(0.5, size=1)
+random_st.exponential(D_arr_0p5)
+random_st.exponential(D_arr_0p5, size=1)
+random_st.exponential(D_arr_like_0p5)
+random_st.exponential(D_arr_like_0p5, size=1)
+
+random_st.geometric(0.5)
+random_st.geometric(0.5, size=None)
+random_st.geometric(0.5, size=1)
+random_st.geometric(D_arr_0p5)
+random_st.geometric(D_arr_0p5, size=1)
+random_st.geometric(D_arr_like_0p5)
+random_st.geometric(D_arr_like_0p5, size=1)
+
+random_st.logseries(0.5)
+random_st.logseries(0.5, size=None)
+random_st.logseries(0.5, size=1)
+random_st.logseries(D_arr_0p5)
+random_st.logseries(D_arr_0p5, size=1)
+random_st.logseries(D_arr_like_0p5)
+random_st.logseries(D_arr_like_0p5, size=1)
+
+random_st.rayleigh(0.5)
+random_st.rayleigh(0.5, size=None)
+random_st.rayleigh(0.5, size=1)
+random_st.rayleigh(D_arr_0p5)
+random_st.rayleigh(D_arr_0p5, size=1)
+random_st.rayleigh(D_arr_like_0p5)
+random_st.rayleigh(D_arr_like_0p5, size=1)
+
+random_st.standard_gamma(0.5)
+random_st.standard_gamma(0.5, size=None)
+random_st.standard_gamma(0.5, size=1)
+random_st.standard_gamma(D_arr_0p5)
+random_st.standard_gamma(D_arr_0p5, size=1)
+random_st.standard_gamma(D_arr_like_0p5)
+random_st.standard_gamma(D_arr_like_0p5, size=1)
+random_st.standard_gamma(D_arr_like_0p5, size=1)
+
+random_st.vonmises(0.5, 0.5)
+random_st.vonmises(0.5, 0.5, size=None)
+random_st.vonmises(0.5, 0.5, size=1)
+random_st.vonmises(D_arr_0p5, 0.5)
+random_st.vonmises(0.5, D_arr_0p5)
+random_st.vonmises(D_arr_0p5, 0.5, size=1)
+random_st.vonmises(0.5, D_arr_0p5, size=1)
+random_st.vonmises(D_arr_like_0p5, 0.5)
+random_st.vonmises(0.5, D_arr_like_0p5)
+random_st.vonmises(D_arr_0p5, D_arr_0p5)
+random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5)
+random_st.vonmises(D_arr_0p5, D_arr_0p5, size=1)
+random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.wald(0.5, 0.5)
+random_st.wald(0.5, 0.5, size=None)
+random_st.wald(0.5, 0.5, size=1)
+random_st.wald(D_arr_0p5, 0.5)
+random_st.wald(0.5, D_arr_0p5)
+random_st.wald(D_arr_0p5, 0.5, size=1)
+random_st.wald(0.5, D_arr_0p5, size=1)
+random_st.wald(D_arr_like_0p5, 0.5)
+random_st.wald(0.5, D_arr_like_0p5)
+random_st.wald(D_arr_0p5, D_arr_0p5)
+random_st.wald(D_arr_like_0p5, D_arr_like_0p5)
+random_st.wald(D_arr_0p5, D_arr_0p5, size=1)
+random_st.wald(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.uniform(0.5, 0.5)
+random_st.uniform(0.5, 0.5, size=None)
+random_st.uniform(0.5, 0.5, size=1)
+random_st.uniform(D_arr_0p5, 0.5)
+random_st.uniform(0.5, D_arr_0p5)
+random_st.uniform(D_arr_0p5, 0.5, size=1)
+random_st.uniform(0.5, D_arr_0p5, size=1)
+random_st.uniform(D_arr_like_0p5, 0.5)
+random_st.uniform(0.5, D_arr_like_0p5)
+random_st.uniform(D_arr_0p5, D_arr_0p5)
+random_st.uniform(D_arr_like_0p5, D_arr_like_0p5)
+random_st.uniform(D_arr_0p5, D_arr_0p5, size=1)
+random_st.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.beta(0.5, 0.5)
+random_st.beta(0.5, 0.5, size=None)
+random_st.beta(0.5, 0.5, size=1)
+random_st.beta(D_arr_0p5, 0.5)
+random_st.beta(0.5, D_arr_0p5)
+random_st.beta(D_arr_0p5, 0.5, size=1)
+random_st.beta(0.5, D_arr_0p5, size=1)
+random_st.beta(D_arr_like_0p5, 0.5)
+random_st.beta(0.5, D_arr_like_0p5)
+random_st.beta(D_arr_0p5, D_arr_0p5)
+random_st.beta(D_arr_like_0p5, D_arr_like_0p5)
+random_st.beta(D_arr_0p5, D_arr_0p5, size=1)
+random_st.beta(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.f(0.5, 0.5)
+random_st.f(0.5, 0.5, size=None)
+random_st.f(0.5, 0.5, size=1)
+random_st.f(D_arr_0p5, 0.5)
+random_st.f(0.5, D_arr_0p5)
+random_st.f(D_arr_0p5, 0.5, size=1)
+random_st.f(0.5, D_arr_0p5, size=1)
+random_st.f(D_arr_like_0p5, 0.5)
+random_st.f(0.5, D_arr_like_0p5)
+random_st.f(D_arr_0p5, D_arr_0p5)
+random_st.f(D_arr_like_0p5, D_arr_like_0p5)
+random_st.f(D_arr_0p5, D_arr_0p5, size=1)
+random_st.f(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.gamma(0.5, 0.5)
+random_st.gamma(0.5, 0.5, size=None)
+random_st.gamma(0.5, 0.5, size=1)
+random_st.gamma(D_arr_0p5, 0.5)
+random_st.gamma(0.5, D_arr_0p5)
+random_st.gamma(D_arr_0p5, 0.5, size=1)
+random_st.gamma(0.5, D_arr_0p5, size=1)
+random_st.gamma(D_arr_like_0p5, 0.5)
+random_st.gamma(0.5, D_arr_like_0p5)
+random_st.gamma(D_arr_0p5, D_arr_0p5)
+random_st.gamma(D_arr_like_0p5, D_arr_like_0p5)
+random_st.gamma(D_arr_0p5, D_arr_0p5, size=1)
+random_st.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.gumbel(0.5, 0.5)
+random_st.gumbel(0.5, 0.5, size=None)
+random_st.gumbel(0.5, 0.5, size=1)
+random_st.gumbel(D_arr_0p5, 0.5)
+random_st.gumbel(0.5, D_arr_0p5)
+random_st.gumbel(D_arr_0p5, 0.5, size=1)
+random_st.gumbel(0.5, D_arr_0p5, size=1)
+random_st.gumbel(D_arr_like_0p5, 0.5)
+random_st.gumbel(0.5, D_arr_like_0p5)
+random_st.gumbel(D_arr_0p5, D_arr_0p5)
+random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5)
+random_st.gumbel(D_arr_0p5, D_arr_0p5, size=1)
+random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.laplace(0.5, 0.5)
+random_st.laplace(0.5, 0.5, size=None)
+random_st.laplace(0.5, 0.5, size=1)
+random_st.laplace(D_arr_0p5, 0.5)
+random_st.laplace(0.5, D_arr_0p5)
+random_st.laplace(D_arr_0p5, 0.5, size=1)
+random_st.laplace(0.5, D_arr_0p5, size=1)
+random_st.laplace(D_arr_like_0p5, 0.5)
+random_st.laplace(0.5, D_arr_like_0p5)
+random_st.laplace(D_arr_0p5, D_arr_0p5)
+random_st.laplace(D_arr_like_0p5, D_arr_like_0p5)
+random_st.laplace(D_arr_0p5, D_arr_0p5, size=1)
+random_st.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.logistic(0.5, 0.5)
+random_st.logistic(0.5, 0.5, size=None)
+random_st.logistic(0.5, 0.5, size=1)
+random_st.logistic(D_arr_0p5, 0.5)
+random_st.logistic(0.5, D_arr_0p5)
+random_st.logistic(D_arr_0p5, 0.5, size=1)
+random_st.logistic(0.5, D_arr_0p5, size=1)
+random_st.logistic(D_arr_like_0p5, 0.5)
+random_st.logistic(0.5, D_arr_like_0p5)
+random_st.logistic(D_arr_0p5, D_arr_0p5)
+random_st.logistic(D_arr_like_0p5, D_arr_like_0p5)
+random_st.logistic(D_arr_0p5, D_arr_0p5, size=1)
+random_st.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.lognormal(0.5, 0.5)
+random_st.lognormal(0.5, 0.5, size=None)
+random_st.lognormal(0.5, 0.5, size=1)
+random_st.lognormal(D_arr_0p5, 0.5)
+random_st.lognormal(0.5, D_arr_0p5)
+random_st.lognormal(D_arr_0p5, 0.5, size=1)
+random_st.lognormal(0.5, D_arr_0p5, size=1)
+random_st.lognormal(D_arr_like_0p5, 0.5)
+random_st.lognormal(0.5, D_arr_like_0p5)
+random_st.lognormal(D_arr_0p5, D_arr_0p5)
+random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5)
+random_st.lognormal(D_arr_0p5, D_arr_0p5, size=1)
+random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.noncentral_chisquare(0.5, 0.5)
+random_st.noncentral_chisquare(0.5, 0.5, size=None)
+random_st.noncentral_chisquare(0.5, 0.5, size=1)
+random_st.noncentral_chisquare(D_arr_0p5, 0.5)
+random_st.noncentral_chisquare(0.5, D_arr_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, 0.5, size=1)
+random_st.noncentral_chisquare(0.5, D_arr_0p5, size=1)
+random_st.noncentral_chisquare(D_arr_like_0p5, 0.5)
+random_st.noncentral_chisquare(0.5, D_arr_like_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5)
+random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5)
+random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1)
+random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.normal(0.5, 0.5)
+random_st.normal(0.5, 0.5, size=None)
+random_st.normal(0.5, 0.5, size=1)
+random_st.normal(D_arr_0p5, 0.5)
+random_st.normal(0.5, D_arr_0p5)
+random_st.normal(D_arr_0p5, 0.5, size=1)
+random_st.normal(0.5, D_arr_0p5, size=1)
+random_st.normal(D_arr_like_0p5, 0.5)
+random_st.normal(0.5, D_arr_like_0p5)
+random_st.normal(D_arr_0p5, D_arr_0p5)
+random_st.normal(D_arr_like_0p5, D_arr_like_0p5)
+random_st.normal(D_arr_0p5, D_arr_0p5, size=1)
+random_st.normal(D_arr_like_0p5, D_arr_like_0p5, size=1)
+
+random_st.triangular(0.1, 0.5, 0.9)
+random_st.triangular(0.1, 0.5, 0.9, size=None)
+random_st.triangular(0.1, 0.5, 0.9, size=1)
+random_st.triangular(D_arr_0p1, 0.5, 0.9)
+random_st.triangular(0.1, D_arr_0p5, 0.9)
+random_st.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+random_st.triangular(0.1, D_arr_0p5, 0.9, size=1)
+random_st.triangular(D_arr_like_0p1, 0.5, D_arr_0p9)
+random_st.triangular(0.5, D_arr_like_0p5, 0.9)
+random_st.triangular(D_arr_0p1, D_arr_0p5, 0.9)
+random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+random_st.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+random_st.noncentral_f(0.1, 0.5, 0.9)
+random_st.noncentral_f(0.1, 0.5, 0.9, size=None)
+random_st.noncentral_f(0.1, 0.5, 0.9, size=1)
+random_st.noncentral_f(D_arr_0p1, 0.5, 0.9)
+random_st.noncentral_f(0.1, D_arr_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1)
+random_st.noncentral_f(0.1, D_arr_0p5, 0.9, size=1)
+random_st.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9)
+random_st.noncentral_f(0.5, D_arr_like_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9)
+random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9)
+random_st.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1)
+random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1)
+
+random_st.binomial(10, 0.5)
+random_st.binomial(10, 0.5, size=None)
+random_st.binomial(10, 0.5, size=1)
+random_st.binomial(I_arr_10, 0.5)
+random_st.binomial(10, D_arr_0p5)
+random_st.binomial(I_arr_10, 0.5, size=1)
+random_st.binomial(10, D_arr_0p5, size=1)
+random_st.binomial(I_arr_like_10, 0.5)
+random_st.binomial(10, D_arr_like_0p5)
+random_st.binomial(I_arr_10, D_arr_0p5)
+random_st.binomial(I_arr_like_10, D_arr_like_0p5)
+random_st.binomial(I_arr_10, D_arr_0p5, size=1)
+random_st.binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+random_st.negative_binomial(10, 0.5)
+random_st.negative_binomial(10, 0.5, size=None)
+random_st.negative_binomial(10, 0.5, size=1)
+random_st.negative_binomial(I_arr_10, 0.5)
+random_st.negative_binomial(10, D_arr_0p5)
+random_st.negative_binomial(I_arr_10, 0.5, size=1)
+random_st.negative_binomial(10, D_arr_0p5, size=1)
+random_st.negative_binomial(I_arr_like_10, 0.5)
+random_st.negative_binomial(10, D_arr_like_0p5)
+random_st.negative_binomial(I_arr_10, D_arr_0p5)
+random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5)
+random_st.negative_binomial(I_arr_10, D_arr_0p5, size=1)
+random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1)
+
+random_st.hypergeometric(20, 20, 10)
+random_st.hypergeometric(20, 20, 10, size=None)
+random_st.hypergeometric(20, 20, 10, size=1)
+random_st.hypergeometric(I_arr_20, 20, 10)
+random_st.hypergeometric(20, I_arr_20, 10)
+random_st.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1)
+random_st.hypergeometric(20, I_arr_20, 10, size=1)
+random_st.hypergeometric(I_arr_like_20, 20, I_arr_10)
+random_st.hypergeometric(20, I_arr_like_20, 10)
+random_st.hypergeometric(I_arr_20, I_arr_20, 10)
+random_st.hypergeometric(I_arr_like_20, I_arr_like_20, 10)
+random_st.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1)
+random_st.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1)
+
+random_st.randint(0, 100)
+random_st.randint(100)
+random_st.randint([100])
+random_st.randint(0, [100])
+
+random_st.randint(2, dtype=bool)
+random_st.randint(0, 2, dtype=bool)
+random_st.randint(I_bool_high_open, dtype=bool)
+random_st.randint(I_bool_low, I_bool_high_open, dtype=bool)
+random_st.randint(0, I_bool_high_open, dtype=bool)
+
+random_st.randint(2, dtype=np.bool)
+random_st.randint(0, 2, dtype=np.bool)
+random_st.randint(I_bool_high_open, dtype=np.bool)
+random_st.randint(I_bool_low, I_bool_high_open, dtype=np.bool)
+random_st.randint(0, I_bool_high_open, dtype=np.bool)
+
+random_st.randint(256, dtype="u1")
+random_st.randint(0, 256, dtype="u1")
+random_st.randint(I_u1_high_open, dtype="u1")
+random_st.randint(I_u1_low, I_u1_high_open, dtype="u1")
+random_st.randint(0, I_u1_high_open, dtype="u1")
+
+random_st.randint(256, dtype="uint8")
+random_st.randint(0, 256, dtype="uint8")
+random_st.randint(I_u1_high_open, dtype="uint8")
+random_st.randint(I_u1_low, I_u1_high_open, dtype="uint8")
+random_st.randint(0, I_u1_high_open, dtype="uint8")
+
+random_st.randint(256, dtype=np.uint8)
+random_st.randint(0, 256, dtype=np.uint8)
+random_st.randint(I_u1_high_open, dtype=np.uint8)
+random_st.randint(I_u1_low, I_u1_high_open, dtype=np.uint8)
+random_st.randint(0, I_u1_high_open, dtype=np.uint8)
+
+random_st.randint(65536, dtype="u2")
+random_st.randint(0, 65536, dtype="u2")
+random_st.randint(I_u2_high_open, dtype="u2")
+random_st.randint(I_u2_low, I_u2_high_open, dtype="u2")
+random_st.randint(0, I_u2_high_open, dtype="u2")
+
+random_st.randint(65536, dtype="uint16")
+random_st.randint(0, 65536, dtype="uint16")
+random_st.randint(I_u2_high_open, dtype="uint16")
+random_st.randint(I_u2_low, I_u2_high_open, dtype="uint16")
+random_st.randint(0, I_u2_high_open, dtype="uint16")
+
+random_st.randint(65536, dtype=np.uint16)
+random_st.randint(0, 65536, dtype=np.uint16)
+random_st.randint(I_u2_high_open, dtype=np.uint16)
+random_st.randint(I_u2_low, I_u2_high_open, dtype=np.uint16)
+random_st.randint(0, I_u2_high_open, dtype=np.uint16)
+
+random_st.randint(4294967296, dtype="u4")
+random_st.randint(0, 4294967296, dtype="u4")
+random_st.randint(I_u4_high_open, dtype="u4")
+random_st.randint(I_u4_low, I_u4_high_open, dtype="u4")
+random_st.randint(0, I_u4_high_open, dtype="u4")
+
+random_st.randint(4294967296, dtype="uint32")
+random_st.randint(0, 4294967296, dtype="uint32")
+random_st.randint(I_u4_high_open, dtype="uint32")
+random_st.randint(I_u4_low, I_u4_high_open, dtype="uint32")
+random_st.randint(0, I_u4_high_open, dtype="uint32")
+
+random_st.randint(4294967296, dtype=np.uint32)
+random_st.randint(0, 4294967296, dtype=np.uint32)
+random_st.randint(I_u4_high_open, dtype=np.uint32)
+random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint32)
+random_st.randint(0, I_u4_high_open, dtype=np.uint32)
+
+
+random_st.randint(18446744073709551616, dtype="u8")
+random_st.randint(0, 18446744073709551616, dtype="u8")
+random_st.randint(I_u8_high_open, dtype="u8")
+random_st.randint(I_u8_low, I_u8_high_open, dtype="u8")
+random_st.randint(0, I_u8_high_open, dtype="u8")
+
+random_st.randint(18446744073709551616, dtype="uint64")
+random_st.randint(0, 18446744073709551616, dtype="uint64")
+random_st.randint(I_u8_high_open, dtype="uint64")
+random_st.randint(I_u8_low, I_u8_high_open, dtype="uint64")
+random_st.randint(0, I_u8_high_open, dtype="uint64")
+
+random_st.randint(18446744073709551616, dtype=np.uint64)
+random_st.randint(0, 18446744073709551616, dtype=np.uint64)
+random_st.randint(I_u8_high_open, dtype=np.uint64)
+random_st.randint(I_u8_low, I_u8_high_open, dtype=np.uint64)
+random_st.randint(0, I_u8_high_open, dtype=np.uint64)
+
+random_st.randint(128, dtype="i1")
+random_st.randint(-128, 128, dtype="i1")
+random_st.randint(I_i1_high_open, dtype="i1")
+random_st.randint(I_i1_low, I_i1_high_open, dtype="i1")
+random_st.randint(-128, I_i1_high_open, dtype="i1")
+
+random_st.randint(128, dtype="int8")
+random_st.randint(-128, 128, dtype="int8")
+random_st.randint(I_i1_high_open, dtype="int8")
+random_st.randint(I_i1_low, I_i1_high_open, dtype="int8")
+random_st.randint(-128, I_i1_high_open, dtype="int8")
+
+random_st.randint(128, dtype=np.int8)
+random_st.randint(-128, 128, dtype=np.int8)
+random_st.randint(I_i1_high_open, dtype=np.int8)
+random_st.randint(I_i1_low, I_i1_high_open, dtype=np.int8)
+random_st.randint(-128, I_i1_high_open, dtype=np.int8)
+
+random_st.randint(32768, dtype="i2")
+random_st.randint(-32768, 32768, dtype="i2")
+random_st.randint(I_i2_high_open, dtype="i2")
+random_st.randint(I_i2_low, I_i2_high_open, dtype="i2")
+random_st.randint(-32768, I_i2_high_open, dtype="i2")
+random_st.randint(32768, dtype="int16")
+random_st.randint(-32768, 32768, dtype="int16")
+random_st.randint(I_i2_high_open, dtype="int16")
+random_st.randint(I_i2_low, I_i2_high_open, dtype="int16")
+random_st.randint(-32768, I_i2_high_open, dtype="int16")
+random_st.randint(32768, dtype=np.int16)
+random_st.randint(-32768, 32768, dtype=np.int16)
+random_st.randint(I_i2_high_open, dtype=np.int16)
+random_st.randint(I_i2_low, I_i2_high_open, dtype=np.int16)
+random_st.randint(-32768, I_i2_high_open, dtype=np.int16)
+
+random_st.randint(2147483648, dtype="i4")
+random_st.randint(-2147483648, 2147483648, dtype="i4")
+random_st.randint(I_i4_high_open, dtype="i4")
+random_st.randint(I_i4_low, I_i4_high_open, dtype="i4")
+random_st.randint(-2147483648, I_i4_high_open, dtype="i4")
+
+random_st.randint(2147483648, dtype="int32")
+random_st.randint(-2147483648, 2147483648, dtype="int32")
+random_st.randint(I_i4_high_open, dtype="int32")
+random_st.randint(I_i4_low, I_i4_high_open, dtype="int32")
+random_st.randint(-2147483648, I_i4_high_open, dtype="int32")
+
+random_st.randint(2147483648, dtype=np.int32)
+random_st.randint(-2147483648, 2147483648, dtype=np.int32)
+random_st.randint(I_i4_high_open, dtype=np.int32)
+random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int32)
+random_st.randint(-2147483648, I_i4_high_open, dtype=np.int32)
+
+random_st.randint(9223372036854775808, dtype="i8")
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype="i8")
+random_st.randint(I_i8_high_open, dtype="i8")
+random_st.randint(I_i8_low, I_i8_high_open, dtype="i8")
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype="i8")
+
+random_st.randint(9223372036854775808, dtype="int64")
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype="int64")
+random_st.randint(I_i8_high_open, dtype="int64")
+random_st.randint(I_i8_low, I_i8_high_open, dtype="int64")
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype="int64")
+
+random_st.randint(9223372036854775808, dtype=np.int64)
+random_st.randint(-9223372036854775808, 9223372036854775808, dtype=np.int64)
+random_st.randint(I_i8_high_open, dtype=np.int64)
+random_st.randint(I_i8_low, I_i8_high_open, dtype=np.int64)
+random_st.randint(-9223372036854775808, I_i8_high_open, dtype=np.int64)
+
+bg: np.random.BitGenerator = random_st._bit_generator
+
+random_st.bytes(2)
+
+random_st.choice(5)
+random_st.choice(5, 3)
+random_st.choice(5, 3, replace=True)
+random_st.choice(5, 3, p=[1 / 5] * 5)
+random_st.choice(5, 3, p=[1 / 5] * 5, replace=False)
+
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"])
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True)
+random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4]))
+
+random_st.dirichlet([0.5, 0.5])
+random_st.dirichlet(np.array([0.5, 0.5]))
+random_st.dirichlet(np.array([0.5, 0.5]), size=3)
+
+random_st.multinomial(20, [1 / 6.0] * 6)
+random_st.multinomial(20, np.array([0.5, 0.5]))
+random_st.multinomial(20, [1 / 6.0] * 6, size=2)
+
+random_st.multivariate_normal([0.0], [[1.0]])
+random_st.multivariate_normal([0.0], np.array([[1.0]]))
+random_st.multivariate_normal(np.array([0.0]), [[1.0]])
+random_st.multivariate_normal([0.0], np.array([[1.0]]))
+
+random_st.permutation(10)
+random_st.permutation([1, 2, 3, 4])
+random_st.permutation(np.array([1, 2, 3, 4]))
+random_st.permutation(D_2D)
+
+random_st.shuffle(np.arange(10))
+random_st.shuffle([1, 2, 3, 4, 5])
+random_st.shuffle(D_2D)
+
+np.random.RandomState(SEED_PCG64)
+np.random.RandomState(0)
+np.random.RandomState([0, 1, 2])
+random_st.__str__()
+random_st.__repr__()
+random_st_state = random_st.__getstate__()
+random_st.__setstate__(random_st_state)
+random_st.seed()
+random_st.seed(1)
+random_st.seed([0, 1])
+random_st_get_state = random_st.get_state()
+random_st_get_state_legacy = random_st.get_state(legacy=True)
+random_st.set_state(random_st_get_state)
+
+random_st.rand()
+random_st.rand(1)
+random_st.rand(1, 2)
+random_st.randn()
+random_st.randn(1)
+random_st.randn(1, 2)
+random_st.random_sample()
+random_st.random_sample(1)
+random_st.random_sample(size=(1, 2))
+
+random_st.tomaxint()
+random_st.tomaxint(1)
+random_st.tomaxint((1,))
+
+np.random.mtrand.set_bit_generator(SEED_PCG64)
+np.random.mtrand.get_bit_generator()
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/recfunctions.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/recfunctions.py
new file mode 100644
index 0000000000000000000000000000000000000000..03322e064be4407c8748d415cc26f7e5861e1b7a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/recfunctions.py
@@ -0,0 +1,162 @@
+"""These tests are based on the doctests from `numpy/lib/recfunctions.py`."""
+
+from typing import Any
+from typing_extensions import assert_type
+
+import numpy as np
+import numpy.typing as npt
+from numpy.lib import recfunctions as rfn
+
+
+def test_recursive_fill_fields() -> None:
+ a: npt.NDArray[np.void] = np.array(
+ [(1, 10.0), (2, 20.0)],
+ dtype=[("A", np.int64), ("B", np.float64)],
+ )
+ b = np.zeros((int(3),), dtype=a.dtype)
+ out = rfn.recursive_fill_fields(a, b)
+ assert_type(out, np.ndarray[tuple[int], np.dtype[np.void]])
+
+
+def test_get_names() -> None:
+ names: tuple[str | Any, ...]
+ names = rfn.get_names(np.empty((1,), dtype=[("A", int)]).dtype)
+ names = rfn.get_names(np.empty((1,), dtype=[("A", int), ("B", float)]).dtype)
+
+ adtype = np.dtype([("a", int), ("b", [("b_a", int), ("b_b", int)])])
+ names = rfn.get_names(adtype)
+
+
+def test_get_names_flat() -> None:
+ names: tuple[str, ...]
+ names = rfn.get_names_flat(np.empty((1,), dtype=[("A", int)]).dtype)
+ names = rfn.get_names_flat(np.empty((1,), dtype=[("A", int), ("B", float)]).dtype)
+
+ adtype = np.dtype([("a", int), ("b", [("b_a", int), ("b_b", int)])])
+ names = rfn.get_names_flat(adtype)
+
+
+def test_flatten_descr() -> None:
+ ndtype = np.dtype([("a", " None:
+ ndtype = np.dtype([
+ ("A", int),
+ ("B", [("B_A", int), ("B_B", [("B_B_A", int), ("B_B_B", int)])]),
+ ])
+ assert_type(rfn.get_fieldstructure(ndtype), dict[str, list[str]])
+
+
+def test_merge_arrays() -> None:
+ assert_type(
+ rfn.merge_arrays((
+ np.ones((int(2),), np.int_),
+ np.ones((int(3),), np.float64),
+ )),
+ np.recarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_drop_fields() -> None:
+ ndtype = [("a", np.int64), ("b", [("b_a", np.double), ("b_b", np.int64)])]
+ a = np.ones((int(3),), dtype=ndtype)
+
+ assert_type(
+ rfn.drop_fields(a, "a"),
+ np.ndarray[tuple[int], np.dtype[np.void]],
+ )
+ assert_type(
+ rfn.drop_fields(a, "a", asrecarray=True),
+ np.rec.recarray[tuple[int], np.dtype[np.void]],
+ )
+ assert_type(
+ rfn.rec_drop_fields(a, "a"),
+ np.rec.recarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_rename_fields() -> None:
+ ndtype = [("a", np.int64), ("b", [("b_a", np.double), ("b_b", np.int64)])]
+ a = np.ones((int(3),), dtype=ndtype)
+
+ assert_type(
+ rfn.rename_fields(a, {"a": "A", "b_b": "B_B"}),
+ np.ndarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_repack_fields() -> None:
+ dt: np.dtype[np.void] = np.dtype("u1, None:
+ a = np.zeros(4, dtype=[("a", "i4"), ("b", "f4,u2"), ("c", "f4", 2)])
+ assert_type(rfn.structured_to_unstructured(a), npt.NDArray[Any])
+
+
+def unstructured_to_structured() -> None:
+ dt: np.dtype[np.void] = np.dtype([("a", "i4"), ("b", "f4,u2"), ("c", "f4", 2)])
+ a = np.arange(20, dtype=np.int32).reshape((4, 5))
+ assert_type(rfn.unstructured_to_structured(a, dt), npt.NDArray[np.void])
+
+
+def test_apply_along_fields() -> None:
+ b = np.ones(4, dtype=[("x", "i4"), ("y", "f4"), ("z", "f8")])
+ assert_type(
+ rfn.apply_along_fields(np.mean, b),
+ np.ndarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_assign_fields_by_name() -> None:
+ b = np.ones(4, dtype=[("x", "i4"), ("y", "f4"), ("z", "f8")])
+ assert_type(
+ rfn.apply_along_fields(np.mean, b),
+ np.ndarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_require_fields() -> None:
+ a = np.ones(4, dtype=[("a", "i4"), ("b", "f8"), ("c", "u1")])
+ assert_type(
+ rfn.require_fields(a, [("b", "f4"), ("c", "u1")]),
+ np.ndarray[tuple[int], np.dtype[np.void]],
+ )
+
+
+def test_stack_arrays() -> None:
+ x = np.zeros((int(2),), np.int32)
+ assert_type(
+ rfn.stack_arrays(x),
+ np.ndarray[tuple[int], np.dtype[np.int32]],
+ )
+
+ z = np.ones((int(2),), [("A", "|S3"), ("B", float)])
+ zz = np.ones((int(2),), [("A", "|S3"), ("B", np.float64), ("C", np.float64)])
+ assert_type(
+ rfn.stack_arrays((z, zz)),
+ np.ma.MaskedArray[tuple[int, ...], np.dtype[np.void]],
+ )
+
+
+def test_find_duplicates() -> None:
+ ndtype = np.dtype([("a", int)])
+
+ a = np.ma.ones(7, mask=[0, 0, 1, 0, 0, 0, 1]).view(ndtype)
+ assert_type(rfn.find_duplicates(a), np.ma.MaskedArray[Any, np.dtype[np.void]])
+ assert_type(
+ rfn.find_duplicates(a, ignoremask=True, return_index=True),
+ tuple[
+ np.ma.MaskedArray[Any, np.dtype[np.void]],
+ np.ndarray[Any, np.dtype[np.int_]],
+ ],
+ )
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/scalars.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/scalars.py
new file mode 100644
index 0000000000000000000000000000000000000000..89f24cb92991ba6586b21e1d707fb0d023731b89
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/scalars.py
@@ -0,0 +1,248 @@
+import datetime as dt
+
+import pytest
+import numpy as np
+
+b = np.bool()
+b_ = np.bool_()
+u8 = np.uint64()
+i8 = np.int64()
+f8 = np.float64()
+c16 = np.complex128()
+U = np.str_()
+S = np.bytes_()
+
+
+# Construction
+class D:
+ def __index__(self) -> int:
+ return 0
+
+
+class C:
+ def __complex__(self) -> complex:
+ return 3j
+
+
+class B:
+ def __int__(self) -> int:
+ return 4
+
+
+class A:
+ def __float__(self) -> float:
+ return 4.0
+
+
+np.complex64(3j)
+np.complex64(A())
+np.complex64(C())
+np.complex128(3j)
+np.complex128(C())
+np.complex128(None)
+np.complex64("1.2")
+np.complex128(b"2j")
+
+np.int8(4)
+np.int16(3.4)
+np.int32(4)
+np.int64(-1)
+np.uint8(B())
+np.uint32()
+np.int32("1")
+np.int64(b"2")
+
+np.float16(A())
+np.float32(16)
+np.float64(3.0)
+np.float64(None)
+np.float32("1")
+np.float16(b"2.5")
+
+np.uint64(D())
+np.float32(D())
+np.complex64(D())
+
+np.bytes_(b"hello")
+np.bytes_("hello", 'utf-8')
+np.bytes_("hello", encoding='utf-8')
+np.str_("hello")
+np.str_(b"hello", 'utf-8')
+np.str_(b"hello", encoding='utf-8')
+
+# Array-ish semantics
+np.int8().real
+np.int16().imag
+np.int32().data
+np.int64().flags
+
+np.uint8().itemsize * 2
+np.uint16().ndim + 1
+np.uint32().strides
+np.uint64().shape
+
+# Time structures
+np.datetime64()
+np.datetime64(0, "D")
+np.datetime64(0, b"D")
+np.datetime64(0, ('ms', 3))
+np.datetime64("2019")
+np.datetime64(b"2019")
+np.datetime64("2019", "D")
+np.datetime64("2019", "us")
+np.datetime64("2019", "as")
+np.datetime64(np.datetime64())
+np.datetime64(np.datetime64())
+np.datetime64(dt.datetime(2000, 5, 3))
+np.datetime64(dt.datetime(2000, 5, 3), "D")
+np.datetime64(dt.datetime(2000, 5, 3), "us")
+np.datetime64(dt.datetime(2000, 5, 3), "as")
+np.datetime64(dt.date(2000, 5, 3))
+np.datetime64(dt.date(2000, 5, 3), "D")
+np.datetime64(dt.date(2000, 5, 3), "us")
+np.datetime64(dt.date(2000, 5, 3), "as")
+np.datetime64(None)
+np.datetime64(None, "D")
+
+np.timedelta64()
+np.timedelta64(0)
+np.timedelta64(0, "D")
+np.timedelta64(0, ('ms', 3))
+np.timedelta64(0, b"D")
+np.timedelta64("3")
+np.timedelta64(b"5")
+np.timedelta64(np.timedelta64(2))
+np.timedelta64(dt.timedelta(2))
+np.timedelta64(None)
+np.timedelta64(None, "D")
+
+np.void(1)
+np.void(np.int64(1))
+np.void(True)
+np.void(np.bool(True))
+np.void(b"test")
+np.void(np.bytes_("test"))
+np.void(object(), [("a", "O"), ("b", "O")])
+np.void(object(), dtype=[("a", "O"), ("b", "O")])
+
+# Protocols
+i8 = np.int64()
+u8 = np.uint64()
+f8 = np.float64()
+c16 = np.complex128()
+b = np.bool()
+td = np.timedelta64()
+U = np.str_("1")
+S = np.bytes_("1")
+AR = np.array(1, dtype=np.float64)
+
+int(i8)
+int(u8)
+int(f8)
+int(b)
+int(td)
+int(U)
+int(S)
+int(AR)
+with pytest.warns(np.exceptions.ComplexWarning):
+ int(c16)
+
+float(i8)
+float(u8)
+float(f8)
+float(b_)
+float(td)
+float(U)
+float(S)
+float(AR)
+with pytest.warns(np.exceptions.ComplexWarning):
+ float(c16)
+
+complex(i8)
+complex(u8)
+complex(f8)
+complex(c16)
+complex(b_)
+complex(td)
+complex(U)
+complex(AR)
+
+
+# Misc
+c16.dtype
+c16.real
+c16.imag
+c16.real.real
+c16.real.imag
+c16.ndim
+c16.size
+c16.itemsize
+c16.shape
+c16.strides
+c16.squeeze()
+c16.byteswap()
+c16.transpose()
+
+# Aliases
+np.byte()
+np.short()
+np.intc()
+np.intp()
+np.int_()
+np.longlong()
+
+np.ubyte()
+np.ushort()
+np.uintc()
+np.uintp()
+np.uint()
+np.ulonglong()
+
+np.half()
+np.single()
+np.double()
+np.longdouble()
+
+np.csingle()
+np.cdouble()
+np.clongdouble()
+
+b.item()
+i8.item()
+u8.item()
+f8.item()
+c16.item()
+U.item()
+S.item()
+
+b.tolist()
+i8.tolist()
+u8.tolist()
+f8.tolist()
+c16.tolist()
+U.tolist()
+S.tolist()
+
+b.ravel()
+i8.ravel()
+u8.ravel()
+f8.ravel()
+c16.ravel()
+U.ravel()
+S.ravel()
+
+b.flatten()
+i8.flatten()
+u8.flatten()
+f8.flatten()
+c16.flatten()
+U.flatten()
+S.flatten()
+
+b.reshape(1)
+i8.reshape(1)
+u8.reshape(1)
+f8.reshape(1)
+c16.reshape(1)
+U.reshape(1)
+S.reshape(1)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/shape.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/shape.py
new file mode 100644
index 0000000000000000000000000000000000000000..ab1ae3d9bc79e19d6000bee350b18fe34d9abdc0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/shape.py
@@ -0,0 +1,21 @@
+from typing import Any, NamedTuple, cast
+
+import numpy as np
+
+
+# Subtype of tuple[int, int]
+class XYGrid(NamedTuple):
+ x_axis: int
+ y_axis: int
+
+# TODO: remove this cast after: https://github.com/numpy/numpy/pull/27171
+arr: np.ndarray[XYGrid, Any] = cast(
+ np.ndarray[XYGrid, Any],
+ np.empty(XYGrid(2, 2)),
+)
+
+# Test variance of _ShapeType_co
+def accepts_2d(a: np.ndarray[tuple[int, int], Any]) -> None:
+ return None
+
+accepts_2d(arr)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple.py
new file mode 100644
index 0000000000000000000000000000000000000000..8f44e6e76f8353d55a29f6cc0608d39e7db433dc
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple.py
@@ -0,0 +1,168 @@
+"""Simple expression that should pass with mypy."""
+import operator
+
+import numpy as np
+import numpy.typing as npt
+from collections.abc import Iterable
+
+# Basic checks
+array = np.array([1, 2])
+
+
+def ndarray_func(x: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]:
+ return x
+
+
+ndarray_func(np.array([1, 2], dtype=np.float64))
+array == 1
+array.dtype == float
+
+# Dtype construction
+np.dtype(float)
+np.dtype(np.float64)
+np.dtype(None)
+np.dtype("float64")
+np.dtype(np.dtype(float))
+np.dtype(("U", 10))
+np.dtype((np.int32, (2, 2)))
+# Define the arguments on the previous line to prevent bidirectional
+# type inference in mypy from broadening the types.
+two_tuples_dtype = [("R", "u1"), ("G", "u1"), ("B", "u1")]
+np.dtype(two_tuples_dtype)
+
+three_tuples_dtype = [("R", "u1", 2)]
+np.dtype(three_tuples_dtype)
+
+mixed_tuples_dtype = [("R", "u1"), ("G", np.str_, 1)]
+np.dtype(mixed_tuples_dtype)
+
+shape_tuple_dtype = [("R", "u1", (2, 2))]
+np.dtype(shape_tuple_dtype)
+
+shape_like_dtype = [("R", "u1", (2, 2)), ("G", np.str_, 1)]
+np.dtype(shape_like_dtype)
+
+object_dtype = [("field1", object)]
+np.dtype(object_dtype)
+
+np.dtype((np.int32, (np.int8, 4)))
+
+# Dtype comparison
+np.dtype(float) == float
+np.dtype(float) != np.float64
+np.dtype(float) < None
+np.dtype(float) <= "float64"
+np.dtype(float) > np.dtype(float)
+np.dtype(float) >= np.dtype(("U", 10))
+
+# Iteration and indexing
+def iterable_func(x: Iterable[object]) -> Iterable[object]:
+ return x
+
+
+iterable_func(array)
+list(array)
+iter(array)
+zip(array, array)
+array[1]
+array[:]
+array[...]
+array[:] = 0
+
+array_2d = np.ones((3, 3))
+array_2d[:2, :2]
+array_2d[:2, :2] = 0
+array_2d[..., 0]
+array_2d[..., 0] = 2
+array_2d[-1, -1] = None
+
+array_obj = np.zeros(1, dtype=np.object_)
+array_obj[0] = slice(None)
+
+# Other special methods
+len(array)
+str(array)
+array_scalar = np.array(1)
+int(array_scalar)
+float(array_scalar)
+complex(array_scalar)
+bytes(array_scalar)
+operator.index(array_scalar)
+bool(array_scalar)
+
+# comparisons
+array < 1
+array <= 1
+array == 1
+array != 1
+array > 1
+array >= 1
+1 < array
+1 <= array
+1 == array
+1 != array
+1 > array
+1 >= array
+
+# binary arithmetic
+array + 1
+1 + array
+array += 1
+
+array - 1
+1 - array
+array -= 1
+
+array * 1
+1 * array
+array *= 1
+
+nonzero_array = np.array([1, 2])
+array / 1
+1 / nonzero_array
+float_array = np.array([1.0, 2.0])
+float_array /= 1
+
+array // 1
+1 // nonzero_array
+array //= 1
+
+array % 1
+1 % nonzero_array
+array %= 1
+
+divmod(array, 1)
+divmod(1, nonzero_array)
+
+array ** 1
+1 ** array
+array **= 1
+
+array << 1
+1 << array
+array <<= 1
+
+array >> 1
+1 >> array
+array >>= 1
+
+array & 1
+1 & array
+array &= 1
+
+array ^ 1
+1 ^ array
+array ^= 1
+
+array | 1
+1 | array
+array |= 1
+
+# unary arithmetic
+-array
++array
+abs(array)
+~array
+
+# Other methods
+np.array([1, 2]).transpose()
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple_py3.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple_py3.py
new file mode 100644
index 0000000000000000000000000000000000000000..c05a1ce612ac5e40d0914732c4c72ad1d3f2d552
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/simple_py3.py
@@ -0,0 +1,6 @@
+import numpy as np
+
+array = np.array([1, 2])
+
+# The @ operator is not in python 2
+array @ array
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunc_config.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunc_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..778e1b57f7e3831464f0bc9ba37e4baddcdf49d8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunc_config.py
@@ -0,0 +1,64 @@
+"""Typing tests for `numpy._core._ufunc_config`."""
+
+import numpy as np
+
+
+def func1(a: str, b: int) -> None:
+ return None
+
+
+def func2(a: str, b: int, c: float = 1.0) -> None:
+ return None
+
+
+def func3(a: str, b: int) -> int:
+ return 0
+
+
+class Write1:
+ def write(self, a: str) -> None:
+ return None
+
+
+class Write2:
+ def write(self, a: str, b: int = 1) -> None:
+ return None
+
+
+class Write3:
+ def write(self, a: str) -> int:
+ return 0
+
+
+_err_default = np.geterr()
+_bufsize_default = np.getbufsize()
+_errcall_default = np.geterrcall()
+
+try:
+ np.seterr(all=None)
+ np.seterr(divide="ignore")
+ np.seterr(over="warn")
+ np.seterr(under="call")
+ np.seterr(invalid="raise")
+ np.geterr()
+
+ np.setbufsize(4096)
+ np.getbufsize()
+
+ np.seterrcall(func1)
+ np.seterrcall(func2)
+ np.seterrcall(func3)
+ np.seterrcall(Write1())
+ np.seterrcall(Write2())
+ np.seterrcall(Write3())
+ np.geterrcall()
+
+ with np.errstate(call=func1, all="call"):
+ pass
+ with np.errstate(call=Write1(), divide="log", over="log"):
+ pass
+
+finally:
+ np.seterr(**_err_default)
+ np.setbufsize(_bufsize_default)
+ np.seterrcall(_errcall_default)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunclike.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunclike.py
new file mode 100644
index 0000000000000000000000000000000000000000..f993939ddba12851c5c93d3eed0f6d0923d0b98d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufunclike.py
@@ -0,0 +1,47 @@
+from __future__ import annotations
+from typing import Any
+import numpy as np
+
+
+class Object:
+ def __ceil__(self) -> Object:
+ return self
+
+ def __floor__(self) -> Object:
+ return self
+
+ def __ge__(self, value: object) -> bool:
+ return True
+
+ def __array__(self, dtype: np.typing.DTypeLike | None = None,
+ copy: bool | None = None) -> np.ndarray[Any, np.dtype[np.object_]]:
+ ret = np.empty((), dtype=object)
+ ret[()] = self
+ return ret
+
+
+AR_LIKE_b = [True, True, False]
+AR_LIKE_u = [np.uint32(1), np.uint32(2), np.uint32(3)]
+AR_LIKE_i = [1, 2, 3]
+AR_LIKE_f = [1.0, 2.0, 3.0]
+AR_LIKE_O = [Object(), Object(), Object()]
+AR_U: np.ndarray[Any, np.dtype[np.str_]] = np.zeros(3, dtype="U5")
+
+np.fix(AR_LIKE_b)
+np.fix(AR_LIKE_u)
+np.fix(AR_LIKE_i)
+np.fix(AR_LIKE_f)
+np.fix(AR_LIKE_O)
+np.fix(AR_LIKE_f, out=AR_U)
+
+np.isposinf(AR_LIKE_b)
+np.isposinf(AR_LIKE_u)
+np.isposinf(AR_LIKE_i)
+np.isposinf(AR_LIKE_f)
+np.isposinf(AR_LIKE_f, out=AR_U)
+
+np.isneginf(AR_LIKE_b)
+np.isneginf(AR_LIKE_u)
+np.isneginf(AR_LIKE_i)
+np.isneginf(AR_LIKE_f)
+np.isneginf(AR_LIKE_f, out=AR_U)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufuncs.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..dbc61bb0b17b594865bc909787798238c5b32bf5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/ufuncs.py
@@ -0,0 +1,16 @@
+import numpy as np
+
+np.sin(1)
+np.sin([1, 2, 3])
+np.sin(1, out=np.empty(1))
+np.matmul(np.ones((2, 2, 2)), np.ones((2, 2, 2)), axes=[(0, 1), (0, 1), (0, 1)])
+np.sin(1, signature="D->D")
+# NOTE: `np.generic` subclasses are not guaranteed to support addition;
+# re-enable this we can infer the exact return type of `np.sin(...)`.
+#
+# np.sin(1) + np.sin(1)
+np.sin.types[0]
+np.sin.__name__
+np.sin.__doc__
+
+np.abs(np.array([1]))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py
new file mode 100644
index 0000000000000000000000000000000000000000..c351afb084c57b2d1264a3ff020ed1e63703a623
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/pass/warnings_and_errors.py
@@ -0,0 +1,6 @@
+import numpy.exceptions as ex
+
+ex.AxisError("test")
+ex.AxisError(1, ndim=2)
+ex.AxisError(1, ndim=2, msg_prefix="error")
+ex.AxisError(1, ndim=2, msg_prefix=None)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..c0b94bae08a10aca0a72cba8ee54ef87e19c7ab7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arithmetic.pyi
@@ -0,0 +1,677 @@
+import datetime as dt
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _32Bit,_64Bit, _128Bit
+
+from typing_extensions import assert_type
+
+b: bool
+c: complex
+f: float
+i: int
+
+c16: np.complex128
+c8: np.complex64
+
+# Can't directly import `np.float128` as it is not available on all platforms
+f16: np.floating[_128Bit]
+f8: np.float64
+f4: np.float32
+
+i8: np.int64
+i4: np.int32
+
+u8: np.uint64
+u4: np.uint32
+
+b_: np.bool
+
+M8: np.datetime64
+M8_none: np.datetime64[None]
+M8_date: np.datetime64[dt.date]
+M8_time: np.datetime64[dt.datetime]
+M8_int: np.datetime64[int]
+date: dt.date
+time: dt.datetime
+
+m8: np.timedelta64
+m8_none: np.timedelta64[None]
+m8_int: np.timedelta64[int]
+m8_delta: np.timedelta64[dt.timedelta]
+delta: dt.timedelta
+
+AR_b: npt.NDArray[np.bool]
+AR_u: npt.NDArray[np.uint32]
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_c: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+AR_floating: npt.NDArray[np.floating]
+AR_number: npt.NDArray[np.number]
+AR_Any: npt.NDArray[Any]
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_m: list[np.timedelta64]
+AR_LIKE_M: list[np.datetime64]
+AR_LIKE_O: list[np.object_]
+
+
+# Array subtraction
+
+assert_type(AR_number - AR_number, npt.NDArray[np.number[Any]])
+
+assert_type(AR_b - AR_LIKE_u, npt.NDArray[np.uint32])
+assert_type(AR_b - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_b - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_b - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_b - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_b - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_u - AR_b, npt.NDArray[np.uint32])
+assert_type(AR_LIKE_i - AR_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_b, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_b, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_b, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_b, Any)
+
+assert_type(AR_u - AR_LIKE_b, npt.NDArray[np.uint32])
+assert_type(AR_u - AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_u - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_u - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_u - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_u - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_u, npt.NDArray[np.uint32])
+assert_type(AR_LIKE_u - AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i - AR_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_u, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_u, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_u, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_u, Any)
+
+assert_type(AR_i - AR_LIKE_b, npt.NDArray[np.int64])
+assert_type(AR_i - AR_LIKE_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i - AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i - AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_i - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_i - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_i - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_i, npt.NDArray[np.int64])
+assert_type(AR_LIKE_u - AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_i - AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f - AR_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_c - AR_i, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_m - AR_i, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_i, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_i, Any)
+
+assert_type(AR_f - AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_f - AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_f - AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_f - AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_f - AR_LIKE_c, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_f - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u - AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i - AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f - AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_c - AR_f, npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(AR_LIKE_O - AR_f, Any)
+
+assert_type(AR_c - AR_LIKE_b, npt.NDArray[np.complex128])
+assert_type(AR_c - AR_LIKE_u, npt.NDArray[np.complex128])
+assert_type(AR_c - AR_LIKE_i, npt.NDArray[np.complex128])
+assert_type(AR_c - AR_LIKE_f, npt.NDArray[np.complex128])
+assert_type(AR_c - AR_LIKE_c, npt.NDArray[np.complex128])
+assert_type(AR_c - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_c, npt.NDArray[np.complex128])
+assert_type(AR_LIKE_u - AR_c, npt.NDArray[np.complex128])
+assert_type(AR_LIKE_i - AR_c, npt.NDArray[np.complex128])
+assert_type(AR_LIKE_f - AR_c, npt.NDArray[np.complex128])
+assert_type(AR_LIKE_c - AR_c, npt.NDArray[np.complex128])
+assert_type(AR_LIKE_O - AR_c, Any)
+
+assert_type(AR_m - AR_LIKE_b, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_u, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_i, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_m, npt.NDArray[np.timedelta64])
+assert_type(AR_m - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_u - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_i - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_m - AR_m, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_M - AR_m, npt.NDArray[np.datetime64])
+assert_type(AR_LIKE_O - AR_m, Any)
+
+assert_type(AR_M - AR_LIKE_b, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_u, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_i, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_m, npt.NDArray[np.datetime64])
+assert_type(AR_M - AR_LIKE_M, npt.NDArray[np.timedelta64])
+assert_type(AR_M - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_M - AR_M, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O - AR_M, Any)
+
+assert_type(AR_O - AR_LIKE_b, Any)
+assert_type(AR_O - AR_LIKE_u, Any)
+assert_type(AR_O - AR_LIKE_i, Any)
+assert_type(AR_O - AR_LIKE_f, Any)
+assert_type(AR_O - AR_LIKE_c, Any)
+assert_type(AR_O - AR_LIKE_m, Any)
+assert_type(AR_O - AR_LIKE_M, Any)
+assert_type(AR_O - AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b - AR_O, Any)
+assert_type(AR_LIKE_u - AR_O, Any)
+assert_type(AR_LIKE_i - AR_O, Any)
+assert_type(AR_LIKE_f - AR_O, Any)
+assert_type(AR_LIKE_c - AR_O, Any)
+assert_type(AR_LIKE_m - AR_O, Any)
+assert_type(AR_LIKE_M - AR_O, Any)
+assert_type(AR_LIKE_O - AR_O, Any)
+
+# Array "true" division
+
+assert_type(AR_f / b, npt.NDArray[np.float64])
+assert_type(AR_f / i, npt.NDArray[np.float64])
+assert_type(AR_f / f, npt.NDArray[np.float64])
+
+assert_type(b / AR_f, npt.NDArray[np.float64])
+assert_type(i / AR_f, npt.NDArray[np.float64])
+assert_type(f / AR_f, npt.NDArray[np.float64])
+
+assert_type(AR_b / AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_b / AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_b / AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_b / AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_b / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b / AR_b, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u / AR_b, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i / AR_b, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f / AR_b, npt.NDArray[np.float64])
+assert_type(AR_LIKE_O / AR_b, Any)
+
+assert_type(AR_u / AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_u / AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_u / AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_u / AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_u / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b / AR_u, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u / AR_u, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i / AR_u, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f / AR_u, npt.NDArray[np.float64])
+assert_type(AR_LIKE_m / AR_u, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O / AR_u, Any)
+
+assert_type(AR_i / AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_i / AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_i / AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_i / AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_i / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b / AR_i, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u / AR_i, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i / AR_i, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f / AR_i, npt.NDArray[np.float64])
+assert_type(AR_LIKE_m / AR_i, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O / AR_i, Any)
+
+assert_type(AR_f / AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_f / AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_f / AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_f / AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_f / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b / AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u / AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i / AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f / AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_m / AR_f, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O / AR_f, Any)
+
+assert_type(AR_m / AR_LIKE_u, npt.NDArray[np.timedelta64])
+assert_type(AR_m / AR_LIKE_i, npt.NDArray[np.timedelta64])
+assert_type(AR_m / AR_LIKE_f, npt.NDArray[np.timedelta64])
+assert_type(AR_m / AR_LIKE_m, npt.NDArray[np.float64])
+assert_type(AR_m / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_m / AR_m, npt.NDArray[np.float64])
+assert_type(AR_LIKE_O / AR_m, Any)
+
+assert_type(AR_O / AR_LIKE_b, Any)
+assert_type(AR_O / AR_LIKE_u, Any)
+assert_type(AR_O / AR_LIKE_i, Any)
+assert_type(AR_O / AR_LIKE_f, Any)
+assert_type(AR_O / AR_LIKE_m, Any)
+assert_type(AR_O / AR_LIKE_M, Any)
+assert_type(AR_O / AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b / AR_O, Any)
+assert_type(AR_LIKE_u / AR_O, Any)
+assert_type(AR_LIKE_i / AR_O, Any)
+assert_type(AR_LIKE_f / AR_O, Any)
+assert_type(AR_LIKE_m / AR_O, Any)
+assert_type(AR_LIKE_M / AR_O, Any)
+assert_type(AR_LIKE_O / AR_O, Any)
+
+# Array floor division
+
+assert_type(AR_b // AR_LIKE_b, npt.NDArray[np.int8])
+assert_type(AR_b // AR_LIKE_u, npt.NDArray[np.uint32])
+assert_type(AR_b // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_b // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_b // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_b, npt.NDArray[np.int8])
+assert_type(AR_LIKE_u // AR_b, npt.NDArray[np.uint32])
+assert_type(AR_LIKE_i // AR_b, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_b, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_O // AR_b, Any)
+
+assert_type(AR_u // AR_LIKE_b, npt.NDArray[np.uint32])
+assert_type(AR_u // AR_LIKE_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_u // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_u // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_u // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_u, npt.NDArray[np.uint32])
+assert_type(AR_LIKE_u // AR_u, npt.NDArray[np.unsignedinteger[Any]])
+assert_type(AR_LIKE_i // AR_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_u, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_m // AR_u, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_u, Any)
+
+assert_type(AR_i // AR_LIKE_b, npt.NDArray[np.int64])
+assert_type(AR_i // AR_LIKE_u, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i // AR_LIKE_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_i // AR_LIKE_f, npt.NDArray[np.floating[Any]])
+assert_type(AR_i // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_i, npt.NDArray[np.int64])
+assert_type(AR_LIKE_u // AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_i // AR_i, npt.NDArray[np.signedinteger[Any]])
+assert_type(AR_LIKE_f // AR_i, npt.NDArray[np.floating[Any]])
+assert_type(AR_LIKE_m // AR_i, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_i, Any)
+
+assert_type(AR_f // AR_LIKE_b, npt.NDArray[np.float64])
+assert_type(AR_f // AR_LIKE_u, npt.NDArray[np.float64])
+assert_type(AR_f // AR_LIKE_i, npt.NDArray[np.float64])
+assert_type(AR_f // AR_LIKE_f, npt.NDArray[np.float64])
+assert_type(AR_f // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_u // AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_i // AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_f // AR_f, npt.NDArray[np.float64])
+assert_type(AR_LIKE_m // AR_f, npt.NDArray[np.timedelta64])
+assert_type(AR_LIKE_O // AR_f, Any)
+
+assert_type(AR_m // AR_LIKE_u, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_i, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_f, npt.NDArray[np.timedelta64])
+assert_type(AR_m // AR_LIKE_m, npt.NDArray[np.int64])
+assert_type(AR_m // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_m // AR_m, npt.NDArray[np.int64])
+assert_type(AR_LIKE_O // AR_m, Any)
+
+assert_type(AR_O // AR_LIKE_b, Any)
+assert_type(AR_O // AR_LIKE_u, Any)
+assert_type(AR_O // AR_LIKE_i, Any)
+assert_type(AR_O // AR_LIKE_f, Any)
+assert_type(AR_O // AR_LIKE_m, Any)
+assert_type(AR_O // AR_LIKE_M, Any)
+assert_type(AR_O // AR_LIKE_O, Any)
+
+assert_type(AR_LIKE_b // AR_O, Any)
+assert_type(AR_LIKE_u // AR_O, Any)
+assert_type(AR_LIKE_i // AR_O, Any)
+assert_type(AR_LIKE_f // AR_O, Any)
+assert_type(AR_LIKE_m // AR_O, Any)
+assert_type(AR_LIKE_M // AR_O, Any)
+assert_type(AR_LIKE_O // AR_O, Any)
+
+# unary ops
+
+assert_type(-f16, np.floating[_128Bit])
+assert_type(-c16, np.complex128)
+assert_type(-c8, np.complex64)
+assert_type(-f8, np.float64)
+assert_type(-f4, np.float32)
+assert_type(-i8, np.int64)
+assert_type(-i4, np.int32)
+assert_type(-u8, np.uint64)
+assert_type(-u4, np.uint32)
+assert_type(-m8, np.timedelta64)
+assert_type(-m8_none, np.timedelta64[None])
+assert_type(-m8_int, np.timedelta64[int])
+assert_type(-m8_delta, np.timedelta64[dt.timedelta])
+assert_type(-AR_f, npt.NDArray[np.float64])
+
+assert_type(+f16, np.floating[_128Bit])
+assert_type(+c16, np.complex128)
+assert_type(+c8, np.complex64)
+assert_type(+f8, np.float64)
+assert_type(+f4, np.float32)
+assert_type(+i8, np.int64)
+assert_type(+i4, np.int32)
+assert_type(+u8, np.uint64)
+assert_type(+u4, np.uint32)
+assert_type(+m8_none, np.timedelta64[None])
+assert_type(+m8_int, np.timedelta64[int])
+assert_type(+m8_delta, np.timedelta64[dt.timedelta])
+assert_type(+AR_f, npt.NDArray[np.float64])
+
+assert_type(abs(f16), np.floating[_128Bit])
+assert_type(abs(c16), np.float64)
+assert_type(abs(c8), np.float32)
+assert_type(abs(f8), np.float64)
+assert_type(abs(f4), np.float32)
+assert_type(abs(i8), np.int64)
+assert_type(abs(i4), np.int32)
+assert_type(abs(u8), np.uint64)
+assert_type(abs(u4), np.uint32)
+assert_type(abs(m8), np.timedelta64)
+assert_type(abs(m8_none), np.timedelta64[None])
+assert_type(abs(m8_int), np.timedelta64[int])
+assert_type(abs(m8_delta), np.timedelta64[dt.timedelta])
+assert_type(abs(b_), np.bool)
+assert_type(abs(AR_O), npt.NDArray[np.object_])
+
+# Time structures
+
+assert_type(M8 + m8, np.datetime64)
+assert_type(M8 + i, np.datetime64)
+assert_type(M8 + i8, np.datetime64)
+assert_type(M8 - M8, np.timedelta64)
+assert_type(M8 - i, np.datetime64)
+assert_type(M8 - i8, np.datetime64)
+
+assert_type(M8_none + m8, np.datetime64[None])
+assert_type(M8_none + i, np.datetime64[None])
+assert_type(M8_none + i8, np.datetime64[None])
+assert_type(M8_none - M8, np.timedelta64[None])
+assert_type(M8_none - m8, np.datetime64[None])
+assert_type(M8_none - i, np.datetime64[None])
+assert_type(M8_none - i8, np.datetime64[None])
+
+assert_type(m8 + m8, np.timedelta64)
+assert_type(m8 + i, np.timedelta64)
+assert_type(m8 + i8, np.timedelta64)
+assert_type(m8 - m8, np.timedelta64)
+assert_type(m8 - i, np.timedelta64)
+assert_type(m8 - i8, np.timedelta64)
+assert_type(m8 * f, np.timedelta64)
+assert_type(m8 * f4, np.timedelta64)
+assert_type(m8 * np.True_, np.timedelta64)
+assert_type(m8 / f, np.timedelta64)
+assert_type(m8 / f4, np.timedelta64)
+assert_type(m8 / m8, np.float64)
+assert_type(m8 // m8, np.int64)
+assert_type(m8 % m8, np.timedelta64)
+assert_type(divmod(m8, m8), tuple[np.int64, np.timedelta64])
+
+assert_type(m8_none + m8, np.timedelta64[None])
+assert_type(m8_none + i, np.timedelta64[None])
+assert_type(m8_none + i8, np.timedelta64[None])
+assert_type(m8_none - i, np.timedelta64[None])
+assert_type(m8_none - i8, np.timedelta64[None])
+
+assert_type(m8_int + i, np.timedelta64[int])
+assert_type(m8_int + m8_delta, np.timedelta64[int])
+assert_type(m8_int + m8, np.timedelta64[int | None])
+assert_type(m8_int - i, np.timedelta64[int])
+assert_type(m8_int - m8_delta, np.timedelta64[int])
+assert_type(m8_int - m8, np.timedelta64[int | None])
+
+assert_type(m8_delta + date, dt.date)
+assert_type(m8_delta + time, dt.datetime)
+assert_type(m8_delta + delta, dt.timedelta)
+assert_type(m8_delta - delta, dt.timedelta)
+assert_type(m8_delta / delta, float)
+assert_type(m8_delta // delta, int)
+assert_type(m8_delta % delta, dt.timedelta)
+assert_type(divmod(m8_delta, delta), tuple[int, dt.timedelta])
+
+# boolean
+
+assert_type(b_ / b, np.float64)
+assert_type(b_ / b_, np.float64)
+assert_type(b_ / i, np.float64)
+assert_type(b_ / i8, np.float64)
+assert_type(b_ / i4, np.float64)
+assert_type(b_ / u8, np.float64)
+assert_type(b_ / u4, np.float64)
+assert_type(b_ / f, np.float64)
+assert_type(b_ / f16, np.floating[_128Bit])
+assert_type(b_ / f8, np.float64)
+assert_type(b_ / f4, np.float32)
+assert_type(b_ / c, np.complex128)
+assert_type(b_ / c16, np.complex128)
+assert_type(b_ / c8, np.complex64)
+
+assert_type(b / b_, np.float64)
+assert_type(b_ / b_, np.float64)
+assert_type(i / b_, np.float64)
+assert_type(i8 / b_, np.float64)
+assert_type(i4 / b_, np.float64)
+assert_type(u8 / b_, np.float64)
+assert_type(u4 / b_, np.float64)
+assert_type(f / b_, np.float64)
+assert_type(f16 / b_, np.floating[_128Bit])
+assert_type(f8 / b_, np.float64)
+assert_type(f4 / b_, np.float32)
+assert_type(c / b_, np.complex128)
+assert_type(c16 / b_, np.complex128)
+assert_type(c8 / b_, np.complex64)
+
+# Complex
+
+assert_type(c16 + f16, np.complex128 | np.complexfloating[_128Bit, _128Bit])
+assert_type(c16 + c16, np.complex128)
+assert_type(c16 + f8, np.complex128)
+assert_type(c16 + i8, np.complex128)
+assert_type(c16 + c8, np.complex128)
+assert_type(c16 + f4, np.complex128)
+assert_type(c16 + i4, np.complex128)
+assert_type(c16 + b_, np.complex128)
+assert_type(c16 + b, np.complex128)
+assert_type(c16 + c, np.complex128)
+assert_type(c16 + f, np.complex128)
+assert_type(c16 + AR_f, npt.NDArray[np.complex128])
+
+assert_type(f16 + c16, np.complex128 | np.complexfloating[_128Bit, _128Bit])
+assert_type(c16 + c16, np.complex128)
+assert_type(f8 + c16, np.complex128)
+assert_type(i8 + c16, np.complex128)
+assert_type(c8 + c16, np.complex128 | np.complex64)
+assert_type(f4 + c16, np.complex128 | np.complex64)
+assert_type(i4 + c16, np.complex128)
+assert_type(b_ + c16, np.complex128)
+assert_type(b + c16, np.complex128)
+assert_type(c + c16, np.complex128)
+assert_type(f + c16, np.complex128)
+assert_type(AR_f + c16, npt.NDArray[np.complex128])
+
+assert_type(c8 + f16, np.complexfloating[_32Bit, _32Bit] | np.complexfloating[_128Bit, _128Bit])
+assert_type(c8 + c16, np.complex64 | np.complex128)
+assert_type(c8 + f8, np.complex64 | np.complex128)
+assert_type(c8 + i8, np.complexfloating[_32Bit, _32Bit] | np.complexfloating[_64Bit, _64Bit])
+assert_type(c8 + c8, np.complex64)
+assert_type(c8 + f4, np.complex64)
+assert_type(c8 + i4, np.complex64)
+assert_type(c8 + b_, np.complex64)
+assert_type(c8 + b, np.complex64)
+assert_type(c8 + c, np.complex64 | np.complex128)
+assert_type(c8 + f, np.complex64 | np.complex128)
+assert_type(c8 + AR_f, npt.NDArray[np.complexfloating])
+
+assert_type(f16 + c8, np.complexfloating[_128Bit, _128Bit] | np.complex64)
+assert_type(c16 + c8, np.complex128)
+assert_type(f8 + c8, np.complexfloating[_64Bit, _64Bit])
+assert_type(i8 + c8, np.complexfloating[_64Bit, _64Bit] | np.complex64)
+assert_type(c8 + c8, np.complex64)
+assert_type(f4 + c8, np.complex64)
+assert_type(i4 + c8, np.complex64)
+assert_type(b_ + c8, np.complex64)
+assert_type(b + c8, np.complex64)
+assert_type(c + c8, np.complex64 | np.complex128)
+assert_type(f + c8, np.complex64 | np.complex128)
+assert_type(AR_f + c8, npt.NDArray[np.complexfloating])
+
+# Float
+
+assert_type(f8 + f16, np.float64| np.floating[_128Bit])
+assert_type(f8 + f8, np.float64)
+assert_type(f8 + i8, np.float64)
+assert_type(f8 + f4, np.float64)
+assert_type(f8 + i4, np.float64)
+assert_type(f8 + b_, np.float64)
+assert_type(f8 + b, np.float64)
+assert_type(f8 + c, np.float64 | np.complex128)
+assert_type(f8 + f, np.float64)
+assert_type(f8 + AR_f, npt.NDArray[np.float64])
+
+assert_type(f16 + f8, np.floating[_128Bit] | np.float64)
+assert_type(f8 + f8, np.float64)
+assert_type(i8 + f8, np.float64)
+assert_type(f4 + f8, np.float32 | np.float64)
+assert_type(i4 + f8,np.float64)
+assert_type(b_ + f8, np.float64)
+assert_type(b + f8, np.float64)
+assert_type(c + f8, np.complex128 | np.float64)
+assert_type(f + f8, np.float64)
+assert_type(AR_f + f8, npt.NDArray[np.float64])
+
+assert_type(f4 + f16, np.float32 | np.floating[_128Bit])
+assert_type(f4 + f8, np.float32 | np.float64)
+assert_type(f4 + i8, np.float32 | np.floating[_64Bit])
+assert_type(f4 + f4, np.float32)
+assert_type(f4 + i4, np.float32)
+assert_type(f4 + b_, np.float32)
+assert_type(f4 + b, np.float32)
+assert_type(f4 + c, np.complex64 | np.complex128)
+assert_type(f4 + f, np.float32 | np.float64)
+assert_type(f4 + AR_f, npt.NDArray[np.float64])
+
+assert_type(f16 + f4, np.floating[_128Bit] | np.float32)
+assert_type(f8 + f4, np.float64)
+assert_type(i8 + f4, np.floating[_32Bit] | np.floating[_64Bit])
+assert_type(f4 + f4, np.float32)
+assert_type(i4 + f4, np.float32)
+assert_type(b_ + f4, np.float32)
+assert_type(b + f4, np.float32)
+assert_type(c + f4, np.complex64 | np.complex128)
+assert_type(f + f4, np.float64 | np.float32)
+assert_type(AR_f + f4, npt.NDArray[np.float64])
+
+# Int
+
+assert_type(i8 + i8, np.int64)
+assert_type(i8 + u8, Any)
+assert_type(i8 + i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i8 + u4, Any)
+assert_type(i8 + b_, np.int64)
+assert_type(i8 + b, np.int64)
+assert_type(i8 + c, np.complex128)
+assert_type(i8 + f, np.float64)
+assert_type(i8 + AR_f, npt.NDArray[np.float64])
+
+assert_type(u8 + u8, np.uint64)
+assert_type(u8 + i4, Any)
+assert_type(u8 + u4, np.unsignedinteger[_32Bit] | np.unsignedinteger[_64Bit])
+assert_type(u8 + b_, np.uint64)
+assert_type(u8 + b, np.uint64)
+assert_type(u8 + c, np.complex128)
+assert_type(u8 + f, np.float64)
+assert_type(u8 + AR_f, npt.NDArray[np.float64])
+
+assert_type(i8 + i8, np.int64)
+assert_type(u8 + i8, Any)
+assert_type(i4 + i8, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(u4 + i8, Any)
+assert_type(b_ + i8, np.int64)
+assert_type(b + i8, np.int64)
+assert_type(c + i8, np.complex128)
+assert_type(f + i8, np.float64)
+assert_type(AR_f + i8, npt.NDArray[np.float64])
+
+assert_type(u8 + u8, np.uint64)
+assert_type(i4 + u8, Any)
+assert_type(u4 + u8, np.unsignedinteger[_32Bit] | np.unsignedinteger[_64Bit])
+assert_type(b_ + u8, np.uint64)
+assert_type(b + u8, np.uint64)
+assert_type(c + u8, np.complex128)
+assert_type(f + u8, np.float64)
+assert_type(AR_f + u8, npt.NDArray[np.float64])
+
+assert_type(i4 + i8, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i4 + i4, np.int32)
+assert_type(i4 + b_, np.int32)
+assert_type(i4 + b, np.int32)
+assert_type(i4 + AR_f, npt.NDArray[np.float64])
+
+assert_type(u4 + i8, Any)
+assert_type(u4 + i4, Any)
+assert_type(u4 + u8, np.unsignedinteger[_32Bit] | np.unsignedinteger[_64Bit])
+assert_type(u4 + u4, np.uint32)
+assert_type(u4 + b_, np.uint32)
+assert_type(u4 + b, np.uint32)
+assert_type(u4 + AR_f, npt.NDArray[np.float64])
+
+assert_type(i8 + i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i4 + i4, np.int32)
+assert_type(b_ + i4, np.int32)
+assert_type(b + i4, np.int32)
+assert_type(AR_f + i4, npt.NDArray[np.float64])
+
+assert_type(i8 + u4, Any)
+assert_type(i4 + u4, Any)
+assert_type(u8 + u4, np.unsignedinteger[_32Bit] | np.unsignedinteger[_64Bit])
+assert_type(u4 + u4, np.uint32)
+assert_type(b_ + u4, np.uint32)
+assert_type(b + u4, np.uint32)
+assert_type(AR_f + u4, npt.NDArray[np.float64])
+
+# Any
+
+assert_type(AR_Any + 2, npt.NDArray[Any])
+
+# regression tests for https://github.com/numpy/numpy/issues/28805
+
+assert_type(AR_floating + f, npt.NDArray[np.floating])
+assert_type(AR_floating - f, npt.NDArray[np.floating])
+assert_type(AR_floating * f, npt.NDArray[np.floating])
+assert_type(AR_floating ** f, npt.NDArray[np.floating])
+assert_type(AR_floating / f, npt.NDArray[np.floating])
+assert_type(AR_floating // f, npt.NDArray[np.floating])
+assert_type(AR_floating % f, npt.NDArray[np.floating])
+assert_type(divmod(AR_floating, f), tuple[npt.NDArray[np.floating], npt.NDArray[np.floating]])
+
+assert_type(f + AR_floating, npt.NDArray[np.floating])
+assert_type(f - AR_floating, npt.NDArray[np.floating])
+assert_type(f * AR_floating, npt.NDArray[np.floating])
+assert_type(f ** AR_floating, npt.NDArray[np.floating])
+assert_type(f / AR_floating, npt.NDArray[np.floating])
+assert_type(f // AR_floating, npt.NDArray[np.floating])
+assert_type(f % AR_floating, npt.NDArray[np.floating])
+assert_type(divmod(f, AR_floating), tuple[npt.NDArray[np.floating], npt.NDArray[np.floating]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_api_info.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_api_info.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e4110b7344e2324b59c2c421cffeeb596dd4ca9a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_api_info.pyi
@@ -0,0 +1,72 @@
+from typing import Literal
+
+import numpy as np
+
+from typing_extensions import Never, assert_type
+
+info = np.__array_namespace_info__()
+
+assert_type(info.__module__, Literal["numpy"])
+
+assert_type(info.default_device(), Literal["cpu"])
+assert_type(info.devices()[0], Literal["cpu"])
+assert_type(info.devices()[-1], Literal["cpu"])
+
+assert_type(info.capabilities()["boolean indexing"], Literal[True])
+assert_type(info.capabilities()["data-dependent shapes"], Literal[True])
+
+assert_type(info.default_dtypes()["real floating"], np.dtype[np.float64])
+assert_type(info.default_dtypes()["complex floating"], np.dtype[np.complex128])
+assert_type(info.default_dtypes()["integral"], np.dtype[np.int_])
+assert_type(info.default_dtypes()["indexing"], np.dtype[np.intp])
+
+assert_type(info.dtypes()["bool"], np.dtype[np.bool])
+assert_type(info.dtypes()["int8"], np.dtype[np.int8])
+assert_type(info.dtypes()["uint8"], np.dtype[np.uint8])
+assert_type(info.dtypes()["float32"], np.dtype[np.float32])
+assert_type(info.dtypes()["complex64"], np.dtype[np.complex64])
+
+assert_type(info.dtypes(kind="bool")["bool"], np.dtype[np.bool])
+assert_type(info.dtypes(kind="signed integer")["int64"], np.dtype[np.int64])
+assert_type(info.dtypes(kind="unsigned integer")["uint64"], np.dtype[np.uint64])
+assert_type(info.dtypes(kind="integral")["int32"], np.dtype[np.int32])
+assert_type(info.dtypes(kind="integral")["uint32"], np.dtype[np.uint32])
+assert_type(info.dtypes(kind="real floating")["float64"], np.dtype[np.float64])
+assert_type(info.dtypes(kind="complex floating")["complex128"], np.dtype[np.complex128])
+assert_type(info.dtypes(kind="numeric")["int16"], np.dtype[np.int16])
+assert_type(info.dtypes(kind="numeric")["uint16"], np.dtype[np.uint16])
+assert_type(info.dtypes(kind="numeric")["float64"], np.dtype[np.float64])
+assert_type(info.dtypes(kind="numeric")["complex128"], np.dtype[np.complex128])
+
+assert_type(info.dtypes(kind=()), dict[Never, Never])
+
+assert_type(info.dtypes(kind=("bool",))["bool"], np.dtype[np.bool])
+assert_type(info.dtypes(kind=("signed integer",))["int64"], np.dtype[np.int64])
+assert_type(info.dtypes(kind=("integral",))["uint32"], np.dtype[np.uint32])
+assert_type(info.dtypes(kind=("complex floating",))["complex128"], np.dtype[np.complex128])
+assert_type(info.dtypes(kind=("numeric",))["float64"], np.dtype[np.float64])
+
+assert_type(
+ info.dtypes(kind=("signed integer", "unsigned integer"))["int8"],
+ np.dtype[np.int8],
+)
+assert_type(
+ info.dtypes(kind=("signed integer", "unsigned integer"))["uint8"],
+ np.dtype[np.uint8],
+)
+assert_type(
+ info.dtypes(kind=("integral", "real floating", "complex floating"))["int16"],
+ np.dtype[np.int16],
+)
+assert_type(
+ info.dtypes(kind=("integral", "real floating", "complex floating"))["uint16"],
+ np.dtype[np.uint16],
+)
+assert_type(
+ info.dtypes(kind=("integral", "real floating", "complex floating"))["float32"],
+ np.dtype[np.float32],
+)
+assert_type(
+ info.dtypes(kind=("integral", "real floating", "complex floating"))["complex64"],
+ np.dtype[np.complex64],
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..35861cc0e94205cb13739187647975f1e0cf3a1e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/array_constructors.pyi
@@ -0,0 +1,244 @@
+import sys
+from typing import Any, Literal as L, TypeVar
+from pathlib import Path
+from collections import deque
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic, covariant=True)
+
+class SubClass(npt.NDArray[_SCT]): ...
+
+i8: np.int64
+
+A: npt.NDArray[np.float64]
+B: SubClass[np.float64]
+C: list[int]
+D: SubClass[np.float64 | np.int64]
+
+def func(i: int, j: int, **kwargs: Any) -> SubClass[np.float64]: ...
+
+assert_type(np.empty_like(A), npt.NDArray[np.float64])
+assert_type(np.empty_like(B), SubClass[np.float64])
+assert_type(np.empty_like([1, 1.0]), npt.NDArray[Any])
+assert_type(np.empty_like(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.empty_like(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.array(A), npt.NDArray[np.float64])
+assert_type(np.array(B), npt.NDArray[np.float64])
+assert_type(np.array([1, 1.0]), npt.NDArray[Any])
+assert_type(np.array(deque([1, 2, 3])), npt.NDArray[Any])
+assert_type(np.array(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.array(A, dtype='c16'), npt.NDArray[Any])
+assert_type(np.array(A, like=A), npt.NDArray[np.float64])
+assert_type(np.array(A, subok=True), npt.NDArray[np.float64])
+assert_type(np.array(B, subok=True), SubClass[np.float64])
+assert_type(np.array(B, subok=True, ndmin=0), SubClass[np.float64])
+assert_type(np.array(B, subok=True, ndmin=1), SubClass[np.float64])
+assert_type(np.array(D), npt.NDArray[np.float64 | np.int64])
+
+assert_type(np.zeros([1, 5, 6]), npt.NDArray[np.float64])
+assert_type(np.zeros([1, 5, 6], dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.zeros([1, 5, 6], dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.empty([1, 5, 6]), npt.NDArray[np.float64])
+assert_type(np.empty([1, 5, 6], dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.empty([1, 5, 6], dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.concatenate(A), npt.NDArray[np.float64])
+assert_type(np.concatenate([A, A]), npt.NDArray[Any])
+assert_type(np.concatenate([[1], A]), npt.NDArray[Any])
+assert_type(np.concatenate([[1], [1]]), npt.NDArray[Any])
+assert_type(np.concatenate((A, A)), npt.NDArray[np.float64])
+assert_type(np.concatenate(([1], [1])), npt.NDArray[Any])
+assert_type(np.concatenate([1, 1.0]), npt.NDArray[Any])
+assert_type(np.concatenate(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.concatenate(A, dtype='c16'), npt.NDArray[Any])
+assert_type(np.concatenate([1, 1.0], out=A), npt.NDArray[np.float64])
+
+assert_type(np.asarray(A), npt.NDArray[np.float64])
+assert_type(np.asarray(B), npt.NDArray[np.float64])
+assert_type(np.asarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.asanyarray(A), npt.NDArray[np.float64])
+assert_type(np.asanyarray(B), SubClass[np.float64])
+assert_type(np.asanyarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asanyarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asanyarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.ascontiguousarray(A), npt.NDArray[np.float64])
+assert_type(np.ascontiguousarray(B), npt.NDArray[np.float64])
+assert_type(np.ascontiguousarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.ascontiguousarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.ascontiguousarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.asfortranarray(A), npt.NDArray[np.float64])
+assert_type(np.asfortranarray(B), npt.NDArray[np.float64])
+assert_type(np.asfortranarray([1, 1.0]), npt.NDArray[Any])
+assert_type(np.asfortranarray(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.asfortranarray(A, dtype='c16'), npt.NDArray[Any])
+
+assert_type(np.fromstring("1 1 1", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromstring(b"1 1 1", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromstring("1 1 1", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromstring(b"1 1 1", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromstring("1 1 1", dtype="c16", sep=" "), npt.NDArray[Any])
+assert_type(np.fromstring(b"1 1 1", dtype="c16", sep=" "), npt.NDArray[Any])
+
+assert_type(np.fromfile("test.txt", sep=" "), npt.NDArray[np.float64])
+assert_type(np.fromfile("test.txt", dtype=np.int64, sep=" "), npt.NDArray[np.int64])
+assert_type(np.fromfile("test.txt", dtype="c16", sep=" "), npt.NDArray[Any])
+with open("test.txt") as f:
+ assert_type(np.fromfile(f, sep=" "), npt.NDArray[np.float64])
+ assert_type(np.fromfile(b"test.txt", sep=" "), npt.NDArray[np.float64])
+ assert_type(np.fromfile(Path("test.txt"), sep=" "), npt.NDArray[np.float64])
+
+assert_type(np.fromiter("12345", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromiter("12345", float), npt.NDArray[Any])
+
+assert_type(np.frombuffer(A), npt.NDArray[np.float64])
+assert_type(np.frombuffer(A, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.frombuffer(A, dtype="c16"), npt.NDArray[Any])
+
+assert_type(np.arange(False, True), np.ndarray[tuple[int], np.dtype[np.signedinteger[Any]]])
+assert_type(np.arange(10), np.ndarray[tuple[int], np.dtype[np.signedinteger[Any]]])
+assert_type(np.arange(0, 10, step=2), np.ndarray[tuple[int], np.dtype[np.signedinteger[Any]]])
+assert_type(np.arange(10.0), np.ndarray[tuple[int], np.dtype[np.floating[Any]]])
+assert_type(np.arange(start=0, stop=10.0), np.ndarray[tuple[int], np.dtype[np.floating[Any]]])
+assert_type(np.arange(np.timedelta64(0)), np.ndarray[tuple[int], np.dtype[np.timedelta64]])
+assert_type(np.arange(0, np.timedelta64(10)), np.ndarray[tuple[int], np.dtype[np.timedelta64]])
+assert_type(np.arange(np.datetime64("0"), np.datetime64("10")), np.ndarray[tuple[int], np.dtype[np.datetime64]])
+assert_type(np.arange(10, dtype=np.float64), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(np.arange(0, 10, step=2, dtype=np.int16), np.ndarray[tuple[int], np.dtype[np.int16]])
+assert_type(np.arange(10, dtype=int), np.ndarray[tuple[int], np.dtype[Any]])
+assert_type(np.arange(0, 10, dtype="f8"), np.ndarray[tuple[int], np.dtype[Any]])
+
+assert_type(np.require(A), npt.NDArray[np.float64])
+assert_type(np.require(B), SubClass[np.float64])
+assert_type(np.require(B, requirements=None), SubClass[np.float64])
+assert_type(np.require(B, dtype=int), npt.NDArray[Any])
+assert_type(np.require(B, requirements="E"), npt.NDArray[Any])
+assert_type(np.require(B, requirements=["ENSUREARRAY"]), npt.NDArray[Any])
+assert_type(np.require(B, requirements={"F", "E"}), npt.NDArray[Any])
+assert_type(np.require(B, requirements=["C", "OWNDATA"]), SubClass[np.float64])
+assert_type(np.require(B, requirements="W"), SubClass[np.float64])
+assert_type(np.require(B, requirements="A"), SubClass[np.float64])
+assert_type(np.require(C), npt.NDArray[Any])
+
+assert_type(np.linspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.linspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.linspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.linspace(0, 10, dtype=int), npt.NDArray[Any])
+assert_type(np.linspace(0, 10, retstep=True), tuple[npt.NDArray[np.floating[Any]], np.floating[Any]])
+assert_type(np.linspace(0j, 10, retstep=True), tuple[npt.NDArray[np.complexfloating[Any, Any]], np.complexfloating[Any, Any]])
+assert_type(np.linspace(0, 10, retstep=True, dtype=np.int64), tuple[npt.NDArray[np.int64], np.int64])
+assert_type(np.linspace(0j, 10, retstep=True, dtype=int), tuple[npt.NDArray[Any], Any])
+
+assert_type(np.logspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.logspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.logspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.logspace(0, 10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.geomspace(0, 10), npt.NDArray[np.floating[Any]])
+assert_type(np.geomspace(0, 10j), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.geomspace(0, 10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.geomspace(0, 10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.zeros_like(A), npt.NDArray[np.float64])
+assert_type(np.zeros_like(C), npt.NDArray[Any])
+assert_type(np.zeros_like(A, dtype=float), npt.NDArray[Any])
+assert_type(np.zeros_like(B), SubClass[np.float64])
+assert_type(np.zeros_like(B, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(np.ones_like(A), npt.NDArray[np.float64])
+assert_type(np.ones_like(C), npt.NDArray[Any])
+assert_type(np.ones_like(A, dtype=float), npt.NDArray[Any])
+assert_type(np.ones_like(B), SubClass[np.float64])
+assert_type(np.ones_like(B, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(np.full_like(A, i8), npt.NDArray[np.float64])
+assert_type(np.full_like(C, i8), npt.NDArray[Any])
+assert_type(np.full_like(A, i8, dtype=int), npt.NDArray[Any])
+assert_type(np.full_like(B, i8), SubClass[np.float64])
+assert_type(np.full_like(B, i8, dtype=np.int64), npt.NDArray[np.int64])
+
+_size: int
+_shape_0d: tuple[()]
+_shape_1d: tuple[int]
+_shape_2d: tuple[int, int]
+_shape_nd: tuple[int, ...]
+_shape_like: list[int]
+
+assert_type(np.ones(_shape_0d), np.ndarray[tuple[()], np.dtype[np.float64]])
+assert_type(np.ones(_size), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(np.ones(_shape_2d), np.ndarray[tuple[int, int], np.dtype[np.float64]])
+assert_type(np.ones(_shape_nd), np.ndarray[tuple[int, ...], np.dtype[np.float64]])
+assert_type(np.ones(_shape_1d, dtype=np.int64), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(np.ones(_shape_like), npt.NDArray[np.float64])
+assert_type(np.ones(_shape_like, dtype=np.dtypes.Int64DType()), np.ndarray[Any, np.dtypes.Int64DType])
+assert_type(np.ones(_shape_like, dtype=int), npt.NDArray[Any])
+
+assert_type(np.full(_size, i8), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(np.full(_shape_2d, i8), np.ndarray[tuple[int, int], np.dtype[np.int64]])
+assert_type(np.full(_shape_like, i8), npt.NDArray[np.int64])
+assert_type(np.full(_shape_like, 42), npt.NDArray[Any])
+assert_type(np.full(_size, i8, dtype=np.float64), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(np.full(_size, i8, dtype=float), np.ndarray[tuple[int], np.dtype[Any]])
+assert_type(np.full(_shape_like, 42, dtype=float), npt.NDArray[Any])
+assert_type(np.full(_shape_0d, i8, dtype=object), np.ndarray[tuple[()], np.dtype[Any]])
+
+assert_type(np.indices([1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.indices([1, 2, 3], sparse=True), tuple[npt.NDArray[np.int_], ...])
+
+assert_type(np.fromfunction(func, (3, 5)), SubClass[np.float64])
+
+assert_type(np.identity(10), npt.NDArray[np.float64])
+assert_type(np.identity(10, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.identity(10, dtype=int), npt.NDArray[Any])
+
+assert_type(np.atleast_1d(A), npt.NDArray[np.float64])
+assert_type(np.atleast_1d(C), npt.NDArray[Any])
+assert_type(np.atleast_1d(A, A), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]])
+assert_type(np.atleast_1d(A, C), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.atleast_1d(C, C), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.atleast_1d(A, A, A), tuple[npt.NDArray[np.float64], ...])
+assert_type(np.atleast_1d(C, C, C), tuple[npt.NDArray[Any], ...])
+
+assert_type(np.atleast_2d(A), npt.NDArray[np.float64])
+assert_type(np.atleast_2d(A, A), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]])
+assert_type(np.atleast_2d(A, A, A), tuple[npt.NDArray[np.float64], ...])
+
+assert_type(np.atleast_3d(A), npt.NDArray[np.float64])
+assert_type(np.atleast_3d(A, A), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]])
+assert_type(np.atleast_3d(A, A, A), tuple[npt.NDArray[np.float64], ...])
+
+assert_type(np.vstack([A, A]), npt.NDArray[np.float64])
+assert_type(np.vstack([A, A], dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.vstack([A, C]), npt.NDArray[Any])
+assert_type(np.vstack([C, C]), npt.NDArray[Any])
+
+assert_type(np.hstack([A, A]), npt.NDArray[np.float64])
+assert_type(np.hstack([A, A], dtype=np.float32), npt.NDArray[np.float32])
+
+assert_type(np.stack([A, A]), npt.NDArray[np.float64])
+assert_type(np.stack([A, A], dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.stack([A, C]), npt.NDArray[Any])
+assert_type(np.stack([C, C]), npt.NDArray[Any])
+assert_type(np.stack([A, A], axis=0), npt.NDArray[np.float64])
+assert_type(np.stack([A, A], out=B), SubClass[np.float64])
+
+assert_type(np.block([[A, A], [A, A]]), npt.NDArray[Any])
+assert_type(np.block(C), npt.NDArray[Any])
+
+if sys.version_info >= (3, 12):
+ from collections.abc import Buffer
+
+ def create_array(obj: npt.ArrayLike) -> npt.NDArray[Any]: ...
+
+ buffer: Buffer
+ assert_type(create_array(buffer), npt.NDArray[Any])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d053dab1c76f9383f0d50041e20301bd2cde52fc
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraypad.pyi
@@ -0,0 +1,24 @@
+from collections.abc import Mapping
+from typing import Any, SupportsIndex
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+def mode_func(
+ ar: npt.NDArray[np.number[Any]],
+ width: tuple[int, int],
+ iaxis: SupportsIndex,
+ kwargs: Mapping[str, Any],
+) -> None: ...
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_LIKE: list[int]
+
+assert_type(np.pad(AR_i8, (2, 3), "constant"), npt.NDArray[np.int64])
+assert_type(np.pad(AR_LIKE, (2, 3), "constant"), npt.NDArray[Any])
+
+assert_type(np.pad(AR_f8, (2, 3), mode_func), npt.NDArray[np.float64])
+assert_type(np.pad(AR_f8, (2, 3), mode_func, a=1, b=2), npt.NDArray[np.float64])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f19f1536d416edec0d49b6a2ad043b68d92c7ad9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayprint.pyi
@@ -0,0 +1,27 @@
+import contextlib
+from collections.abc import Callable
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy._core.arrayprint import _FormatOptions
+
+from typing_extensions import assert_type
+
+AR: npt.NDArray[np.int64]
+func_float: Callable[[np.floating[Any]], str]
+func_int: Callable[[np.integer[Any]], str]
+
+assert_type(np.get_printoptions(), _FormatOptions)
+assert_type(
+ np.array2string(AR, formatter={'float_kind': func_float, 'int_kind': func_int}),
+ str,
+)
+assert_type(np.format_float_scientific(1.0), str)
+assert_type(np.format_float_positional(1), str)
+assert_type(np.array_repr(AR), str)
+assert_type(np.array_str(AR), str)
+
+assert_type(np.printoptions(), contextlib._GeneratorContextManager[_FormatOptions])
+with np.printoptions() as dct:
+ assert_type(dct, _FormatOptions)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..eabc7677cde9655914e0366cfadc13c9758830dc
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arraysetops.pyi
@@ -0,0 +1,72 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy.lib._arraysetops_impl import UniqueAllResult, UniqueCountsResult, UniqueInverseResult
+
+from typing_extensions import assert_type
+
+AR_b: npt.NDArray[np.bool]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+
+AR_LIKE_f8: list[float]
+
+assert_type(np.ediff1d(AR_b), npt.NDArray[np.int8])
+assert_type(np.ediff1d(AR_i8, to_end=[1, 2, 3]), npt.NDArray[np.int64])
+assert_type(np.ediff1d(AR_M), npt.NDArray[np.timedelta64])
+assert_type(np.ediff1d(AR_O), npt.NDArray[np.object_])
+assert_type(np.ediff1d(AR_LIKE_f8, to_begin=[1, 1.5]), npt.NDArray[Any])
+
+assert_type(np.intersect1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.intersect1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.intersect1d(AR_f8, AR_i8), npt.NDArray[Any])
+assert_type(
+ np.intersect1d(AR_f8, AR_f8, return_indices=True),
+ tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]],
+)
+
+assert_type(np.setxor1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.setxor1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.setxor1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.isin(AR_i8, AR_i8), npt.NDArray[np.bool])
+assert_type(np.isin(AR_M, AR_M, assume_unique=True), npt.NDArray[np.bool])
+assert_type(np.isin(AR_f8, AR_i8), npt.NDArray[np.bool])
+assert_type(np.isin(AR_f8, AR_LIKE_f8, invert=True), npt.NDArray[np.bool])
+
+assert_type(np.union1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.union1d(AR_M, AR_M), npt.NDArray[np.datetime64])
+assert_type(np.union1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.setdiff1d(AR_i8, AR_i8), npt.NDArray[np.int64])
+assert_type(np.setdiff1d(AR_M, AR_M, assume_unique=True), npt.NDArray[np.datetime64])
+assert_type(np.setdiff1d(AR_f8, AR_i8), npt.NDArray[Any])
+
+assert_type(np.unique(AR_f8), npt.NDArray[np.float64])
+assert_type(np.unique(AR_LIKE_f8, axis=0), npt.NDArray[Any])
+assert_type(np.unique(AR_f8, return_index=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_inverse=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_inverse=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_inverse=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_inverse=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_inverse=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_inverse=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_f8, return_index=True, return_inverse=True, return_counts=True), tuple[npt.NDArray[np.float64], npt.NDArray[np.intp], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.unique(AR_LIKE_f8, return_index=True, return_inverse=True, return_counts=True), tuple[npt.NDArray[Any], npt.NDArray[np.intp], npt.NDArray[np.intp], npt.NDArray[np.intp]])
+
+assert_type(np.unique_all(AR_f8), UniqueAllResult[np.float64])
+assert_type(np.unique_all(AR_LIKE_f8), UniqueAllResult[Any])
+assert_type(np.unique_counts(AR_f8), UniqueCountsResult[np.float64])
+assert_type(np.unique_counts(AR_LIKE_f8), UniqueCountsResult[Any])
+assert_type(np.unique_inverse(AR_f8), UniqueInverseResult[np.float64])
+assert_type(np.unique_inverse(AR_LIKE_f8), UniqueInverseResult[Any])
+assert_type(np.unique_values(AR_f8), npt.NDArray[np.float64])
+assert_type(np.unique_values(AR_LIKE_f8), npt.NDArray[Any])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..332e5da9bc961ef1a49883449ed4641d55aaf216
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/arrayterator.pyi
@@ -0,0 +1,29 @@
+from typing import Any
+from collections.abc import Generator
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+ar_iter = np.lib.Arrayterator(AR_i8)
+
+assert_type(ar_iter.var, npt.NDArray[np.int64])
+assert_type(ar_iter.buf_size, None | int)
+assert_type(ar_iter.start, list[int])
+assert_type(ar_iter.stop, list[int])
+assert_type(ar_iter.step, list[int])
+assert_type(ar_iter.shape, tuple[int, ...])
+assert_type(ar_iter.flat, Generator[np.int64, None, None])
+
+assert_type(ar_iter.__array__(), npt.NDArray[np.int64])
+
+for i in ar_iter:
+ assert_type(i, npt.NDArray[np.int64])
+
+assert_type(ar_iter[0], np.lib.Arrayterator[tuple[int, ...], np.dtype[np.int64]])
+assert_type(ar_iter[...], np.lib.Arrayterator[tuple[int, ...], np.dtype[np.int64]])
+assert_type(ar_iter[:], np.lib.Arrayterator[tuple[int, ...], np.dtype[np.int64]])
+assert_type(ar_iter[0, 0, 0], np.lib.Arrayterator[tuple[int, ...], np.dtype[np.int64]])
+assert_type(ar_iter[..., 0, :], np.lib.Arrayterator[tuple[int, ...], np.dtype[np.int64]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..384932a2c823528dad842aaac26a00b0c666133d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/bitwise_ops.pyi
@@ -0,0 +1,170 @@
+from typing import Any, Literal as L, TypeAlias
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _64Bit, _32Bit
+
+from typing_extensions import assert_type
+
+FalseType: TypeAlias = L[False]
+TrueType: TypeAlias = L[True]
+
+i4: np.int32
+i8: np.int64
+
+u4: np.uint32
+u8: np.uint64
+
+b_: np.bool[bool]
+b0_: np.bool[FalseType]
+b1_: np.bool[TrueType]
+
+b: bool
+b0: FalseType
+b1: TrueType
+
+i: int
+
+AR: npt.NDArray[np.int32]
+
+
+assert_type(i8 << i8, np.int64)
+assert_type(i8 >> i8, np.int64)
+assert_type(i8 | i8, np.int64)
+assert_type(i8 ^ i8, np.int64)
+assert_type(i8 & i8, np.int64)
+
+assert_type(i8 << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(i8 & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(i4 << i4, np.int32)
+assert_type(i4 >> i4, np.int32)
+assert_type(i4 | i4, np.int32)
+assert_type(i4 ^ i4, np.int32)
+assert_type(i4 & i4, np.int32)
+
+assert_type(i8 << i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i8 >> i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i8 | i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i8 ^ i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+assert_type(i8 & i4, np.signedinteger[_32Bit] | np.signedinteger[_64Bit])
+
+assert_type(i8 << b_, np.int64)
+assert_type(i8 >> b_, np.int64)
+assert_type(i8 | b_, np.int64)
+assert_type(i8 ^ b_, np.int64)
+assert_type(i8 & b_, np.int64)
+
+assert_type(i8 << b, np.int64)
+assert_type(i8 >> b, np.int64)
+assert_type(i8 | b, np.int64)
+assert_type(i8 ^ b, np.int64)
+assert_type(i8 & b, np.int64)
+
+assert_type(u8 << u8, np.uint64)
+assert_type(u8 >> u8, np.uint64)
+assert_type(u8 | u8, np.uint64)
+assert_type(u8 ^ u8, np.uint64)
+assert_type(u8 & u8, np.uint64)
+
+assert_type(u8 << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(u8 & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(u4 << u4, np.uint32)
+assert_type(u4 >> u4, np.uint32)
+assert_type(u4 | u4, np.uint32)
+assert_type(u4 ^ u4, np.uint32)
+assert_type(u4 & u4, np.uint32)
+
+assert_type(u4 << i4, np.signedinteger[Any])
+assert_type(u4 >> i4, np.signedinteger[Any])
+assert_type(u4 | i4, np.signedinteger[Any])
+assert_type(u4 ^ i4, np.signedinteger[Any])
+assert_type(u4 & i4, np.signedinteger[Any])
+
+assert_type(u4 << i, np.signedinteger[Any])
+assert_type(u4 >> i, np.signedinteger[Any])
+assert_type(u4 | i, np.signedinteger[Any])
+assert_type(u4 ^ i, np.signedinteger[Any])
+assert_type(u4 & i, np.signedinteger[Any])
+
+assert_type(u8 << b_, np.uint64)
+assert_type(u8 >> b_, np.uint64)
+assert_type(u8 | b_, np.uint64)
+assert_type(u8 ^ b_, np.uint64)
+assert_type(u8 & b_, np.uint64)
+
+assert_type(u8 << b, np.uint64)
+assert_type(u8 >> b, np.uint64)
+assert_type(u8 | b, np.uint64)
+assert_type(u8 ^ b, np.uint64)
+assert_type(u8 & b, np.uint64)
+
+assert_type(b_ << b_, np.int8)
+assert_type(b_ >> b_, np.int8)
+assert_type(b_ | b_, np.bool)
+assert_type(b_ ^ b_, np.bool)
+assert_type(b_ & b_, np.bool)
+
+assert_type(b_ << AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ >> AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ | AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ ^ AR, npt.NDArray[np.signedinteger[Any]])
+assert_type(b_ & AR, npt.NDArray[np.signedinteger[Any]])
+
+assert_type(b_ << b, np.int8)
+assert_type(b_ >> b, np.int8)
+assert_type(b_ | b, np.bool)
+assert_type(b_ ^ b, np.bool)
+assert_type(b_ & b, np.bool)
+
+assert_type(b_ << i, np.int_)
+assert_type(b_ >> i, np.int_)
+assert_type(b_ | i, np.bool | np.int_)
+assert_type(b_ ^ i, np.bool | np.int_)
+assert_type(b_ & i, np.bool | np.int_)
+
+assert_type(~i8, np.int64)
+assert_type(~i4, np.int32)
+assert_type(~u8, np.uint64)
+assert_type(~u4, np.uint32)
+assert_type(~b_, np.bool)
+assert_type(~b0_, np.bool[TrueType])
+assert_type(~b1_, np.bool[FalseType])
+assert_type(~AR, npt.NDArray[np.int32])
+
+assert_type(b_ | b0_, np.bool)
+assert_type(b0_ | b_, np.bool)
+assert_type(b_ | b1_, np.bool[TrueType])
+assert_type(b1_ | b_, np.bool[TrueType])
+
+assert_type(b_ ^ b0_, np.bool)
+assert_type(b0_ ^ b_, np.bool)
+assert_type(b_ ^ b1_, np.bool)
+assert_type(b1_ ^ b_, np.bool)
+
+assert_type(b_ & b0_, np.bool[FalseType])
+assert_type(b0_ & b_, np.bool[FalseType])
+assert_type(b_ & b1_, np.bool)
+assert_type(b1_ & b_, np.bool)
+
+assert_type(b0_ | b0_, np.bool[FalseType])
+assert_type(b0_ | b1_, np.bool[TrueType])
+assert_type(b1_ | b0_, np.bool[TrueType])
+assert_type(b1_ | b1_, np.bool[TrueType])
+
+assert_type(b0_ ^ b0_, np.bool[FalseType])
+assert_type(b0_ ^ b1_, np.bool[TrueType])
+assert_type(b1_ ^ b0_, np.bool[TrueType])
+assert_type(b1_ ^ b1_, np.bool[FalseType])
+
+assert_type(b0_ & b0_, np.bool[FalseType])
+assert_type(b0_ & b1_, np.bool[FalseType])
+assert_type(b1_ & b0_, np.bool[FalseType])
+assert_type(b1_ & b1_, np.bool[TrueType])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/char.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/char.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..19ca211bec1a906cdf75fbd619239b9fda68d435
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/char.pyi
@@ -0,0 +1,219 @@
+import numpy as np
+import numpy.typing as npt
+import numpy._typing as np_t
+
+from typing_extensions import assert_type
+from typing import TypeAlias
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+AR_T: np.ndarray[np_t._Shape, np.dtypes.StringDType]
+
+AR_T_alias: TypeAlias = np.ndarray[np_t._Shape, np.dtypes.StringDType]
+AR_TU_alias: TypeAlias = AR_T_alias | npt.NDArray[np.str_]
+
+assert_type(np.char.equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.not_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.not_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.not_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.greater_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.greater_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.greater_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.less_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.less_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.less_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.greater(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.greater(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.greater(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.less(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.char.less(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.char.less(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.multiply(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.multiply(AR_S, [5, 4, 3]), npt.NDArray[np.bytes_])
+assert_type(np.char.multiply(AR_T, 5), AR_T_alias)
+
+assert_type(np.char.mod(AR_U, "test"), npt.NDArray[np.str_])
+assert_type(np.char.mod(AR_S, "test"), npt.NDArray[np.bytes_])
+assert_type(np.char.mod(AR_T, "test"), AR_T_alias)
+
+assert_type(np.char.capitalize(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.capitalize(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.char.capitalize(AR_T), AR_T_alias)
+
+assert_type(np.char.center(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.center(AR_S, [2, 3, 4], b"a"), npt.NDArray[np.bytes_])
+assert_type(np.char.center(AR_T, 5), AR_T_alias)
+
+assert_type(np.char.encode(AR_U), npt.NDArray[np.bytes_])
+assert_type(np.char.encode(AR_T), npt.NDArray[np.bytes_])
+assert_type(np.char.decode(AR_S), npt.NDArray[np.str_])
+
+assert_type(np.char.expandtabs(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.expandtabs(AR_S, tabsize=4), npt.NDArray[np.bytes_])
+assert_type(np.char.expandtabs(AR_T), AR_T_alias)
+
+assert_type(np.char.join(AR_U, "_"), npt.NDArray[np.str_])
+assert_type(np.char.join(AR_S, [b"_", b""]), npt.NDArray[np.bytes_])
+assert_type(np.char.join(AR_T, "_"), AR_TU_alias)
+
+assert_type(np.char.ljust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.ljust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.ljust(AR_T, 5), AR_T_alias)
+assert_type(np.char.ljust(AR_T, [4, 2, 1], fillchar=["a", "b", "c"]), AR_TU_alias)
+
+assert_type(np.char.rjust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.rjust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.rjust(AR_T, 5), AR_T_alias)
+assert_type(np.char.rjust(AR_T, [4, 2, 1], fillchar=["a", "b", "c"]), AR_TU_alias)
+
+assert_type(np.char.lstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.lstrip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.char.lstrip(AR_T), AR_T_alias)
+assert_type(np.char.lstrip(AR_T, "_"), AR_TU_alias)
+
+assert_type(np.char.rstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.rstrip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.char.rstrip(AR_T), AR_T_alias)
+assert_type(np.char.rstrip(AR_T, "_"), AR_TU_alias)
+
+assert_type(np.char.strip(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.strip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.char.strip(AR_T), AR_T_alias)
+assert_type(np.char.strip(AR_T, "_"), AR_TU_alias)
+
+assert_type(np.char.count(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.count(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.count(AR_T, AR_T, start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.count(AR_T, ["a", "b", "c"], end=9), npt.NDArray[np.int_])
+
+assert_type(np.char.partition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.char.partition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.partition(AR_T, "\n"), AR_TU_alias)
+
+assert_type(np.char.rpartition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.char.rpartition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.char.rpartition(AR_T, "\n"), AR_TU_alias)
+
+assert_type(np.char.replace(AR_U, "_", "-"), npt.NDArray[np.str_])
+assert_type(np.char.replace(AR_S, [b"_", b""], [b"a", b"b"]), npt.NDArray[np.bytes_])
+assert_type(np.char.replace(AR_T, "_", "_"), AR_TU_alias)
+
+assert_type(np.char.split(AR_U, "_"), npt.NDArray[np.object_])
+assert_type(np.char.split(AR_S, maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+assert_type(np.char.split(AR_T, "_"), npt.NDArray[np.object_])
+
+assert_type(np.char.rsplit(AR_U, "_"), npt.NDArray[np.object_])
+assert_type(np.char.rsplit(AR_S, maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+assert_type(np.char.rsplit(AR_T, "_"), npt.NDArray[np.object_])
+
+assert_type(np.char.splitlines(AR_U), npt.NDArray[np.object_])
+assert_type(np.char.splitlines(AR_S, keepends=[True, True, False]), npt.NDArray[np.object_])
+assert_type(np.char.splitlines(AR_T), npt.NDArray[np.object_])
+
+assert_type(np.char.lower(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.lower(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.char.lower(AR_T), AR_T_alias)
+
+assert_type(np.char.upper(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.upper(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.char.upper(AR_T), AR_T_alias)
+
+assert_type(np.char.swapcase(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.swapcase(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.char.swapcase(AR_T), AR_T_alias)
+
+assert_type(np.char.title(AR_U), npt.NDArray[np.str_])
+assert_type(np.char.title(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.char.title(AR_T), AR_T_alias)
+
+assert_type(np.char.zfill(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.char.zfill(AR_S, [2, 3, 4]), npt.NDArray[np.bytes_])
+assert_type(np.char.zfill(AR_T, 5), AR_T_alias)
+
+assert_type(np.char.endswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(np.char.endswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+assert_type(np.char.endswith(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+
+assert_type(np.char.startswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(np.char.startswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+assert_type(np.char.startswith(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+
+assert_type(np.char.find(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.find(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.find(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.char.rfind(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.rfind(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.rfind(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.char.index(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.index(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.index(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.char.rindex(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.char.rindex(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.char.rindex(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.char.isalpha(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isalpha(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.isalpha(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isalnum(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isalnum(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.isalnum(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isdecimal(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isdecimal(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isdigit(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isdigit(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.isdigit(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.islower(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.islower(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.islower(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isnumeric(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isnumeric(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isspace(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isspace(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.isspace(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.istitle(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.istitle(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.istitle(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.isupper(AR_U), npt.NDArray[np.bool])
+assert_type(np.char.isupper(AR_S), npt.NDArray[np.bool])
+assert_type(np.char.isupper(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.char.str_len(AR_U), npt.NDArray[np.int_])
+assert_type(np.char.str_len(AR_S), npt.NDArray[np.int_])
+assert_type(np.char.str_len(AR_T), npt.NDArray[np.int_])
+
+assert_type(np.char.translate(AR_U, ""), npt.NDArray[np.str_])
+assert_type(np.char.translate(AR_S, ""), npt.NDArray[np.bytes_])
+assert_type(np.char.translate(AR_T, ""), AR_T_alias)
+
+assert_type(np.char.array(AR_U), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(np.char.array(AR_S, order="K"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.array("bob", copy=True), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(np.char.array(b"bob", itemsize=5), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.array(1, unicode=False), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.array(1, unicode=True), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+
+assert_type(np.char.asarray(AR_U), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(np.char.asarray(AR_S, order="K"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.asarray("bob"), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(np.char.asarray(b"bob", itemsize=5), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.asarray(1, unicode=False), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(np.char.asarray(1, unicode=True), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/chararray.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/chararray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..116880f44356564e4e42cebd2a4854f42ca8fe70
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/chararray.pyi
@@ -0,0 +1,136 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_U: np.char.chararray[tuple[int, ...], np.dtype[np.str_]]
+AR_S: np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]]
+
+assert_type(AR_U == AR_U, npt.NDArray[np.bool])
+assert_type(AR_S == AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U != AR_U, npt.NDArray[np.bool])
+assert_type(AR_S != AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U >= AR_U, npt.NDArray[np.bool])
+assert_type(AR_S >= AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U <= AR_U, npt.NDArray[np.bool])
+assert_type(AR_S <= AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U > AR_U, npt.NDArray[np.bool])
+assert_type(AR_S > AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U < AR_U, npt.NDArray[np.bool])
+assert_type(AR_S < AR_S, npt.NDArray[np.bool])
+
+assert_type(AR_U * 5, np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S * [5], np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U % "test", np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S % b"test", np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.capitalize(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.capitalize(), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.center(5), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.center([2, 3, 4], b"a"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.encode(), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(AR_S.decode(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+
+assert_type(AR_U.expandtabs(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.expandtabs(tabsize=4), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.join("_"), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.join([b"_", b""]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.ljust(5), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.ljust([4, 3, 1], fillchar=[b"a", b"b", b"c"]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(AR_U.rjust(5), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.rjust([4, 3, 1], fillchar=[b"a", b"b", b"c"]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.lstrip(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.lstrip(chars=b"_"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(AR_U.rstrip(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.rstrip(chars=b"_"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(AR_U.strip(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.strip(chars=b"_"), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.partition("\n"), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.partition([b"a", b"b", b"c"]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+assert_type(AR_U.rpartition("\n"), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.rpartition([b"a", b"b", b"c"]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.replace("_", "-"), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.replace([b"_", b""], [b"a", b"b"]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.split("_"), npt.NDArray[np.object_])
+assert_type(AR_S.split(maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+assert_type(AR_U.rsplit("_"), npt.NDArray[np.object_])
+assert_type(AR_S.rsplit(maxsplit=[1, 2, 3]), npt.NDArray[np.object_])
+
+assert_type(AR_U.splitlines(), npt.NDArray[np.object_])
+assert_type(AR_S.splitlines(keepends=[True, True, False]), npt.NDArray[np.object_])
+
+assert_type(AR_U.swapcase(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.swapcase(), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.title(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.title(), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.upper(), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.upper(), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.zfill(5), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(AR_S.zfill([2, 3, 4]), np.char.chararray[tuple[int, ...], np.dtype[np.bytes_]])
+
+assert_type(AR_U.count("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.count([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.endswith("a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(AR_S.endswith([b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+assert_type(AR_U.startswith("a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(AR_S.startswith([b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+
+assert_type(AR_U.find("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.find([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(AR_U.rfind("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.rfind([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.index("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.index([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(AR_U.rindex("a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(AR_S.rindex([b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+
+assert_type(AR_U.isalpha(), npt.NDArray[np.bool])
+assert_type(AR_S.isalpha(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isalnum(), npt.NDArray[np.bool])
+assert_type(AR_S.isalnum(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isdecimal(), npt.NDArray[np.bool])
+assert_type(AR_S.isdecimal(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isdigit(), npt.NDArray[np.bool])
+assert_type(AR_S.isdigit(), npt.NDArray[np.bool])
+
+assert_type(AR_U.islower(), npt.NDArray[np.bool])
+assert_type(AR_S.islower(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isnumeric(), npt.NDArray[np.bool])
+assert_type(AR_S.isnumeric(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isspace(), npt.NDArray[np.bool])
+assert_type(AR_S.isspace(), npt.NDArray[np.bool])
+
+assert_type(AR_U.istitle(), npt.NDArray[np.bool])
+assert_type(AR_S.istitle(), npt.NDArray[np.bool])
+
+assert_type(AR_U.isupper(), npt.NDArray[np.bool])
+assert_type(AR_S.isupper(), npt.NDArray[np.bool])
+
+assert_type(AR_U.__array_finalize__(object()), None)
+assert_type(AR_S.__array_finalize__(object()), None)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b71ef1d1b79f952cc03e9924f30c52bd821cb72b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/comparisons.pyi
@@ -0,0 +1,266 @@
+import fractions
+import decimal
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+c16 = np.complex128()
+f8 = np.float64()
+i8 = np.int64()
+u8 = np.uint64()
+
+c8 = np.complex64()
+f4 = np.float32()
+i4 = np.int32()
+u4 = np.uint32()
+
+dt = np.datetime64(0, "D")
+td = np.timedelta64(0, "D")
+
+b_ = np.bool()
+
+b = bool()
+c = complex()
+f = float()
+i = int()
+
+AR = np.array([0], dtype=np.int64)
+AR.setflags(write=False)
+
+SEQ = (0, 1, 2, 3, 4)
+
+# object-like comparisons
+
+assert_type(i8 > fractions.Fraction(1, 5), np.bool)
+assert_type(i8 > [fractions.Fraction(1, 5)], npt.NDArray[np.bool])
+assert_type(i8 > decimal.Decimal("1.5"), np.bool)
+assert_type(i8 > [decimal.Decimal("1.5")], npt.NDArray[np.bool])
+
+# Time structures
+
+assert_type(dt > dt, np.bool)
+
+assert_type(td > td, np.bool)
+assert_type(td > i, np.bool)
+assert_type(td > i4, np.bool)
+assert_type(td > i8, np.bool)
+
+assert_type(td > AR, npt.NDArray[np.bool])
+assert_type(td > SEQ, npt.NDArray[np.bool])
+assert_type(AR > SEQ, npt.NDArray[np.bool])
+assert_type(AR > td, npt.NDArray[np.bool])
+assert_type(SEQ > td, npt.NDArray[np.bool])
+assert_type(SEQ > AR, npt.NDArray[np.bool])
+
+# boolean
+
+assert_type(b_ > b, np.bool)
+assert_type(b_ > b_, np.bool)
+assert_type(b_ > i, np.bool)
+assert_type(b_ > i8, np.bool)
+assert_type(b_ > i4, np.bool)
+assert_type(b_ > u8, np.bool)
+assert_type(b_ > u4, np.bool)
+assert_type(b_ > f, np.bool)
+assert_type(b_ > f8, np.bool)
+assert_type(b_ > f4, np.bool)
+assert_type(b_ > c, np.bool)
+assert_type(b_ > c16, np.bool)
+assert_type(b_ > c8, np.bool)
+assert_type(b_ > AR, npt.NDArray[np.bool])
+assert_type(b_ > SEQ, npt.NDArray[np.bool])
+
+# Complex
+
+assert_type(c16 > c16, np.bool)
+assert_type(c16 > f8, np.bool)
+assert_type(c16 > i8, np.bool)
+assert_type(c16 > c8, np.bool)
+assert_type(c16 > f4, np.bool)
+assert_type(c16 > i4, np.bool)
+assert_type(c16 > b_, np.bool)
+assert_type(c16 > b, np.bool)
+assert_type(c16 > c, np.bool)
+assert_type(c16 > f, np.bool)
+assert_type(c16 > i, np.bool)
+assert_type(c16 > AR, npt.NDArray[np.bool])
+assert_type(c16 > SEQ, npt.NDArray[np.bool])
+
+assert_type(c16 > c16, np.bool)
+assert_type(f8 > c16, np.bool)
+assert_type(i8 > c16, np.bool)
+assert_type(c8 > c16, np.bool)
+assert_type(f4 > c16, np.bool)
+assert_type(i4 > c16, np.bool)
+assert_type(b_ > c16, np.bool)
+assert_type(b > c16, np.bool)
+assert_type(c > c16, np.bool)
+assert_type(f > c16, np.bool)
+assert_type(i > c16, np.bool)
+assert_type(AR > c16, npt.NDArray[np.bool])
+assert_type(SEQ > c16, npt.NDArray[np.bool])
+
+assert_type(c8 > c16, np.bool)
+assert_type(c8 > f8, np.bool)
+assert_type(c8 > i8, np.bool)
+assert_type(c8 > c8, np.bool)
+assert_type(c8 > f4, np.bool)
+assert_type(c8 > i4, np.bool)
+assert_type(c8 > b_, np.bool)
+assert_type(c8 > b, np.bool)
+assert_type(c8 > c, np.bool)
+assert_type(c8 > f, np.bool)
+assert_type(c8 > i, np.bool)
+assert_type(c8 > AR, npt.NDArray[np.bool])
+assert_type(c8 > SEQ, npt.NDArray[np.bool])
+
+assert_type(c16 > c8, np.bool)
+assert_type(f8 > c8, np.bool)
+assert_type(i8 > c8, np.bool)
+assert_type(c8 > c8, np.bool)
+assert_type(f4 > c8, np.bool)
+assert_type(i4 > c8, np.bool)
+assert_type(b_ > c8, np.bool)
+assert_type(b > c8, np.bool)
+assert_type(c > c8, np.bool)
+assert_type(f > c8, np.bool)
+assert_type(i > c8, np.bool)
+assert_type(AR > c8, npt.NDArray[np.bool])
+assert_type(SEQ > c8, npt.NDArray[np.bool])
+
+# Float
+
+assert_type(f8 > f8, np.bool)
+assert_type(f8 > i8, np.bool)
+assert_type(f8 > f4, np.bool)
+assert_type(f8 > i4, np.bool)
+assert_type(f8 > b_, np.bool)
+assert_type(f8 > b, np.bool)
+assert_type(f8 > c, np.bool)
+assert_type(f8 > f, np.bool)
+assert_type(f8 > i, np.bool)
+assert_type(f8 > AR, npt.NDArray[np.bool])
+assert_type(f8 > SEQ, npt.NDArray[np.bool])
+
+assert_type(f8 > f8, np.bool)
+assert_type(i8 > f8, np.bool)
+assert_type(f4 > f8, np.bool)
+assert_type(i4 > f8, np.bool)
+assert_type(b_ > f8, np.bool)
+assert_type(b > f8, np.bool)
+assert_type(c > f8, np.bool)
+assert_type(f > f8, np.bool)
+assert_type(i > f8, np.bool)
+assert_type(AR > f8, npt.NDArray[np.bool])
+assert_type(SEQ > f8, npt.NDArray[np.bool])
+
+assert_type(f4 > f8, np.bool)
+assert_type(f4 > i8, np.bool)
+assert_type(f4 > f4, np.bool)
+assert_type(f4 > i4, np.bool)
+assert_type(f4 > b_, np.bool)
+assert_type(f4 > b, np.bool)
+assert_type(f4 > c, np.bool)
+assert_type(f4 > f, np.bool)
+assert_type(f4 > i, np.bool)
+assert_type(f4 > AR, npt.NDArray[np.bool])
+assert_type(f4 > SEQ, npt.NDArray[np.bool])
+
+assert_type(f8 > f4, np.bool)
+assert_type(i8 > f4, np.bool)
+assert_type(f4 > f4, np.bool)
+assert_type(i4 > f4, np.bool)
+assert_type(b_ > f4, np.bool)
+assert_type(b > f4, np.bool)
+assert_type(c > f4, np.bool)
+assert_type(f > f4, np.bool)
+assert_type(i > f4, np.bool)
+assert_type(AR > f4, npt.NDArray[np.bool])
+assert_type(SEQ > f4, npt.NDArray[np.bool])
+
+# Int
+
+assert_type(i8 > i8, np.bool)
+assert_type(i8 > u8, np.bool)
+assert_type(i8 > i4, np.bool)
+assert_type(i8 > u4, np.bool)
+assert_type(i8 > b_, np.bool)
+assert_type(i8 > b, np.bool)
+assert_type(i8 > c, np.bool)
+assert_type(i8 > f, np.bool)
+assert_type(i8 > i, np.bool)
+assert_type(i8 > AR, npt.NDArray[np.bool])
+assert_type(i8 > SEQ, npt.NDArray[np.bool])
+
+assert_type(u8 > u8, np.bool)
+assert_type(u8 > i4, np.bool)
+assert_type(u8 > u4, np.bool)
+assert_type(u8 > b_, np.bool)
+assert_type(u8 > b, np.bool)
+assert_type(u8 > c, np.bool)
+assert_type(u8 > f, np.bool)
+assert_type(u8 > i, np.bool)
+assert_type(u8 > AR, npt.NDArray[np.bool])
+assert_type(u8 > SEQ, npt.NDArray[np.bool])
+
+assert_type(i8 > i8, np.bool)
+assert_type(u8 > i8, np.bool)
+assert_type(i4 > i8, np.bool)
+assert_type(u4 > i8, np.bool)
+assert_type(b_ > i8, np.bool)
+assert_type(b > i8, np.bool)
+assert_type(c > i8, np.bool)
+assert_type(f > i8, np.bool)
+assert_type(i > i8, np.bool)
+assert_type(AR > i8, npt.NDArray[np.bool])
+assert_type(SEQ > i8, npt.NDArray[np.bool])
+
+assert_type(u8 > u8, np.bool)
+assert_type(i4 > u8, np.bool)
+assert_type(u4 > u8, np.bool)
+assert_type(b_ > u8, np.bool)
+assert_type(b > u8, np.bool)
+assert_type(c > u8, np.bool)
+assert_type(f > u8, np.bool)
+assert_type(i > u8, np.bool)
+assert_type(AR > u8, npt.NDArray[np.bool])
+assert_type(SEQ > u8, npt.NDArray[np.bool])
+
+assert_type(i4 > i8, np.bool)
+assert_type(i4 > i4, np.bool)
+assert_type(i4 > i, np.bool)
+assert_type(i4 > b_, np.bool)
+assert_type(i4 > b, np.bool)
+assert_type(i4 > AR, npt.NDArray[np.bool])
+assert_type(i4 > SEQ, npt.NDArray[np.bool])
+
+assert_type(u4 > i8, np.bool)
+assert_type(u4 > i4, np.bool)
+assert_type(u4 > u8, np.bool)
+assert_type(u4 > u4, np.bool)
+assert_type(u4 > i, np.bool)
+assert_type(u4 > b_, np.bool)
+assert_type(u4 > b, np.bool)
+assert_type(u4 > AR, npt.NDArray[np.bool])
+assert_type(u4 > SEQ, npt.NDArray[np.bool])
+
+assert_type(i8 > i4, np.bool)
+assert_type(i4 > i4, np.bool)
+assert_type(i > i4, np.bool)
+assert_type(b_ > i4, np.bool)
+assert_type(b > i4, np.bool)
+assert_type(AR > i4, npt.NDArray[np.bool])
+assert_type(SEQ > i4, npt.NDArray[np.bool])
+
+assert_type(i8 > u4, np.bool)
+assert_type(i4 > u4, np.bool)
+assert_type(u8 > u4, np.bool)
+assert_type(u4 > u4, np.bool)
+assert_type(b_ > u4, np.bool)
+assert_type(b > u4, np.bool)
+assert_type(i > u4, np.bool)
+assert_type(AR > u4, npt.NDArray[np.bool])
+assert_type(SEQ > u4, npt.NDArray[np.bool])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/constants.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/constants.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..146a40cf467ffd22355a261eef5ad1687a62ad2e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/constants.pyi
@@ -0,0 +1,15 @@
+from typing import Literal
+from typing_extensions import assert_type
+
+import numpy as np
+
+assert_type(np.e, float)
+assert_type(np.euler_gamma, float)
+assert_type(np.inf, float)
+assert_type(np.nan, float)
+assert_type(np.pi, float)
+
+assert_type(np.little_endian, bool)
+
+assert_type(np.True_, np.bool[Literal[True]])
+assert_type(np.False_, np.bool[Literal[False]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..80928a93444cf0a1af8b92fcdaccf8b45be0d98b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ctypeslib.pyi
@@ -0,0 +1,93 @@
+import sys
+import ctypes as ct
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy import ctypeslib
+
+from typing_extensions import assert_type
+
+AR_bool: npt.NDArray[np.bool]
+AR_ubyte: npt.NDArray[np.ubyte]
+AR_ushort: npt.NDArray[np.ushort]
+AR_uintc: npt.NDArray[np.uintc]
+AR_ulong: npt.NDArray[np.ulong]
+AR_ulonglong: npt.NDArray[np.ulonglong]
+AR_byte: npt.NDArray[np.byte]
+AR_short: npt.NDArray[np.short]
+AR_intc: npt.NDArray[np.intc]
+AR_long: npt.NDArray[np.long]
+AR_longlong: npt.NDArray[np.longlong]
+AR_single: npt.NDArray[np.single]
+AR_double: npt.NDArray[np.double]
+AR_longdouble: npt.NDArray[np.longdouble]
+AR_void: npt.NDArray[np.void]
+
+pointer: ct._Pointer[Any]
+
+assert_type(np.ctypeslib.c_intp(), ctypeslib.c_intp)
+
+assert_type(np.ctypeslib.ndpointer(), type[ctypeslib._ndptr[None]])
+assert_type(np.ctypeslib.ndpointer(dtype=np.float64), type[ctypeslib._ndptr[np.dtype[np.float64]]])
+assert_type(np.ctypeslib.ndpointer(dtype=float), type[ctypeslib._ndptr[np.dtype[Any]]])
+assert_type(np.ctypeslib.ndpointer(shape=(10, 3)), type[ctypeslib._ndptr[None]])
+assert_type(np.ctypeslib.ndpointer(np.int64, shape=(10, 3)), type[ctypeslib._concrete_ndptr[np.dtype[np.int64]]])
+assert_type(np.ctypeslib.ndpointer(int, shape=(1,)), type[np.ctypeslib._concrete_ndptr[np.dtype[Any]]])
+
+assert_type(np.ctypeslib.as_ctypes_type(np.bool), type[ct.c_bool])
+assert_type(np.ctypeslib.as_ctypes_type(np.ubyte), type[ct.c_ubyte])
+assert_type(np.ctypeslib.as_ctypes_type(np.ushort), type[ct.c_ushort])
+assert_type(np.ctypeslib.as_ctypes_type(np.uintc), type[ct.c_uint])
+assert_type(np.ctypeslib.as_ctypes_type(np.byte), type[ct.c_byte])
+assert_type(np.ctypeslib.as_ctypes_type(np.short), type[ct.c_short])
+assert_type(np.ctypeslib.as_ctypes_type(np.intc), type[ct.c_int])
+assert_type(np.ctypeslib.as_ctypes_type(np.single), type[ct.c_float])
+assert_type(np.ctypeslib.as_ctypes_type(np.double), type[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes_type(ct.c_double), type[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes_type("q"), type[ct.c_longlong])
+assert_type(np.ctypeslib.as_ctypes_type([("i8", np.int64), ("f8", np.float64)]), type[Any])
+assert_type(np.ctypeslib.as_ctypes_type("i8"), type[Any])
+assert_type(np.ctypeslib.as_ctypes_type("f8"), type[Any])
+
+assert_type(np.ctypeslib.as_ctypes(AR_bool.take(0)), ct.c_bool)
+assert_type(np.ctypeslib.as_ctypes(AR_ubyte.take(0)), ct.c_ubyte)
+assert_type(np.ctypeslib.as_ctypes(AR_ushort.take(0)), ct.c_ushort)
+assert_type(np.ctypeslib.as_ctypes(AR_uintc.take(0)), ct.c_uint)
+
+assert_type(np.ctypeslib.as_ctypes(AR_byte.take(0)), ct.c_byte)
+assert_type(np.ctypeslib.as_ctypes(AR_short.take(0)), ct.c_short)
+assert_type(np.ctypeslib.as_ctypes(AR_intc.take(0)), ct.c_int)
+assert_type(np.ctypeslib.as_ctypes(AR_single.take(0)), ct.c_float)
+assert_type(np.ctypeslib.as_ctypes(AR_double.take(0)), ct.c_double)
+assert_type(np.ctypeslib.as_ctypes(AR_void.take(0)), Any)
+assert_type(np.ctypeslib.as_ctypes(AR_bool), ct.Array[ct.c_bool])
+assert_type(np.ctypeslib.as_ctypes(AR_ubyte), ct.Array[ct.c_ubyte])
+assert_type(np.ctypeslib.as_ctypes(AR_ushort), ct.Array[ct.c_ushort])
+assert_type(np.ctypeslib.as_ctypes(AR_uintc), ct.Array[ct.c_uint])
+assert_type(np.ctypeslib.as_ctypes(AR_byte), ct.Array[ct.c_byte])
+assert_type(np.ctypeslib.as_ctypes(AR_short), ct.Array[ct.c_short])
+assert_type(np.ctypeslib.as_ctypes(AR_intc), ct.Array[ct.c_int])
+assert_type(np.ctypeslib.as_ctypes(AR_single), ct.Array[ct.c_float])
+assert_type(np.ctypeslib.as_ctypes(AR_double), ct.Array[ct.c_double])
+assert_type(np.ctypeslib.as_ctypes(AR_void), ct.Array[Any])
+
+assert_type(np.ctypeslib.as_array(AR_ubyte), npt.NDArray[np.ubyte])
+assert_type(np.ctypeslib.as_array(1), npt.NDArray[Any])
+assert_type(np.ctypeslib.as_array(pointer), npt.NDArray[Any])
+
+if sys.platform == "win32":
+ # Mainly on windows int is the same size as long but gets picked first:
+ assert_type(np.ctypeslib.as_ctypes_type(np.long), type[ct.c_int])
+ assert_type(np.ctypeslib.as_ctypes_type(np.ulong), type[ct.c_uint])
+ assert_type(np.ctypeslib.as_ctypes(AR_ulong), ct.Array[ct.c_uint])
+ assert_type(np.ctypeslib.as_ctypes(AR_long), ct.Array[ct.c_int])
+ assert_type(np.ctypeslib.as_ctypes(AR_long.take(0)), ct.c_int)
+ assert_type(np.ctypeslib.as_ctypes(AR_ulong.take(0)), ct.c_uint)
+else:
+ assert_type(np.ctypeslib.as_ctypes_type(np.long), type[ct.c_long])
+ assert_type(np.ctypeslib.as_ctypes_type(np.ulong), type[ct.c_ulong])
+ assert_type(np.ctypeslib.as_ctypes(AR_ulong), ct.Array[ct.c_ulong])
+ assert_type(np.ctypeslib.as_ctypes(AR_long), ct.Array[ct.c_long])
+ assert_type(np.ctypeslib.as_ctypes(AR_long.take(0)), ct.c_long)
+ assert_type(np.ctypeslib.as_ctypes(AR_ulong.take(0)), ct.c_ulong)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/datasource.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/datasource.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..88f2b076be8481ffb58618afa4b25d51bf18bf60
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/datasource.pyi
@@ -0,0 +1,25 @@
+from pathlib import Path
+from typing import IO, Any
+
+import numpy as np
+
+from typing_extensions import assert_type
+
+path1: Path
+path2: str
+
+d1 = np.lib.npyio.DataSource(path1)
+d2 = np.lib.npyio.DataSource(path2)
+d3 = np.lib.npyio.DataSource(None)
+
+assert_type(d1.abspath("..."), str)
+assert_type(d2.abspath("..."), str)
+assert_type(d3.abspath("..."), str)
+
+assert_type(d1.exists("..."), bool)
+assert_type(d2.exists("..."), bool)
+assert_type(d3.exists("..."), bool)
+
+assert_type(d1.open("...", "r"), IO[Any])
+assert_type(d2.open("...", encoding="utf8"), IO[Any])
+assert_type(d3.open("...", newline="/n"), IO[Any])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/dtype.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/dtype.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..da37778b177bd08c7919f3bcc0a4ee83a07f94a2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/dtype.pyi
@@ -0,0 +1,140 @@
+import ctypes as ct
+import datetime as dt
+from decimal import Decimal
+from fractions import Fraction
+from typing import Any, Literal, TypeAlias
+
+import numpy as np
+from numpy.dtypes import StringDType
+
+from typing_extensions import LiteralString, assert_type
+
+# a combination of likely `object` dtype-like candidates (no `_co`)
+_PyObjectLike: TypeAlias = Decimal | Fraction | dt.datetime | dt.timedelta
+
+dtype_U: np.dtype[np.str_]
+dtype_V: np.dtype[np.void]
+dtype_i8: np.dtype[np.int64]
+
+py_int_co: type[int | bool]
+py_float_co: type[float | int | bool]
+py_complex_co: type[complex | float | int | bool]
+py_object: type[_PyObjectLike]
+py_character: type[str | bytes]
+py_flexible: type[str | bytes | memoryview]
+
+ct_floating: type[ct.c_float | ct.c_double | ct.c_longdouble]
+ct_number: type[ct.c_uint8 | ct.c_float]
+ct_generic: type[ct.c_bool | ct.c_char]
+
+cs_integer: Literal["u1", "V", "S"]
+cs_generic: Literal["H", "U", "h", "|M8[Y]", "?"]
+
+dt_inexact: np.dtype[np.inexact[Any]]
+dt_string: StringDType
+
+
+assert_type(np.dtype(np.float64), np.dtype[np.float64])
+assert_type(np.dtype(np.float64, metadata={"test": "test"}), np.dtype[np.float64])
+assert_type(np.dtype(np.int64), np.dtype[np.int64])
+
+# String aliases
+assert_type(np.dtype("float64"), np.dtype[np.float64])
+assert_type(np.dtype("float32"), np.dtype[np.float32])
+assert_type(np.dtype("int64"), np.dtype[np.int64])
+assert_type(np.dtype("int32"), np.dtype[np.int32])
+assert_type(np.dtype("bool"), np.dtype[np.bool])
+assert_type(np.dtype("bytes"), np.dtype[np.bytes_])
+assert_type(np.dtype("str"), np.dtype[np.str_])
+
+# Python types
+assert_type(np.dtype(bool), np.dtype[np.bool])
+assert_type(np.dtype(py_int_co), np.dtype[np.int_ | np.bool])
+assert_type(np.dtype(int), np.dtype[np.int_ | np.bool])
+assert_type(np.dtype(py_float_co), np.dtype[np.float64 | np.int_ | np.bool])
+assert_type(np.dtype(float), np.dtype[np.float64 | np.int_ | np.bool])
+assert_type(np.dtype(py_complex_co), np.dtype[np.complex128 | np.float64 | np.int_ | np.bool])
+assert_type(np.dtype(complex), np.dtype[np.complex128 | np.float64 | np.int_ | np.bool])
+assert_type(np.dtype(py_object), np.dtype[np.object_])
+assert_type(np.dtype(str), np.dtype[np.str_])
+assert_type(np.dtype(bytes), np.dtype[np.bytes_])
+assert_type(np.dtype(py_character), np.dtype[np.character])
+assert_type(np.dtype(memoryview), np.dtype[np.void])
+assert_type(np.dtype(py_flexible), np.dtype[np.flexible])
+
+assert_type(np.dtype(list), np.dtype[np.object_])
+assert_type(np.dtype(dt.datetime), np.dtype[np.object_])
+assert_type(np.dtype(dt.timedelta), np.dtype[np.object_])
+assert_type(np.dtype(Decimal), np.dtype[np.object_])
+assert_type(np.dtype(Fraction), np.dtype[np.object_])
+
+# char-codes
+assert_type(np.dtype("?"), np.dtype[np.bool])
+assert_type(np.dtype("|b1"), np.dtype[np.bool])
+assert_type(np.dtype("u1"), np.dtype[np.uint8])
+assert_type(np.dtype("l"), np.dtype[np.long])
+assert_type(np.dtype("longlong"), np.dtype[np.longlong])
+assert_type(np.dtype(">g"), np.dtype[np.longdouble])
+assert_type(np.dtype(cs_integer), np.dtype[np.integer[Any]])
+assert_type(np.dtype(cs_number), np.dtype[np.number[Any]])
+assert_type(np.dtype(cs_flex), np.dtype[np.flexible])
+assert_type(np.dtype(cs_generic), np.dtype[np.generic])
+
+# ctypes
+assert_type(np.dtype(ct.c_double), np.dtype[np.double])
+assert_type(np.dtype(ct.c_longlong), np.dtype[np.longlong])
+assert_type(np.dtype(ct.c_uint32), np.dtype[np.uint32])
+assert_type(np.dtype(ct.c_bool), np.dtype[np.bool])
+assert_type(np.dtype(ct.c_char), np.dtype[np.bytes_])
+assert_type(np.dtype(ct.py_object), np.dtype[np.object_])
+
+# Special case for None
+assert_type(np.dtype(None), np.dtype[np.float64])
+
+# Dypes of dtypes
+assert_type(np.dtype(np.dtype(np.float64)), np.dtype[np.float64])
+assert_type(np.dtype(dt_inexact), np.dtype[np.inexact[Any]])
+
+# Parameterized dtypes
+assert_type(np.dtype("S8"), np.dtype[Any])
+
+# Void
+assert_type(np.dtype(("U", 10)), np.dtype[np.void])
+
+# StringDType
+assert_type(np.dtype(dt_string), StringDType)
+assert_type(np.dtype("T"), StringDType)
+assert_type(np.dtype("=T"), StringDType)
+assert_type(np.dtype("|T"), StringDType)
+
+
+# Methods and attributes
+assert_type(dtype_U.base, np.dtype[Any])
+assert_type(dtype_U.subdtype, None | tuple[np.dtype[Any], tuple[int, ...]])
+assert_type(dtype_U.newbyteorder(), np.dtype[np.str_])
+assert_type(dtype_U.type, type[np.str_])
+assert_type(dtype_U.name, LiteralString)
+assert_type(dtype_U.names, None | tuple[str, ...])
+
+assert_type(dtype_U * 0, np.dtype[np.str_])
+assert_type(dtype_U * 1, np.dtype[np.str_])
+assert_type(dtype_U * 2, np.dtype[np.str_])
+
+assert_type(dtype_i8 * 0, np.dtype[np.void])
+assert_type(dtype_i8 * 1, np.dtype[np.int64])
+assert_type(dtype_i8 * 2, np.dtype[np.void])
+
+assert_type(0 * dtype_U, np.dtype[np.str_])
+assert_type(1 * dtype_U, np.dtype[np.str_])
+assert_type(2 * dtype_U, np.dtype[np.str_])
+
+assert_type(0 * dtype_i8, np.dtype[Any])
+assert_type(1 * dtype_i8, np.dtype[Any])
+assert_type(2 * dtype_i8, np.dtype[Any])
+
+assert_type(dtype_V["f0"], np.dtype[Any])
+assert_type(dtype_V[0], np.dtype[Any])
+assert_type(dtype_V[["f0", "f1"]], np.dtype[np.void])
+assert_type(dtype_V[["f0"]], np.dtype[np.void])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6dc44e23bda0523c528f502ed224aa2d64a1970a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/einsumfunc.pyi
@@ -0,0 +1,41 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_c: list[complex]
+AR_LIKE_U: list[str]
+AR_o: npt.NDArray[np.object_]
+
+OUT_f: npt.NDArray[np.float64]
+
+assert_type(np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_b), Any)
+assert_type(np.einsum("i,i->i", AR_o, AR_o), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_u, AR_LIKE_u), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_i, AR_LIKE_i), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_b, AR_LIKE_i), Any)
+assert_type(np.einsum("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c), Any)
+
+assert_type(np.einsum("i,i->i", AR_LIKE_c, AR_LIKE_c, out=OUT_f), npt.NDArray[np.float64])
+assert_type(np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe", out=OUT_f), npt.NDArray[np.float64])
+assert_type(np.einsum("i,i->i", AR_LIKE_f, AR_LIKE_f, dtype="c16"), Any)
+assert_type(np.einsum("i,i->i", AR_LIKE_U, AR_LIKE_U, dtype=bool, casting="unsafe"), Any)
+
+assert_type(np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_b), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_u, AR_LIKE_u), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_i, AR_LIKE_i), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_f, AR_LIKE_f), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_c, AR_LIKE_c), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i->i", AR_LIKE_b, AR_LIKE_i), tuple[list[Any], str])
+assert_type(np.einsum_path("i,i,i,i->i", AR_LIKE_b, AR_LIKE_u, AR_LIKE_i, AR_LIKE_c), tuple[list[Any], str])
+
+assert_type(np.einsum([[1, 1], [1, 1]], AR_LIKE_i, AR_LIKE_i), Any)
+assert_type(np.einsum_path([[1, 1], [1, 1]], AR_LIKE_i, AR_LIKE_i), tuple[list[Any], str])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/emath.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/emath.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..cc6579cf3b33a9cc831720ae9d6382ab2b710c3b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/emath.pyi
@@ -0,0 +1,56 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+f8: np.float64
+c16: np.complex128
+
+assert_type(np.emath.sqrt(f8), Any)
+assert_type(np.emath.sqrt(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.sqrt(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.sqrt(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log(f8), Any)
+assert_type(np.emath.log(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log10(f8), Any)
+assert_type(np.emath.log10(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log10(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log10(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.log2(f8), Any)
+assert_type(np.emath.log2(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.log2(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.log2(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.logn(f8, 2), Any)
+assert_type(np.emath.logn(AR_f8, 4), npt.NDArray[Any])
+assert_type(np.emath.logn(f8, 1j), np.complexfloating[Any, Any])
+assert_type(np.emath.logn(AR_c16, 1.5), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.power(f8, 2), Any)
+assert_type(np.emath.power(AR_f8, 4), npt.NDArray[Any])
+assert_type(np.emath.power(f8, 2j), np.complexfloating[Any, Any])
+assert_type(np.emath.power(AR_c16, 1.5), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arccos(f8), Any)
+assert_type(np.emath.arccos(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arccos(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arccos(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arcsin(f8), Any)
+assert_type(np.emath.arcsin(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arcsin(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arcsin(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.emath.arctanh(f8), Any)
+assert_type(np.emath.arctanh(AR_f8), npt.NDArray[Any])
+assert_type(np.emath.arctanh(c16), np.complexfloating[Any, Any])
+assert_type(np.emath.arctanh(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fft.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fft.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f3a29c75615ce86d9d977445b82b41ab33f470e7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fft.pyi
@@ -0,0 +1,39 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_LIKE_f8: list[float]
+
+assert_type(np.fft.fftshift(AR_f8), npt.NDArray[np.float64])
+assert_type(np.fft.fftshift(AR_LIKE_f8, axes=0), npt.NDArray[Any])
+
+assert_type(np.fft.ifftshift(AR_f8), npt.NDArray[np.float64])
+assert_type(np.fft.ifftshift(AR_LIKE_f8, axes=0), npt.NDArray[Any])
+
+assert_type(np.fft.fftfreq(5, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.fft.fftfreq(np.int64(), AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.fft.fftfreq(5, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.fft.fftfreq(np.int64(), AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.fft.fft(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifft(AR_f8, axis=1), npt.NDArray[np.complex128])
+assert_type(np.fft.rfft(AR_f8, n=None), npt.NDArray[np.complex128])
+assert_type(np.fft.irfft(AR_f8, norm="ortho"), npt.NDArray[np.float64])
+assert_type(np.fft.hfft(AR_f8, n=2), npt.NDArray[np.float64])
+assert_type(np.fft.ihfft(AR_f8), npt.NDArray[np.complex128])
+
+assert_type(np.fft.fftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.rfftn(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.irfftn(AR_f8), npt.NDArray[np.float64])
+
+assert_type(np.fft.rfft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.ifft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.fft2(AR_f8), npt.NDArray[np.complex128])
+assert_type(np.fft.irfft2(AR_f8), npt.NDArray[np.float64])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..6891ce7382fe93b32e5a7cb87def3fde36dfb2a5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/flatiter.pyi
@@ -0,0 +1,49 @@
+from typing import Literal, TypeAlias
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+a: np.flatiter[npt.NDArray[np.str_]]
+a_1d: np.flatiter[np.ndarray[tuple[int], np.dtype[np.bytes_]]]
+
+Size: TypeAlias = Literal[42]
+a_1d_fixed: np.flatiter[np.ndarray[tuple[Size], np.dtype[np.object_]]]
+
+assert_type(a.base, npt.NDArray[np.str_])
+assert_type(a.copy(), npt.NDArray[np.str_])
+assert_type(a.coords, tuple[int, ...])
+assert_type(a.index, int)
+assert_type(iter(a), np.flatiter[npt.NDArray[np.str_]])
+assert_type(next(a), np.str_)
+assert_type(a[0], np.str_)
+assert_type(a[[0, 1, 2]], npt.NDArray[np.str_])
+assert_type(a[...], npt.NDArray[np.str_])
+assert_type(a[:], npt.NDArray[np.str_])
+assert_type(a[(...,)], npt.NDArray[np.str_])
+assert_type(a[(0,)], np.str_)
+
+assert_type(a.__array__(), npt.NDArray[np.str_])
+assert_type(a.__array__(np.dtype(np.float64)), npt.NDArray[np.float64])
+assert_type(
+ a_1d.__array__(),
+ np.ndarray[tuple[int], np.dtype[np.bytes_]],
+)
+assert_type(
+ a_1d.__array__(np.dtype(np.float64)),
+ np.ndarray[tuple[int], np.dtype[np.float64]],
+)
+assert_type(
+ a_1d_fixed.__array__(),
+ np.ndarray[tuple[Size], np.dtype[np.object_]],
+)
+assert_type(
+ a_1d_fixed.__array__(np.dtype(np.float64)),
+ np.ndarray[tuple[Size], np.dtype[np.float64]],
+)
+
+a[0] = "a"
+a[:5] = "a"
+a[...] = "a"
+a[(...,)] = "a"
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7e778dc58410e3cdf2a552497bde5c92df9a9b34
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/fromnumeric.pyi
@@ -0,0 +1,343 @@
+"""Tests for :mod:`_core.fromnumeric`."""
+
+from typing import Any, Literal as L
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+class NDArraySubclass(npt.NDArray[np.complex128]):
+ ...
+
+AR_b: npt.NDArray[np.bool]
+AR_f4: npt.NDArray[np.float32]
+AR_c16: npt.NDArray[np.complex128]
+AR_u8: npt.NDArray[np.uint64]
+AR_i8: npt.NDArray[np.int64]
+AR_O: npt.NDArray[np.object_]
+AR_subclass: NDArraySubclass
+AR_m: npt.NDArray[np.timedelta64]
+AR_0d: np.ndarray[tuple[()], np.dtype[Any]]
+AR_1d: np.ndarray[tuple[int], np.dtype[Any]]
+AR_nd: np.ndarray[tuple[int, ...], np.dtype[Any]]
+
+b: np.bool
+f4: np.float32
+i8: np.int64
+f: float
+
+assert_type(np.take(b, 0), np.bool)
+assert_type(np.take(f4, 0), np.float32)
+assert_type(np.take(f, 0), Any)
+assert_type(np.take(AR_b, 0), np.bool)
+assert_type(np.take(AR_f4, 0), np.float32)
+assert_type(np.take(AR_b, [0]), npt.NDArray[np.bool])
+assert_type(np.take(AR_f4, [0]), npt.NDArray[np.float32])
+assert_type(np.take([1], [0]), npt.NDArray[Any])
+assert_type(np.take(AR_f4, [0], out=AR_subclass), NDArraySubclass)
+
+assert_type(np.reshape(b, 1), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(np.reshape(f4, 1), np.ndarray[tuple[int], np.dtype[np.float32]])
+assert_type(np.reshape(f, 1), np.ndarray[tuple[int], np.dtype[Any]])
+assert_type(np.reshape(AR_b, 1), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(np.reshape(AR_f4, 1), np.ndarray[tuple[int], np.dtype[np.float32]])
+
+assert_type(np.choose(1, [True, True]), Any)
+assert_type(np.choose([1], [True, True]), npt.NDArray[Any])
+assert_type(np.choose([1], AR_b), npt.NDArray[np.bool])
+assert_type(np.choose([1], AR_b, out=AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.repeat(b, 1), npt.NDArray[np.bool])
+assert_type(np.repeat(f4, 1), npt.NDArray[np.float32])
+assert_type(np.repeat(f, 1), npt.NDArray[Any])
+assert_type(np.repeat(AR_b, 1), npt.NDArray[np.bool])
+assert_type(np.repeat(AR_f4, 1), npt.NDArray[np.float32])
+
+# TODO: array_bdd tests for np.put()
+
+assert_type(np.swapaxes([[0, 1]], 0, 0), npt.NDArray[Any])
+assert_type(np.swapaxes(AR_b, 0, 0), npt.NDArray[np.bool])
+assert_type(np.swapaxes(AR_f4, 0, 0), npt.NDArray[np.float32])
+
+assert_type(np.transpose(b), npt.NDArray[np.bool])
+assert_type(np.transpose(f4), npt.NDArray[np.float32])
+assert_type(np.transpose(f), npt.NDArray[Any])
+assert_type(np.transpose(AR_b), npt.NDArray[np.bool])
+assert_type(np.transpose(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.partition(b, 0, axis=None), npt.NDArray[np.bool])
+assert_type(np.partition(f4, 0, axis=None), npt.NDArray[np.float32])
+assert_type(np.partition(f, 0, axis=None), npt.NDArray[Any])
+assert_type(np.partition(AR_b, 0), npt.NDArray[np.bool])
+assert_type(np.partition(AR_f4, 0), npt.NDArray[np.float32])
+
+assert_type(np.argpartition(b, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(f4, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(f, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(AR_b, 0), npt.NDArray[np.intp])
+assert_type(np.argpartition(AR_f4, 0), npt.NDArray[np.intp])
+
+assert_type(np.sort([2, 1], 0), npt.NDArray[Any])
+assert_type(np.sort(AR_b, 0), npt.NDArray[np.bool])
+assert_type(np.sort(AR_f4, 0), npt.NDArray[np.float32])
+
+assert_type(np.argsort(AR_b, 0), npt.NDArray[np.intp])
+assert_type(np.argsort(AR_f4, 0), npt.NDArray[np.intp])
+
+assert_type(np.argmax(AR_b), np.intp)
+assert_type(np.argmax(AR_f4), np.intp)
+assert_type(np.argmax(AR_b, axis=0), Any)
+assert_type(np.argmax(AR_f4, axis=0), Any)
+assert_type(np.argmax(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.argmin(AR_b), np.intp)
+assert_type(np.argmin(AR_f4), np.intp)
+assert_type(np.argmin(AR_b, axis=0), Any)
+assert_type(np.argmin(AR_f4, axis=0), Any)
+assert_type(np.argmin(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.searchsorted(AR_b[0], 0), np.intp)
+assert_type(np.searchsorted(AR_f4[0], 0), np.intp)
+assert_type(np.searchsorted(AR_b[0], [0]), npt.NDArray[np.intp])
+assert_type(np.searchsorted(AR_f4[0], [0]), npt.NDArray[np.intp])
+
+assert_type(np.resize(b, (5, 5)), np.ndarray[tuple[int, int], np.dtype[np.bool]])
+assert_type(np.resize(f4, (5, 5)), np.ndarray[tuple[int, int], np.dtype[np.float32]])
+assert_type(np.resize(f, (5, 5)), np.ndarray[tuple[int, int], np.dtype[Any]])
+assert_type(np.resize(AR_b, (5, 5)), np.ndarray[tuple[int, int], np.dtype[np.bool]])
+assert_type(np.resize(AR_f4, (5, 5)), np.ndarray[tuple[int, int], np.dtype[np.float32]])
+
+assert_type(np.squeeze(b), np.bool)
+assert_type(np.squeeze(f4), np.float32)
+assert_type(np.squeeze(f), npt.NDArray[Any])
+assert_type(np.squeeze(AR_b), npt.NDArray[np.bool])
+assert_type(np.squeeze(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.diagonal(AR_b), npt.NDArray[np.bool])
+assert_type(np.diagonal(AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.trace(AR_b), Any)
+assert_type(np.trace(AR_f4), Any)
+assert_type(np.trace(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ravel(b), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(np.ravel(f4), np.ndarray[tuple[int], np.dtype[np.float32]])
+assert_type(np.ravel(f), np.ndarray[tuple[int], np.dtype[np.float64 | np.int_ | np.bool]])
+assert_type(np.ravel(AR_b), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(np.ravel(AR_f4), np.ndarray[tuple[int], np.dtype[np.float32]])
+
+assert_type(np.nonzero(AR_b), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(AR_f4), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(AR_1d), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.nonzero(AR_nd), tuple[npt.NDArray[np.intp], ...])
+
+assert_type(np.shape(b), tuple[()])
+assert_type(np.shape(f), tuple[()])
+assert_type(np.shape([1]), tuple[int])
+assert_type(np.shape([[2]]), tuple[int, int])
+assert_type(np.shape([[[3]]]), tuple[int, ...])
+assert_type(np.shape(AR_b), tuple[int, ...])
+assert_type(np.shape(AR_nd), tuple[int, ...])
+# these fail on mypy, but it works as expected with pyright/pylance
+# assert_type(np.shape(AR_0d), tuple[()])
+# assert_type(np.shape(AR_1d), tuple[int])
+# assert_type(np.shape(AR_2d), tuple[int, int])
+
+assert_type(np.compress([True], b), npt.NDArray[np.bool])
+assert_type(np.compress([True], f4), npt.NDArray[np.float32])
+assert_type(np.compress([True], f), npt.NDArray[Any])
+assert_type(np.compress([True], AR_b), npt.NDArray[np.bool])
+assert_type(np.compress([True], AR_f4), npt.NDArray[np.float32])
+
+assert_type(np.clip(b, 0, 1.0), np.bool)
+assert_type(np.clip(f4, -1, 1), np.float32)
+assert_type(np.clip(f, 0, 1), Any)
+assert_type(np.clip(AR_b, 0, 1), npt.NDArray[np.bool])
+assert_type(np.clip(AR_f4, 0, 1), npt.NDArray[np.float32])
+assert_type(np.clip([0], 0, 1), npt.NDArray[Any])
+assert_type(np.clip(AR_b, 0, 1, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.sum(b), np.bool)
+assert_type(np.sum(f4), np.float32)
+assert_type(np.sum(f), Any)
+assert_type(np.sum(AR_b), np.bool)
+assert_type(np.sum(AR_f4), np.float32)
+assert_type(np.sum(AR_b, axis=0), Any)
+assert_type(np.sum(AR_f4, axis=0), Any)
+assert_type(np.sum(AR_f4, out=AR_subclass), NDArraySubclass)
+assert_type(np.sum(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.sum(AR_f4, None, np.float64), np.float64)
+assert_type(np.sum(AR_f4, dtype=np.float64, keepdims=False), np.float64)
+assert_type(np.sum(AR_f4, None, np.float64, keepdims=False), np.float64)
+assert_type(np.sum(AR_f4, dtype=np.float64, keepdims=True), np.float64 | npt.NDArray[np.float64])
+assert_type(np.sum(AR_f4, None, np.float64, keepdims=True), np.float64 | npt.NDArray[np.float64])
+
+assert_type(np.all(b), np.bool)
+assert_type(np.all(f4), np.bool)
+assert_type(np.all(f), np.bool)
+assert_type(np.all(AR_b), np.bool)
+assert_type(np.all(AR_f4), np.bool)
+assert_type(np.all(AR_b, axis=0), Any)
+assert_type(np.all(AR_f4, axis=0), Any)
+assert_type(np.all(AR_b, keepdims=True), Any)
+assert_type(np.all(AR_f4, keepdims=True), Any)
+assert_type(np.all(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.any(b), np.bool)
+assert_type(np.any(f4), np.bool)
+assert_type(np.any(f), np.bool)
+assert_type(np.any(AR_b), np.bool)
+assert_type(np.any(AR_f4), np.bool)
+assert_type(np.any(AR_b, axis=0), Any)
+assert_type(np.any(AR_f4, axis=0), Any)
+assert_type(np.any(AR_b, keepdims=True), Any)
+assert_type(np.any(AR_f4, keepdims=True), Any)
+assert_type(np.any(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumsum(b), npt.NDArray[np.bool])
+assert_type(np.cumsum(f4), npt.NDArray[np.float32])
+assert_type(np.cumsum(f), npt.NDArray[Any])
+assert_type(np.cumsum(AR_b), npt.NDArray[np.bool])
+assert_type(np.cumsum(AR_f4), npt.NDArray[np.float32])
+assert_type(np.cumsum(f, dtype=float), npt.NDArray[Any])
+assert_type(np.cumsum(f, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumsum(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumulative_sum(b), npt.NDArray[np.bool])
+assert_type(np.cumulative_sum(f4), npt.NDArray[np.float32])
+assert_type(np.cumulative_sum(f), npt.NDArray[Any])
+assert_type(np.cumulative_sum(AR_b), npt.NDArray[np.bool])
+assert_type(np.cumulative_sum(AR_f4), npt.NDArray[np.float32])
+assert_type(np.cumulative_sum(f, dtype=float), npt.NDArray[Any])
+assert_type(np.cumulative_sum(f, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumulative_sum(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ptp(b), np.bool)
+assert_type(np.ptp(f4), np.float32)
+assert_type(np.ptp(f), Any)
+assert_type(np.ptp(AR_b), np.bool)
+assert_type(np.ptp(AR_f4), np.float32)
+assert_type(np.ptp(AR_b, axis=0), Any)
+assert_type(np.ptp(AR_f4, axis=0), Any)
+assert_type(np.ptp(AR_b, keepdims=True), Any)
+assert_type(np.ptp(AR_f4, keepdims=True), Any)
+assert_type(np.ptp(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.amax(b), np.bool)
+assert_type(np.amax(f4), np.float32)
+assert_type(np.amax(f), Any)
+assert_type(np.amax(AR_b), np.bool)
+assert_type(np.amax(AR_f4), np.float32)
+assert_type(np.amax(AR_b, axis=0), Any)
+assert_type(np.amax(AR_f4, axis=0), Any)
+assert_type(np.amax(AR_b, keepdims=True), Any)
+assert_type(np.amax(AR_f4, keepdims=True), Any)
+assert_type(np.amax(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.amin(b), np.bool)
+assert_type(np.amin(f4), np.float32)
+assert_type(np.amin(f), Any)
+assert_type(np.amin(AR_b), np.bool)
+assert_type(np.amin(AR_f4), np.float32)
+assert_type(np.amin(AR_b, axis=0), Any)
+assert_type(np.amin(AR_f4, axis=0), Any)
+assert_type(np.amin(AR_b, keepdims=True), Any)
+assert_type(np.amin(AR_f4, keepdims=True), Any)
+assert_type(np.amin(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.prod(AR_b), np.int_)
+assert_type(np.prod(AR_u8), np.uint64)
+assert_type(np.prod(AR_i8), np.int64)
+assert_type(np.prod(AR_f4), np.floating[Any])
+assert_type(np.prod(AR_c16), np.complexfloating[Any, Any])
+assert_type(np.prod(AR_O), Any)
+assert_type(np.prod(AR_f4, axis=0), Any)
+assert_type(np.prod(AR_f4, keepdims=True), Any)
+assert_type(np.prod(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.prod(AR_f4, dtype=float), Any)
+assert_type(np.prod(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumprod(AR_b), npt.NDArray[np.int_])
+assert_type(np.cumprod(AR_u8), npt.NDArray[np.uint64])
+assert_type(np.cumprod(AR_i8), npt.NDArray[np.int64])
+assert_type(np.cumprod(AR_f4), npt.NDArray[np.floating[Any]])
+assert_type(np.cumprod(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cumprod(AR_O), npt.NDArray[np.object_])
+assert_type(np.cumprod(AR_f4, axis=0), npt.NDArray[np.floating[Any]])
+assert_type(np.cumprod(AR_f4, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumprod(AR_f4, dtype=float), npt.NDArray[Any])
+assert_type(np.cumprod(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.cumulative_prod(AR_b), npt.NDArray[np.int_])
+assert_type(np.cumulative_prod(AR_u8), npt.NDArray[np.uint64])
+assert_type(np.cumulative_prod(AR_i8), npt.NDArray[np.int64])
+assert_type(np.cumulative_prod(AR_f4), npt.NDArray[np.floating[Any]])
+assert_type(np.cumulative_prod(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cumulative_prod(AR_O), npt.NDArray[np.object_])
+assert_type(np.cumulative_prod(AR_f4, axis=0), npt.NDArray[np.floating[Any]])
+assert_type(np.cumulative_prod(AR_f4, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.cumulative_prod(AR_f4, dtype=float), npt.NDArray[Any])
+assert_type(np.cumulative_prod(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.ndim(b), int)
+assert_type(np.ndim(f4), int)
+assert_type(np.ndim(f), int)
+assert_type(np.ndim(AR_b), int)
+assert_type(np.ndim(AR_f4), int)
+
+assert_type(np.size(b), int)
+assert_type(np.size(f4), int)
+assert_type(np.size(f), int)
+assert_type(np.size(AR_b), int)
+assert_type(np.size(AR_f4), int)
+
+assert_type(np.around(b), np.float16)
+assert_type(np.around(f), Any)
+assert_type(np.around(i8), np.int64)
+assert_type(np.around(f4), np.float32)
+assert_type(np.around(AR_b), npt.NDArray[np.float16])
+assert_type(np.around(AR_i8), npt.NDArray[np.int64])
+assert_type(np.around(AR_f4), npt.NDArray[np.float32])
+assert_type(np.around([1.5]), npt.NDArray[Any])
+assert_type(np.around(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.mean(AR_b), np.floating[Any])
+assert_type(np.mean(AR_i8), np.floating[Any])
+assert_type(np.mean(AR_f4), np.floating[Any])
+assert_type(np.mean(AR_m), np.timedelta64)
+assert_type(np.mean(AR_c16), np.complexfloating[Any, Any])
+assert_type(np.mean(AR_O), Any)
+assert_type(np.mean(AR_f4, axis=0), Any)
+assert_type(np.mean(AR_f4, keepdims=True), Any)
+assert_type(np.mean(AR_f4, dtype=float), Any)
+assert_type(np.mean(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.mean(AR_f4, out=AR_subclass), NDArraySubclass)
+assert_type(np.mean(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.mean(AR_f4, None, np.float64), np.float64)
+assert_type(np.mean(AR_f4, dtype=np.float64, keepdims=False), np.float64)
+assert_type(np.mean(AR_f4, None, np.float64, keepdims=False), np.float64)
+assert_type(np.mean(AR_f4, dtype=np.float64, keepdims=True), np.float64 | npt.NDArray[np.float64])
+assert_type(np.mean(AR_f4, None, np.float64, keepdims=True), np.float64 | npt.NDArray[np.float64])
+
+assert_type(np.std(AR_b), np.floating[Any])
+assert_type(np.std(AR_i8), np.floating[Any])
+assert_type(np.std(AR_f4), np.floating[Any])
+assert_type(np.std(AR_c16), np.floating[Any])
+assert_type(np.std(AR_O), Any)
+assert_type(np.std(AR_f4, axis=0), Any)
+assert_type(np.std(AR_f4, keepdims=True), Any)
+assert_type(np.std(AR_f4, dtype=float), Any)
+assert_type(np.std(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.std(AR_f4, out=AR_subclass), NDArraySubclass)
+
+assert_type(np.var(AR_b), np.floating[Any])
+assert_type(np.var(AR_i8), np.floating[Any])
+assert_type(np.var(AR_f4), np.floating[Any])
+assert_type(np.var(AR_c16), np.floating[Any])
+assert_type(np.var(AR_O), Any)
+assert_type(np.var(AR_f4, axis=0), Any)
+assert_type(np.var(AR_f4, keepdims=True), Any)
+assert_type(np.var(AR_f4, dtype=float), Any)
+assert_type(np.var(AR_f4, dtype=np.float64), np.float64)
+assert_type(np.var(AR_f4, out=AR_subclass), NDArraySubclass)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f058382f2042e38267fccf0e772907420c4dc51c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/getlimits.pyi
@@ -0,0 +1,53 @@
+from typing import Any
+
+import numpy as np
+from numpy._typing import _64Bit
+
+from typing_extensions import assert_type, LiteralString
+
+f: float
+f8: np.float64
+c8: np.complex64
+
+i: int
+i8: np.int64
+u4: np.uint32
+
+finfo_f8: np.finfo[np.float64]
+iinfo_i8: np.iinfo[np.int64]
+
+assert_type(np.finfo(f), np.finfo[np.float64])
+assert_type(np.finfo(f8), np.finfo[np.floating[_64Bit]])
+assert_type(np.finfo(c8), np.finfo[np.float32])
+assert_type(np.finfo('f2'), np.finfo[np.floating[Any]])
+
+assert_type(finfo_f8.dtype, np.dtype[np.float64])
+assert_type(finfo_f8.bits, int)
+assert_type(finfo_f8.eps, np.float64)
+assert_type(finfo_f8.epsneg, np.float64)
+assert_type(finfo_f8.iexp, int)
+assert_type(finfo_f8.machep, int)
+assert_type(finfo_f8.max, np.float64)
+assert_type(finfo_f8.maxexp, int)
+assert_type(finfo_f8.min, np.float64)
+assert_type(finfo_f8.minexp, int)
+assert_type(finfo_f8.negep, int)
+assert_type(finfo_f8.nexp, int)
+assert_type(finfo_f8.nmant, int)
+assert_type(finfo_f8.precision, int)
+assert_type(finfo_f8.resolution, np.float64)
+assert_type(finfo_f8.tiny, np.float64)
+assert_type(finfo_f8.smallest_normal, np.float64)
+assert_type(finfo_f8.smallest_subnormal, np.float64)
+
+assert_type(np.iinfo(i), np.iinfo[np.int_])
+assert_type(np.iinfo(i8), np.iinfo[np.int64])
+assert_type(np.iinfo(u4), np.iinfo[np.uint32])
+assert_type(np.iinfo('i2'), np.iinfo[Any])
+
+assert_type(iinfo_i8.dtype, np.dtype[np.int64])
+assert_type(iinfo_i8.kind, LiteralString)
+assert_type(iinfo_i8.bits, int)
+assert_type(iinfo_i8.key, LiteralString)
+assert_type(iinfo_i8.min, int)
+assert_type(iinfo_i8.max, int)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/histograms.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/histograms.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..91a7d0394d20c575af6a7763ef35a9469d369a2b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/histograms.pyi
@@ -0,0 +1,27 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+assert_type(np.histogram_bin_edges(AR_i8, bins="auto"), npt.NDArray[Any])
+assert_type(np.histogram_bin_edges(AR_i8, bins="rice", range=(0, 3)), npt.NDArray[Any])
+assert_type(np.histogram_bin_edges(AR_i8, bins="scott", weights=AR_f8), npt.NDArray[Any])
+
+assert_type(np.histogram(AR_i8, bins="auto"), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_i8, bins="rice", range=(0, 3)), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_i8, bins="scott", weights=AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+assert_type(np.histogram(AR_f8, bins=1, density=True), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.histogramdd(AR_i8, bins=[1]),
+ tuple[npt.NDArray[Any], tuple[npt.NDArray[Any], ...]])
+assert_type(np.histogramdd(AR_i8, range=[(0, 3)]),
+ tuple[npt.NDArray[Any], tuple[npt.NDArray[Any], ...]])
+assert_type(np.histogramdd(AR_i8, weights=AR_f8),
+ tuple[npt.NDArray[Any], tuple[npt.NDArray[Any], ...]])
+assert_type(np.histogramdd(AR_f8, density=True),
+ tuple[npt.NDArray[Any], tuple[npt.NDArray[Any], ...]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..06071feddd79f9bd3c0d61ec10c489d62e06e0fa
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/index_tricks.pyi
@@ -0,0 +1,72 @@
+from types import EllipsisType
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_U: list[str]
+AR_LIKE_O: list[object]
+
+AR_i8: npt.NDArray[np.int64]
+AR_O: npt.NDArray[np.object_]
+
+assert_type(np.ndenumerate(AR_i8), np.ndenumerate[np.int64])
+assert_type(np.ndenumerate(AR_LIKE_f), np.ndenumerate[np.float64])
+assert_type(np.ndenumerate(AR_LIKE_U), np.ndenumerate[np.str_])
+assert_type(np.ndenumerate(AR_LIKE_O), np.ndenumerate[Any])
+
+assert_type(next(np.ndenumerate(AR_i8)), tuple[tuple[int, ...], np.int64])
+assert_type(next(np.ndenumerate(AR_LIKE_f)), tuple[tuple[int, ...], np.float64])
+assert_type(next(np.ndenumerate(AR_LIKE_U)), tuple[tuple[int, ...], np.str_])
+assert_type(next(np.ndenumerate(AR_LIKE_O)), tuple[tuple[int, ...], Any])
+
+assert_type(iter(np.ndenumerate(AR_i8)), np.ndenumerate[np.int64])
+assert_type(iter(np.ndenumerate(AR_LIKE_f)), np.ndenumerate[np.float64])
+assert_type(iter(np.ndenumerate(AR_LIKE_U)), np.ndenumerate[np.str_])
+assert_type(iter(np.ndenumerate(AR_LIKE_O)), np.ndenumerate[Any])
+
+assert_type(np.ndindex(1, 2, 3), np.ndindex)
+assert_type(np.ndindex((1, 2, 3)), np.ndindex)
+assert_type(iter(np.ndindex(1, 2, 3)), np.ndindex)
+assert_type(next(np.ndindex(1, 2, 3)), tuple[int, ...])
+
+assert_type(np.unravel_index([22, 41, 37], (7, 6)), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.unravel_index([31, 41, 13], (7, 6), order="F"), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.unravel_index(1621, (6, 7, 8, 9)), tuple[np.intp, ...])
+
+assert_type(np.ravel_multi_index([[1]], (7, 6)), npt.NDArray[np.intp])
+assert_type(np.ravel_multi_index(AR_LIKE_i, (7, 6)), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (7, 6), order="F"), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (4, 6), mode="clip"), np.intp)
+assert_type(np.ravel_multi_index(AR_LIKE_i, (4, 4), mode=("clip", "wrap")), np.intp)
+assert_type(np.ravel_multi_index((3, 1, 4, 1), (6, 7, 8, 9)), np.intp)
+
+assert_type(np.mgrid[1:1:2], npt.NDArray[Any])
+assert_type(np.mgrid[1:1:2, None:10], npt.NDArray[Any])
+
+assert_type(np.ogrid[1:1:2], tuple[npt.NDArray[Any], ...])
+assert_type(np.ogrid[1:1:2, None:10], tuple[npt.NDArray[Any], ...])
+
+assert_type(np.index_exp[0:1], tuple[slice[int, int, None]])
+assert_type(np.index_exp[0:1, None:3], tuple[slice[int, int, None], slice[None, int, None]])
+assert_type(np.index_exp[0, 0:1, ..., [0, 1, 3]], tuple[Literal[0], slice[int, int, None], EllipsisType, list[int]])
+
+assert_type(np.s_[0:1], slice[int, int, None])
+assert_type(np.s_[0:1, None:3], tuple[slice[int, int, None], slice[None, int, None]])
+assert_type(np.s_[0, 0:1, ..., [0, 1, 3]], tuple[Literal[0], slice[int, int, None], EllipsisType, list[int]])
+
+assert_type(np.ix_(AR_LIKE_b), tuple[npt.NDArray[np.bool], ...])
+assert_type(np.ix_(AR_LIKE_i, AR_LIKE_f), tuple[npt.NDArray[np.float64], ...])
+assert_type(np.ix_(AR_i8), tuple[npt.NDArray[np.int64], ...])
+
+assert_type(np.fill_diagonal(AR_i8, 5), None)
+
+assert_type(np.diag_indices(4), tuple[npt.NDArray[np.int_], ...])
+assert_type(np.diag_indices(2, 3), tuple[npt.NDArray[np.int_], ...])
+
+assert_type(np.diag_indices_from(AR_i8), tuple[npt.NDArray[np.int_], ...])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9cd06a36f3e08e21b0b8e538bc45d1cfd37de083
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_function_base.pyi
@@ -0,0 +1,210 @@
+from fractions import Fraction
+from typing import Any
+from collections.abc import Callable
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+vectorized_func: np.vectorize
+
+f8: np.float64
+AR_LIKE_f8: list[float]
+AR_LIKE_c16: list[complex]
+AR_LIKE_O: list[Fraction]
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+AR_O: npt.NDArray[np.object_]
+AR_b: npt.NDArray[np.bool]
+AR_U: npt.NDArray[np.str_]
+CHAR_AR_U: np.char.chararray[tuple[int, ...], np.dtype[np.str_]]
+
+AR_b_list: list[npt.NDArray[np.bool]]
+
+def func(
+ a: npt.NDArray[Any],
+ posarg: bool = ...,
+ /,
+ arg: int = ...,
+ *,
+ kwarg: str = ...,
+) -> npt.NDArray[Any]: ...
+
+assert_type(vectorized_func.pyfunc, Callable[..., Any])
+assert_type(vectorized_func.cache, bool)
+assert_type(vectorized_func.signature, None | str)
+assert_type(vectorized_func.otypes, None | str)
+assert_type(vectorized_func.excluded, set[int | str])
+assert_type(vectorized_func.__doc__, None | str)
+assert_type(vectorized_func([1]), Any)
+assert_type(np.vectorize(int), np.vectorize)
+assert_type(
+ np.vectorize(int, otypes="i", doc="doc", excluded=(), cache=True, signature=None),
+ np.vectorize,
+)
+
+assert_type(np.rot90(AR_f8, k=2), npt.NDArray[np.float64])
+assert_type(np.rot90(AR_LIKE_f8, axes=(0, 1)), npt.NDArray[Any])
+
+assert_type(np.flip(f8), np.float64)
+assert_type(np.flip(1.0), Any)
+assert_type(np.flip(AR_f8, axis=(0, 1)), npt.NDArray[np.float64])
+assert_type(np.flip(AR_LIKE_f8, axis=0), npt.NDArray[Any])
+
+assert_type(np.iterable(1), bool)
+assert_type(np.iterable([1]), bool)
+
+assert_type(np.average(AR_f8), np.floating[Any])
+assert_type(np.average(AR_f8, weights=AR_c16), np.complexfloating[Any, Any])
+assert_type(np.average(AR_O), Any)
+assert_type(np.average(AR_f8, returned=True), tuple[np.floating[Any], np.floating[Any]])
+assert_type(np.average(AR_f8, weights=AR_c16, returned=True), tuple[np.complexfloating[Any, Any], np.complexfloating[Any, Any]])
+assert_type(np.average(AR_O, returned=True), tuple[Any, Any])
+assert_type(np.average(AR_f8, axis=0), Any)
+assert_type(np.average(AR_f8, axis=0, returned=True), tuple[Any, Any])
+
+assert_type(np.asarray_chkfinite(AR_f8), npt.NDArray[np.float64])
+assert_type(np.asarray_chkfinite(AR_LIKE_f8), npt.NDArray[Any])
+assert_type(np.asarray_chkfinite(AR_f8, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.asarray_chkfinite(AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.piecewise(AR_f8, AR_b, [func]), npt.NDArray[np.float64])
+assert_type(np.piecewise(AR_f8, AR_b_list, [func]), npt.NDArray[np.float64])
+assert_type(np.piecewise(AR_f8, AR_b_list, [func], True, -1, kwarg=''), npt.NDArray[np.float64])
+assert_type(np.piecewise(AR_f8, AR_b_list, [func], True, arg=-1, kwarg=''), npt.NDArray[np.float64])
+assert_type(np.piecewise(AR_LIKE_f8, AR_b_list, [func]), npt.NDArray[Any])
+
+assert_type(np.select([AR_f8], [AR_f8]), npt.NDArray[Any])
+
+assert_type(np.copy(AR_LIKE_f8), npt.NDArray[Any])
+assert_type(np.copy(AR_U), npt.NDArray[np.str_])
+assert_type(np.copy(CHAR_AR_U), npt.NDArray[np.str_])
+assert_type(np.copy(CHAR_AR_U, "K", subok=True), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+assert_type(np.copy(CHAR_AR_U, subok=True), np.char.chararray[tuple[int, ...], np.dtype[np.str_]])
+
+assert_type(np.gradient(AR_f8, axis=None), Any)
+assert_type(np.gradient(AR_LIKE_f8, edge_order=2), Any)
+
+assert_type(np.diff("bob", n=0), str)
+assert_type(np.diff(AR_f8, axis=0), npt.NDArray[Any])
+assert_type(np.diff(AR_LIKE_f8, prepend=1.5), npt.NDArray[Any])
+
+assert_type(np.interp(1, [1], AR_f8), np.float64)
+assert_type(np.interp(1, [1], [1]), np.float64)
+assert_type(np.interp(1, [1], AR_c16), np.complex128)
+assert_type(np.interp(1, [1], [1j]), np.complex128) # pyright correctly infers `complex128 | float64`
+assert_type(np.interp([1], [1], AR_f8), npt.NDArray[np.float64])
+assert_type(np.interp([1], [1], [1]), npt.NDArray[np.float64])
+assert_type(np.interp([1], [1], AR_c16), npt.NDArray[np.complex128])
+assert_type(np.interp([1], [1], [1j]), npt.NDArray[np.complex128]) # pyright correctly infers `NDArray[complex128 | float64]`
+
+assert_type(np.angle(f8), np.floating[Any])
+assert_type(np.angle(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.angle(AR_c16, deg=True), npt.NDArray[np.floating[Any]])
+assert_type(np.angle(AR_O), npt.NDArray[np.object_])
+
+assert_type(np.unwrap(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.unwrap(AR_O), npt.NDArray[np.object_])
+
+assert_type(np.sort_complex(AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.trim_zeros(AR_f8), npt.NDArray[np.float64])
+assert_type(np.trim_zeros(AR_LIKE_f8), list[float])
+
+assert_type(np.extract(AR_i8, AR_f8), npt.NDArray[np.float64])
+assert_type(np.extract(AR_i8, AR_LIKE_f8), npt.NDArray[Any])
+
+assert_type(np.place(AR_f8, mask=AR_i8, vals=5.0), None)
+
+assert_type(np.cov(AR_f8, bias=True), npt.NDArray[np.floating[Any]])
+assert_type(np.cov(AR_f8, AR_c16, ddof=1), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cov(AR_f8, aweights=AR_f8, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.cov(AR_f8, fweights=AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.corrcoef(AR_f8, rowvar=True), npt.NDArray[np.floating[Any]])
+assert_type(np.corrcoef(AR_f8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.corrcoef(AR_f8, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(np.corrcoef(AR_f8, dtype=float), npt.NDArray[Any])
+
+assert_type(np.blackman(5), npt.NDArray[np.floating[Any]])
+assert_type(np.bartlett(6), npt.NDArray[np.floating[Any]])
+assert_type(np.hanning(4.5), npt.NDArray[np.floating[Any]])
+assert_type(np.hamming(0), npt.NDArray[np.floating[Any]])
+assert_type(np.i0(AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.kaiser(4, 5.9), npt.NDArray[np.floating[Any]])
+
+assert_type(np.sinc(1.0), np.floating[Any])
+assert_type(np.sinc(1j), np.complexfloating[Any, Any])
+assert_type(np.sinc(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.sinc(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.median(AR_f8, keepdims=False), np.floating[Any])
+assert_type(np.median(AR_c16, overwrite_input=True), np.complexfloating[Any, Any])
+assert_type(np.median(AR_m), np.timedelta64)
+assert_type(np.median(AR_O), Any)
+assert_type(np.median(AR_f8, keepdims=True), Any)
+assert_type(np.median(AR_c16, axis=0), Any)
+assert_type(np.median(AR_LIKE_f8, out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.percentile(AR_f8, 50), np.floating[Any])
+assert_type(np.percentile(AR_c16, 50), np.complexfloating[Any, Any])
+assert_type(np.percentile(AR_m, 50), np.timedelta64)
+assert_type(np.percentile(AR_M, 50, overwrite_input=True), np.datetime64)
+assert_type(np.percentile(AR_O, 50), Any)
+assert_type(np.percentile(AR_f8, [50]), npt.NDArray[np.floating[Any]])
+assert_type(np.percentile(AR_c16, [50]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.percentile(AR_m, [50]), npt.NDArray[np.timedelta64])
+assert_type(np.percentile(AR_M, [50], method="nearest"), npt.NDArray[np.datetime64])
+assert_type(np.percentile(AR_O, [50]), npt.NDArray[np.object_])
+assert_type(np.percentile(AR_f8, [50], keepdims=True), Any)
+assert_type(np.percentile(AR_f8, [50], axis=[1]), Any)
+assert_type(np.percentile(AR_f8, [50], out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.quantile(AR_f8, 0.5), np.floating[Any])
+assert_type(np.quantile(AR_c16, 0.5), np.complexfloating[Any, Any])
+assert_type(np.quantile(AR_m, 0.5), np.timedelta64)
+assert_type(np.quantile(AR_M, 0.5, overwrite_input=True), np.datetime64)
+assert_type(np.quantile(AR_O, 0.5), Any)
+assert_type(np.quantile(AR_f8, [0.5]), npt.NDArray[np.floating[Any]])
+assert_type(np.quantile(AR_c16, [0.5]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.quantile(AR_m, [0.5]), npt.NDArray[np.timedelta64])
+assert_type(np.quantile(AR_M, [0.5], method="nearest"), npt.NDArray[np.datetime64])
+assert_type(np.quantile(AR_O, [0.5]), npt.NDArray[np.object_])
+assert_type(np.quantile(AR_f8, [0.5], keepdims=True), Any)
+assert_type(np.quantile(AR_f8, [0.5], axis=[1]), Any)
+assert_type(np.quantile(AR_f8, [0.5], out=AR_c16), npt.NDArray[np.complex128])
+
+assert_type(np.trapezoid(AR_LIKE_f8), np.float64)
+assert_type(np.trapezoid(AR_LIKE_f8, AR_LIKE_f8), np.float64)
+assert_type(np.trapezoid(AR_LIKE_c16), np.complex128)
+assert_type(np.trapezoid(AR_LIKE_c16, AR_LIKE_f8), np.complex128)
+assert_type(np.trapezoid(AR_LIKE_f8, AR_LIKE_c16), np.complex128)
+assert_type(np.trapezoid(AR_LIKE_O), float)
+assert_type(np.trapezoid(AR_LIKE_O, AR_LIKE_f8), float)
+assert_type(np.trapezoid(AR_f8), np.float64 | npt.NDArray[np.float64])
+assert_type(np.trapezoid(AR_f8, AR_f8), np.float64 | npt.NDArray[np.float64])
+assert_type(np.trapezoid(AR_c16), np.complex128 | npt.NDArray[np.complex128])
+assert_type(np.trapezoid(AR_c16, AR_c16), np.complex128 | npt.NDArray[np.complex128])
+assert_type(np.trapezoid(AR_m), np.timedelta64 | npt.NDArray[np.timedelta64])
+assert_type(np.trapezoid(AR_O), float | npt.NDArray[np.object_])
+assert_type(np.trapezoid(AR_O, AR_LIKE_f8), float | npt.NDArray[np.object_])
+
+assert_type(np.meshgrid(AR_f8, AR_i8, copy=False), tuple[npt.NDArray[Any], ...])
+assert_type(np.meshgrid(AR_f8, AR_i8, AR_c16, indexing="ij"), tuple[npt.NDArray[Any], ...])
+
+assert_type(np.delete(AR_f8, np.s_[:5]), npt.NDArray[np.float64])
+assert_type(np.delete(AR_LIKE_f8, [0, 4, 9], axis=0), npt.NDArray[Any])
+
+assert_type(np.insert(AR_f8, np.s_[:5], 5), npt.NDArray[np.float64])
+assert_type(np.insert(AR_LIKE_f8, [0, 4, 9], [0.5, 9.2, 7], axis=0), npt.NDArray[Any])
+
+assert_type(np.append(AR_f8, 5), npt.NDArray[Any])
+assert_type(np.append(AR_LIKE_f8, 1j, axis=0), npt.NDArray[Any])
+
+assert_type(np.digitize(4.5, [1]), np.intp)
+assert_type(np.digitize(AR_f8, [1, 2, 3]), npt.NDArray[np.intp])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d41b1d56b75a7d3f2e119bc0801b052cbc8ec858
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_polynomial.pyi
@@ -0,0 +1,146 @@
+from typing import Any, NoReturn
+from collections.abc import Iterator
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_b: npt.NDArray[np.bool]
+AR_u4: npt.NDArray[np.uint32]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+
+poly_obj: np.poly1d
+
+assert_type(poly_obj.variable, str)
+assert_type(poly_obj.order, int)
+assert_type(poly_obj.o, int)
+assert_type(poly_obj.roots, npt.NDArray[Any])
+assert_type(poly_obj.r, npt.NDArray[Any])
+assert_type(poly_obj.coeffs, npt.NDArray[Any])
+assert_type(poly_obj.c, npt.NDArray[Any])
+assert_type(poly_obj.coef, npt.NDArray[Any])
+assert_type(poly_obj.coefficients, npt.NDArray[Any])
+assert_type(poly_obj.__hash__, None)
+
+assert_type(poly_obj(1), Any)
+assert_type(poly_obj([1]), npt.NDArray[Any])
+assert_type(poly_obj(poly_obj), np.poly1d)
+
+assert_type(len(poly_obj), int)
+assert_type(-poly_obj, np.poly1d)
+assert_type(+poly_obj, np.poly1d)
+
+assert_type(poly_obj * 5, np.poly1d)
+assert_type(5 * poly_obj, np.poly1d)
+assert_type(poly_obj + 5, np.poly1d)
+assert_type(5 + poly_obj, np.poly1d)
+assert_type(poly_obj - 5, np.poly1d)
+assert_type(5 - poly_obj, np.poly1d)
+assert_type(poly_obj**1, np.poly1d)
+assert_type(poly_obj**1.0, np.poly1d)
+assert_type(poly_obj / 5, np.poly1d)
+assert_type(5 / poly_obj, np.poly1d)
+
+assert_type(poly_obj[0], Any)
+poly_obj[0] = 5
+assert_type(iter(poly_obj), Iterator[Any])
+assert_type(poly_obj.deriv(), np.poly1d)
+assert_type(poly_obj.integ(), np.poly1d)
+
+assert_type(np.poly(poly_obj), npt.NDArray[np.floating[Any]])
+assert_type(np.poly(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.poly(AR_c16), npt.NDArray[np.floating[Any]])
+
+assert_type(np.polyint(poly_obj), np.poly1d)
+assert_type(np.polyint(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyint(AR_f8, k=AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyint(AR_O, m=2), npt.NDArray[np.object_])
+
+assert_type(np.polyder(poly_obj), np.poly1d)
+assert_type(np.polyder(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyder(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyder(AR_O, m=2), npt.NDArray[np.object_])
+
+assert_type(np.polyfit(AR_f8, AR_f8, 2), npt.NDArray[np.float64])
+assert_type(
+ np.polyfit(AR_f8, AR_i8, 1, full=True),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.int32],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(
+ np.polyfit(AR_u4, AR_f8, 1.0, cov="unscaled"),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(np.polyfit(AR_c16, AR_f8, 2), npt.NDArray[np.complex128])
+assert_type(
+ np.polyfit(AR_f8, AR_c16, 1, full=True),
+ tuple[
+ npt.NDArray[np.complex128],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.int32],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(
+ np.polyfit(AR_u4, AR_c16, 1.0, cov=True),
+ tuple[
+ npt.NDArray[np.complex128],
+ npt.NDArray[np.complex128],
+ ],
+)
+
+assert_type(np.polyval(AR_b, AR_b), npt.NDArray[np.int64])
+assert_type(np.polyval(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polyval(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polyval(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyval(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyval(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polyadd(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polyadd(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polyadd(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.polyadd(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polyadd(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polyadd(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polyadd(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polyadd(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polysub(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polysub(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polysub(AR_b, AR_b), NoReturn)
+assert_type(np.polysub(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polysub(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polysub(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polysub(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polysub(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polymul(poly_obj, AR_i8), np.poly1d)
+assert_type(np.polymul(AR_f8, poly_obj), np.poly1d)
+assert_type(np.polymul(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.polymul(AR_u4, AR_b), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.polymul(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.polymul(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(np.polymul(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.polymul(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.polydiv(poly_obj, AR_i8), tuple[np.poly1d, np.poly1d])
+assert_type(np.polydiv(AR_f8, poly_obj), tuple[np.poly1d, np.poly1d])
+assert_type(np.polydiv(AR_b, AR_b), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_u4, AR_b), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_i8, AR_i8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_f8, AR_i8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]]])
+assert_type(np.polydiv(AR_i8, AR_c16), tuple[npt.NDArray[np.complexfloating[Any, Any]], npt.NDArray[np.complexfloating[Any, Any]]])
+assert_type(np.polydiv(AR_O, AR_O), tuple[npt.NDArray[Any], npt.NDArray[Any]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..44ae59234c42405cdb717b74bb213f057449cfad
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_utils.pyi
@@ -0,0 +1,18 @@
+from io import StringIO
+
+import numpy as np
+import numpy.typing as npt
+import numpy.lib.array_utils as array_utils
+
+from typing_extensions import assert_type
+
+AR: npt.NDArray[np.float64]
+AR_DICT: dict[str, npt.NDArray[np.float64]]
+FILE: StringIO
+
+def func(a: int) -> bool: ...
+
+assert_type(array_utils.byte_bounds(AR), tuple[int, int])
+assert_type(array_utils.byte_bounds(np.float64()), tuple[int, int])
+
+assert_type(np.info(1, output=FILE), None)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..52c1218e9dfde3b0241ebb739aec6e27f91e0eb0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/lib_version.pyi
@@ -0,0 +1,20 @@
+from numpy.lib import NumpyVersion
+
+from typing_extensions import assert_type
+
+version = NumpyVersion("1.8.0")
+
+assert_type(version.vstring, str)
+assert_type(version.version, str)
+assert_type(version.major, int)
+assert_type(version.minor, int)
+assert_type(version.bugfix, int)
+assert_type(version.pre_release, str)
+assert_type(version.is_devversion, bool)
+
+assert_type(version == version, bool)
+assert_type(version != version, bool)
+assert_type(version < "1.8.0", bool)
+assert_type(version <= version, bool)
+assert_type(version > version, bool)
+assert_type(version >= "1.8.0", bool)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/linalg.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/linalg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..f9aaa71ef4bc44a4fdc22f9224912b16e086a439
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/linalg.pyi
@@ -0,0 +1,130 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+from numpy.linalg._linalg import (
+ QRResult, EigResult, EighResult, SVDResult, SlogdetResult
+)
+
+from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+AR_m: npt.NDArray[np.timedelta64]
+AR_S: npt.NDArray[np.str_]
+AR_b: npt.NDArray[np.bool]
+
+assert_type(np.linalg.tensorsolve(AR_i8, AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.tensorsolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.tensorsolve(AR_c16, AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.solve(AR_i8, AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.solve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.solve(AR_c16, AR_f8), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.tensorinv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.tensorinv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.tensorinv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.inv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.inv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.inv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.matrix_power(AR_i8, -1), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_f8, 0), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_c16, 1), npt.NDArray[Any])
+assert_type(np.linalg.matrix_power(AR_O, 2), npt.NDArray[Any])
+
+assert_type(np.linalg.cholesky(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.cholesky(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.cholesky(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.outer(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.linalg.outer(AR_f8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.outer(AR_c16, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.linalg.outer(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.linalg.outer(AR_O, AR_O), npt.NDArray[np.object_])
+assert_type(np.linalg.outer(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+
+assert_type(np.linalg.qr(AR_i8), QRResult)
+assert_type(np.linalg.qr(AR_f8), QRResult)
+assert_type(np.linalg.qr(AR_c16), QRResult)
+
+assert_type(np.linalg.eigvals(AR_i8), npt.NDArray[np.float64] | npt.NDArray[np.complex128])
+assert_type(np.linalg.eigvals(AR_f8), npt.NDArray[np.floating[Any]] | npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.linalg.eigvals(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.eigvalsh(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.eigvalsh(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.eigvalsh(AR_c16), npt.NDArray[np.floating[Any]])
+
+assert_type(np.linalg.eig(AR_i8), EigResult)
+assert_type(np.linalg.eig(AR_f8), EigResult)
+assert_type(np.linalg.eig(AR_c16), EigResult)
+
+assert_type(np.linalg.eigh(AR_i8), EighResult)
+assert_type(np.linalg.eigh(AR_f8), EighResult)
+assert_type(np.linalg.eigh(AR_c16), EighResult)
+
+assert_type(np.linalg.svd(AR_i8), SVDResult)
+assert_type(np.linalg.svd(AR_f8), SVDResult)
+assert_type(np.linalg.svd(AR_c16), SVDResult)
+assert_type(np.linalg.svd(AR_i8, compute_uv=False), npt.NDArray[np.float64])
+assert_type(np.linalg.svd(AR_f8, compute_uv=False), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.svd(AR_c16, compute_uv=False), npt.NDArray[np.floating[Any]])
+
+assert_type(np.linalg.cond(AR_i8), Any)
+assert_type(np.linalg.cond(AR_f8), Any)
+assert_type(np.linalg.cond(AR_c16), Any)
+
+assert_type(np.linalg.matrix_rank(AR_i8), Any)
+assert_type(np.linalg.matrix_rank(AR_f8), Any)
+assert_type(np.linalg.matrix_rank(AR_c16), Any)
+
+assert_type(np.linalg.pinv(AR_i8), npt.NDArray[np.float64])
+assert_type(np.linalg.pinv(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.pinv(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.slogdet(AR_i8), SlogdetResult)
+assert_type(np.linalg.slogdet(AR_f8), SlogdetResult)
+assert_type(np.linalg.slogdet(AR_c16), SlogdetResult)
+
+assert_type(np.linalg.det(AR_i8), Any)
+assert_type(np.linalg.det(AR_f8), Any)
+assert_type(np.linalg.det(AR_c16), Any)
+
+assert_type(np.linalg.lstsq(AR_i8, AR_i8), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64], np.int32, npt.NDArray[np.float64]])
+assert_type(np.linalg.lstsq(AR_i8, AR_f8), tuple[npt.NDArray[np.floating[Any]], npt.NDArray[np.floating[Any]], np.int32, npt.NDArray[np.floating[Any]]])
+assert_type(np.linalg.lstsq(AR_f8, AR_c16), tuple[npt.NDArray[np.complexfloating[Any, Any]], npt.NDArray[np.floating[Any]], np.int32, npt.NDArray[np.floating[Any]]])
+
+assert_type(np.linalg.norm(AR_i8), np.floating[Any])
+assert_type(np.linalg.norm(AR_f8), np.floating[Any])
+assert_type(np.linalg.norm(AR_c16), np.floating[Any])
+assert_type(np.linalg.norm(AR_S), np.floating[Any])
+assert_type(np.linalg.norm(AR_f8, axis=0), Any)
+
+assert_type(np.linalg.matrix_norm(AR_i8), np.floating[Any])
+assert_type(np.linalg.matrix_norm(AR_f8), np.floating[Any])
+assert_type(np.linalg.matrix_norm(AR_c16), np.floating[Any])
+assert_type(np.linalg.matrix_norm(AR_S), np.floating[Any])
+
+assert_type(np.linalg.vector_norm(AR_i8), np.floating[Any])
+assert_type(np.linalg.vector_norm(AR_f8), np.floating[Any])
+assert_type(np.linalg.vector_norm(AR_c16), np.floating[Any])
+assert_type(np.linalg.vector_norm(AR_S), np.floating[Any])
+
+assert_type(np.linalg.multi_dot([AR_i8, AR_i8]), Any)
+assert_type(np.linalg.multi_dot([AR_i8, AR_f8]), Any)
+assert_type(np.linalg.multi_dot([AR_f8, AR_c16]), Any)
+assert_type(np.linalg.multi_dot([AR_O, AR_O]), Any)
+assert_type(np.linalg.multi_dot([AR_m, AR_m]), Any)
+
+assert_type(np.linalg.cross(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.linalg.cross(AR_f8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.cross(AR_c16, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+
+assert_type(np.linalg.matmul(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.linalg.matmul(AR_f8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.linalg.matmul(AR_c16, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/matrix.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/matrix.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..28a2531b4db26b0c074236906bdedb1022217d4a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/matrix.pyi
@@ -0,0 +1,74 @@
+from typing import Any, TypeAlias
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+_Shape2D: TypeAlias = tuple[int, int]
+
+mat: np.matrix[_Shape2D, np.dtype[np.int64]]
+ar_f8: npt.NDArray[np.float64]
+
+assert_type(mat * 5, np.matrix[_Shape2D, Any])
+assert_type(5 * mat, np.matrix[_Shape2D, Any])
+mat *= 5
+
+assert_type(mat**5, np.matrix[_Shape2D, Any])
+mat **= 5
+
+assert_type(mat.sum(), Any)
+assert_type(mat.mean(), Any)
+assert_type(mat.std(), Any)
+assert_type(mat.var(), Any)
+assert_type(mat.prod(), Any)
+assert_type(mat.any(), np.bool)
+assert_type(mat.all(), np.bool)
+assert_type(mat.max(), np.int64)
+assert_type(mat.min(), np.int64)
+assert_type(mat.argmax(), np.intp)
+assert_type(mat.argmin(), np.intp)
+assert_type(mat.ptp(), np.int64)
+
+assert_type(mat.sum(axis=0), np.matrix[_Shape2D, Any])
+assert_type(mat.mean(axis=0), np.matrix[_Shape2D, Any])
+assert_type(mat.std(axis=0), np.matrix[_Shape2D, Any])
+assert_type(mat.var(axis=0), np.matrix[_Shape2D, Any])
+assert_type(mat.prod(axis=0), np.matrix[_Shape2D, Any])
+assert_type(mat.any(axis=0), np.matrix[_Shape2D, np.dtype[np.bool]])
+assert_type(mat.all(axis=0), np.matrix[_Shape2D, np.dtype[np.bool]])
+assert_type(mat.max(axis=0), np.matrix[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.min(axis=0), np.matrix[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.argmax(axis=0), np.matrix[_Shape2D, np.dtype[np.intp]])
+assert_type(mat.argmin(axis=0), np.matrix[_Shape2D, np.dtype[np.intp]])
+assert_type(mat.ptp(axis=0), np.matrix[_Shape2D, np.dtype[np.int64]])
+
+assert_type(mat.sum(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.mean(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.std(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.var(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.prod(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.any(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.all(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.max(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.min(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.argmax(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.argmin(out=ar_f8), npt.NDArray[np.float64])
+assert_type(mat.ptp(out=ar_f8), npt.NDArray[np.float64])
+
+assert_type(mat.T, np.matrix[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.I, np.matrix[_Shape2D, Any])
+assert_type(mat.A, np.ndarray[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.A1, npt.NDArray[np.int64])
+assert_type(mat.H, np.matrix[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.getT(), np.matrix[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.getI(), np.matrix[_Shape2D, Any])
+assert_type(mat.getA(), np.ndarray[_Shape2D, np.dtype[np.int64]])
+assert_type(mat.getA1(), npt.NDArray[np.int64])
+assert_type(mat.getH(), np.matrix[_Shape2D, np.dtype[np.int64]])
+
+assert_type(np.bmat(ar_f8), np.matrix[_Shape2D, Any])
+assert_type(np.bmat([[0, 1, 2]]), np.matrix[_Shape2D, Any])
+assert_type(np.bmat("mat"), np.matrix[_Shape2D, Any])
+
+assert_type(np.asmatrix(ar_f8, dtype=np.int64), np.matrix[_Shape2D, Any])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/memmap.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/memmap.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b1f985382c6b63b2dd9f6619ab5d60c90efc783b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/memmap.pyi
@@ -0,0 +1,21 @@
+from typing import Any
+
+import numpy as np
+
+from typing_extensions import assert_type
+
+memmap_obj: np.memmap[Any, np.dtype[np.str_]]
+
+assert_type(np.memmap.__array_priority__, float)
+assert_type(memmap_obj.__array_priority__, float)
+assert_type(memmap_obj.filename, str | None)
+assert_type(memmap_obj.offset, int)
+assert_type(memmap_obj.mode, str)
+assert_type(memmap_obj.flush(), None)
+
+assert_type(np.memmap("file.txt", offset=5), np.memmap[Any, np.dtype[np.uint8]])
+assert_type(np.memmap(b"file.txt", dtype=np.float64, shape=(10, 3)), np.memmap[Any, np.dtype[np.float64]])
+with open("file.txt", "rb") as f:
+ assert_type(np.memmap(f, dtype=float, order="K"), np.memmap[Any, np.dtype[Any]])
+
+assert_type(memmap_obj.__array_finalize__(object()), None)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/mod.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/mod.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..db79504fdd1f472bb004f5db1ef3864f1a0e5ab1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/mod.pyi
@@ -0,0 +1,181 @@
+import datetime as dt
+from typing import Literal as L
+
+from typing_extensions import assert_type
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _64Bit
+
+f8: np.float64
+i8: np.int64
+u8: np.uint64
+
+f4: np.float32
+i4: np.int32
+u4: np.uint32
+
+m: np.timedelta64
+m_nat: np.timedelta64[None]
+m_int0: np.timedelta64[L[0]]
+m_int: np.timedelta64[int]
+m_td: np.timedelta64[dt.timedelta]
+
+b_: np.bool
+
+b: bool
+i: int
+f: float
+
+AR_b: npt.NDArray[np.bool]
+AR_m: npt.NDArray[np.timedelta64]
+
+# Time structures
+
+assert_type(m % m, np.timedelta64)
+assert_type(m % m_nat, np.timedelta64[None])
+assert_type(m % m_int0, np.timedelta64[None])
+assert_type(m % m_int, np.timedelta64[int | None])
+assert_type(m_nat % m, np.timedelta64[None])
+assert_type(m_int % m_nat, np.timedelta64[None])
+assert_type(m_int % m_int0, np.timedelta64[None])
+assert_type(m_int % m_int, np.timedelta64[int | None])
+assert_type(m_int % m_td, np.timedelta64[int | None])
+assert_type(m_td % m_nat, np.timedelta64[None])
+assert_type(m_td % m_int0, np.timedelta64[None])
+assert_type(m_td % m_int, np.timedelta64[int | None])
+assert_type(m_td % m_td, np.timedelta64[dt.timedelta | None])
+
+assert_type(AR_m % m, npt.NDArray[np.timedelta64])
+assert_type(m % AR_m, npt.NDArray[np.timedelta64])
+
+assert_type(divmod(m, m), tuple[np.int64, np.timedelta64])
+assert_type(divmod(m, m_nat), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m, m_int0), tuple[np.int64, np.timedelta64[None]])
+# workarounds for https://github.com/microsoft/pyright/issues/9663
+assert_type(m.__divmod__(m_int), tuple[np.int64, np.timedelta64[int | None]])
+assert_type(divmod(m_nat, m), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m_int, m_nat), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m_int, m_int0), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m_int, m_int), tuple[np.int64, np.timedelta64[int | None]])
+assert_type(divmod(m_int, m_td), tuple[np.int64, np.timedelta64[int | None]])
+assert_type(divmod(m_td, m_nat), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m_td, m_int0), tuple[np.int64, np.timedelta64[None]])
+assert_type(divmod(m_td, m_int), tuple[np.int64, np.timedelta64[int | None]])
+assert_type(divmod(m_td, m_td), tuple[np.int64, np.timedelta64[dt.timedelta | None]])
+
+assert_type(divmod(AR_m, m), tuple[npt.NDArray[np.int64], npt.NDArray[np.timedelta64]])
+assert_type(divmod(m, AR_m), tuple[npt.NDArray[np.int64], npt.NDArray[np.timedelta64]])
+
+# Bool
+
+assert_type(b_ % b, np.int8)
+assert_type(b_ % i, np.int_)
+assert_type(b_ % f, np.float64)
+assert_type(b_ % b_, np.int8)
+assert_type(b_ % i8, np.int64)
+assert_type(b_ % u8, np.uint64)
+assert_type(b_ % f8, np.float64)
+assert_type(b_ % AR_b, npt.NDArray[np.int8])
+
+assert_type(divmod(b_, b), tuple[np.int8, np.int8])
+assert_type(divmod(b_, b_), tuple[np.int8, np.int8])
+# workarounds for https://github.com/microsoft/pyright/issues/9663
+assert_type(b_.__divmod__(i), tuple[np.int_, np.int_])
+assert_type(b_.__divmod__(f), tuple[np.float64, np.float64])
+assert_type(b_.__divmod__(i8), tuple[np.int64, np.int64])
+assert_type(b_.__divmod__(u8), tuple[np.uint64, np.uint64])
+assert_type(divmod(b_, f8), tuple[np.float64, np.float64])
+assert_type(divmod(b_, AR_b), tuple[npt.NDArray[np.int8], npt.NDArray[np.int8]])
+
+assert_type(b % b_, np.int8)
+assert_type(i % b_, np.int_)
+assert_type(f % b_, np.float64)
+assert_type(b_ % b_, np.int8)
+assert_type(i8 % b_, np.int64)
+assert_type(u8 % b_, np.uint64)
+assert_type(f8 % b_, np.float64)
+assert_type(AR_b % b_, npt.NDArray[np.int8])
+
+assert_type(divmod(b, b_), tuple[np.int8, np.int8])
+assert_type(divmod(i, b_), tuple[np.int_, np.int_])
+assert_type(divmod(f, b_), tuple[np.float64, np.float64])
+assert_type(divmod(b_, b_), tuple[np.int8, np.int8])
+assert_type(divmod(i8, b_), tuple[np.int64, np.int64])
+assert_type(divmod(u8, b_), tuple[np.uint64, np.uint64])
+assert_type(divmod(f8, b_), tuple[np.float64, np.float64])
+assert_type(divmod(AR_b, b_), tuple[npt.NDArray[np.int8], npt.NDArray[np.int8]])
+
+# int
+
+assert_type(i8 % b, np.int64)
+assert_type(i8 % i8, np.int64)
+assert_type(i8 % f, np.float64 | np.floating[_64Bit])
+assert_type(i8 % f8, np.float64 | np.floating[_64Bit])
+assert_type(i4 % i8, np.int64 | np.int32)
+assert_type(i4 % f8, np.float64 | np.float32)
+assert_type(i4 % i4, np.int32)
+assert_type(i4 % f4, np.float32)
+assert_type(i8 % AR_b, npt.NDArray[np.int64])
+
+assert_type(divmod(i8, b), tuple[np.int64, np.int64])
+assert_type(divmod(i8, i4), tuple[np.int64, np.int64] | tuple[np.int32, np.int32])
+assert_type(divmod(i8, i8), tuple[np.int64, np.int64])
+# workarounds for https://github.com/microsoft/pyright/issues/9663
+assert_type(i8.__divmod__(f), tuple[np.floating[_64Bit], np.floating[_64Bit]] | tuple[np.float64, np.float64])
+assert_type(i8.__divmod__(f8), tuple[np.floating[_64Bit], np.floating[_64Bit]] | tuple[np.float64, np.float64])
+assert_type(divmod(i8, f4), tuple[np.floating[_64Bit], np.floating[_64Bit]] | tuple[np.float32, np.float32])
+assert_type(divmod(i4, i4), tuple[np.int32, np.int32])
+assert_type(divmod(i4, f4), tuple[np.float32, np.float32])
+assert_type(divmod(i8, AR_b), tuple[npt.NDArray[np.int64], npt.NDArray[np.int64]])
+
+assert_type(b % i8, np.int64)
+assert_type(f % i8, np.float64 | np.floating[_64Bit])
+assert_type(i8 % i8, np.int64)
+assert_type(f8 % i8, np.float64)
+assert_type(i8 % i4, np.int64 | np.int32)
+assert_type(f8 % i4, np.float64)
+assert_type(i4 % i4, np.int32)
+assert_type(f4 % i4, np.float32)
+assert_type(AR_b % i8, npt.NDArray[np.int64])
+
+assert_type(divmod(b, i8), tuple[np.int64, np.int64])
+assert_type(divmod(f, i8), tuple[np.floating[_64Bit], np.floating[_64Bit]] | tuple[np.float64, np.float64])
+assert_type(divmod(i8, i8), tuple[np.int64, np.int64])
+assert_type(divmod(f8, i8), tuple[np.float64, np.float64])
+assert_type(divmod(i4, i8), tuple[np.int64, np.int64] | tuple[np.int32, np.int32])
+assert_type(divmod(i4, i4), tuple[np.int32, np.int32])
+# workarounds for https://github.com/microsoft/pyright/issues/9663
+assert_type(f4.__divmod__(i8), tuple[np.floating[_64Bit], np.floating[_64Bit]] | tuple[np.float32, np.float32])
+assert_type(f4.__divmod__(i4), tuple[np.float32, np.float32])
+assert_type(AR_b.__divmod__(i8), tuple[npt.NDArray[np.int64], npt.NDArray[np.int64]])
+
+# float
+
+assert_type(f8 % b, np.float64)
+assert_type(f8 % f, np.float64)
+assert_type(i8 % f4, np.floating[_64Bit] | np.float32)
+assert_type(f4 % f4, np.float32)
+assert_type(f8 % AR_b, npt.NDArray[np.float64])
+
+assert_type(divmod(f8, b), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f4), tuple[np.float64, np.float64])
+assert_type(divmod(f4, f4), tuple[np.float32, np.float32])
+assert_type(divmod(f8, AR_b), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]])
+
+assert_type(b % f8, np.float64)
+assert_type(f % f8, np.float64) # pyright: ignore[reportAssertTypeFailure] # pyright incorrectly infers `builtins.float`
+assert_type(f8 % f8, np.float64)
+assert_type(f8 % f8, np.float64)
+assert_type(f4 % f4, np.float32)
+assert_type(AR_b % f8, npt.NDArray[np.float64])
+
+assert_type(divmod(b, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f8, f8), tuple[np.float64, np.float64])
+assert_type(divmod(f4, f4), tuple[np.float32, np.float32])
+# workarounds for https://github.com/microsoft/pyright/issues/9663
+assert_type(f8.__rdivmod__(f), tuple[np.float64, np.float64])
+assert_type(f8.__rdivmod__(f4), tuple[np.float64, np.float64])
+assert_type(AR_b.__divmod__(f8), tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/modules.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/modules.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1e4e895bf5f864b902c68c27f0725f7fa3da553e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/modules.pyi
@@ -0,0 +1,52 @@
+import types
+
+import numpy as np
+from numpy import f2py
+
+from typing_extensions import assert_type
+
+assert_type(np, types.ModuleType)
+
+assert_type(np.char, types.ModuleType)
+assert_type(np.ctypeslib, types.ModuleType)
+assert_type(np.emath, types.ModuleType)
+assert_type(np.fft, types.ModuleType)
+assert_type(np.lib, types.ModuleType)
+assert_type(np.linalg, types.ModuleType)
+assert_type(np.ma, types.ModuleType)
+assert_type(np.matrixlib, types.ModuleType)
+assert_type(np.polynomial, types.ModuleType)
+assert_type(np.random, types.ModuleType)
+assert_type(np.rec, types.ModuleType)
+assert_type(np.testing, types.ModuleType)
+assert_type(np.version, types.ModuleType)
+assert_type(np.exceptions, types.ModuleType)
+assert_type(np.dtypes, types.ModuleType)
+
+assert_type(np.lib.format, types.ModuleType)
+assert_type(np.lib.mixins, types.ModuleType)
+assert_type(np.lib.scimath, types.ModuleType)
+assert_type(np.lib.stride_tricks, types.ModuleType)
+assert_type(np.ma.extras, types.ModuleType)
+assert_type(np.polynomial.chebyshev, types.ModuleType)
+assert_type(np.polynomial.hermite, types.ModuleType)
+assert_type(np.polynomial.hermite_e, types.ModuleType)
+assert_type(np.polynomial.laguerre, types.ModuleType)
+assert_type(np.polynomial.legendre, types.ModuleType)
+assert_type(np.polynomial.polynomial, types.ModuleType)
+
+assert_type(np.__path__, list[str])
+assert_type(np.__version__, str)
+assert_type(np.test, np._pytesttester.PytestTester)
+assert_type(np.test.module_name, str)
+
+assert_type(np.__all__, list[str])
+assert_type(np.char.__all__, list[str])
+assert_type(np.ctypeslib.__all__, list[str])
+assert_type(np.emath.__all__, list[str])
+assert_type(np.lib.__all__, list[str])
+assert_type(np.ma.__all__, list[str])
+assert_type(np.random.__all__, list[str])
+assert_type(np.rec.__all__, list[str])
+assert_type(np.testing.__all__, list[str])
+assert_type(f2py.__all__, list[str])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..cae14ee57e22f492629a23d8bed0e2038741e0b3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/multiarray.pyi
@@ -0,0 +1,196 @@
+import datetime as dt
+from typing import Any, Literal, TypeVar
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import Unpack, assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic, covariant=True)
+
+class SubClass(npt.NDArray[_SCT]): ...
+
+subclass: SubClass[np.float64]
+
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+AR_u1: npt.NDArray[np.uint8]
+AR_m: npt.NDArray[np.timedelta64]
+AR_M: npt.NDArray[np.datetime64]
+
+AR_LIKE_f: list[float]
+AR_LIKE_i: list[int]
+
+m: np.timedelta64
+M: np.datetime64
+
+b_f8 = np.broadcast(AR_f8)
+b_i8_f8_f8 = np.broadcast(AR_i8, AR_f8, AR_f8)
+
+nditer_obj: np.nditer
+
+date_scalar: dt.date
+date_seq: list[dt.date]
+timedelta_seq: list[dt.timedelta]
+
+n1: Literal[1]
+n2: Literal[2]
+n3: Literal[3]
+
+f8: np.float64
+
+def func11(a: int) -> bool: ...
+def func21(a: int, b: int) -> int: ...
+def func12(a: int) -> tuple[complex, bool]: ...
+
+assert_type(next(b_f8), tuple[Any, ...])
+assert_type(b_f8.reset(), None)
+assert_type(b_f8.index, int)
+assert_type(b_f8.iters, tuple[np.flatiter[Any], ...])
+assert_type(b_f8.nd, int)
+assert_type(b_f8.ndim, int)
+assert_type(b_f8.numiter, int)
+assert_type(b_f8.shape, tuple[int, ...])
+assert_type(b_f8.size, int)
+
+assert_type(next(b_i8_f8_f8), tuple[Any, ...])
+assert_type(b_i8_f8_f8.reset(), None)
+assert_type(b_i8_f8_f8.index, int)
+assert_type(b_i8_f8_f8.iters, tuple[np.flatiter[Any], ...])
+assert_type(b_i8_f8_f8.nd, int)
+assert_type(b_i8_f8_f8.ndim, int)
+assert_type(b_i8_f8_f8.numiter, int)
+assert_type(b_i8_f8_f8.shape, tuple[int, ...])
+assert_type(b_i8_f8_f8.size, int)
+
+assert_type(np.inner(AR_f8, AR_i8), Any)
+
+assert_type(np.where([True, True, False]), tuple[npt.NDArray[np.intp], ...])
+assert_type(np.where([True, True, False], 1, 0), npt.NDArray[Any])
+
+assert_type(np.lexsort([0, 1, 2]), Any)
+
+assert_type(np.can_cast(np.dtype("i8"), int), bool)
+assert_type(np.can_cast(AR_f8, "f8"), bool)
+assert_type(np.can_cast(AR_f8, np.complex128, casting="unsafe"), bool)
+
+assert_type(np.min_scalar_type([1]), np.dtype[Any])
+assert_type(np.min_scalar_type(AR_f8), np.dtype[Any])
+
+assert_type(np.result_type(int, [1]), np.dtype[Any])
+assert_type(np.result_type(AR_f8, AR_u1), np.dtype[Any])
+assert_type(np.result_type(AR_f8, np.complex128), np.dtype[Any])
+
+assert_type(np.dot(AR_LIKE_f, AR_i8), Any)
+assert_type(np.dot(AR_u1, 1), Any)
+assert_type(np.dot(1.5j, 1), Any)
+assert_type(np.dot(AR_u1, 1, out=AR_f8), npt.NDArray[np.float64])
+
+assert_type(np.vdot(AR_LIKE_f, AR_i8), np.floating[Any])
+assert_type(np.vdot(AR_u1, 1), np.signedinteger[Any])
+assert_type(np.vdot(1.5j, 1), np.complexfloating[Any, Any])
+
+assert_type(np.bincount(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.copyto(AR_f8, [1., 1.5, 1.6]), None)
+
+assert_type(np.putmask(AR_f8, [True, True, False], 1.5), None)
+
+assert_type(np.packbits(AR_i8), npt.NDArray[np.uint8])
+assert_type(np.packbits(AR_u1), npt.NDArray[np.uint8])
+
+assert_type(np.unpackbits(AR_u1), npt.NDArray[np.uint8])
+
+assert_type(np.shares_memory(1, 2), bool)
+assert_type(np.shares_memory(AR_f8, AR_f8, max_work=1), bool)
+
+assert_type(np.may_share_memory(1, 2), bool)
+assert_type(np.may_share_memory(AR_f8, AR_f8, max_work=1), bool)
+
+assert_type(np.promote_types(np.int32, np.int64), np.dtype[Any])
+assert_type(np.promote_types("f4", float), np.dtype[Any])
+
+assert_type(np.frompyfunc(func11, n1, n1).nin, Literal[1])
+assert_type(np.frompyfunc(func11, n1, n1).nout, Literal[1])
+assert_type(np.frompyfunc(func11, n1, n1).nargs, Literal[2])
+assert_type(np.frompyfunc(func11, n1, n1).ntypes, Literal[1])
+assert_type(np.frompyfunc(func11, n1, n1).identity, None)
+assert_type(np.frompyfunc(func11, n1, n1).signature, None)
+assert_type(np.frompyfunc(func11, n1, n1)(f8), bool)
+assert_type(np.frompyfunc(func11, n1, n1)(AR_f8), bool | npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func11, n1, n1).at(AR_f8, AR_i8), None)
+
+assert_type(np.frompyfunc(func21, n2, n1).nin, Literal[2])
+assert_type(np.frompyfunc(func21, n2, n1).nout, Literal[1])
+assert_type(np.frompyfunc(func21, n2, n1).nargs, Literal[3])
+assert_type(np.frompyfunc(func21, n2, n1).ntypes, Literal[1])
+assert_type(np.frompyfunc(func21, n2, n1).identity, None)
+assert_type(np.frompyfunc(func21, n2, n1).signature, None)
+assert_type(np.frompyfunc(func21, n2, n1)(f8, f8), int)
+assert_type(np.frompyfunc(func21, n2, n1)(AR_f8, f8), int | npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func21, n2, n1)(f8, AR_f8), int | npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func21, n2, n1).reduce(AR_f8, axis=0), int | npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func21, n2, n1).accumulate(AR_f8), npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func21, n2, n1).reduceat(AR_f8, AR_i8), npt.NDArray[np.object_])
+assert_type(np.frompyfunc(func21, n2, n1).outer(f8, f8), int)
+assert_type(np.frompyfunc(func21, n2, n1).outer(AR_f8, f8), int | npt.NDArray[np.object_])
+
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).nin, Literal[2])
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).nout, Literal[1])
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).nargs, Literal[3])
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).ntypes, Literal[1])
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).identity, int)
+assert_type(np.frompyfunc(func21, n2, n1, identity=0).signature, None)
+
+assert_type(np.frompyfunc(func12, n1, n2).nin, Literal[1])
+assert_type(np.frompyfunc(func12, n1, n2).nout, Literal[2])
+assert_type(np.frompyfunc(func12, n1, n2).nargs, int)
+assert_type(np.frompyfunc(func12, n1, n2).ntypes, Literal[1])
+assert_type(np.frompyfunc(func12, n1, n2).identity, None)
+assert_type(np.frompyfunc(func12, n1, n2).signature, None)
+assert_type(
+ np.frompyfunc(func12, n2, n2)(f8, f8),
+ tuple[complex, complex, Unpack[tuple[complex, ...]]],
+)
+assert_type(
+ np.frompyfunc(func12, n2, n2)(AR_f8, f8),
+ tuple[
+ complex | npt.NDArray[np.object_],
+ complex | npt.NDArray[np.object_],
+ Unpack[tuple[complex | npt.NDArray[np.object_], ...]],
+ ],
+)
+
+assert_type(np.datetime_data("m8[D]"), tuple[str, int])
+assert_type(np.datetime_data(np.datetime64), tuple[str, int])
+assert_type(np.datetime_data(np.dtype(np.timedelta64)), tuple[str, int])
+
+assert_type(np.busday_count("2011-01", "2011-02"), np.int_)
+assert_type(np.busday_count(["2011-01"], "2011-02"), npt.NDArray[np.int_])
+assert_type(np.busday_count(["2011-01"], date_scalar), npt.NDArray[np.int_])
+
+assert_type(np.busday_offset(M, m), np.datetime64)
+assert_type(np.busday_offset(date_scalar, m), np.datetime64)
+assert_type(np.busday_offset(M, 5), np.datetime64)
+assert_type(np.busday_offset(AR_M, m), npt.NDArray[np.datetime64])
+assert_type(np.busday_offset(M, timedelta_seq), npt.NDArray[np.datetime64])
+assert_type(np.busday_offset("2011-01", "2011-02", roll="forward"), np.datetime64)
+assert_type(np.busday_offset(["2011-01"], "2011-02", roll="forward"), npt.NDArray[np.datetime64])
+
+assert_type(np.is_busday("2012"), np.bool)
+assert_type(np.is_busday(date_scalar), np.bool)
+assert_type(np.is_busday(["2012"]), npt.NDArray[np.bool])
+
+assert_type(np.datetime_as_string(M), np.str_)
+assert_type(np.datetime_as_string(AR_M), npt.NDArray[np.str_])
+
+assert_type(np.busdaycalendar(holidays=date_seq), np.busdaycalendar)
+assert_type(np.busdaycalendar(holidays=[M]), np.busdaycalendar)
+
+assert_type(np.char.compare_chararrays("a", "b", "!=", rstrip=False), npt.NDArray[np.bool])
+assert_type(np.char.compare_chararrays(b"a", b"a", "==", True), npt.NDArray[np.bool])
+
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], flags=["c_index"]), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_flags=[["readonly", "readonly"]]), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], op_dtypes=np.int_), tuple[np.nditer, ...])
+assert_type(np.nested_iters([AR_i8, AR_i8], [[0], [1]], order="C", casting="no"), tuple[np.nditer, ...])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..add031ac884affb8ea7f5e3c8d48b1dc366ac206
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nbit_base_example.pyi
@@ -0,0 +1,23 @@
+from typing import TypeVar
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _64Bit, _32Bit
+
+from typing_extensions import assert_type
+
+T1 = TypeVar("T1", bound=npt.NBitBase)
+T2 = TypeVar("T2", bound=npt.NBitBase)
+
+def add(a: np.floating[T1], b: np.integer[T2]) -> np.floating[T1 | T2]:
+ return a + b
+
+i8: np.int64
+i4: np.int32
+f8: np.float64
+f4: np.float32
+
+assert_type(add(f8, i8), np.floating[_64Bit])
+assert_type(add(f4, i8), np.floating[_32Bit | _64Bit])
+assert_type(add(f8, i4), np.floating[_32Bit | _64Bit])
+assert_type(add(f4, i4), np.floating[_32Bit])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_assignability.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_assignability.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..22f0d005a7d2eec43b30cd7be51847233acda211
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_assignability.pyi
@@ -0,0 +1,79 @@
+from typing import Protocol, TypeAlias, TypeVar
+from typing_extensions import assert_type
+import numpy as np
+
+from numpy._typing import _64Bit
+
+
+_T = TypeVar("_T")
+_T_co = TypeVar("_T_co", covariant=True)
+
+class CanAbs(Protocol[_T_co]):
+ def __abs__(self, /) -> _T_co: ...
+
+class CanInvert(Protocol[_T_co]):
+ def __invert__(self, /) -> _T_co: ...
+
+class CanNeg(Protocol[_T_co]):
+ def __neg__(self, /) -> _T_co: ...
+
+class CanPos(Protocol[_T_co]):
+ def __pos__(self, /) -> _T_co: ...
+
+def do_abs(x: CanAbs[_T]) -> _T: ...
+def do_invert(x: CanInvert[_T]) -> _T: ...
+def do_neg(x: CanNeg[_T]) -> _T: ...
+def do_pos(x: CanPos[_T]) -> _T: ...
+
+_Bool_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.bool]]
+_UInt8_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.uint8]]
+_Int16_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.int16]]
+_LongLong_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.longlong]]
+_Float32_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.float32]]
+_Float64_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.float64]]
+_LongDouble_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.longdouble]]
+_Complex64_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complex64]]
+_Complex128_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complex128]]
+_CLongDouble_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[np.clongdouble]]
+
+b1_1d: _Bool_1d
+u1_1d: _UInt8_1d
+i2_1d: _Int16_1d
+q_1d: _LongLong_1d
+f4_1d: _Float32_1d
+f8_1d: _Float64_1d
+g_1d: _LongDouble_1d
+c8_1d: _Complex64_1d
+c16_1d: _Complex128_1d
+G_1d: _CLongDouble_1d
+
+assert_type(do_abs(b1_1d), _Bool_1d)
+assert_type(do_abs(u1_1d), _UInt8_1d)
+assert_type(do_abs(i2_1d), _Int16_1d)
+assert_type(do_abs(q_1d), _LongLong_1d)
+assert_type(do_abs(f4_1d), _Float32_1d)
+assert_type(do_abs(f8_1d), _Float64_1d)
+assert_type(do_abs(g_1d), _LongDouble_1d)
+
+assert_type(do_abs(c8_1d), _Float32_1d)
+# NOTE: Unfortunately it's not possible to have this return a `float64` sctype, see
+# https://github.com/python/mypy/issues/14070
+assert_type(do_abs(c16_1d), np.ndarray[tuple[int], np.dtype[np.floating[_64Bit]]])
+assert_type(do_abs(G_1d), _LongDouble_1d)
+
+assert_type(do_invert(b1_1d), _Bool_1d)
+assert_type(do_invert(u1_1d), _UInt8_1d)
+assert_type(do_invert(i2_1d), _Int16_1d)
+assert_type(do_invert(q_1d), _LongLong_1d)
+
+assert_type(do_neg(u1_1d), _UInt8_1d)
+assert_type(do_neg(i2_1d), _Int16_1d)
+assert_type(do_neg(q_1d), _LongLong_1d)
+assert_type(do_neg(f4_1d), _Float32_1d)
+assert_type(do_neg(c16_1d), _Complex128_1d)
+
+assert_type(do_pos(u1_1d), _UInt8_1d)
+assert_type(do_pos(i2_1d), _Int16_1d)
+assert_type(do_pos(q_1d), _LongLong_1d)
+assert_type(do_pos(f4_1d), _Float32_1d)
+assert_type(do_pos(c16_1d), _Complex128_1d)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..49181d2c98a61730e86748dd8823fe7549a781ff
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_conversion.pyi
@@ -0,0 +1,88 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+b1_0d: np.ndarray[tuple[()], np.dtype[np.bool]]
+u2_1d: np.ndarray[tuple[int], np.dtype[np.uint16]]
+i4_2d: np.ndarray[tuple[int, int], np.dtype[np.int32]]
+f8_3d: np.ndarray[tuple[int, int, int], np.dtype[np.float64]]
+cG_4d: np.ndarray[tuple[int, int, int, int], np.dtype[np.clongdouble]]
+i0_nd: npt.NDArray[np.int_]
+uncertain_dtype: np.int32 | np.float64 | np.str_
+
+# item
+assert_type(i0_nd.item(), int)
+assert_type(i0_nd.item(1), int)
+assert_type(i0_nd.item(0, 1), int)
+assert_type(i0_nd.item((0, 1)), int)
+
+assert_type(b1_0d.item(()), bool)
+assert_type(u2_1d.item((0,)), int)
+assert_type(i4_2d.item(-1, 2), int)
+assert_type(f8_3d.item(2, 1, -1), float)
+assert_type(cG_4d.item(-0xEd_fed_Deb_a_dead_bee), complex) # c'mon Ed, we talked about this...
+
+# tolist
+assert_type(b1_0d.tolist(), bool)
+assert_type(u2_1d.tolist(), list[int])
+assert_type(i4_2d.tolist(), list[list[int]])
+assert_type(f8_3d.tolist(), list[list[list[float]]])
+assert_type(cG_4d.tolist(), Any)
+assert_type(i0_nd.tolist(), Any)
+
+# regression tests for numpy/numpy#27944
+any_dtype: np.ndarray[Any, Any]
+any_sctype: np.ndarray[Any, Any]
+assert_type(any_dtype.tolist(), Any)
+assert_type(any_sctype.tolist(), Any)
+
+
+# itemset does not return a value
+# tostring is pretty simple
+# tobytes is pretty simple
+# tofile does not return a value
+# dump does not return a value
+# dumps is pretty simple
+
+# astype
+assert_type(i0_nd.astype("float"), npt.NDArray[Any])
+assert_type(i0_nd.astype(float), npt.NDArray[Any])
+assert_type(i0_nd.astype(np.float64), npt.NDArray[np.float64])
+assert_type(i0_nd.astype(np.float64, "K"), npt.NDArray[np.float64])
+assert_type(i0_nd.astype(np.float64, "K", "unsafe"), npt.NDArray[np.float64])
+assert_type(i0_nd.astype(np.float64, "K", "unsafe", True), npt.NDArray[np.float64])
+assert_type(i0_nd.astype(np.float64, "K", "unsafe", True, True), npt.NDArray[np.float64])
+
+assert_type(np.astype(i0_nd, np.float64), npt.NDArray[np.float64])
+
+assert_type(i4_2d.astype(np.uint16), np.ndarray[tuple[int, int], np.dtype[np.uint16]])
+assert_type(np.astype(i4_2d, np.uint16), np.ndarray[tuple[int, int], np.dtype[np.uint16]])
+assert_type(f8_3d.astype(np.int16), np.ndarray[tuple[int, int, int], np.dtype[np.int16]])
+assert_type(np.astype(f8_3d, np.int16), np.ndarray[tuple[int, int, int], np.dtype[np.int16]])
+assert_type(i4_2d.astype(uncertain_dtype), np.ndarray[tuple[int, int], np.dtype[np.generic[Any]]])
+assert_type(np.astype(i4_2d, uncertain_dtype), np.ndarray[tuple[int, int], np.dtype[Any]])
+
+# byteswap
+assert_type(i0_nd.byteswap(), npt.NDArray[np.int_])
+assert_type(i0_nd.byteswap(True), npt.NDArray[np.int_])
+
+# copy
+assert_type(i0_nd.copy(), npt.NDArray[np.int_])
+assert_type(i0_nd.copy("C"), npt.NDArray[np.int_])
+
+assert_type(i0_nd.view(), npt.NDArray[np.int_])
+assert_type(i0_nd.view(np.float64), npt.NDArray[np.float64])
+assert_type(i0_nd.view(float), npt.NDArray[Any])
+assert_type(i0_nd.view(np.float64, np.matrix), np.matrix[tuple[int, int], Any])
+
+# getfield
+assert_type(i0_nd.getfield("float"), npt.NDArray[Any])
+assert_type(i0_nd.getfield(float), npt.NDArray[Any])
+assert_type(i0_nd.getfield(np.float64), npt.NDArray[np.float64])
+assert_type(i0_nd.getfield(np.float64, 8), npt.NDArray[np.float64])
+
+# setflags does not return a value
+# fill does not return a value
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7c619c1e156e313f1eb3d8f4af6c535065ec0b55
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_misc.pyi
@@ -0,0 +1,234 @@
+"""
+Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.
+
+More extensive tests are performed for the methods'
+function-based counterpart in `../from_numeric.py`.
+
+"""
+
+import operator
+import ctypes as ct
+from types import ModuleType
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import CapsuleType, assert_type
+
+class SubClass(npt.NDArray[np.object_]): ...
+
+f8: np.float64
+i8: np.int64
+B: SubClass
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+AR_u1: npt.NDArray[np.uint8]
+AR_c8: npt.NDArray[np.complex64]
+AR_m: npt.NDArray[np.timedelta64]
+AR_U: npt.NDArray[np.str_]
+AR_V: npt.NDArray[np.void]
+
+ctypes_obj = AR_f8.ctypes
+
+assert_type(AR_f8.__dlpack__(), CapsuleType)
+assert_type(AR_f8.__dlpack_device__(), tuple[Literal[1], Literal[0]])
+
+assert_type(ctypes_obj.data, int)
+assert_type(ctypes_obj.shape, ct.Array[np.ctypeslib.c_intp])
+assert_type(ctypes_obj.strides, ct.Array[np.ctypeslib.c_intp])
+assert_type(ctypes_obj._as_parameter_, ct.c_void_p)
+
+assert_type(ctypes_obj.data_as(ct.c_void_p), ct.c_void_p)
+assert_type(ctypes_obj.shape_as(ct.c_longlong), ct.Array[ct.c_longlong])
+assert_type(ctypes_obj.strides_as(ct.c_ubyte), ct.Array[ct.c_ubyte])
+
+assert_type(f8.all(), np.bool)
+assert_type(AR_f8.all(), np.bool)
+assert_type(AR_f8.all(axis=0), np.bool | npt.NDArray[np.bool])
+assert_type(AR_f8.all(keepdims=True), np.bool | npt.NDArray[np.bool])
+assert_type(AR_f8.all(out=B), SubClass)
+
+assert_type(f8.any(), np.bool)
+assert_type(AR_f8.any(), np.bool)
+assert_type(AR_f8.any(axis=0), np.bool | npt.NDArray[np.bool])
+assert_type(AR_f8.any(keepdims=True), np.bool | npt.NDArray[np.bool])
+assert_type(AR_f8.any(out=B), SubClass)
+
+assert_type(f8.argmax(), np.intp)
+assert_type(AR_f8.argmax(), np.intp)
+assert_type(AR_f8.argmax(axis=0), Any)
+assert_type(AR_f8.argmax(out=B), SubClass)
+
+assert_type(f8.argmin(), np.intp)
+assert_type(AR_f8.argmin(), np.intp)
+assert_type(AR_f8.argmin(axis=0), Any)
+assert_type(AR_f8.argmin(out=B), SubClass)
+
+assert_type(f8.argsort(), npt.NDArray[Any])
+assert_type(AR_f8.argsort(), npt.NDArray[Any])
+
+assert_type(f8.astype(np.int64).choose([()]), npt.NDArray[Any])
+assert_type(AR_f8.choose([0]), npt.NDArray[Any])
+assert_type(AR_f8.choose([0], out=B), SubClass)
+
+assert_type(f8.clip(1), npt.NDArray[Any])
+assert_type(AR_f8.clip(1), npt.NDArray[Any])
+assert_type(AR_f8.clip(None, 1), npt.NDArray[Any])
+assert_type(AR_f8.clip(1, out=B), SubClass)
+assert_type(AR_f8.clip(None, 1, out=B), SubClass)
+
+assert_type(f8.compress([0]), npt.NDArray[Any])
+assert_type(AR_f8.compress([0]), npt.NDArray[Any])
+assert_type(AR_f8.compress([0], out=B), SubClass)
+
+assert_type(f8.conj(), np.float64)
+assert_type(AR_f8.conj(), npt.NDArray[np.float64])
+assert_type(B.conj(), SubClass)
+
+assert_type(f8.conjugate(), np.float64)
+assert_type(AR_f8.conjugate(), npt.NDArray[np.float64])
+assert_type(B.conjugate(), SubClass)
+
+assert_type(f8.cumprod(), npt.NDArray[Any])
+assert_type(AR_f8.cumprod(), npt.NDArray[Any])
+assert_type(AR_f8.cumprod(out=B), SubClass)
+
+assert_type(f8.cumsum(), npt.NDArray[Any])
+assert_type(AR_f8.cumsum(), npt.NDArray[Any])
+assert_type(AR_f8.cumsum(out=B), SubClass)
+
+assert_type(f8.max(), Any)
+assert_type(AR_f8.max(), Any)
+assert_type(AR_f8.max(axis=0), Any)
+assert_type(AR_f8.max(keepdims=True), Any)
+assert_type(AR_f8.max(out=B), SubClass)
+
+assert_type(f8.mean(), Any)
+assert_type(AR_f8.mean(), Any)
+assert_type(AR_f8.mean(axis=0), Any)
+assert_type(AR_f8.mean(keepdims=True), Any)
+assert_type(AR_f8.mean(out=B), SubClass)
+
+assert_type(f8.min(), Any)
+assert_type(AR_f8.min(), Any)
+assert_type(AR_f8.min(axis=0), Any)
+assert_type(AR_f8.min(keepdims=True), Any)
+assert_type(AR_f8.min(out=B), SubClass)
+
+assert_type(f8.prod(), Any)
+assert_type(AR_f8.prod(), Any)
+assert_type(AR_f8.prod(axis=0), Any)
+assert_type(AR_f8.prod(keepdims=True), Any)
+assert_type(AR_f8.prod(out=B), SubClass)
+
+assert_type(f8.round(), np.float64)
+assert_type(AR_f8.round(), npt.NDArray[np.float64])
+assert_type(AR_f8.round(out=B), SubClass)
+
+assert_type(f8.repeat(1), npt.NDArray[np.float64])
+assert_type(AR_f8.repeat(1), npt.NDArray[np.float64])
+assert_type(B.repeat(1), npt.NDArray[np.object_])
+
+assert_type(f8.std(), Any)
+assert_type(AR_f8.std(), Any)
+assert_type(AR_f8.std(axis=0), Any)
+assert_type(AR_f8.std(keepdims=True), Any)
+assert_type(AR_f8.std(out=B), SubClass)
+
+assert_type(f8.sum(), Any)
+assert_type(AR_f8.sum(), Any)
+assert_type(AR_f8.sum(axis=0), Any)
+assert_type(AR_f8.sum(keepdims=True), Any)
+assert_type(AR_f8.sum(out=B), SubClass)
+
+assert_type(f8.take(0), np.float64)
+assert_type(AR_f8.take(0), np.float64)
+assert_type(AR_f8.take([0]), npt.NDArray[np.float64])
+assert_type(AR_f8.take(0, out=B), SubClass)
+assert_type(AR_f8.take([0], out=B), SubClass)
+
+assert_type(f8.var(), Any)
+assert_type(AR_f8.var(), Any)
+assert_type(AR_f8.var(axis=0), Any)
+assert_type(AR_f8.var(keepdims=True), Any)
+assert_type(AR_f8.var(out=B), SubClass)
+
+assert_type(AR_f8.argpartition([0]), npt.NDArray[np.intp])
+
+assert_type(AR_f8.diagonal(), npt.NDArray[np.float64])
+
+assert_type(AR_f8.dot(1), npt.NDArray[Any])
+assert_type(AR_f8.dot([1]), Any)
+assert_type(AR_f8.dot(1, out=B), SubClass)
+
+assert_type(AR_f8.nonzero(), tuple[npt.NDArray[np.intp], ...])
+
+assert_type(AR_f8.searchsorted(1), np.intp)
+assert_type(AR_f8.searchsorted([1]), npt.NDArray[np.intp])
+
+assert_type(AR_f8.trace(), Any)
+assert_type(AR_f8.trace(out=B), SubClass)
+
+assert_type(AR_f8.item(), float)
+assert_type(AR_U.item(), str)
+
+assert_type(AR_f8.ravel(), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(AR_U.ravel(), np.ndarray[tuple[int], np.dtype[np.str_]])
+
+assert_type(AR_f8.flatten(), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(AR_U.flatten(), np.ndarray[tuple[int], np.dtype[np.str_]])
+
+assert_type(AR_i8.reshape(None), npt.NDArray[np.int64])
+assert_type(AR_f8.reshape(-1), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(AR_c8.reshape(2, 3, 4, 5), np.ndarray[tuple[int, int, int, int], np.dtype[np.complex64]])
+assert_type(AR_m.reshape(()), np.ndarray[tuple[()], np.dtype[np.timedelta64]])
+assert_type(AR_U.reshape([]), np.ndarray[tuple[()], np.dtype[np.str_]])
+assert_type(AR_V.reshape((480, 720, 4)), np.ndarray[tuple[int, int, int], np.dtype[np.void]])
+
+assert_type(int(AR_f8), int)
+assert_type(int(AR_U), int)
+
+assert_type(float(AR_f8), float)
+assert_type(float(AR_U), float)
+
+assert_type(complex(AR_f8), complex)
+
+assert_type(operator.index(AR_i8), int)
+
+assert_type(AR_f8.__array_wrap__(B), npt.NDArray[np.object_])
+
+assert_type(AR_V[0], Any)
+assert_type(AR_V[0, 0], Any)
+assert_type(AR_V[AR_i8], npt.NDArray[np.void])
+assert_type(AR_V[AR_i8, AR_i8], npt.NDArray[np.void])
+assert_type(AR_V[AR_i8, None], npt.NDArray[np.void])
+assert_type(AR_V[0, ...], npt.NDArray[np.void])
+assert_type(AR_V[[0]], npt.NDArray[np.void])
+assert_type(AR_V[[0], [0]], npt.NDArray[np.void])
+assert_type(AR_V[:], npt.NDArray[np.void])
+assert_type(AR_V["a"], npt.NDArray[Any])
+assert_type(AR_V[["a", "b"]], npt.NDArray[np.void])
+
+assert_type(AR_f8.dump("test_file"), None)
+assert_type(AR_f8.dump(b"test_file"), None)
+with open("test_file", "wb") as f:
+ assert_type(AR_f8.dump(f), None)
+
+assert_type(AR_f8.__array_finalize__(None), None)
+assert_type(AR_f8.__array_finalize__(B), None)
+assert_type(AR_f8.__array_finalize__(AR_f8), None)
+
+assert_type(f8.device, Literal["cpu"])
+assert_type(AR_f8.device, Literal["cpu"])
+
+assert_type(f8.to_device("cpu"), np.float64)
+assert_type(i8.to_device("cpu"), np.int64)
+assert_type(AR_f8.to_device("cpu"), npt.NDArray[np.float64])
+assert_type(AR_i8.to_device("cpu"), npt.NDArray[np.int64])
+assert_type(AR_u1.to_device("cpu"), npt.NDArray[np.uint8])
+assert_type(AR_c8.to_device("cpu"), npt.NDArray[np.complex64])
+assert_type(AR_m.to_device("cpu"), npt.NDArray[np.timedelta64])
+
+assert_type(f8.__array_namespace__(), ModuleType)
+assert_type(AR_f8.__array_namespace__(), ModuleType)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..25637134088c7c9990c4fc257ed4e779d9ac34aa
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ndarray_shape_manipulation.pyi
@@ -0,0 +1,39 @@
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+nd: npt.NDArray[np.int64]
+
+# reshape
+assert_type(nd.reshape(None), npt.NDArray[np.int64])
+assert_type(nd.reshape(4), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(nd.reshape((4,)), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(nd.reshape(2, 2), np.ndarray[tuple[int, int], np.dtype[np.int64]])
+assert_type(nd.reshape((2, 2)), np.ndarray[tuple[int, int], np.dtype[np.int64]])
+
+assert_type(nd.reshape((2, 2), order="C"), np.ndarray[tuple[int, int], np.dtype[np.int64]])
+assert_type(nd.reshape(4, order="C"), np.ndarray[tuple[int], np.dtype[np.int64]])
+
+# resize does not return a value
+
+# transpose
+assert_type(nd.transpose(), npt.NDArray[np.int64])
+assert_type(nd.transpose(1, 0), npt.NDArray[np.int64])
+assert_type(nd.transpose((1, 0)), npt.NDArray[np.int64])
+
+# swapaxes
+assert_type(nd.swapaxes(0, 1), npt.NDArray[np.int64])
+
+# flatten
+assert_type(nd.flatten(), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(nd.flatten("C"), np.ndarray[tuple[int], np.dtype[np.int64]])
+
+# ravel
+assert_type(nd.ravel(), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(nd.ravel("C"), np.ndarray[tuple[int], np.dtype[np.int64]])
+
+# squeeze
+assert_type(nd.squeeze(), npt.NDArray[np.int64])
+assert_type(nd.squeeze(0), npt.NDArray[np.int64])
+assert_type(nd.squeeze((0, 2)), npt.NDArray[np.int64])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nditer.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nditer.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b5723c41310e84318b6d436bb305b994a61b61b3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nditer.pyi
@@ -0,0 +1,51 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+nditer_obj: np.nditer
+
+assert_type(np.nditer([0, 1], flags=["c_index"]), np.nditer)
+assert_type(np.nditer([0, 1], op_flags=[["readonly", "readonly"]]), np.nditer)
+assert_type(np.nditer([0, 1], op_dtypes=np.int_), np.nditer)
+assert_type(np.nditer([0, 1], order="C", casting="no"), np.nditer)
+
+assert_type(nditer_obj.dtypes, tuple[np.dtype[Any], ...])
+assert_type(nditer_obj.finished, bool)
+assert_type(nditer_obj.has_delayed_bufalloc, bool)
+assert_type(nditer_obj.has_index, bool)
+assert_type(nditer_obj.has_multi_index, bool)
+assert_type(nditer_obj.index, int)
+assert_type(nditer_obj.iterationneedsapi, bool)
+assert_type(nditer_obj.iterindex, int)
+assert_type(nditer_obj.iterrange, tuple[int, ...])
+assert_type(nditer_obj.itersize, int)
+assert_type(nditer_obj.itviews, tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.multi_index, tuple[int, ...])
+assert_type(nditer_obj.ndim, int)
+assert_type(nditer_obj.nop, int)
+assert_type(nditer_obj.operands, tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.shape, tuple[int, ...])
+assert_type(nditer_obj.value, tuple[npt.NDArray[Any], ...])
+
+assert_type(nditer_obj.close(), None)
+assert_type(nditer_obj.copy(), np.nditer)
+assert_type(nditer_obj.debug_print(), None)
+assert_type(nditer_obj.enable_external_loop(), None)
+assert_type(nditer_obj.iternext(), bool)
+assert_type(nditer_obj.remove_axis(0), None)
+assert_type(nditer_obj.remove_multi_index(), None)
+assert_type(nditer_obj.reset(), None)
+
+assert_type(len(nditer_obj), int)
+assert_type(iter(nditer_obj), np.nditer)
+assert_type(next(nditer_obj), tuple[npt.NDArray[Any], ...])
+assert_type(nditer_obj.__copy__(), np.nditer)
+with nditer_obj as f:
+ assert_type(f, np.nditer)
+assert_type(nditer_obj[0], npt.NDArray[Any])
+assert_type(nditer_obj[:], tuple[npt.NDArray[Any], ...])
+nditer_obj[0] = 0
+nditer_obj[:] = [0, 1]
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..06acbbd9ce84e41481053de8e3b0b7c402e6a296
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/nested_sequence.pyi
@@ -0,0 +1,28 @@
+from collections.abc import Sequence
+from typing import Any
+
+from numpy._typing import _NestedSequence
+
+from typing_extensions import assert_type
+
+a: Sequence[int]
+b: Sequence[Sequence[int]]
+c: Sequence[Sequence[Sequence[int]]]
+d: Sequence[Sequence[Sequence[Sequence[int]]]]
+e: Sequence[bool]
+f: tuple[int, ...]
+g: list[int]
+h: Sequence[Any]
+
+def func(a: _NestedSequence[int]) -> None:
+ ...
+
+assert_type(func(a), None)
+assert_type(func(b), None)
+assert_type(func(c), None)
+assert_type(func(d), None)
+assert_type(func(e), None)
+assert_type(func(f), None)
+assert_type(func(g), None)
+assert_type(func(h), None)
+assert_type(func(range(15)), None)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/npyio.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/npyio.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d4c47b665ca50d5d5ecd503bcaeaea717bdc889b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/npyio.pyi
@@ -0,0 +1,85 @@
+import re
+import zipfile
+import pathlib
+from typing import IO, Any
+from collections.abc import Mapping
+
+import numpy.typing as npt
+import numpy as np
+from numpy.lib._npyio_impl import BagObj
+
+from typing_extensions import assert_type
+
+str_path: str
+pathlib_path: pathlib.Path
+str_file: IO[str]
+bytes_file: IO[bytes]
+
+npz_file: np.lib.npyio.NpzFile
+
+AR_i8: npt.NDArray[np.int64]
+AR_LIKE_f8: list[float]
+
+class BytesWriter:
+ def write(self, data: bytes) -> None: ...
+
+class BytesReader:
+ def read(self, n: int = ...) -> bytes: ...
+ def seek(self, offset: int, whence: int = ...) -> int: ...
+
+bytes_writer: BytesWriter
+bytes_reader: BytesReader
+
+assert_type(npz_file.zip, zipfile.ZipFile)
+assert_type(npz_file.fid, None | IO[str])
+assert_type(npz_file.files, list[str])
+assert_type(npz_file.allow_pickle, bool)
+assert_type(npz_file.pickle_kwargs, None | Mapping[str, Any])
+assert_type(npz_file.f, BagObj[np.lib.npyio.NpzFile])
+assert_type(npz_file["test"], npt.NDArray[Any])
+assert_type(len(npz_file), int)
+with npz_file as f:
+ assert_type(f, np.lib.npyio.NpzFile)
+
+assert_type(np.load(bytes_file), Any)
+assert_type(np.load(pathlib_path, allow_pickle=True), Any)
+assert_type(np.load(str_path, encoding="bytes"), Any)
+assert_type(np.load(bytes_reader), Any)
+
+assert_type(np.save(bytes_file, AR_LIKE_f8), None)
+assert_type(np.save(pathlib_path, AR_i8, allow_pickle=True), None)
+assert_type(np.save(str_path, AR_LIKE_f8), None)
+assert_type(np.save(bytes_writer, AR_LIKE_f8), None)
+
+assert_type(np.savez(bytes_file, AR_LIKE_f8), None)
+assert_type(np.savez(pathlib_path, ar1=AR_i8, ar2=AR_i8), None)
+assert_type(np.savez(str_path, AR_LIKE_f8, ar1=AR_i8), None)
+assert_type(np.savez(bytes_writer, AR_LIKE_f8, ar1=AR_i8), None)
+
+assert_type(np.savez_compressed(bytes_file, AR_LIKE_f8), None)
+assert_type(np.savez_compressed(pathlib_path, ar1=AR_i8, ar2=AR_i8), None)
+assert_type(np.savez_compressed(str_path, AR_LIKE_f8, ar1=AR_i8), None)
+assert_type(np.savez_compressed(bytes_writer, AR_LIKE_f8, ar1=AR_i8), None)
+
+assert_type(np.loadtxt(bytes_file), npt.NDArray[np.float64])
+assert_type(np.loadtxt(pathlib_path, dtype=np.str_), npt.NDArray[np.str_])
+assert_type(np.loadtxt(str_path, dtype=str, skiprows=2), npt.NDArray[Any])
+assert_type(np.loadtxt(str_file, comments="test"), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_file, comments=None), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_path, delimiter="\n"), npt.NDArray[np.float64])
+assert_type(np.loadtxt(str_path, ndmin=2), npt.NDArray[np.float64])
+assert_type(np.loadtxt(["1", "2", "3"]), npt.NDArray[np.float64])
+
+assert_type(np.fromregex(bytes_file, "test", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromregex(str_file, b"test", dtype=float), npt.NDArray[Any])
+assert_type(np.fromregex(str_path, re.compile("test"), dtype=np.str_, encoding="utf8"), npt.NDArray[np.str_])
+assert_type(np.fromregex(pathlib_path, "test", np.float64), npt.NDArray[np.float64])
+assert_type(np.fromregex(bytes_reader, "test", np.float64), npt.NDArray[np.float64])
+
+assert_type(np.genfromtxt(bytes_file), npt.NDArray[Any])
+assert_type(np.genfromtxt(pathlib_path, dtype=np.str_), npt.NDArray[np.str_])
+assert_type(np.genfromtxt(str_path, dtype=str, skip_header=2), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_file, comments="test"), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_path, delimiter="\n"), npt.NDArray[Any])
+assert_type(np.genfromtxt(str_path, ndmin=2), npt.NDArray[Any])
+assert_type(np.genfromtxt(["1", "2", "3"], ndmin=2), npt.NDArray[Any])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numeric.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numeric.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..90e6674a85e39a806020d5768883356c9e85bed4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numeric.pyi
@@ -0,0 +1,137 @@
+"""
+Tests for :mod:`_core.numeric`.
+
+Does not include tests which fall under ``array_constructors``.
+
+"""
+
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+class SubClass(npt.NDArray[np.int64]):
+ ...
+
+i8: np.int64
+
+AR_b: npt.NDArray[np.bool]
+AR_u8: npt.NDArray[np.uint64]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_m: npt.NDArray[np.timedelta64]
+AR_O: npt.NDArray[np.object_]
+
+B: list[int]
+C: SubClass
+
+assert_type(np.count_nonzero(i8), int)
+assert_type(np.count_nonzero(AR_i8), int)
+assert_type(np.count_nonzero(B), int)
+assert_type(np.count_nonzero(AR_i8, keepdims=True), npt.NDArray[np.intp])
+assert_type(np.count_nonzero(AR_i8, axis=0), Any)
+
+assert_type(np.isfortran(i8), bool)
+assert_type(np.isfortran(AR_i8), bool)
+
+assert_type(np.argwhere(i8), npt.NDArray[np.intp])
+assert_type(np.argwhere(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.flatnonzero(i8), npt.NDArray[np.intp])
+assert_type(np.flatnonzero(AR_i8), npt.NDArray[np.intp])
+
+assert_type(np.correlate(B, AR_i8, mode="valid"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_i8, mode="same"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.correlate(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.correlate(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.correlate(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.correlate(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.correlate(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.convolve(B, AR_i8, mode="valid"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_i8, mode="same"), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.convolve(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.convolve(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.convolve(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.convolve(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.outer(i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_i8, out=C), SubClass)
+assert_type(np.outer(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.outer(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.outer(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.convolve(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.outer(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.outer(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.outer(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.tensordot(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8, axes=0), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_i8, axes=(0, 1)), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.tensordot(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.tensordot(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.tensordot(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.tensordot(AR_i8, AR_m), npt.NDArray[np.timedelta64])
+assert_type(np.tensordot(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.isscalar(i8), bool)
+assert_type(np.isscalar(AR_i8), bool)
+assert_type(np.isscalar(B), bool)
+
+assert_type(np.roll(AR_i8, 1), npt.NDArray[np.int64])
+assert_type(np.roll(AR_i8, (1, 2)), npt.NDArray[np.int64])
+assert_type(np.roll(B, 1), npt.NDArray[Any])
+
+assert_type(np.rollaxis(AR_i8, 0, 1), npt.NDArray[np.int64])
+
+assert_type(np.moveaxis(AR_i8, 0, 1), npt.NDArray[np.int64])
+assert_type(np.moveaxis(AR_i8, (0, 1), (1, 2)), npt.NDArray[np.int64])
+
+assert_type(np.cross(B, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_b, AR_u8), npt.NDArray[np.unsignedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.cross(AR_i8, AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(np.cross(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.cross(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(np.indices([0, 1, 2]), npt.NDArray[np.int_])
+assert_type(np.indices([0, 1, 2], sparse=True), tuple[npt.NDArray[np.int_], ...])
+assert_type(np.indices([0, 1, 2], dtype=np.float64), npt.NDArray[np.float64])
+assert_type(np.indices([0, 1, 2], sparse=True, dtype=np.float64), tuple[npt.NDArray[np.float64], ...])
+assert_type(np.indices([0, 1, 2], dtype=float), npt.NDArray[Any])
+assert_type(np.indices([0, 1, 2], sparse=True, dtype=float), tuple[npt.NDArray[Any], ...])
+
+assert_type(np.binary_repr(1), str)
+
+assert_type(np.base_repr(1), str)
+
+assert_type(np.allclose(i8, AR_i8), bool)
+assert_type(np.allclose(B, AR_i8), bool)
+assert_type(np.allclose(AR_i8, AR_i8), bool)
+
+assert_type(np.isclose(i8, i8), np.bool)
+assert_type(np.isclose(i8, AR_i8), npt.NDArray[np.bool])
+assert_type(np.isclose(B, AR_i8), npt.NDArray[np.bool])
+assert_type(np.isclose(AR_i8, AR_i8), npt.NDArray[np.bool])
+
+assert_type(np.array_equal(i8, AR_i8), bool)
+assert_type(np.array_equal(B, AR_i8), bool)
+assert_type(np.array_equal(AR_i8, AR_i8), bool)
+
+assert_type(np.array_equiv(i8, AR_i8), bool)
+assert_type(np.array_equiv(B, AR_i8), bool)
+assert_type(np.array_equiv(AR_i8, AR_i8), bool)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a8ad4e0e1f4b287245ae3d457ccf3c67b5483b10
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi
@@ -0,0 +1,53 @@
+from typing import Literal
+from typing_extensions import assert_type
+
+import numpy as np
+
+
+assert_type(
+ np.ScalarType,
+ tuple[
+ type[int],
+ type[float],
+ type[complex],
+ type[bool],
+ type[bytes],
+ type[str],
+ type[memoryview],
+ type[np.bool],
+ type[np.csingle],
+ type[np.cdouble],
+ type[np.clongdouble],
+ type[np.half],
+ type[np.single],
+ type[np.double],
+ type[np.longdouble],
+ type[np.byte],
+ type[np.short],
+ type[np.intc],
+ type[np.long],
+ type[np.longlong],
+ type[np.timedelta64],
+ type[np.datetime64],
+ type[np.object_],
+ type[np.bytes_],
+ type[np.str_],
+ type[np.ubyte],
+ type[np.ushort],
+ type[np.uintc],
+ type[np.ulong],
+ type[np.ulonglong],
+ type[np.void],
+ ],
+)
+assert_type(np.ScalarType[0], type[int])
+assert_type(np.ScalarType[3], type[bool])
+assert_type(np.ScalarType[8], type[np.csingle])
+assert_type(np.ScalarType[10], type[np.clongdouble])
+assert_type(np.bool_(object()), np.bool)
+
+assert_type(np.typecodes["Character"], Literal["c"])
+assert_type(np.typecodes["Complex"], Literal["FDG"])
+assert_type(np.typecodes["All"], Literal["?bhilqnpBHILQNPefdgFDGSUVOMm"])
+
+assert_type(np.sctypeDict['uint8'], type[np.generic])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polybase.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polybase.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..40c13e646f4a31a4e1c1196ebeb953098c745b91
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polybase.pyi
@@ -0,0 +1,221 @@
+from fractions import Fraction
+from collections.abc import Sequence
+from decimal import Decimal
+from typing import Any, Literal as L, TypeAlias, TypeVar
+
+import numpy as np
+import numpy.polynomial as npp
+import numpy.typing as npt
+
+from typing_extensions import assert_type, LiteralString
+
+_Ar_x: TypeAlias = npt.NDArray[np.inexact[Any] | np.object_]
+_Ar_f: TypeAlias = npt.NDArray[np.floating[Any]]
+_Ar_c: TypeAlias = npt.NDArray[np.complexfloating[Any, Any]]
+_Ar_O: TypeAlias = npt.NDArray[np.object_]
+
+_Ar_x_n: TypeAlias = np.ndarray[tuple[int], np.dtype[np.inexact[Any] | np.object_]]
+_Ar_f_n: TypeAlias = np.ndarray[tuple[int], np.dtype[np.floating[Any]]]
+_Ar_c_n: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complexfloating[Any, Any]]]
+_Ar_O_n: TypeAlias = np.ndarray[tuple[int], np.dtype[np.object_]]
+
+_Ar_x_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.inexact[Any] | np.object_]]
+_Ar_f_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.floating[Any]]]
+_Ar_c_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.complexfloating[Any, Any]]]
+_Ar_O_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.object_]]
+
+_SCT = TypeVar("_SCT", bound=np.generic)
+_Ar_1d: TypeAlias = np.ndarray[tuple[int], np.dtype[_SCT]]
+
+_BasisName: TypeAlias = L["X"]
+
+SC_i: np.int_
+SC_i_co: int | np.int_
+SC_f: np.float64
+SC_f_co: float | np.float64 | np.int_
+SC_c: np.complex128
+SC_c_co: complex | np.complex128
+SC_O: Decimal
+
+AR_i: npt.NDArray[np.int_]
+AR_f: npt.NDArray[np.float64]
+AR_f_co: npt.NDArray[np.float64] | npt.NDArray[np.int_]
+AR_c: npt.NDArray[np.complex128]
+AR_c_co: npt.NDArray[np.complex128] |npt.NDArray[np.float64] | npt.NDArray[np.int_]
+AR_O: npt.NDArray[np.object_]
+AR_O_co: npt.NDArray[np.object_ | np.number[Any]]
+
+SQ_i: Sequence[int]
+SQ_f: Sequence[float]
+SQ_c: Sequence[complex]
+SQ_O: Sequence[Decimal]
+
+PS_poly: npp.Polynomial
+PS_cheb: npp.Chebyshev
+PS_herm: npp.Hermite
+PS_herme: npp.HermiteE
+PS_lag: npp.Laguerre
+PS_leg: npp.Legendre
+PS_all: (
+ npp.Polynomial
+ | npp.Chebyshev
+ | npp.Hermite
+ | npp.HermiteE
+ | npp.Laguerre
+ | npp.Legendre
+)
+
+# static- and classmethods
+
+assert_type(type(PS_poly).basis_name, None)
+assert_type(type(PS_cheb).basis_name, L['T'])
+assert_type(type(PS_herm).basis_name, L['H'])
+assert_type(type(PS_herme).basis_name, L['He'])
+assert_type(type(PS_lag).basis_name, L['L'])
+assert_type(type(PS_leg).basis_name, L['P'])
+
+assert_type(type(PS_all).__hash__, None)
+assert_type(type(PS_all).__array_ufunc__, None)
+assert_type(type(PS_all).maxpower, L[100])
+
+assert_type(type(PS_poly).fromroots(SC_i), npp.Polynomial)
+assert_type(type(PS_poly).fromroots(SQ_i), npp.Polynomial)
+assert_type(type(PS_poly).fromroots(AR_i), npp.Polynomial)
+assert_type(type(PS_cheb).fromroots(SC_f), npp.Chebyshev)
+assert_type(type(PS_cheb).fromroots(SQ_f), npp.Chebyshev)
+assert_type(type(PS_cheb).fromroots(AR_f_co), npp.Chebyshev)
+assert_type(type(PS_herm).fromroots(SC_c), npp.Hermite)
+assert_type(type(PS_herm).fromroots(SQ_c), npp.Hermite)
+assert_type(type(PS_herm).fromroots(AR_c_co), npp.Hermite)
+assert_type(type(PS_leg).fromroots(SC_O), npp.Legendre)
+assert_type(type(PS_leg).fromroots(SQ_O), npp.Legendre)
+assert_type(type(PS_leg).fromroots(AR_O_co), npp.Legendre)
+
+assert_type(type(PS_poly).identity(), npp.Polynomial)
+assert_type(type(PS_cheb).identity(symbol='z'), npp.Chebyshev)
+
+assert_type(type(PS_lag).basis(SC_i), npp.Laguerre)
+assert_type(type(PS_leg).basis(32, symbol='u'), npp.Legendre)
+
+assert_type(type(PS_herm).cast(PS_poly), npp.Hermite)
+assert_type(type(PS_herme).cast(PS_leg), npp.HermiteE)
+
+# attributes / properties
+
+assert_type(PS_all.coef, _Ar_x_n)
+assert_type(PS_all.domain, _Ar_x_2)
+assert_type(PS_all.window, _Ar_x_2)
+assert_type(PS_all.symbol, LiteralString)
+
+# instance methods
+
+assert_type(PS_all.has_samecoef(PS_all), bool)
+assert_type(PS_all.has_samedomain(PS_all), bool)
+assert_type(PS_all.has_samewindow(PS_all), bool)
+assert_type(PS_all.has_sametype(PS_all), bool)
+assert_type(PS_poly.has_sametype(PS_poly), bool)
+assert_type(PS_poly.has_sametype(PS_leg), bool)
+assert_type(PS_poly.has_sametype(NotADirectoryError), L[False])
+
+assert_type(PS_poly.copy(), npp.Polynomial)
+assert_type(PS_cheb.copy(), npp.Chebyshev)
+assert_type(PS_herm.copy(), npp.Hermite)
+assert_type(PS_herme.copy(), npp.HermiteE)
+assert_type(PS_lag.copy(), npp.Laguerre)
+assert_type(PS_leg.copy(), npp.Legendre)
+
+assert_type(PS_leg.cutdeg(), npp.Legendre)
+assert_type(PS_leg.trim(), npp.Legendre)
+assert_type(PS_leg.trim(tol=SC_f_co), npp.Legendre)
+assert_type(PS_leg.truncate(SC_i_co), npp.Legendre)
+
+assert_type(PS_all.convert(None, npp.Chebyshev), npp.Chebyshev)
+assert_type(PS_all.convert((0, 1), npp.Laguerre), npp.Laguerre)
+assert_type(PS_all.convert([0, 1], npp.Hermite, [-1, 1]), npp.Hermite)
+
+assert_type(PS_all.degree(), int)
+assert_type(PS_all.mapparms(), tuple[Any, Any])
+
+assert_type(PS_poly.integ(), npp.Polynomial)
+assert_type(PS_herme.integ(SC_i_co), npp.HermiteE)
+assert_type(PS_lag.integ(SC_i_co, SC_f_co), npp.Laguerre)
+assert_type(PS_poly.deriv(), npp.Polynomial)
+assert_type(PS_herm.deriv(SC_i_co), npp.Hermite)
+
+assert_type(PS_poly.roots(), _Ar_x_n)
+
+assert_type(
+ PS_poly.linspace(),
+ tuple[_Ar_1d[np.float64 | np.complex128], _Ar_1d[np.float64 | np.complex128]],
+)
+
+assert_type(
+ PS_poly.linspace(9),
+ tuple[_Ar_1d[np.float64 | np.complex128], _Ar_1d[np.float64 | np.complex128]],
+)
+
+assert_type(PS_cheb.fit(AR_c_co, AR_c_co, SC_i_co), npp.Chebyshev)
+assert_type(PS_leg.fit(AR_c_co, AR_c_co, AR_i), npp.Legendre)
+assert_type(PS_herm.fit(AR_c_co, AR_c_co, SQ_i), npp.Hermite)
+assert_type(PS_poly.fit(AR_c_co, SQ_c, SQ_i), npp.Polynomial)
+assert_type(PS_lag.fit(SQ_c, SQ_c, SQ_i, full=False), npp.Laguerre)
+assert_type(
+ PS_herme.fit(SQ_c, AR_c_co, SC_i_co, full=True),
+ tuple[npp.HermiteE, Sequence[np.inexact[Any] | np.int32]],
+)
+
+# custom operations
+
+assert_type(PS_all.__hash__, None)
+assert_type(PS_all.__array_ufunc__, None)
+
+assert_type(str(PS_all), str)
+assert_type(repr(PS_all), str)
+assert_type(format(PS_all), str)
+
+assert_type(len(PS_all), int)
+assert_type(next(iter(PS_all)), np.inexact[Any] | object)
+
+assert_type(PS_all(SC_f_co), np.float64 | np.complex128)
+assert_type(PS_all(SC_c_co), np.complex128)
+assert_type(PS_all(Decimal()), np.float64 | np.complex128)
+assert_type(PS_all(Fraction()), np.float64 | np.complex128)
+assert_type(PS_poly(SQ_f), npt.NDArray[np.float64] | npt.NDArray[np.complex128] | npt.NDArray[np.object_])
+assert_type(PS_poly(SQ_c), npt.NDArray[np.complex128] | npt.NDArray[np.object_])
+assert_type(PS_poly(SQ_O), npt.NDArray[np.object_])
+assert_type(PS_poly(AR_f), npt.NDArray[np.float64] | npt.NDArray[np.complex128] | npt.NDArray[np.object_])
+assert_type(PS_poly(AR_c), npt.NDArray[np.complex128] | npt.NDArray[np.object_])
+assert_type(PS_poly(AR_O), npt.NDArray[np.object_])
+assert_type(PS_all(PS_poly), npp.Polynomial)
+
+assert_type(PS_poly == PS_poly, bool)
+assert_type(PS_poly != PS_poly, bool)
+
+assert_type(-PS_poly, npp.Polynomial)
+assert_type(+PS_poly, npp.Polynomial)
+
+assert_type(PS_poly + 5, npp.Polynomial)
+assert_type(PS_poly - 5, npp.Polynomial)
+assert_type(PS_poly * 5, npp.Polynomial)
+assert_type(PS_poly / 5, npp.Polynomial)
+assert_type(PS_poly // 5, npp.Polynomial)
+assert_type(PS_poly % 5, npp.Polynomial)
+
+assert_type(PS_poly + PS_leg, npp.Polynomial)
+assert_type(PS_poly - PS_leg, npp.Polynomial)
+assert_type(PS_poly * PS_leg, npp.Polynomial)
+assert_type(PS_poly / PS_leg, npp.Polynomial)
+assert_type(PS_poly // PS_leg, npp.Polynomial)
+assert_type(PS_poly % PS_leg, npp.Polynomial)
+
+assert_type(5 + PS_poly, npp.Polynomial)
+assert_type(5 - PS_poly, npp.Polynomial)
+assert_type(5 * PS_poly, npp.Polynomial)
+assert_type(5 / PS_poly, npp.Polynomial)
+assert_type(5 // PS_poly, npp.Polynomial)
+assert_type(5 % PS_poly, npp.Polynomial)
+assert_type(divmod(PS_poly, 5), tuple[npp.Polynomial, npp.Polynomial])
+assert_type(divmod(5, PS_poly), tuple[npp.Polynomial, npp.Polynomial])
+
+assert_type(PS_poly**1, npp.Polynomial)
+assert_type(PS_poly**1.0, npp.Polynomial)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polyutils.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polyutils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ca5852808ce7102460016a9e1fd5cad5faf781e7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_polyutils.pyi
@@ -0,0 +1,220 @@
+from collections.abc import Sequence
+from decimal import Decimal
+from fractions import Fraction
+from typing import Any, Literal as L, TypeAlias
+
+import numpy as np
+import numpy.typing as npt
+import numpy.polynomial.polyutils as pu
+from numpy.polynomial._polytypes import _Tuple2
+
+from typing_extensions import assert_type
+
+_ArrFloat1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.floating[Any]]]
+_ArrComplex1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complexfloating[Any, Any]]]
+_ArrObject1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.object_]]
+
+_ArrFloat1D_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.float64]]
+_ArrComplex1D_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.complex128]]
+_ArrObject1D_2: TypeAlias = np.ndarray[tuple[L[2]], np.dtype[np.object_]]
+
+num_int: int
+num_float: float
+num_complex: complex
+# will result in an `object_` dtype
+num_object: Decimal | Fraction
+
+sct_int: np.int_
+sct_float: np.float64
+sct_complex: np.complex128
+sct_object: np.object_ # doesn't exist at runtime
+
+arr_int: npt.NDArray[np.int_]
+arr_float: npt.NDArray[np.float64]
+arr_complex: npt.NDArray[np.complex128]
+arr_object: npt.NDArray[np.object_]
+
+seq_num_int: Sequence[int]
+seq_num_float: Sequence[float]
+seq_num_complex: Sequence[complex]
+seq_num_object: Sequence[Decimal | Fraction]
+
+seq_sct_int: Sequence[np.int_]
+seq_sct_float: Sequence[np.float64]
+seq_sct_complex: Sequence[np.complex128]
+seq_sct_object: Sequence[np.object_]
+
+seq_arr_int: Sequence[npt.NDArray[np.int_]]
+seq_arr_float: Sequence[npt.NDArray[np.float64]]
+seq_arr_complex: Sequence[npt.NDArray[np.complex128]]
+seq_arr_object: Sequence[npt.NDArray[np.object_]]
+
+seq_seq_num_int: Sequence[Sequence[int]]
+seq_seq_num_float: Sequence[Sequence[float]]
+seq_seq_num_complex: Sequence[Sequence[complex]]
+seq_seq_num_object: Sequence[Sequence[Decimal | Fraction]]
+
+seq_seq_sct_int: Sequence[Sequence[np.int_]]
+seq_seq_sct_float: Sequence[Sequence[np.float64]]
+seq_seq_sct_complex: Sequence[Sequence[np.complex128]]
+seq_seq_sct_object: Sequence[Sequence[np.object_]] # doesn't exist at runtime
+
+# as_series
+
+assert_type(pu.as_series(arr_int), list[_ArrFloat1D])
+assert_type(pu.as_series(arr_float), list[_ArrFloat1D])
+assert_type(pu.as_series(arr_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(arr_object), list[_ArrObject1D])
+
+assert_type(pu.as_series(seq_num_int), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_num_float), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_num_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(seq_num_object), list[_ArrObject1D])
+
+assert_type(pu.as_series(seq_sct_int), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_sct_float), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_sct_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(seq_sct_object), list[_ArrObject1D])
+
+assert_type(pu.as_series(seq_arr_int), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_arr_float), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_arr_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(seq_arr_object), list[_ArrObject1D])
+
+assert_type(pu.as_series(seq_seq_num_int), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_seq_num_float), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_seq_num_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(seq_seq_num_object), list[_ArrObject1D])
+
+assert_type(pu.as_series(seq_seq_sct_int), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_seq_sct_float), list[_ArrFloat1D])
+assert_type(pu.as_series(seq_seq_sct_complex), list[_ArrComplex1D])
+assert_type(pu.as_series(seq_seq_sct_object), list[_ArrObject1D])
+
+# trimcoef
+
+assert_type(pu.trimcoef(num_int), _ArrFloat1D)
+assert_type(pu.trimcoef(num_float), _ArrFloat1D)
+assert_type(pu.trimcoef(num_complex), _ArrComplex1D)
+assert_type(pu.trimcoef(num_object), _ArrObject1D)
+assert_type(pu.trimcoef(num_object), _ArrObject1D)
+
+assert_type(pu.trimcoef(sct_int), _ArrFloat1D)
+assert_type(pu.trimcoef(sct_float), _ArrFloat1D)
+assert_type(pu.trimcoef(sct_complex), _ArrComplex1D)
+assert_type(pu.trimcoef(sct_object), _ArrObject1D)
+
+assert_type(pu.trimcoef(arr_int), _ArrFloat1D)
+assert_type(pu.trimcoef(arr_float), _ArrFloat1D)
+assert_type(pu.trimcoef(arr_complex), _ArrComplex1D)
+assert_type(pu.trimcoef(arr_object), _ArrObject1D)
+
+assert_type(pu.trimcoef(seq_num_int), _ArrFloat1D)
+assert_type(pu.trimcoef(seq_num_float), _ArrFloat1D)
+assert_type(pu.trimcoef(seq_num_complex), _ArrComplex1D)
+assert_type(pu.trimcoef(seq_num_object), _ArrObject1D)
+
+assert_type(pu.trimcoef(seq_sct_int), _ArrFloat1D)
+assert_type(pu.trimcoef(seq_sct_float), _ArrFloat1D)
+assert_type(pu.trimcoef(seq_sct_complex), _ArrComplex1D)
+assert_type(pu.trimcoef(seq_sct_object), _ArrObject1D)
+
+# getdomain
+
+assert_type(pu.getdomain(num_int), _ArrFloat1D_2)
+assert_type(pu.getdomain(num_float), _ArrFloat1D_2)
+assert_type(pu.getdomain(num_complex), _ArrComplex1D_2)
+assert_type(pu.getdomain(num_object), _ArrObject1D_2)
+assert_type(pu.getdomain(num_object), _ArrObject1D_2)
+
+assert_type(pu.getdomain(sct_int), _ArrFloat1D_2)
+assert_type(pu.getdomain(sct_float), _ArrFloat1D_2)
+assert_type(pu.getdomain(sct_complex), _ArrComplex1D_2)
+assert_type(pu.getdomain(sct_object), _ArrObject1D_2)
+
+assert_type(pu.getdomain(arr_int), _ArrFloat1D_2)
+assert_type(pu.getdomain(arr_float), _ArrFloat1D_2)
+assert_type(pu.getdomain(arr_complex), _ArrComplex1D_2)
+assert_type(pu.getdomain(arr_object), _ArrObject1D_2)
+
+assert_type(pu.getdomain(seq_num_int), _ArrFloat1D_2)
+assert_type(pu.getdomain(seq_num_float), _ArrFloat1D_2)
+assert_type(pu.getdomain(seq_num_complex), _ArrComplex1D_2)
+assert_type(pu.getdomain(seq_num_object), _ArrObject1D_2)
+
+assert_type(pu.getdomain(seq_sct_int), _ArrFloat1D_2)
+assert_type(pu.getdomain(seq_sct_float), _ArrFloat1D_2)
+assert_type(pu.getdomain(seq_sct_complex), _ArrComplex1D_2)
+assert_type(pu.getdomain(seq_sct_object), _ArrObject1D_2)
+
+# mapparms
+
+assert_type(pu.mapparms(seq_num_int, seq_num_int), _Tuple2[float])
+assert_type(pu.mapparms(seq_num_int, seq_num_float), _Tuple2[float])
+assert_type(pu.mapparms(seq_num_float, seq_num_float), _Tuple2[float])
+assert_type(pu.mapparms(seq_num_float, seq_num_complex), _Tuple2[complex])
+assert_type(pu.mapparms(seq_num_complex, seq_num_complex), _Tuple2[complex])
+assert_type(pu.mapparms(seq_num_complex, seq_num_object), _Tuple2[object])
+assert_type(pu.mapparms(seq_num_object, seq_num_object), _Tuple2[object])
+
+assert_type(pu.mapparms(seq_sct_int, seq_sct_int), _Tuple2[np.floating[Any]])
+assert_type(pu.mapparms(seq_sct_int, seq_sct_float), _Tuple2[np.floating[Any]])
+assert_type(pu.mapparms(seq_sct_float, seq_sct_float), _Tuple2[float])
+assert_type(pu.mapparms(seq_sct_float, seq_sct_complex), _Tuple2[complex])
+assert_type(pu.mapparms(seq_sct_complex, seq_sct_complex), _Tuple2[complex])
+assert_type(pu.mapparms(seq_sct_complex, seq_sct_object), _Tuple2[object])
+assert_type(pu.mapparms(seq_sct_object, seq_sct_object), _Tuple2[object])
+
+assert_type(pu.mapparms(arr_int, arr_int), _Tuple2[np.floating[Any]])
+assert_type(pu.mapparms(arr_int, arr_float), _Tuple2[np.floating[Any]])
+assert_type(pu.mapparms(arr_float, arr_float), _Tuple2[np.floating[Any]])
+assert_type(pu.mapparms(arr_float, arr_complex), _Tuple2[np.complexfloating[Any, Any]])
+assert_type(pu.mapparms(arr_complex, arr_complex), _Tuple2[np.complexfloating[Any, Any]])
+assert_type(pu.mapparms(arr_complex, arr_object), _Tuple2[object])
+assert_type(pu.mapparms(arr_object, arr_object), _Tuple2[object])
+
+# mapdomain
+
+assert_type(pu.mapdomain(num_int, seq_num_int, seq_num_int), np.floating[Any])
+assert_type(pu.mapdomain(num_int, seq_num_int, seq_num_float), np.floating[Any])
+assert_type(pu.mapdomain(num_int, seq_num_float, seq_num_float), np.floating[Any])
+assert_type(pu.mapdomain(num_float, seq_num_float, seq_num_float), np.floating[Any])
+assert_type(pu.mapdomain(num_float, seq_num_float, seq_num_complex), np.complexfloating[Any, Any])
+assert_type(pu.mapdomain(num_float, seq_num_complex, seq_num_complex), np.complexfloating[Any, Any])
+assert_type(pu.mapdomain(num_complex, seq_num_complex, seq_num_complex), np.complexfloating[Any, Any])
+assert_type(pu.mapdomain(num_complex, seq_num_complex, seq_num_object), object)
+assert_type(pu.mapdomain(num_complex, seq_num_object, seq_num_object), object)
+assert_type(pu.mapdomain(num_object, seq_num_object, seq_num_object), object)
+
+assert_type(pu.mapdomain(seq_num_int, seq_num_int, seq_num_int), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_num_int, seq_num_int, seq_num_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_num_int, seq_num_float, seq_num_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_num_float, seq_num_float, seq_num_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_num_float, seq_num_float, seq_num_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_num_float, seq_num_complex, seq_num_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_num_complex, seq_num_complex, seq_num_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_num_complex, seq_num_complex, seq_num_object), _ArrObject1D)
+assert_type(pu.mapdomain(seq_num_complex, seq_num_object, seq_num_object), _ArrObject1D)
+assert_type(pu.mapdomain(seq_num_object, seq_num_object, seq_num_object), _ArrObject1D)
+
+assert_type(pu.mapdomain(seq_sct_int, seq_sct_int, seq_sct_int), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_sct_int, seq_sct_int, seq_sct_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_sct_int, seq_sct_float, seq_sct_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_sct_float, seq_sct_float, seq_sct_float), _ArrFloat1D)
+assert_type(pu.mapdomain(seq_sct_float, seq_sct_float, seq_sct_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_sct_float, seq_sct_complex, seq_sct_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_sct_complex, seq_sct_complex, seq_sct_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(seq_sct_complex, seq_sct_complex, seq_sct_object), _ArrObject1D)
+assert_type(pu.mapdomain(seq_sct_complex, seq_sct_object, seq_sct_object), _ArrObject1D)
+assert_type(pu.mapdomain(seq_sct_object, seq_sct_object, seq_sct_object), _ArrObject1D)
+
+assert_type(pu.mapdomain(arr_int, arr_int, arr_int), _ArrFloat1D)
+assert_type(pu.mapdomain(arr_int, arr_int, arr_float), _ArrFloat1D)
+assert_type(pu.mapdomain(arr_int, arr_float, arr_float), _ArrFloat1D)
+assert_type(pu.mapdomain(arr_float, arr_float, arr_float), _ArrFloat1D)
+assert_type(pu.mapdomain(arr_float, arr_float, arr_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(arr_float, arr_complex, arr_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(arr_complex, arr_complex, arr_complex), _ArrComplex1D)
+assert_type(pu.mapdomain(arr_complex, arr_complex, arr_object), _ArrObject1D)
+assert_type(pu.mapdomain(arr_complex, arr_object, arr_object), _ArrObject1D)
+assert_type(pu.mapdomain(arr_object, arr_object, arr_object), _ArrObject1D)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_series.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_series.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..80ec9c0ff56ac1905b8a97483d26f85eba02e58f
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/polynomial_series.pyi
@@ -0,0 +1,140 @@
+from collections.abc import Sequence
+from typing import Any, TypeAlias
+
+import numpy as np
+import numpy.polynomial as npp
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+_ArrFloat1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.floating[Any]]]
+_ArrFloat1D64: TypeAlias = np.ndarray[tuple[int], np.dtype[np.float64]]
+_ArrComplex1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complexfloating[Any, Any]]]
+_ArrComplex1D128: TypeAlias = np.ndarray[tuple[int], np.dtype[np.complex128]]
+_ArrObject1D: TypeAlias = np.ndarray[tuple[int], np.dtype[np.object_]]
+
+AR_b: npt.NDArray[np.bool]
+AR_u4: npt.NDArray[np.uint32]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+AR_c16: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+
+PS_poly: npp.Polynomial
+PS_cheb: npp.Chebyshev
+
+assert_type(npp.polynomial.polyroots(AR_f8), _ArrFloat1D64)
+assert_type(npp.polynomial.polyroots(AR_c16), _ArrComplex1D128)
+assert_type(npp.polynomial.polyroots(AR_O), _ArrObject1D)
+
+assert_type(npp.polynomial.polyfromroots(AR_f8), _ArrFloat1D)
+assert_type(npp.polynomial.polyfromroots(AR_c16), _ArrComplex1D)
+assert_type(npp.polynomial.polyfromroots(AR_O), _ArrObject1D)
+
+# assert_type(npp.polynomial.polyadd(AR_b, AR_b), NoReturn)
+assert_type(npp.polynomial.polyadd(AR_u4, AR_b), _ArrFloat1D)
+assert_type(npp.polynomial.polyadd(AR_i8, AR_i8), _ArrFloat1D)
+assert_type(npp.polynomial.polyadd(AR_f8, AR_i8), _ArrFloat1D)
+assert_type(npp.polynomial.polyadd(AR_i8, AR_c16), _ArrComplex1D)
+assert_type(npp.polynomial.polyadd(AR_O, AR_O), _ArrObject1D)
+
+assert_type(npp.polynomial.polymulx(AR_u4), _ArrFloat1D)
+assert_type(npp.polynomial.polymulx(AR_i8), _ArrFloat1D)
+assert_type(npp.polynomial.polymulx(AR_f8), _ArrFloat1D)
+assert_type(npp.polynomial.polymulx(AR_c16), _ArrComplex1D)
+assert_type(npp.polynomial.polymulx(AR_O), _ArrObject1D)
+
+assert_type(npp.polynomial.polypow(AR_u4, 2), _ArrFloat1D)
+assert_type(npp.polynomial.polypow(AR_i8, 2), _ArrFloat1D)
+assert_type(npp.polynomial.polypow(AR_f8, 2), _ArrFloat1D)
+assert_type(npp.polynomial.polypow(AR_c16, 2), _ArrComplex1D)
+assert_type(npp.polynomial.polypow(AR_O, 2), _ArrObject1D)
+
+# assert_type(npp.polynomial.polyder(PS_poly), npt.NDArray[np.object_])
+assert_type(npp.polynomial.polyder(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyder(AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyder(AR_O, m=2), npt.NDArray[np.object_])
+
+# assert_type(npp.polynomial.polyint(PS_poly), npt.NDArray[np.object_])
+assert_type(npp.polynomial.polyint(AR_f8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyint(AR_f8, k=AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyint(AR_O, m=2), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyval(AR_b, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval(AR_u4, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval(AR_i8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyval(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyval2d(AR_b, AR_b, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval2d(AR_u4, AR_u4, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval2d(AR_i8, AR_i8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval2d(AR_f8, AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval2d(AR_i8, AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyval2d(AR_O, AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyval3d(AR_b, AR_b, AR_b, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval3d(AR_u4, AR_u4, AR_u4, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval3d(AR_i8, AR_i8, AR_i8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval3d(AR_f8, AR_f8, AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyval3d(AR_i8, AR_i8, AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyval3d(AR_O, AR_O, AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyvalfromroots(AR_b, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvalfromroots(AR_u4, AR_b), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvalfromroots(AR_i8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvalfromroots(AR_f8, AR_i8), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvalfromroots(AR_i8, AR_c16), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyvalfromroots(AR_O, AR_O), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyvander(AR_f8, 3), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvander(AR_c16, 3), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyvander(AR_O, 3), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyvander2d(AR_f8, AR_f8, [4, 2]), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvander2d(AR_c16, AR_c16, [4, 2]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyvander2d(AR_O, AR_O, [4, 2]), npt.NDArray[np.object_])
+
+assert_type(npp.polynomial.polyvander3d(AR_f8, AR_f8, AR_f8, [4, 3, 2]), npt.NDArray[np.floating[Any]])
+assert_type(npp.polynomial.polyvander3d(AR_c16, AR_c16, AR_c16, [4, 3, 2]), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(npp.polynomial.polyvander3d(AR_O, AR_O, AR_O, [4, 3, 2]), npt.NDArray[np.object_])
+
+assert_type(
+ npp.polynomial.polyfit(AR_f8, AR_f8, 2),
+ npt.NDArray[np.floating[Any]],
+)
+assert_type(
+ npp.polynomial.polyfit(AR_f8, AR_i8, 1, full=True),
+ tuple[npt.NDArray[np.floating[Any]], Sequence[np.inexact[Any] | np.int32]],
+)
+assert_type(
+ npp.polynomial.polyfit(AR_c16, AR_f8, 2),
+ npt.NDArray[np.complexfloating[Any, Any]],
+)
+assert_type(
+ npp.polynomial.polyfit(AR_f8, AR_c16, 1, full=True)[0],
+ npt.NDArray[np.complexfloating[Any, Any]],
+)
+
+assert_type(npp.chebyshev.chebgauss(2), tuple[_ArrFloat1D64, _ArrFloat1D64])
+
+assert_type(npp.chebyshev.chebweight(AR_f8), npt.NDArray[np.float64])
+assert_type(npp.chebyshev.chebweight(AR_c16), npt.NDArray[np.complex128])
+assert_type(npp.chebyshev.chebweight(AR_O), npt.NDArray[np.object_])
+
+assert_type(npp.chebyshev.poly2cheb(AR_f8), _ArrFloat1D)
+assert_type(npp.chebyshev.poly2cheb(AR_c16), _ArrComplex1D)
+assert_type(npp.chebyshev.poly2cheb(AR_O), _ArrObject1D)
+
+assert_type(npp.chebyshev.cheb2poly(AR_f8), _ArrFloat1D)
+assert_type(npp.chebyshev.cheb2poly(AR_c16), _ArrComplex1D)
+assert_type(npp.chebyshev.cheb2poly(AR_O), _ArrObject1D)
+
+assert_type(npp.chebyshev.chebpts1(6), _ArrFloat1D64)
+assert_type(npp.chebyshev.chebpts2(6), _ArrFloat1D64)
+
+assert_type(
+ npp.chebyshev.chebinterpolate(np.tanh, 3),
+ npt.NDArray[np.float64 | np.complex128 | np.object_],
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/random.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/random.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4c1c8abd927c5950445e725f0ccefe7005cf96c2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/random.pyi
@@ -0,0 +1,1551 @@
+import threading
+from typing import Any
+from collections.abc import Sequence
+
+import numpy as np
+import numpy.typing as npt
+from numpy.random._generator import Generator
+from numpy.random._mt19937 import MT19937
+from numpy.random._pcg64 import PCG64
+from numpy.random._sfc64 import SFC64
+from numpy.random._philox import Philox
+from numpy.random.bit_generator import SeedSequence, SeedlessSeedSequence
+
+from typing_extensions import assert_type
+
+def_rng = np.random.default_rng()
+seed_seq = np.random.SeedSequence()
+mt19937 = np.random.MT19937()
+pcg64 = np.random.PCG64()
+sfc64 = np.random.SFC64()
+philox = np.random.Philox()
+seedless_seq = SeedlessSeedSequence()
+
+assert_type(def_rng, Generator)
+assert_type(mt19937, MT19937)
+assert_type(pcg64, PCG64)
+assert_type(sfc64, SFC64)
+assert_type(philox, Philox)
+assert_type(seed_seq, SeedSequence)
+assert_type(seedless_seq, SeedlessSeedSequence)
+
+mt19937_jumped = mt19937.jumped()
+mt19937_jumped3 = mt19937.jumped(3)
+mt19937_raw = mt19937.random_raw()
+mt19937_raw_arr = mt19937.random_raw(5)
+
+assert_type(mt19937_jumped, MT19937)
+assert_type(mt19937_jumped3, MT19937)
+assert_type(mt19937_raw, int)
+assert_type(mt19937_raw_arr, npt.NDArray[np.uint64])
+assert_type(mt19937.lock, threading.Lock)
+
+pcg64_jumped = pcg64.jumped()
+pcg64_jumped3 = pcg64.jumped(3)
+pcg64_adv = pcg64.advance(3)
+pcg64_raw = pcg64.random_raw()
+pcg64_raw_arr = pcg64.random_raw(5)
+
+assert_type(pcg64_jumped, PCG64)
+assert_type(pcg64_jumped3, PCG64)
+assert_type(pcg64_adv, PCG64)
+assert_type(pcg64_raw, int)
+assert_type(pcg64_raw_arr, npt.NDArray[np.uint64])
+assert_type(pcg64.lock, threading.Lock)
+
+philox_jumped = philox.jumped()
+philox_jumped3 = philox.jumped(3)
+philox_adv = philox.advance(3)
+philox_raw = philox.random_raw()
+philox_raw_arr = philox.random_raw(5)
+
+assert_type(philox_jumped, Philox)
+assert_type(philox_jumped3, Philox)
+assert_type(philox_adv, Philox)
+assert_type(philox_raw, int)
+assert_type(philox_raw_arr, npt.NDArray[np.uint64])
+assert_type(philox.lock, threading.Lock)
+
+sfc64_raw = sfc64.random_raw()
+sfc64_raw_arr = sfc64.random_raw(5)
+
+assert_type(sfc64_raw, int)
+assert_type(sfc64_raw_arr, npt.NDArray[np.uint64])
+assert_type(sfc64.lock, threading.Lock)
+
+assert_type(seed_seq.pool, npt.NDArray[np.uint32])
+assert_type(seed_seq.entropy, None | int | Sequence[int])
+assert_type(seed_seq.spawn(1), list[np.random.SeedSequence])
+assert_type(seed_seq.generate_state(8, "uint32"), npt.NDArray[np.uint32 | np.uint64])
+assert_type(seed_seq.generate_state(8, "uint64"), npt.NDArray[np.uint32 | np.uint64])
+
+
+def_gen: np.random.Generator = np.random.default_rng()
+
+D_arr_0p1: npt.NDArray[np.float64] = np.array([0.1])
+D_arr_0p5: npt.NDArray[np.float64] = np.array([0.5])
+D_arr_0p9: npt.NDArray[np.float64] = np.array([0.9])
+D_arr_1p5: npt.NDArray[np.float64] = np.array([1.5])
+I_arr_10: npt.NDArray[np.int_] = np.array([10], dtype=np.int_)
+I_arr_20: npt.NDArray[np.int_] = np.array([20], dtype=np.int_)
+D_arr_like_0p1: list[float] = [0.1]
+D_arr_like_0p5: list[float] = [0.5]
+D_arr_like_0p9: list[float] = [0.9]
+D_arr_like_1p5: list[float] = [1.5]
+I_arr_like_10: list[int] = [10]
+I_arr_like_20: list[int] = [20]
+D_2D_like: list[list[float]] = [[1, 2], [2, 3], [3, 4], [4, 5.1]]
+D_2D: npt.NDArray[np.float64] = np.array(D_2D_like)
+S_out: npt.NDArray[np.float32] = np.empty(1, dtype=np.float32)
+D_out: npt.NDArray[np.float64] = np.empty(1)
+
+assert_type(def_gen.standard_normal(), float)
+assert_type(def_gen.standard_normal(dtype=np.float32), float)
+assert_type(def_gen.standard_normal(dtype="float32"), float)
+assert_type(def_gen.standard_normal(dtype="double"), float)
+assert_type(def_gen.standard_normal(dtype=np.float64), float)
+assert_type(def_gen.standard_normal(size=None), float)
+assert_type(def_gen.standard_normal(size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_normal(size=1, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_normal(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.random(), float)
+assert_type(def_gen.random(dtype=np.float32), float)
+assert_type(def_gen.random(dtype="float32"), float)
+assert_type(def_gen.random(dtype="double"), float)
+assert_type(def_gen.random(dtype=np.float64), float)
+assert_type(def_gen.random(size=None), float)
+assert_type(def_gen.random(size=1), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.random(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.random(size=1, dtype=np.float64), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.random(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.random(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_cauchy(), float)
+assert_type(def_gen.standard_cauchy(size=None), float)
+assert_type(def_gen.standard_cauchy(size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_exponential(), float)
+assert_type(def_gen.standard_exponential(method="inv"), float)
+assert_type(def_gen.standard_exponential(dtype=np.float32), float)
+assert_type(def_gen.standard_exponential(dtype="float32"), float)
+assert_type(def_gen.standard_exponential(dtype="double"), float)
+assert_type(def_gen.standard_exponential(dtype=np.float64), float)
+assert_type(def_gen.standard_exponential(size=None), float)
+assert_type(def_gen.standard_exponential(size=None, method="inv"), float)
+assert_type(def_gen.standard_exponential(size=1, method="inv"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype=np.float32), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype="f4", method="inv"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_exponential(size=1, dtype=np.float64, method="inv"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="f8"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64"), npt.NDArray[np.float64])
+assert_type(def_gen.standard_exponential(size=1, dtype="float64", out=D_out), npt.NDArray[np.float64])
+
+assert_type(def_gen.zipf(1.5), int)
+assert_type(def_gen.zipf(1.5, size=None), int)
+assert_type(def_gen.zipf(1.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_1p5), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_1p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_like_1p5), npt.NDArray[np.int64])
+assert_type(def_gen.zipf(D_arr_like_1p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.weibull(0.5), float)
+assert_type(def_gen.weibull(0.5, size=None), float)
+assert_type(def_gen.weibull(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.weibull(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_t(0.5), float)
+assert_type(def_gen.standard_t(0.5, size=None), float)
+assert_type(def_gen.standard_t(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_t(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.poisson(0.5), int)
+assert_type(def_gen.poisson(0.5, size=None), int)
+assert_type(def_gen.poisson(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.poisson(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.power(0.5), float)
+assert_type(def_gen.power(0.5, size=None), float)
+assert_type(def_gen.power(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.power(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.pareto(0.5), float)
+assert_type(def_gen.pareto(0.5, size=None), float)
+assert_type(def_gen.pareto(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.pareto(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.chisquare(0.5), float)
+assert_type(def_gen.chisquare(0.5, size=None), float)
+assert_type(def_gen.chisquare(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.chisquare(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.exponential(0.5), float)
+assert_type(def_gen.exponential(0.5, size=None), float)
+assert_type(def_gen.exponential(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.exponential(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.geometric(0.5), int)
+assert_type(def_gen.geometric(0.5, size=None), int)
+assert_type(def_gen.geometric(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.geometric(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.logseries(0.5), int)
+assert_type(def_gen.logseries(0.5, size=None), int)
+assert_type(def_gen.logseries(0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.logseries(D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.rayleigh(0.5), float)
+assert_type(def_gen.rayleigh(0.5, size=None), float)
+assert_type(def_gen.rayleigh(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.rayleigh(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.standard_gamma(0.5), float)
+assert_type(def_gen.standard_gamma(0.5, size=None), float)
+assert_type(def_gen.standard_gamma(0.5, dtype="float32"), float)
+assert_type(def_gen.standard_gamma(0.5, size=None, dtype="float32"), float)
+assert_type(def_gen.standard_gamma(0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_0p5, dtype="f4"), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(0.5, size=1, dtype="float32", out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(D_arr_0p5, dtype=np.float32, out=S_out), npt.NDArray[np.float32])
+assert_type(def_gen.standard_gamma(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(0.5, out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, out=D_out), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.standard_gamma(D_arr_like_0p5, size=1, out=D_out, dtype=np.float64), npt.NDArray[np.float64])
+
+assert_type(def_gen.vonmises(0.5, 0.5), float)
+assert_type(def_gen.vonmises(0.5, 0.5, size=None), float)
+assert_type(def_gen.vonmises(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.wald(0.5, 0.5), float)
+assert_type(def_gen.wald(0.5, 0.5, size=None), float)
+assert_type(def_gen.wald(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.wald(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.uniform(0.5, 0.5), float)
+assert_type(def_gen.uniform(0.5, 0.5, size=None), float)
+assert_type(def_gen.uniform(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.beta(0.5, 0.5), float)
+assert_type(def_gen.beta(0.5, 0.5, size=None), float)
+assert_type(def_gen.beta(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.beta(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.f(0.5, 0.5), float)
+assert_type(def_gen.f(0.5, 0.5, size=None), float)
+assert_type(def_gen.f(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.f(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.f(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.gamma(0.5, 0.5), float)
+assert_type(def_gen.gamma(0.5, 0.5, size=None), float)
+assert_type(def_gen.gamma(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.gumbel(0.5, 0.5), float)
+assert_type(def_gen.gumbel(0.5, 0.5, size=None), float)
+assert_type(def_gen.gumbel(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.laplace(0.5, 0.5), float)
+assert_type(def_gen.laplace(0.5, 0.5, size=None), float)
+assert_type(def_gen.laplace(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.logistic(0.5, 0.5), float)
+assert_type(def_gen.logistic(0.5, 0.5, size=None), float)
+assert_type(def_gen.logistic(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.lognormal(0.5, 0.5), float)
+assert_type(def_gen.lognormal(0.5, 0.5, size=None), float)
+assert_type(def_gen.lognormal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5), float)
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5, size=None), float)
+assert_type(def_gen.noncentral_chisquare(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.normal(0.5, 0.5), float)
+assert_type(def_gen.normal(0.5, 0.5, size=None), float)
+assert_type(def_gen.normal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.normal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.triangular(0.1, 0.5, 0.9), float)
+assert_type(def_gen.triangular(0.1, 0.5, 0.9, size=None), float)
+assert_type(def_gen.triangular(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9), float)
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9, size=None), float)
+assert_type(def_gen.noncentral_f(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(def_gen.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(def_gen.binomial(10, 0.5), int)
+assert_type(def_gen.binomial(10, 0.5, size=None), int)
+assert_type(def_gen.binomial(10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.negative_binomial(10, 0.5), int)
+assert_type(def_gen.negative_binomial(10, 0.5, size=None), int)
+assert_type(def_gen.negative_binomial(10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, 0.5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.int64])
+
+assert_type(def_gen.hypergeometric(20, 20, 10), int)
+assert_type(def_gen.hypergeometric(20, 20, 10, size=None), int)
+assert_type(def_gen.hypergeometric(20, 20, 10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, 20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_20, 10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, 20, I_arr_10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(20, I_arr_like_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, I_arr_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, 10), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1), npt.NDArray[np.int64])
+assert_type(def_gen.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1), npt.NDArray[np.int64])
+
+I_int64_100: npt.NDArray[np.int64] = np.array([100], dtype=np.int64)
+
+assert_type(def_gen.integers(0, 100), np.int64)
+assert_type(def_gen.integers(100), np.int64)
+assert_type(def_gen.integers([100]), npt.NDArray[np.int64])
+assert_type(def_gen.integers(0, [100]), npt.NDArray[np.int64])
+
+I_bool_low: npt.NDArray[np.bool] = np.array([0], dtype=np.bool)
+I_bool_low_like: list[int] = [0]
+I_bool_high_open: npt.NDArray[np.bool] = np.array([1], dtype=np.bool)
+I_bool_high_closed: npt.NDArray[np.bool] = np.array([1], dtype=np.bool)
+
+assert_type(def_gen.integers(2, dtype=bool), bool)
+assert_type(def_gen.integers(0, 2, dtype=bool), bool)
+assert_type(def_gen.integers(1, dtype=bool, endpoint=True), bool)
+assert_type(def_gen.integers(0, 1, dtype=bool, endpoint=True), bool)
+assert_type(def_gen.integers(I_bool_low_like, 1, dtype=bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(0, I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(0, I_bool_high_closed, dtype=bool, endpoint=True), npt.NDArray[np.bool])
+
+assert_type(def_gen.integers(2, dtype=np.bool), np.bool)
+assert_type(def_gen.integers(0, 2, dtype=np.bool), np.bool)
+assert_type(def_gen.integers(1, dtype=np.bool, endpoint=True), np.bool)
+assert_type(def_gen.integers(0, 1, dtype=np.bool, endpoint=True), np.bool)
+assert_type(def_gen.integers(I_bool_low_like, 1, dtype=np.bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(0, I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_high_closed, dtype=np.bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(I_bool_low, I_bool_high_closed, dtype=np.bool, endpoint=True), npt.NDArray[np.bool])
+assert_type(def_gen.integers(0, I_bool_high_closed, dtype=np.bool, endpoint=True), npt.NDArray[np.bool])
+
+I_u1_low: npt.NDArray[np.uint8] = np.array([0], dtype=np.uint8)
+I_u1_low_like: list[int] = [0]
+I_u1_high_open: npt.NDArray[np.uint8] = np.array([255], dtype=np.uint8)
+I_u1_high_closed: npt.NDArray[np.uint8] = np.array([255], dtype=np.uint8)
+
+assert_type(def_gen.integers(256, dtype="u1"), np.uint8)
+assert_type(def_gen.integers(0, 256, dtype="u1"), np.uint8)
+assert_type(def_gen.integers(255, dtype="u1", endpoint=True), np.uint8)
+assert_type(def_gen.integers(0, 255, dtype="u1", endpoint=True), np.uint8)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype="u1", endpoint=True), npt.NDArray[np.uint8])
+
+assert_type(def_gen.integers(256, dtype="uint8"), np.uint8)
+assert_type(def_gen.integers(0, 256, dtype="uint8"), np.uint8)
+assert_type(def_gen.integers(255, dtype="uint8", endpoint=True), np.uint8)
+assert_type(def_gen.integers(0, 255, dtype="uint8", endpoint=True), np.uint8)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype="uint8", endpoint=True), npt.NDArray[np.uint8])
+
+assert_type(def_gen.integers(256, dtype=np.uint8), np.uint8)
+assert_type(def_gen.integers(0, 256, dtype=np.uint8), np.uint8)
+assert_type(def_gen.integers(255, dtype=np.uint8, endpoint=True), np.uint8)
+assert_type(def_gen.integers(0, 255, dtype=np.uint8, endpoint=True), np.uint8)
+assert_type(def_gen.integers(I_u1_low_like, 255, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(I_u1_low, I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+assert_type(def_gen.integers(0, I_u1_high_closed, dtype=np.uint8, endpoint=True), npt.NDArray[np.uint8])
+
+I_u2_low: npt.NDArray[np.uint16] = np.array([0], dtype=np.uint16)
+I_u2_low_like: list[int] = [0]
+I_u2_high_open: npt.NDArray[np.uint16] = np.array([65535], dtype=np.uint16)
+I_u2_high_closed: npt.NDArray[np.uint16] = np.array([65535], dtype=np.uint16)
+
+assert_type(def_gen.integers(65536, dtype="u2"), np.uint16)
+assert_type(def_gen.integers(0, 65536, dtype="u2"), np.uint16)
+assert_type(def_gen.integers(65535, dtype="u2", endpoint=True), np.uint16)
+assert_type(def_gen.integers(0, 65535, dtype="u2", endpoint=True), np.uint16)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype="u2", endpoint=True), npt.NDArray[np.uint16])
+
+assert_type(def_gen.integers(65536, dtype="uint16"), np.uint16)
+assert_type(def_gen.integers(0, 65536, dtype="uint16"), np.uint16)
+assert_type(def_gen.integers(65535, dtype="uint16", endpoint=True), np.uint16)
+assert_type(def_gen.integers(0, 65535, dtype="uint16", endpoint=True), np.uint16)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype="uint16", endpoint=True), npt.NDArray[np.uint16])
+
+assert_type(def_gen.integers(65536, dtype=np.uint16), np.uint16)
+assert_type(def_gen.integers(0, 65536, dtype=np.uint16), np.uint16)
+assert_type(def_gen.integers(65535, dtype=np.uint16, endpoint=True), np.uint16)
+assert_type(def_gen.integers(0, 65535, dtype=np.uint16, endpoint=True), np.uint16)
+assert_type(def_gen.integers(I_u2_low_like, 65535, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(I_u2_low, I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+assert_type(def_gen.integers(0, I_u2_high_closed, dtype=np.uint16, endpoint=True), npt.NDArray[np.uint16])
+
+I_u4_low: npt.NDArray[np.uint32] = np.array([0], dtype=np.uint32)
+I_u4_low_like: list[int] = [0]
+I_u4_high_open: npt.NDArray[np.uint32] = np.array([4294967295], dtype=np.uint32)
+I_u4_high_closed: npt.NDArray[np.uint32] = np.array([4294967295], dtype=np.uint32)
+
+assert_type(def_gen.integers(4294967296, dtype=np.int_), np.int_)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.int_), np.int_)
+assert_type(def_gen.integers(4294967295, dtype=np.int_, endpoint=True), np.int_)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.int_, endpoint=True), np.int_)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.int_, endpoint=True), npt.NDArray[np.int_])
+
+
+assert_type(def_gen.integers(4294967296, dtype="u4"), np.uint32)
+assert_type(def_gen.integers(0, 4294967296, dtype="u4"), np.uint32)
+assert_type(def_gen.integers(4294967295, dtype="u4", endpoint=True), np.uint32)
+assert_type(def_gen.integers(0, 4294967295, dtype="u4", endpoint=True), np.uint32)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype="u4", endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype="uint32"), np.uint32)
+assert_type(def_gen.integers(0, 4294967296, dtype="uint32"), np.uint32)
+assert_type(def_gen.integers(4294967295, dtype="uint32", endpoint=True), np.uint32)
+assert_type(def_gen.integers(0, 4294967295, dtype="uint32", endpoint=True), np.uint32)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype="uint32", endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype=np.uint32), np.uint32)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.uint32), np.uint32)
+assert_type(def_gen.integers(4294967295, dtype=np.uint32, endpoint=True), np.uint32)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.uint32, endpoint=True), np.uint32)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.uint32, endpoint=True), npt.NDArray[np.uint32])
+
+assert_type(def_gen.integers(4294967296, dtype=np.uint), np.uint)
+assert_type(def_gen.integers(0, 4294967296, dtype=np.uint), np.uint)
+assert_type(def_gen.integers(4294967295, dtype=np.uint, endpoint=True), np.uint)
+assert_type(def_gen.integers(0, 4294967295, dtype=np.uint, endpoint=True), np.uint)
+assert_type(def_gen.integers(I_u4_low_like, 4294967295, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(0, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(I_u4_low, I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+assert_type(def_gen.integers(0, I_u4_high_closed, dtype=np.uint, endpoint=True), npt.NDArray[np.uint])
+
+I_u8_low: npt.NDArray[np.uint64] = np.array([0], dtype=np.uint64)
+I_u8_low_like: list[int] = [0]
+I_u8_high_open: npt.NDArray[np.uint64] = np.array([18446744073709551615], dtype=np.uint64)
+I_u8_high_closed: npt.NDArray[np.uint64] = np.array([18446744073709551615], dtype=np.uint64)
+
+assert_type(def_gen.integers(18446744073709551616, dtype="u8"), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype="u8"), np.uint64)
+assert_type(def_gen.integers(18446744073709551615, dtype="u8", endpoint=True), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype="u8", endpoint=True), np.uint64)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype="u8", endpoint=True), npt.NDArray[np.uint64])
+
+assert_type(def_gen.integers(18446744073709551616, dtype="uint64"), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype="uint64"), np.uint64)
+assert_type(def_gen.integers(18446744073709551615, dtype="uint64", endpoint=True), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype="uint64", endpoint=True), np.uint64)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype="uint64", endpoint=True), npt.NDArray[np.uint64])
+
+assert_type(def_gen.integers(18446744073709551616, dtype=np.uint64), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551616, dtype=np.uint64), np.uint64)
+assert_type(def_gen.integers(18446744073709551615, dtype=np.uint64, endpoint=True), np.uint64)
+assert_type(def_gen.integers(0, 18446744073709551615, dtype=np.uint64, endpoint=True), np.uint64)
+assert_type(def_gen.integers(I_u8_low_like, 18446744073709551615, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(I_u8_low, I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+assert_type(def_gen.integers(0, I_u8_high_closed, dtype=np.uint64, endpoint=True), npt.NDArray[np.uint64])
+
+I_i1_low: npt.NDArray[np.int8] = np.array([-128], dtype=np.int8)
+I_i1_low_like: list[int] = [-128]
+I_i1_high_open: npt.NDArray[np.int8] = np.array([127], dtype=np.int8)
+I_i1_high_closed: npt.NDArray[np.int8] = np.array([127], dtype=np.int8)
+
+assert_type(def_gen.integers(128, dtype="i1"), np.int8)
+assert_type(def_gen.integers(-128, 128, dtype="i1"), np.int8)
+assert_type(def_gen.integers(127, dtype="i1", endpoint=True), np.int8)
+assert_type(def_gen.integers(-128, 127, dtype="i1", endpoint=True), np.int8)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype="i1", endpoint=True), npt.NDArray[np.int8])
+
+assert_type(def_gen.integers(128, dtype="int8"), np.int8)
+assert_type(def_gen.integers(-128, 128, dtype="int8"), np.int8)
+assert_type(def_gen.integers(127, dtype="int8", endpoint=True), np.int8)
+assert_type(def_gen.integers(-128, 127, dtype="int8", endpoint=True), np.int8)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype="int8", endpoint=True), npt.NDArray[np.int8])
+
+assert_type(def_gen.integers(128, dtype=np.int8), np.int8)
+assert_type(def_gen.integers(-128, 128, dtype=np.int8), np.int8)
+assert_type(def_gen.integers(127, dtype=np.int8, endpoint=True), np.int8)
+assert_type(def_gen.integers(-128, 127, dtype=np.int8, endpoint=True), np.int8)
+assert_type(def_gen.integers(I_i1_low_like, 127, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(I_i1_low, I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+assert_type(def_gen.integers(-128, I_i1_high_closed, dtype=np.int8, endpoint=True), npt.NDArray[np.int8])
+
+I_i2_low: npt.NDArray[np.int16] = np.array([-32768], dtype=np.int16)
+I_i2_low_like: list[int] = [-32768]
+I_i2_high_open: npt.NDArray[np.int16] = np.array([32767], dtype=np.int16)
+I_i2_high_closed: npt.NDArray[np.int16] = np.array([32767], dtype=np.int16)
+
+assert_type(def_gen.integers(32768, dtype="i2"), np.int16)
+assert_type(def_gen.integers(-32768, 32768, dtype="i2"), np.int16)
+assert_type(def_gen.integers(32767, dtype="i2", endpoint=True), np.int16)
+assert_type(def_gen.integers(-32768, 32767, dtype="i2", endpoint=True), np.int16)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype="i2", endpoint=True), npt.NDArray[np.int16])
+
+assert_type(def_gen.integers(32768, dtype="int16"), np.int16)
+assert_type(def_gen.integers(-32768, 32768, dtype="int16"), np.int16)
+assert_type(def_gen.integers(32767, dtype="int16", endpoint=True), np.int16)
+assert_type(def_gen.integers(-32768, 32767, dtype="int16", endpoint=True), np.int16)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype="int16", endpoint=True), npt.NDArray[np.int16])
+
+assert_type(def_gen.integers(32768, dtype=np.int16), np.int16)
+assert_type(def_gen.integers(-32768, 32768, dtype=np.int16), np.int16)
+assert_type(def_gen.integers(32767, dtype=np.int16, endpoint=True), np.int16)
+assert_type(def_gen.integers(-32768, 32767, dtype=np.int16, endpoint=True), np.int16)
+assert_type(def_gen.integers(I_i2_low_like, 32767, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(I_i2_low, I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+assert_type(def_gen.integers(-32768, I_i2_high_closed, dtype=np.int16, endpoint=True), npt.NDArray[np.int16])
+
+I_i4_low: npt.NDArray[np.int32] = np.array([-2147483648], dtype=np.int32)
+I_i4_low_like: list[int] = [-2147483648]
+I_i4_high_open: npt.NDArray[np.int32] = np.array([2147483647], dtype=np.int32)
+I_i4_high_closed: npt.NDArray[np.int32] = np.array([2147483647], dtype=np.int32)
+
+assert_type(def_gen.integers(2147483648, dtype="i4"), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype="i4"), np.int32)
+assert_type(def_gen.integers(2147483647, dtype="i4", endpoint=True), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype="i4", endpoint=True), np.int32)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype="i4", endpoint=True), npt.NDArray[np.int32])
+
+assert_type(def_gen.integers(2147483648, dtype="int32"), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype="int32"), np.int32)
+assert_type(def_gen.integers(2147483647, dtype="int32", endpoint=True), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype="int32", endpoint=True), np.int32)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype="int32", endpoint=True), npt.NDArray[np.int32])
+
+assert_type(def_gen.integers(2147483648, dtype=np.int32), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483648, dtype=np.int32), np.int32)
+assert_type(def_gen.integers(2147483647, dtype=np.int32, endpoint=True), np.int32)
+assert_type(def_gen.integers(-2147483648, 2147483647, dtype=np.int32, endpoint=True), np.int32)
+assert_type(def_gen.integers(I_i4_low_like, 2147483647, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(I_i4_low, I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+assert_type(def_gen.integers(-2147483648, I_i4_high_closed, dtype=np.int32, endpoint=True), npt.NDArray[np.int32])
+
+I_i8_low: npt.NDArray[np.int64] = np.array([-9223372036854775808], dtype=np.int64)
+I_i8_low_like: list[int] = [-9223372036854775808]
+I_i8_high_open: npt.NDArray[np.int64] = np.array([9223372036854775807], dtype=np.int64)
+I_i8_high_closed: npt.NDArray[np.int64] = np.array([9223372036854775807], dtype=np.int64)
+
+assert_type(def_gen.integers(9223372036854775808, dtype="i8"), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="i8"), np.int64)
+assert_type(def_gen.integers(9223372036854775807, dtype="i8", endpoint=True), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="i8", endpoint=True), np.int64)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="i8", endpoint=True), npt.NDArray[np.int64])
+
+assert_type(def_gen.integers(9223372036854775808, dtype="int64"), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype="int64"), np.int64)
+assert_type(def_gen.integers(9223372036854775807, dtype="int64", endpoint=True), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype="int64", endpoint=True), np.int64)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype="int64", endpoint=True), npt.NDArray[np.int64])
+
+assert_type(def_gen.integers(9223372036854775808, dtype=np.int64), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775808, dtype=np.int64), np.int64)
+assert_type(def_gen.integers(9223372036854775807, dtype=np.int64, endpoint=True), np.int64)
+assert_type(def_gen.integers(-9223372036854775808, 9223372036854775807, dtype=np.int64, endpoint=True), np.int64)
+assert_type(def_gen.integers(I_i8_low_like, 9223372036854775807, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(I_i8_low, I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+assert_type(def_gen.integers(-9223372036854775808, I_i8_high_closed, dtype=np.int64, endpoint=True), npt.NDArray[np.int64])
+
+
+assert_type(def_gen.bit_generator, np.random.BitGenerator)
+
+assert_type(def_gen.bytes(2), bytes)
+
+assert_type(def_gen.choice(5), int)
+assert_type(def_gen.choice(5, 3), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, replace=True), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, p=[1 / 5] * 5), npt.NDArray[np.int64])
+assert_type(def_gen.choice(5, 3, p=[1 / 5] * 5, replace=False), npt.NDArray[np.int64])
+
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"]), Any)
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3), npt.NDArray[Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4), npt.NDArray[Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True), npt.NDArray[Any])
+assert_type(def_gen.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4])), npt.NDArray[Any])
+
+assert_type(def_gen.dirichlet([0.5, 0.5]), npt.NDArray[np.float64])
+assert_type(def_gen.dirichlet(np.array([0.5, 0.5])), npt.NDArray[np.float64])
+assert_type(def_gen.dirichlet(np.array([0.5, 0.5]), size=3), npt.NDArray[np.float64])
+
+assert_type(def_gen.multinomial(20, [1 / 6.0] * 6), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(20, np.array([0.5, 0.5])), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(20, [1 / 6.0] * 6, size=2), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial([[10], [20]], [1 / 6.0] * 6, size=(2, 2)), npt.NDArray[np.int64])
+assert_type(def_gen.multinomial(np.array([[10], [20]]), np.array([0.5, 0.5]), size=(2, 2)), npt.NDArray[np.int64])
+
+assert_type(def_gen.multivariate_hypergeometric([3, 5, 7], 2), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=4), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, size=(4, 7)), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric([3, 5, 7], 2, method="count"), npt.NDArray[np.int64])
+assert_type(def_gen.multivariate_hypergeometric(np.array([3, 5, 7]), 2, method="marginals"), npt.NDArray[np.int64])
+
+assert_type(def_gen.multivariate_normal([0.0], [[1.0]]), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal(np.array([0.0]), [[1.0]]), npt.NDArray[np.float64])
+assert_type(def_gen.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+
+assert_type(def_gen.permutation(10), npt.NDArray[np.int64])
+assert_type(def_gen.permutation([1, 2, 3, 4]), npt.NDArray[Any])
+assert_type(def_gen.permutation(np.array([1, 2, 3, 4])), npt.NDArray[Any])
+assert_type(def_gen.permutation(D_2D, axis=1), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D_like), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D, axis=1), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D, out=D_2D), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D_like, out=D_2D), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D_like, out=D_2D), npt.NDArray[Any])
+assert_type(def_gen.permuted(D_2D, axis=1, out=D_2D), npt.NDArray[Any])
+
+assert_type(def_gen.shuffle(np.arange(10)), None)
+assert_type(def_gen.shuffle([1, 2, 3, 4, 5]), None)
+assert_type(def_gen.shuffle(D_2D, axis=1), None)
+
+assert_type(np.random.Generator(pcg64), np.random.Generator)
+assert_type(def_gen.__str__(), str)
+assert_type(def_gen.__repr__(), str)
+assert_type(def_gen.__setstate__(dict(def_gen.bit_generator.state)), None)
+
+# RandomState
+random_st: np.random.RandomState = np.random.RandomState()
+
+assert_type(random_st.standard_normal(), float)
+assert_type(random_st.standard_normal(size=None), float)
+assert_type(random_st.standard_normal(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.random(), float)
+assert_type(random_st.random(size=None), float)
+assert_type(random_st.random(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_cauchy(), float)
+assert_type(random_st.standard_cauchy(size=None), float)
+assert_type(random_st.standard_cauchy(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_exponential(), float)
+assert_type(random_st.standard_exponential(size=None), float)
+assert_type(random_st.standard_exponential(size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.zipf(1.5), int)
+assert_type(random_st.zipf(1.5, size=None), int)
+assert_type(random_st.zipf(1.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.zipf(D_arr_1p5), npt.NDArray[np.long])
+assert_type(random_st.zipf(D_arr_1p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.zipf(D_arr_like_1p5), npt.NDArray[np.long])
+assert_type(random_st.zipf(D_arr_like_1p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.weibull(0.5), float)
+assert_type(random_st.weibull(0.5, size=None), float)
+assert_type(random_st.weibull(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.weibull(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_t(0.5), float)
+assert_type(random_st.standard_t(0.5, size=None), float)
+assert_type(random_st.standard_t(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_t(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.poisson(0.5), int)
+assert_type(random_st.poisson(0.5, size=None), int)
+assert_type(random_st.poisson(0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.poisson(D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.poisson(D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.poisson(D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.poisson(D_arr_like_0p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.power(0.5), float)
+assert_type(random_st.power(0.5, size=None), float)
+assert_type(random_st.power(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.power(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.pareto(0.5), float)
+assert_type(random_st.pareto(0.5, size=None), float)
+assert_type(random_st.pareto(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.pareto(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.chisquare(0.5), float)
+assert_type(random_st.chisquare(0.5, size=None), float)
+assert_type(random_st.chisquare(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.chisquare(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.exponential(0.5), float)
+assert_type(random_st.exponential(0.5, size=None), float)
+assert_type(random_st.exponential(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.exponential(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.geometric(0.5), int)
+assert_type(random_st.geometric(0.5, size=None), int)
+assert_type(random_st.geometric(0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.geometric(D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.geometric(D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.geometric(D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.geometric(D_arr_like_0p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.logseries(0.5), int)
+assert_type(random_st.logseries(0.5, size=None), int)
+assert_type(random_st.logseries(0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.logseries(D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.logseries(D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.logseries(D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.logseries(D_arr_like_0p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.rayleigh(0.5), float)
+assert_type(random_st.rayleigh(0.5, size=None), float)
+assert_type(random_st.rayleigh(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.rayleigh(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.standard_gamma(0.5), float)
+assert_type(random_st.standard_gamma(0.5, size=None), float)
+assert_type(random_st.standard_gamma(0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.standard_gamma(D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.vonmises(0.5, 0.5), float)
+assert_type(random_st.vonmises(0.5, 0.5, size=None), float)
+assert_type(random_st.vonmises(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.vonmises(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.wald(0.5, 0.5), float)
+assert_type(random_st.wald(0.5, 0.5, size=None), float)
+assert_type(random_st.wald(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.wald(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.wald(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.uniform(0.5, 0.5), float)
+assert_type(random_st.uniform(0.5, 0.5, size=None), float)
+assert_type(random_st.uniform(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.uniform(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.beta(0.5, 0.5), float)
+assert_type(random_st.beta(0.5, 0.5, size=None), float)
+assert_type(random_st.beta(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.beta(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.beta(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.f(0.5, 0.5), float)
+assert_type(random_st.f(0.5, 0.5, size=None), float)
+assert_type(random_st.f(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.f(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.f(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.gamma(0.5, 0.5), float)
+assert_type(random_st.gamma(0.5, 0.5, size=None), float)
+assert_type(random_st.gamma(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gamma(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.gumbel(0.5, 0.5), float)
+assert_type(random_st.gumbel(0.5, 0.5, size=None), float)
+assert_type(random_st.gumbel(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.gumbel(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.laplace(0.5, 0.5), float)
+assert_type(random_st.laplace(0.5, 0.5, size=None), float)
+assert_type(random_st.laplace(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.laplace(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.logistic(0.5, 0.5), float)
+assert_type(random_st.logistic(0.5, 0.5, size=None), float)
+assert_type(random_st.logistic(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.logistic(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.lognormal(0.5, 0.5), float)
+assert_type(random_st.lognormal(0.5, 0.5, size=None), float)
+assert_type(random_st.lognormal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.lognormal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.noncentral_chisquare(0.5, 0.5), float)
+assert_type(random_st.noncentral_chisquare(0.5, 0.5, size=None), float)
+assert_type(random_st.noncentral_chisquare(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_chisquare(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.normal(0.5, 0.5), float)
+assert_type(random_st.normal(0.5, 0.5, size=None), float)
+assert_type(random_st.normal(0.5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, 0.5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, 0.5), npt.NDArray[np.float64])
+assert_type(random_st.normal(0.5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, D_arr_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, D_arr_like_0p5), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_0p5, D_arr_0p5, size=1), npt.NDArray[np.float64])
+assert_type(random_st.normal(D_arr_like_0p5, D_arr_like_0p5, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.triangular(0.1, 0.5, 0.9), float)
+assert_type(random_st.triangular(0.1, 0.5, 0.9, size=None), float)
+assert_type(random_st.triangular(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.triangular(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9), float)
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9, size=None), float)
+assert_type(random_st.noncentral_f(0.1, 0.5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, 0.5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, 0.5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.1, D_arr_0p5, 0.9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, 0.5, D_arr_0p9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(0.5, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, D_arr_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, 0.9), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_0p1, D_arr_0p5, D_arr_0p9, size=1), npt.NDArray[np.float64])
+assert_type(random_st.noncentral_f(D_arr_like_0p1, D_arr_like_0p5, D_arr_like_0p9, size=1), npt.NDArray[np.float64])
+
+assert_type(random_st.binomial(10, 0.5), int)
+assert_type(random_st.binomial(10, 0.5, size=None), int)
+assert_type(random_st.binomial(10, 0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_10, 0.5), npt.NDArray[np.long])
+assert_type(random_st.binomial(10, D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.binomial(10, D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_like_10, 0.5), npt.NDArray[np.long])
+assert_type(random_st.binomial(10, D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.negative_binomial(10, 0.5), int)
+assert_type(random_st.negative_binomial(10, 0.5, size=None), int)
+assert_type(random_st.negative_binomial(10, 0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_10, 0.5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(10, D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_10, 0.5, size=1), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(10, D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_like_10, 0.5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(10, D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_10, D_arr_0p5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_10, D_arr_0p5, size=1), npt.NDArray[np.long])
+assert_type(random_st.negative_binomial(I_arr_like_10, D_arr_like_0p5, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.hypergeometric(20, 20, 10), int)
+assert_type(random_st.hypergeometric(20, 20, 10, size=None), int)
+assert_type(random_st.hypergeometric(20, 20, 10, size=1), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_20, 20, 10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(20, I_arr_20, 10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_20, 20, I_arr_like_10, size=1), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(20, I_arr_20, 10, size=1), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_like_20, 20, I_arr_10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(20, I_arr_like_20, 10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_20, I_arr_20, 10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_like_20, I_arr_like_20, 10), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_20, I_arr_20, I_arr_10, size=1), npt.NDArray[np.long])
+assert_type(random_st.hypergeometric(I_arr_like_20, I_arr_like_20, I_arr_like_10, size=1), npt.NDArray[np.long])
+
+assert_type(random_st.randint(0, 100), int)
+assert_type(random_st.randint(100), int)
+assert_type(random_st.randint([100]), npt.NDArray[np.long])
+assert_type(random_st.randint(0, [100]), npt.NDArray[np.long])
+
+assert_type(random_st.randint(2, dtype=bool), bool)
+assert_type(random_st.randint(0, 2, dtype=bool), bool)
+assert_type(random_st.randint(I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+assert_type(random_st.randint(I_bool_low, I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+assert_type(random_st.randint(0, I_bool_high_open, dtype=bool), npt.NDArray[np.bool])
+
+assert_type(random_st.randint(2, dtype=np.bool), np.bool)
+assert_type(random_st.randint(0, 2, dtype=np.bool), np.bool)
+assert_type(random_st.randint(I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+assert_type(random_st.randint(I_bool_low, I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+assert_type(random_st.randint(0, I_bool_high_open, dtype=np.bool), npt.NDArray[np.bool])
+
+assert_type(random_st.randint(256, dtype="u1"), np.uint8)
+assert_type(random_st.randint(0, 256, dtype="u1"), np.uint8)
+assert_type(random_st.randint(I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype="u1"), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(256, dtype="uint8"), np.uint8)
+assert_type(random_st.randint(0, 256, dtype="uint8"), np.uint8)
+assert_type(random_st.randint(I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype="uint8"), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(256, dtype=np.uint8), np.uint8)
+assert_type(random_st.randint(0, 256, dtype=np.uint8), np.uint8)
+assert_type(random_st.randint(I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(random_st.randint(I_u1_low, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+assert_type(random_st.randint(0, I_u1_high_open, dtype=np.uint8), npt.NDArray[np.uint8])
+
+assert_type(random_st.randint(65536, dtype="u2"), np.uint16)
+assert_type(random_st.randint(0, 65536, dtype="u2"), np.uint16)
+assert_type(random_st.randint(I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype="u2"), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(65536, dtype="uint16"), np.uint16)
+assert_type(random_st.randint(0, 65536, dtype="uint16"), np.uint16)
+assert_type(random_st.randint(I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype="uint16"), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(65536, dtype=np.uint16), np.uint16)
+assert_type(random_st.randint(0, 65536, dtype=np.uint16), np.uint16)
+assert_type(random_st.randint(I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(random_st.randint(I_u2_low, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+assert_type(random_st.randint(0, I_u2_high_open, dtype=np.uint16), npt.NDArray[np.uint16])
+
+assert_type(random_st.randint(4294967296, dtype="u4"), np.uint32)
+assert_type(random_st.randint(0, 4294967296, dtype="u4"), np.uint32)
+assert_type(random_st.randint(I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype="u4"), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype="uint32"), np.uint32)
+assert_type(random_st.randint(0, 4294967296, dtype="uint32"), np.uint32)
+assert_type(random_st.randint(I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype="uint32"), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype=np.uint32), np.uint32)
+assert_type(random_st.randint(0, 4294967296, dtype=np.uint32), np.uint32)
+assert_type(random_st.randint(I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+assert_type(random_st.randint(0, I_u4_high_open, dtype=np.uint32), npt.NDArray[np.uint32])
+
+assert_type(random_st.randint(4294967296, dtype=np.uint), np.uint)
+assert_type(random_st.randint(0, 4294967296, dtype=np.uint), np.uint)
+assert_type(random_st.randint(I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(random_st.randint(I_u4_low, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+assert_type(random_st.randint(0, I_u4_high_open, dtype=np.uint), npt.NDArray[np.uint])
+
+assert_type(random_st.randint(18446744073709551616, dtype="u8"), np.uint64)
+assert_type(random_st.randint(0, 18446744073709551616, dtype="u8"), np.uint64)
+assert_type(random_st.randint(I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype="u8"), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(18446744073709551616, dtype="uint64"), np.uint64)
+assert_type(random_st.randint(0, 18446744073709551616, dtype="uint64"), np.uint64)
+assert_type(random_st.randint(I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype="uint64"), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(18446744073709551616, dtype=np.uint64), np.uint64)
+assert_type(random_st.randint(0, 18446744073709551616, dtype=np.uint64), np.uint64)
+assert_type(random_st.randint(I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(random_st.randint(I_u8_low, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+assert_type(random_st.randint(0, I_u8_high_open, dtype=np.uint64), npt.NDArray[np.uint64])
+
+assert_type(random_st.randint(128, dtype="i1"), np.int8)
+assert_type(random_st.randint(-128, 128, dtype="i1"), np.int8)
+assert_type(random_st.randint(I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype="i1"), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(128, dtype="int8"), np.int8)
+assert_type(random_st.randint(-128, 128, dtype="int8"), np.int8)
+assert_type(random_st.randint(I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype="int8"), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(128, dtype=np.int8), np.int8)
+assert_type(random_st.randint(-128, 128, dtype=np.int8), np.int8)
+assert_type(random_st.randint(I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(random_st.randint(I_i1_low, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+assert_type(random_st.randint(-128, I_i1_high_open, dtype=np.int8), npt.NDArray[np.int8])
+
+assert_type(random_st.randint(32768, dtype="i2"), np.int16)
+assert_type(random_st.randint(-32768, 32768, dtype="i2"), np.int16)
+assert_type(random_st.randint(I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype="i2"), npt.NDArray[np.int16])
+
+assert_type(random_st.randint(32768, dtype="int16"), np.int16)
+assert_type(random_st.randint(-32768, 32768, dtype="int16"), np.int16)
+assert_type(random_st.randint(I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype="int16"), npt.NDArray[np.int16])
+
+assert_type(random_st.randint(32768, dtype=np.int16), np.int16)
+assert_type(random_st.randint(-32768, 32768, dtype=np.int16), np.int16)
+assert_type(random_st.randint(I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(random_st.randint(I_i2_low, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+assert_type(random_st.randint(-32768, I_i2_high_open, dtype=np.int16), npt.NDArray[np.int16])
+
+assert_type(random_st.randint(2147483648, dtype="i4"), np.int32)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype="i4"), np.int32)
+assert_type(random_st.randint(I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype="i4"), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype="int32"), np.int32)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype="int32"), np.int32)
+assert_type(random_st.randint(I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype="int32"), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype=np.int32), np.int32)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype=np.int32), np.int32)
+assert_type(random_st.randint(I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype=np.int32), npt.NDArray[np.int32])
+
+assert_type(random_st.randint(2147483648, dtype=np.int_), np.int_)
+assert_type(random_st.randint(-2147483648, 2147483648, dtype=np.int_), np.int_)
+assert_type(random_st.randint(I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(random_st.randint(I_i4_low, I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+assert_type(random_st.randint(-2147483648, I_i4_high_open, dtype=np.int_), npt.NDArray[np.int_])
+
+assert_type(random_st.randint(9223372036854775808, dtype="i8"), np.int64)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype="i8"), np.int64)
+assert_type(random_st.randint(I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype="i8"), npt.NDArray[np.int64])
+
+assert_type(random_st.randint(9223372036854775808, dtype="int64"), np.int64)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype="int64"), np.int64)
+assert_type(random_st.randint(I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype="int64"), npt.NDArray[np.int64])
+
+assert_type(random_st.randint(9223372036854775808, dtype=np.int64), np.int64)
+assert_type(random_st.randint(-9223372036854775808, 9223372036854775808, dtype=np.int64), np.int64)
+assert_type(random_st.randint(I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(random_st.randint(I_i8_low, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(random_st.randint(-9223372036854775808, I_i8_high_open, dtype=np.int64), npt.NDArray[np.int64])
+
+assert_type(random_st._bit_generator, np.random.BitGenerator)
+
+assert_type(random_st.bytes(2), bytes)
+
+assert_type(random_st.choice(5), int)
+assert_type(random_st.choice(5, 3), npt.NDArray[np.long])
+assert_type(random_st.choice(5, 3, replace=True), npt.NDArray[np.long])
+assert_type(random_st.choice(5, 3, p=[1 / 5] * 5), npt.NDArray[np.long])
+assert_type(random_st.choice(5, 3, p=[1 / 5] * 5, replace=False), npt.NDArray[np.long])
+
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"]), Any)
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3), npt.NDArray[Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, p=[1 / 4] * 4), npt.NDArray[Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=True), npt.NDArray[Any])
+assert_type(random_st.choice(["pooh", "rabbit", "piglet", "Christopher"], 3, replace=False, p=np.array([1 / 8, 1 / 8, 1 / 2, 1 / 4])), npt.NDArray[Any])
+
+assert_type(random_st.dirichlet([0.5, 0.5]), npt.NDArray[np.float64])
+assert_type(random_st.dirichlet(np.array([0.5, 0.5])), npt.NDArray[np.float64])
+assert_type(random_st.dirichlet(np.array([0.5, 0.5]), size=3), npt.NDArray[np.float64])
+
+assert_type(random_st.multinomial(20, [1 / 6.0] * 6), npt.NDArray[np.long])
+assert_type(random_st.multinomial(20, np.array([0.5, 0.5])), npt.NDArray[np.long])
+assert_type(random_st.multinomial(20, [1 / 6.0] * 6, size=2), npt.NDArray[np.long])
+
+assert_type(random_st.multivariate_normal([0.0], [[1.0]]), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal(np.array([0.0]), [[1.0]]), npt.NDArray[np.float64])
+assert_type(random_st.multivariate_normal([0.0], np.array([[1.0]])), npt.NDArray[np.float64])
+
+assert_type(random_st.permutation(10), npt.NDArray[np.long])
+assert_type(random_st.permutation([1, 2, 3, 4]), npt.NDArray[Any])
+assert_type(random_st.permutation(np.array([1, 2, 3, 4])), npt.NDArray[Any])
+assert_type(random_st.permutation(D_2D), npt.NDArray[Any])
+
+assert_type(random_st.shuffle(np.arange(10)), None)
+assert_type(random_st.shuffle([1, 2, 3, 4, 5]), None)
+assert_type(random_st.shuffle(D_2D), None)
+
+assert_type(np.random.RandomState(pcg64), np.random.RandomState)
+assert_type(np.random.RandomState(0), np.random.RandomState)
+assert_type(np.random.RandomState([0, 1, 2]), np.random.RandomState)
+assert_type(random_st.__str__(), str)
+assert_type(random_st.__repr__(), str)
+random_st_state = random_st.__getstate__()
+assert_type(random_st_state, dict[str, Any])
+assert_type(random_st.__setstate__(random_st_state), None)
+assert_type(random_st.seed(), None)
+assert_type(random_st.seed(1), None)
+assert_type(random_st.seed([0, 1]), None)
+random_st_get_state = random_st.get_state()
+assert_type(random_st_state, dict[str, Any])
+random_st_get_state_legacy = random_st.get_state(legacy=True)
+assert_type(random_st_get_state_legacy, dict[str, Any] | tuple[str, npt.NDArray[np.uint32], int, int, float])
+assert_type(random_st.set_state(random_st_get_state), None)
+
+assert_type(random_st.rand(), float)
+assert_type(random_st.rand(1), npt.NDArray[np.float64])
+assert_type(random_st.rand(1, 2), npt.NDArray[np.float64])
+assert_type(random_st.randn(), float)
+assert_type(random_st.randn(1), npt.NDArray[np.float64])
+assert_type(random_st.randn(1, 2), npt.NDArray[np.float64])
+assert_type(random_st.random_sample(), float)
+assert_type(random_st.random_sample(1), npt.NDArray[np.float64])
+assert_type(random_st.random_sample(size=(1, 2)), npt.NDArray[np.float64])
+
+assert_type(random_st.tomaxint(), int)
+assert_type(random_st.tomaxint(1), npt.NDArray[np.int64])
+assert_type(random_st.tomaxint((1,)), npt.NDArray[np.int64])
+
+assert_type(np.random.mtrand.set_bit_generator(pcg64), None)
+assert_type(np.random.mtrand.get_bit_generator(), np.random.BitGenerator)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/rec.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/rec.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..1b88f6b46316c11a742143c3f48982733ac19744
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/rec.pyi
@@ -0,0 +1,168 @@
+import io
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_i8: npt.NDArray[np.int64]
+REC_AR_V: np.recarray[tuple[int, ...], np.dtype[np.record]]
+AR_LIST: list[npt.NDArray[np.int64]]
+
+record: np.record
+file_obj: io.BufferedIOBase
+
+assert_type(np.rec.format_parser(
+ formats=[np.float64, np.int64, np.bool],
+ names=["f8", "i8", "?"],
+ titles=None,
+ aligned=True,
+), np.rec.format_parser)
+assert_type(np.rec.format_parser.dtype, np.dtype[np.void])
+
+assert_type(record.field_a, Any)
+assert_type(record.field_b, Any)
+assert_type(record["field_a"], Any)
+assert_type(record["field_b"], Any)
+assert_type(record.pprint(), str)
+record.field_c = 5
+
+assert_type(REC_AR_V.field(0), Any)
+assert_type(REC_AR_V.field("field_a"), Any)
+assert_type(REC_AR_V.field(0, AR_i8), None)
+assert_type(REC_AR_V.field("field_a", AR_i8), None)
+assert_type(REC_AR_V["field_a"], npt.NDArray[Any])
+assert_type(REC_AR_V.field_a, Any)
+assert_type(REC_AR_V.__array_finalize__(object()), None)
+
+assert_type(
+ np.recarray(
+ shape=(10, 5),
+ formats=[np.float64, np.int64, np.bool],
+ order="K",
+ byteorder="|",
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.recarray(
+ shape=(10, 5),
+ dtype=[("f8", np.float64), ("i8", np.int64)],
+ strides=(5, 5),
+ ),
+ np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(np.rec.fromarrays(AR_LIST), np.recarray[Any, np.dtype[Any]])
+assert_type(
+ np.rec.fromarrays(AR_LIST, dtype=np.int64),
+ np.recarray[Any, np.dtype[Any]],
+)
+assert_type(
+ np.rec.fromarrays(
+ AR_LIST,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"]
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.fromrecords((1, 1.5)),
+ np.recarray[Any, np.dtype[np.record]]
+)
+
+assert_type(
+ np.rec.fromrecords(
+ [(1, 1.5)],
+ dtype=[("i8", np.int64), ("f8", np.float64)],
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.fromrecords(
+ REC_AR_V,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"]
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.fromstring(
+ b"(1, 1.5)",
+ dtype=[("i8", np.int64), ("f8", np.float64)],
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.fromstring(
+ REC_AR_V,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"]
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(np.rec.fromfile(
+ "test_file.txt",
+ dtype=[("i8", np.int64), ("f8", np.float64)],
+), np.recarray[Any, np.dtype[Any]])
+
+assert_type(
+ np.rec.fromfile(
+ file_obj,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"]
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(np.rec.array(AR_i8), np.recarray[Any, np.dtype[np.int64]])
+
+assert_type(
+ np.rec.array([(1, 1.5)], dtype=[("i8", np.int64), ("f8", np.float64)]),
+ np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+ np.rec.array(
+ [(1, 1.5)],
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"]
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.array(
+ None,
+ dtype=np.float64,
+ shape=(10, 3),
+ ),
+ np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+ np.rec.array(
+ None,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"],
+ shape=(10, 3),
+ ),
+ np.recarray[Any, np.dtype[np.record]],
+)
+
+assert_type(
+ np.rec.array(file_obj, dtype=np.float64),
+ np.recarray[Any, np.dtype[Any]],
+)
+
+assert_type(
+ np.rec.array(file_obj, formats=[np.int64, np.float64], names=["i8", "f8"]),
+ np.recarray[Any, np.dtype[np.record]],
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/scalars.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/scalars.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..d3070437b740a3c122ae4d73dc5b971f4421c9d0
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/scalars.pyi
@@ -0,0 +1,193 @@
+from typing import Any, Literal, TypeAlias
+from typing_extensions import Unpack, assert_type
+
+import numpy as np
+import numpy.typing as npt
+
+_1: TypeAlias = Literal[1]
+
+b: np.bool
+u8: np.uint64
+i8: np.int64
+f8: np.float64
+c8: np.complex64
+c16: np.complex128
+m: np.timedelta64
+U: np.str_
+S: np.bytes_
+V: np.void
+O: np.object_ # cannot exists at runtime
+
+array_nd: np.ndarray[Any, Any]
+array_0d: np.ndarray[tuple[()], Any]
+array_2d_2x2: np.ndarray[tuple[Literal[2], Literal[2]], Any]
+
+assert_type(c8.real, np.float32)
+assert_type(c8.imag, np.float32)
+
+assert_type(c8.real.real, np.float32)
+assert_type(c8.real.imag, np.float32)
+
+assert_type(c8.itemsize, int)
+assert_type(c8.shape, tuple[()])
+assert_type(c8.strides, tuple[()])
+
+assert_type(c8.ndim, Literal[0])
+assert_type(c8.size, Literal[1])
+
+assert_type(c8.squeeze(), np.complex64)
+assert_type(c8.byteswap(), np.complex64)
+assert_type(c8.transpose(), np.complex64)
+
+assert_type(c8.dtype, np.dtype[np.complex64])
+
+assert_type(c8.real, np.float32)
+assert_type(c16.imag, np.float64)
+
+assert_type(np.str_('foo'), np.str_)
+
+assert_type(V[0], Any)
+assert_type(V["field1"], Any)
+assert_type(V[["field1", "field2"]], np.void)
+V[0] = 5
+
+# Aliases
+assert_type(np.bool_(), np.bool[Literal[False]])
+assert_type(np.byte(), np.byte)
+assert_type(np.short(), np.short)
+assert_type(np.intc(), np.intc)
+assert_type(np.intp(), np.intp)
+assert_type(np.int_(), np.int_)
+assert_type(np.long(), np.long)
+assert_type(np.longlong(), np.longlong)
+
+assert_type(np.ubyte(), np.ubyte)
+assert_type(np.ushort(), np.ushort)
+assert_type(np.uintc(), np.uintc)
+assert_type(np.uintp(), np.uintp)
+assert_type(np.uint(), np.uint)
+assert_type(np.ulong(), np.ulong)
+assert_type(np.ulonglong(), np.ulonglong)
+
+assert_type(np.half(), np.half)
+assert_type(np.single(), np.single)
+assert_type(np.double(), np.double)
+assert_type(np.longdouble(), np.longdouble)
+
+assert_type(np.csingle(), np.csingle)
+assert_type(np.cdouble(), np.cdouble)
+assert_type(np.clongdouble(), np.clongdouble)
+
+assert_type(b.item(), bool)
+assert_type(i8.item(), int)
+assert_type(u8.item(), int)
+assert_type(f8.item(), float)
+assert_type(c16.item(), complex)
+assert_type(U.item(), str)
+assert_type(S.item(), bytes)
+
+assert_type(b.tolist(), bool)
+assert_type(i8.tolist(), int)
+assert_type(u8.tolist(), int)
+assert_type(f8.tolist(), float)
+assert_type(c16.tolist(), complex)
+assert_type(U.tolist(), str)
+assert_type(S.tolist(), bytes)
+
+assert_type(b.ravel(), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(i8.ravel(), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(u8.ravel(), np.ndarray[tuple[int], np.dtype[np.uint64]])
+assert_type(f8.ravel(), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(c16.ravel(), np.ndarray[tuple[int], np.dtype[np.complex128]])
+assert_type(U.ravel(), np.ndarray[tuple[int], np.dtype[np.str_]])
+assert_type(S.ravel(), np.ndarray[tuple[int], np.dtype[np.bytes_]])
+
+assert_type(b.flatten(), np.ndarray[tuple[int], np.dtype[np.bool]])
+assert_type(i8.flatten(), np.ndarray[tuple[int], np.dtype[np.int64]])
+assert_type(u8.flatten(), np.ndarray[tuple[int], np.dtype[np.uint64]])
+assert_type(f8.flatten(), np.ndarray[tuple[int], np.dtype[np.float64]])
+assert_type(c16.flatten(), np.ndarray[tuple[int], np.dtype[np.complex128]])
+assert_type(U.flatten(), np.ndarray[tuple[int], np.dtype[np.str_]])
+assert_type(S.flatten(), np.ndarray[tuple[int], np.dtype[np.bytes_]])
+
+assert_type(b.reshape(()), np.bool)
+assert_type(i8.reshape([]), np.int64)
+assert_type(b.reshape(1), np.ndarray[tuple[_1], np.dtype[np.bool]])
+assert_type(i8.reshape(-1), np.ndarray[tuple[_1], np.dtype[np.int64]])
+assert_type(u8.reshape(1, 1), np.ndarray[tuple[_1, _1], np.dtype[np.uint64]])
+assert_type(f8.reshape(1, -1), np.ndarray[tuple[_1, _1], np.dtype[np.float64]])
+assert_type(c16.reshape(1, 1, 1), np.ndarray[tuple[_1, _1, _1], np.dtype[np.complex128]])
+assert_type(U.reshape(1, 1, 1, 1), np.ndarray[tuple[_1, _1, _1, _1], np.dtype[np.str_]])
+assert_type(
+ S.reshape(1, 1, 1, 1, 1),
+ np.ndarray[
+ # len(shape) >= 5
+ tuple[_1, _1, _1, _1, _1, Unpack[tuple[_1, ...]]],
+ np.dtype[np.bytes_],
+ ],
+)
+
+assert_type(i8.astype(float), Any)
+assert_type(i8.astype(np.float64), np.float64)
+
+assert_type(i8.view(), np.int64)
+assert_type(i8.view(np.float64), np.float64)
+assert_type(i8.view(float), Any)
+assert_type(i8.view(np.float64, np.ndarray), np.float64)
+
+assert_type(i8.getfield(float), Any)
+assert_type(i8.getfield(np.float64), np.float64)
+assert_type(i8.getfield(np.float64, 8), np.float64)
+
+assert_type(f8.as_integer_ratio(), tuple[int, int])
+assert_type(f8.is_integer(), bool)
+assert_type(f8.__trunc__(), int)
+assert_type(f8.__getformat__("float"), str)
+assert_type(f8.hex(), str)
+assert_type(np.float64.fromhex("0x0.0p+0"), np.float64)
+
+assert_type(f8.__getnewargs__(), tuple[float])
+assert_type(c16.__getnewargs__(), tuple[float, float])
+
+assert_type(i8.numerator, np.int64)
+assert_type(i8.denominator, Literal[1])
+assert_type(u8.numerator, np.uint64)
+assert_type(u8.denominator, Literal[1])
+assert_type(m.numerator, np.timedelta64)
+assert_type(m.denominator, Literal[1])
+
+assert_type(round(i8), int)
+assert_type(round(i8, 3), np.int64)
+assert_type(round(u8), int)
+assert_type(round(u8, 3), np.uint64)
+assert_type(round(f8), int)
+assert_type(round(f8, 3), np.float64)
+
+assert_type(f8.__ceil__(), int)
+assert_type(f8.__floor__(), int)
+
+assert_type(i8.is_integer(), Literal[True])
+
+assert_type(O.real, np.object_)
+assert_type(O.imag, np.object_)
+assert_type(int(O), int)
+assert_type(float(O), float)
+assert_type(complex(O), complex)
+
+# These fail fail because of a mypy __new__ bug:
+# https://github.com/python/mypy/issues/15182
+# According to the typing spec, the following statements are valid, see
+# https://typing.readthedocs.io/en/latest/spec/constructors.html#new-method
+
+# assert_type(np.object_(), None)
+# assert_type(np.object_(None), None)
+# assert_type(np.object_(array_nd), np.ndarray[Any, np.dtype[np.object_]])
+# assert_type(np.object_([]), npt.NDArray[np.object_])
+# assert_type(np.object_(()), npt.NDArray[np.object_])
+# assert_type(np.object_(range(4)), npt.NDArray[np.object_])
+# assert_type(np.object_(+42), int)
+# assert_type(np.object_(1 / 137), float)
+# assert_type(np.object_('Developers! ' * (1 << 6)), str)
+# assert_type(np.object_(object()), object)
+# assert_type(np.object_({False, True, NotADirectoryError}), set[Any])
+# assert_type(np.object_({'spam': 'food', 'ham': 'food'}), dict[str, str])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8f8d819cbcea964d9c66cc80b82c1622db2ce2a9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape.pyi
@@ -0,0 +1,15 @@
+from typing import Any, NamedTuple
+
+import numpy as np
+from typing_extensions import assert_type
+
+
+# Subtype of tuple[int, int]
+class XYGrid(NamedTuple):
+ x_axis: int
+ y_axis: int
+
+arr: np.ndarray[XYGrid, Any]
+
+# Test shape property matches shape typevar
+assert_type(arr.shape, XYGrid)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..a4b4bba3f9fc68e233a4f06d80b837dea449cc0e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/shape_base.pyi
@@ -0,0 +1,54 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+i8: np.int64
+f8: np.float64
+
+AR_b: npt.NDArray[np.bool]
+AR_i8: npt.NDArray[np.int64]
+AR_f8: npt.NDArray[np.float64]
+
+AR_LIKE_f8: list[float]
+
+assert_type(np.take_along_axis(AR_f8, AR_i8, axis=1), npt.NDArray[np.float64])
+assert_type(np.take_along_axis(f8, AR_i8, axis=None), npt.NDArray[np.float64])
+
+assert_type(np.put_along_axis(AR_f8, AR_i8, "1.0", axis=1), None)
+
+assert_type(np.expand_dims(AR_i8, 2), npt.NDArray[np.int64])
+assert_type(np.expand_dims(AR_LIKE_f8, 2), npt.NDArray[Any])
+
+assert_type(np.column_stack([AR_i8]), npt.NDArray[np.int64])
+assert_type(np.column_stack([AR_LIKE_f8]), npt.NDArray[Any])
+
+assert_type(np.dstack([AR_i8]), npt.NDArray[np.int64])
+assert_type(np.dstack([AR_LIKE_f8]), npt.NDArray[Any])
+
+assert_type(np.array_split(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.array_split(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.split(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.split(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.hsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.hsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.vsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.vsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.dsplit(AR_i8, [3, 5, 6, 10]), list[npt.NDArray[np.int64]])
+assert_type(np.dsplit(AR_LIKE_f8, [3, 5, 6, 10]), list[npt.NDArray[Any]])
+
+assert_type(np.kron(AR_b, AR_b), npt.NDArray[np.bool])
+assert_type(np.kron(AR_b, AR_i8), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.kron(AR_f8, AR_f8), npt.NDArray[np.floating[Any]])
+
+assert_type(np.tile(AR_i8, 5), npt.NDArray[np.int64])
+assert_type(np.tile(AR_LIKE_f8, [2, 2]), npt.NDArray[Any])
+
+assert_type(np.unstack(AR_i8, axis=0), tuple[npt.NDArray[np.int64], ...])
+assert_type(np.unstack(AR_LIKE_f8, axis=0), tuple[npt.NDArray[Any], ...])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2ce666280f64a58a4d8f96efd1bca6d4ceeaffbe
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/stride_tricks.pyi
@@ -0,0 +1,29 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_LIKE_f: list[float]
+interface_dict: dict[str, Any]
+
+assert_type(np.lib.stride_tricks.as_strided(AR_f8), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.as_strided(AR_LIKE_f), npt.NDArray[Any])
+assert_type(np.lib.stride_tricks.as_strided(AR_f8, strides=(1, 5)), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.as_strided(AR_f8, shape=[9, 20]), npt.NDArray[np.float64])
+
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_f8, 5), npt.NDArray[np.float64])
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_LIKE_f, (1, 5)), npt.NDArray[Any])
+assert_type(np.lib.stride_tricks.sliding_window_view(AR_f8, [9], axis=1), npt.NDArray[np.float64])
+
+assert_type(np.broadcast_to(AR_f8, 5), npt.NDArray[np.float64])
+assert_type(np.broadcast_to(AR_LIKE_f, (1, 5)), npt.NDArray[Any])
+assert_type(np.broadcast_to(AR_f8, [4, 6], subok=True), npt.NDArray[np.float64])
+
+assert_type(np.broadcast_shapes((1, 2), [3, 1], (3, 2)), tuple[int, ...])
+assert_type(np.broadcast_shapes((6, 7), (5, 6, 1), 7, (5, 1, 7)), tuple[int, ...])
+
+assert_type(np.broadcast_arrays(AR_f8, AR_f8), tuple[npt.NDArray[Any], ...])
+assert_type(np.broadcast_arrays(AR_f8, AR_LIKE_f), tuple[npt.NDArray[Any], ...])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/strings.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/strings.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9339456b61aea342c9f00ac0c17d794ca12e35e8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/strings.pyi
@@ -0,0 +1,193 @@
+import numpy as np
+import numpy.typing as npt
+import numpy._typing as np_t
+
+from typing_extensions import assert_type
+from typing import TypeAlias
+
+AR_U: npt.NDArray[np.str_]
+AR_S: npt.NDArray[np.bytes_]
+AR_T: np.ndarray[np_t._Shape, np.dtypes.StringDType]
+
+AR_T_alias: TypeAlias = np.ndarray[np_t._Shape, np.dtypes.StringDType]
+AR_TU_alias: TypeAlias = AR_T_alias | npt.NDArray[np.str_]
+
+assert_type(np.strings.equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.not_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.not_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.not_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.greater_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.greater_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.greater_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.less_equal(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.less_equal(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.less_equal(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.greater(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.greater(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.greater(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.less(AR_U, AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.less(AR_S, AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.less(AR_T, AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.add(AR_U, AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.add(AR_S, AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.add(AR_T, AR_T), AR_T_alias)
+
+assert_type(np.strings.multiply(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.strings.multiply(AR_S, [5, 4, 3]), npt.NDArray[np.bytes_])
+assert_type(np.strings.multiply(AR_T, 5), AR_T_alias)
+
+assert_type(np.strings.mod(AR_U, "test"), npt.NDArray[np.str_])
+assert_type(np.strings.mod(AR_S, "test"), npt.NDArray[np.bytes_])
+assert_type(np.strings.mod(AR_T, "test"), AR_T_alias)
+
+assert_type(np.strings.capitalize(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.capitalize(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.capitalize(AR_T), AR_T_alias)
+
+assert_type(np.strings.center(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.strings.center(AR_S, [2, 3, 4], b"a"), npt.NDArray[np.bytes_])
+assert_type(np.strings.center(AR_T, 5), AR_T_alias)
+
+assert_type(np.strings.encode(AR_U), npt.NDArray[np.bytes_])
+assert_type(np.strings.encode(AR_T), npt.NDArray[np.bytes_])
+assert_type(np.strings.decode(AR_S), npt.NDArray[np.str_])
+
+assert_type(np.strings.expandtabs(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.expandtabs(AR_S, tabsize=4), npt.NDArray[np.bytes_])
+assert_type(np.strings.expandtabs(AR_T), AR_T_alias)
+
+assert_type(np.strings.ljust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.strings.ljust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.strings.ljust(AR_T, 5), AR_T_alias)
+assert_type(np.strings.ljust(AR_T, [4, 2, 1], fillchar=["a", "b", "c"]), AR_T_alias)
+
+assert_type(np.strings.rjust(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.strings.rjust(AR_S, [4, 3, 1], fillchar=[b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.strings.rjust(AR_T, 5), AR_T_alias)
+assert_type(np.strings.rjust(AR_T, [4, 2, 1], fillchar=["a", "b", "c"]), AR_T_alias)
+
+assert_type(np.strings.lstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.lstrip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.strings.lstrip(AR_T), AR_T_alias)
+assert_type(np.strings.lstrip(AR_T, "_"), AR_T_alias)
+
+assert_type(np.strings.rstrip(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.rstrip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.strings.rstrip(AR_T), AR_T_alias)
+assert_type(np.strings.rstrip(AR_T, "_"), AR_T_alias)
+
+assert_type(np.strings.strip(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.strip(AR_S, b"_"), npt.NDArray[np.bytes_])
+assert_type(np.strings.strip(AR_T), AR_T_alias)
+assert_type(np.strings.strip(AR_T, "_"), AR_T_alias)
+
+assert_type(np.strings.count(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.count(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.strings.count(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.count(AR_T, ["a", "b", "c"], end=9), npt.NDArray[np.int_])
+
+assert_type(np.strings.partition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.strings.partition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.strings.partition(AR_T, "\n"), AR_TU_alias)
+
+assert_type(np.strings.rpartition(AR_U, "\n"), npt.NDArray[np.str_])
+assert_type(np.strings.rpartition(AR_S, [b"a", b"b", b"c"]), npt.NDArray[np.bytes_])
+assert_type(np.strings.rpartition(AR_T, "\n"), AR_TU_alias)
+
+assert_type(np.strings.replace(AR_U, "_", "-"), npt.NDArray[np.str_])
+assert_type(np.strings.replace(AR_S, [b"_", b""], [b"a", b"b"]), npt.NDArray[np.bytes_])
+assert_type(np.strings.replace(AR_T, "_", "_"), AR_TU_alias)
+
+assert_type(np.strings.lower(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.lower(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.lower(AR_T), AR_T_alias)
+
+assert_type(np.strings.upper(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.upper(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.upper(AR_T), AR_T_alias)
+
+assert_type(np.strings.swapcase(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.swapcase(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.swapcase(AR_T), AR_T_alias)
+
+assert_type(np.strings.title(AR_U), npt.NDArray[np.str_])
+assert_type(np.strings.title(AR_S), npt.NDArray[np.bytes_])
+assert_type(np.strings.title(AR_T), AR_T_alias)
+
+assert_type(np.strings.zfill(AR_U, 5), npt.NDArray[np.str_])
+assert_type(np.strings.zfill(AR_S, [2, 3, 4]), npt.NDArray[np.bytes_])
+assert_type(np.strings.zfill(AR_T, 5), AR_T_alias)
+
+assert_type(np.strings.endswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(np.strings.endswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+assert_type(np.strings.endswith(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+
+assert_type(np.strings.startswith(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+assert_type(np.strings.startswith(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.bool])
+assert_type(np.strings.startswith(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.bool])
+
+assert_type(np.strings.find(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.find(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.strings.find(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.strings.rfind(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.rfind(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.strings.rfind(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.strings.index(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.index(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.strings.index(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.strings.rindex(AR_U, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+assert_type(np.strings.rindex(AR_S, [b"a", b"b", b"c"], end=9), npt.NDArray[np.int_])
+assert_type(np.strings.rindex(AR_T, "a", start=[1, 2, 3]), npt.NDArray[np.int_])
+
+assert_type(np.strings.isalpha(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isalpha(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.isalpha(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isalnum(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isalnum(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.isalnum(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isdecimal(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isdecimal(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isdigit(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isdigit(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.isdigit(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.islower(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.islower(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.islower(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isnumeric(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isnumeric(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isspace(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isspace(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.isspace(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.istitle(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.istitle(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.istitle(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.isupper(AR_U), npt.NDArray[np.bool])
+assert_type(np.strings.isupper(AR_S), npt.NDArray[np.bool])
+assert_type(np.strings.isupper(AR_T), npt.NDArray[np.bool])
+
+assert_type(np.strings.str_len(AR_U), npt.NDArray[np.int_])
+assert_type(np.strings.str_len(AR_S), npt.NDArray[np.int_])
+assert_type(np.strings.str_len(AR_T), npt.NDArray[np.int_])
+
+assert_type(np.strings.translate(AR_U, ""), npt.NDArray[np.str_])
+assert_type(np.strings.translate(AR_S, ""), npt.NDArray[np.bytes_])
+assert_type(np.strings.translate(AR_T, ""), AR_T_alias)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/testing.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/testing.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..741c71f62a5bfbca0e3c8f2ed03917a46899d0ed
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/testing.pyi
@@ -0,0 +1,200 @@
+import re
+import sys
+import warnings
+import types
+import unittest
+import contextlib
+from collections.abc import Callable
+from typing import Any, TypeVar
+from pathlib import Path
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+
+bool_obj: bool
+suppress_obj: np.testing.suppress_warnings
+FT = TypeVar("FT", bound=Callable[..., Any])
+
+def func() -> int: ...
+
+def func2(
+ x: npt.NDArray[np.number[Any]],
+ y: npt.NDArray[np.number[Any]],
+) -> npt.NDArray[np.bool]: ...
+
+assert_type(np.testing.KnownFailureException(), np.testing.KnownFailureException)
+assert_type(np.testing.IgnoreException(), np.testing.IgnoreException)
+
+assert_type(
+ np.testing.clear_and_catch_warnings(modules=[np.testing]),
+ np.testing.clear_and_catch_warnings[None],
+)
+assert_type(
+ np.testing.clear_and_catch_warnings(True),
+ np.testing.clear_and_catch_warnings[list[warnings.WarningMessage]],
+)
+assert_type(
+ np.testing.clear_and_catch_warnings(False),
+ np.testing.clear_and_catch_warnings[None],
+)
+assert_type(
+ np.testing.clear_and_catch_warnings(bool_obj),
+ np.testing.clear_and_catch_warnings,
+)
+assert_type(
+ np.testing.clear_and_catch_warnings.class_modules,
+ tuple[types.ModuleType, ...],
+)
+assert_type(
+ np.testing.clear_and_catch_warnings.modules,
+ set[types.ModuleType],
+)
+
+with np.testing.clear_and_catch_warnings(True) as c1:
+ assert_type(c1, list[warnings.WarningMessage])
+with np.testing.clear_and_catch_warnings() as c2:
+ assert_type(c2, None)
+
+assert_type(np.testing.suppress_warnings("once"), np.testing.suppress_warnings)
+assert_type(np.testing.suppress_warnings()(func), Callable[[], int])
+assert_type(suppress_obj.filter(RuntimeWarning), None)
+assert_type(suppress_obj.record(RuntimeWarning), list[warnings.WarningMessage])
+with suppress_obj as c3:
+ assert_type(c3, np.testing.suppress_warnings)
+
+assert_type(np.testing.verbose, int)
+assert_type(np.testing.IS_PYPY, bool)
+assert_type(np.testing.HAS_REFCOUNT, bool)
+assert_type(np.testing.HAS_LAPACK64, bool)
+
+assert_type(np.testing.assert_(1, msg="test"), None)
+assert_type(np.testing.assert_(2, msg=lambda: "test"), None)
+
+if sys.platform == "win32" or sys.platform == "cygwin":
+ assert_type(np.testing.memusage(), int)
+elif sys.platform == "linux":
+ assert_type(np.testing.memusage(), None | int)
+
+assert_type(np.testing.jiffies(), int)
+
+assert_type(np.testing.build_err_msg([0, 1, 2], "test"), str)
+assert_type(np.testing.build_err_msg(range(2), "test", header="header"), str)
+assert_type(np.testing.build_err_msg(np.arange(9).reshape(3, 3), "test", verbose=False), str)
+assert_type(np.testing.build_err_msg("abc", "test", names=["x", "y"]), str)
+assert_type(np.testing.build_err_msg([1.0, 2.0], "test", precision=5), str)
+
+assert_type(np.testing.assert_equal({1}, {1}), None)
+assert_type(np.testing.assert_equal([1, 2, 3], [1, 2, 3], err_msg="fail"), None)
+assert_type(np.testing.assert_equal(1, 1.0, verbose=True), None)
+
+assert_type(np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 1]), None)
+
+assert_type(np.testing.assert_almost_equal(1.0, 1.1), None)
+assert_type(np.testing.assert_almost_equal([1, 2, 3], [1, 2, 3], err_msg="fail"), None)
+assert_type(np.testing.assert_almost_equal(1, 1.0, verbose=True), None)
+assert_type(np.testing.assert_almost_equal(1, 1.0001, decimal=2), None)
+
+assert_type(np.testing.assert_approx_equal(1.0, 1.1), None)
+assert_type(np.testing.assert_approx_equal("1", "2", err_msg="fail"), None)
+assert_type(np.testing.assert_approx_equal(1, 1.0, verbose=True), None)
+assert_type(np.testing.assert_approx_equal(1, 1.0001, significant=2), None)
+
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, verbose=True), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, header="header"), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, precision=np.int64()), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, equal_nan=False), None)
+assert_type(np.testing.assert_array_compare(func2, AR_i8, AR_f8, equal_inf=True), None)
+
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_equal(AR_i8, AR_f8, verbose=True), None)
+
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, verbose=True), None)
+assert_type(np.testing.assert_array_almost_equal(AR_i8, AR_f8, decimal=1), None)
+
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8, err_msg="test"), None)
+assert_type(np.testing.assert_array_less(AR_i8, AR_f8, verbose=True), None)
+
+assert_type(np.testing.runstring("1 + 1", {}), Any)
+assert_type(np.testing.runstring("int64() + 1", {"int64": np.int64}), Any)
+
+assert_type(np.testing.assert_string_equal("1", "1"), None)
+
+assert_type(np.testing.rundocs(), None)
+assert_type(np.testing.rundocs("test.py"), None)
+assert_type(np.testing.rundocs(Path("test.py"), raise_on_error=True), None)
+
+def func3(a: int) -> bool: ...
+
+assert_type(
+ np.testing.assert_raises(RuntimeWarning),
+ unittest.case._AssertRaisesContext[RuntimeWarning],
+)
+assert_type(np.testing.assert_raises(RuntimeWarning, func3, 5), None)
+
+assert_type(
+ np.testing.assert_raises_regex(RuntimeWarning, r"test"),
+ unittest.case._AssertRaisesContext[RuntimeWarning],
+)
+assert_type(np.testing.assert_raises_regex(RuntimeWarning, b"test", func3, 5), None)
+assert_type(np.testing.assert_raises_regex(RuntimeWarning, re.compile(b"test"), func3, 5), None)
+
+class Test: ...
+
+def decorate(a: FT) -> FT:
+ return a
+
+assert_type(np.testing.decorate_methods(Test, decorate), None)
+assert_type(np.testing.decorate_methods(Test, decorate, None), None)
+assert_type(np.testing.decorate_methods(Test, decorate, "test"), None)
+assert_type(np.testing.decorate_methods(Test, decorate, b"test"), None)
+assert_type(np.testing.decorate_methods(Test, decorate, re.compile("test")), None)
+
+assert_type(np.testing.measure("for i in range(1000): np.sqrt(i**2)"), float)
+assert_type(np.testing.measure(b"for i in range(1000): np.sqrt(i**2)", times=5), float)
+
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, rtol=0.005), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, atol=1), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, equal_nan=True), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, err_msg="err"), None)
+assert_type(np.testing.assert_allclose(AR_i8, AR_f8, verbose=False), None)
+
+assert_type(np.testing.assert_array_almost_equal_nulp(AR_i8, AR_f8, nulp=2), None)
+
+assert_type(np.testing.assert_array_max_ulp(AR_i8, AR_f8, maxulp=2), npt.NDArray[Any])
+assert_type(np.testing.assert_array_max_ulp(AR_i8, AR_f8, dtype=np.float32), npt.NDArray[Any])
+
+assert_type(np.testing.assert_warns(RuntimeWarning), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_warns(RuntimeWarning, func3, 5), bool)
+
+def func4(a: int, b: str) -> bool: ...
+
+assert_type(np.testing.assert_no_warnings(), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_no_warnings(func3, 5), bool)
+assert_type(np.testing.assert_no_warnings(func4, a=1, b="test"), bool)
+assert_type(np.testing.assert_no_warnings(func4, 1, "test"), bool)
+
+assert_type(np.testing.tempdir("test_dir"), contextlib._GeneratorContextManager[str])
+assert_type(np.testing.tempdir(prefix=b"test"), contextlib._GeneratorContextManager[bytes])
+assert_type(np.testing.tempdir("test_dir", dir=Path("here")), contextlib._GeneratorContextManager[str])
+
+assert_type(np.testing.temppath("test_dir", text=True), contextlib._GeneratorContextManager[str])
+assert_type(np.testing.temppath(prefix=b"test"), contextlib._GeneratorContextManager[bytes])
+assert_type(np.testing.temppath("test_dir", dir=Path("here")), contextlib._GeneratorContextManager[str])
+
+assert_type(np.testing.assert_no_gc_cycles(), contextlib._GeneratorContextManager[None])
+assert_type(np.testing.assert_no_gc_cycles(func3, 5), None)
+
+assert_type(np.testing.break_cycles(), None)
+
+assert_type(np.testing.TestCase(), unittest.case.TestCase)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2f1cd56d1e7b7b6941431a40fea1001bf5a7d7e3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/twodim_base.pyi
@@ -0,0 +1,152 @@
+from typing import Any, TypeVar
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+_SCT = TypeVar("_SCT", bound=np.generic)
+
+
+def func1(ar: npt.NDArray[_SCT], a: int) -> npt.NDArray[_SCT]:
+ pass
+
+
+def func2(ar: npt.NDArray[np.number[Any]], a: str) -> npt.NDArray[np.float64]:
+ pass
+
+
+AR_b: npt.NDArray[np.bool]
+AR_u: npt.NDArray[np.uint64]
+AR_i: npt.NDArray[np.int64]
+AR_f: npt.NDArray[np.float64]
+AR_c: npt.NDArray[np.complex128]
+AR_O: npt.NDArray[np.object_]
+
+AR_LIKE_b: list[bool]
+AR_LIKE_c: list[complex]
+
+assert_type(np.fliplr(AR_b), npt.NDArray[np.bool])
+assert_type(np.fliplr(AR_LIKE_b), npt.NDArray[Any])
+
+assert_type(np.flipud(AR_b), npt.NDArray[np.bool])
+assert_type(np.flipud(AR_LIKE_b), npt.NDArray[Any])
+
+assert_type(np.eye(10), npt.NDArray[np.float64])
+assert_type(np.eye(10, M=20, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.eye(10, k=2, dtype=int), npt.NDArray[Any])
+
+assert_type(np.diag(AR_b), npt.NDArray[np.bool])
+assert_type(np.diag(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.diagflat(AR_b), npt.NDArray[np.bool])
+assert_type(np.diagflat(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.tri(10), npt.NDArray[np.float64])
+assert_type(np.tri(10, M=20, dtype=np.int64), npt.NDArray[np.int64])
+assert_type(np.tri(10, k=2, dtype=int), npt.NDArray[Any])
+
+assert_type(np.tril(AR_b), npt.NDArray[np.bool])
+assert_type(np.tril(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.triu(AR_b), npt.NDArray[np.bool])
+assert_type(np.triu(AR_LIKE_b, k=0), npt.NDArray[Any])
+
+assert_type(np.vander(AR_b), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_u), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_i, N=2), npt.NDArray[np.signedinteger[Any]])
+assert_type(np.vander(AR_f, increasing=True), npt.NDArray[np.floating[Any]])
+assert_type(np.vander(AR_c), npt.NDArray[np.complexfloating[Any, Any]])
+assert_type(np.vander(AR_O), npt.NDArray[np.object_])
+
+assert_type(
+ np.histogram2d(AR_LIKE_c, AR_LIKE_c),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.complex128 | np.float64],
+ npt.NDArray[np.complex128 | np.float64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_i, AR_b),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_f, AR_i),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_i, AR_f),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ npt.NDArray[np.float64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_f, AR_c, weights=AR_LIKE_b),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.complex128],
+ npt.NDArray[np.complex128],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_f, AR_c, bins=8),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.complex128],
+ npt.NDArray[np.complex128],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_c, AR_f, bins=(8, 5)),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.complex128],
+ npt.NDArray[np.complex128],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_c, AR_i, bins=AR_u),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.uint64],
+ npt.NDArray[np.uint64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_c, AR_c, bins=(AR_u, AR_u)),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.uint64],
+ npt.NDArray[np.uint64],
+ ],
+)
+assert_type(
+ np.histogram2d(AR_c, AR_c, bins=(AR_b, 8)),
+ tuple[
+ npt.NDArray[np.float64],
+ npt.NDArray[np.bool | np.complex128],
+ npt.NDArray[np.bool | np.complex128],
+ ],
+)
+
+assert_type(np.mask_indices(10, func1), tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]])
+assert_type(np.mask_indices(8, func2, "0"), tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]])
+
+assert_type(np.tril_indices(10), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.tril_indices_from(AR_b), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.triu_indices(10), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
+
+assert_type(np.triu_indices_from(AR_b), tuple[npt.NDArray[np.int_], npt.NDArray[np.int_]])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/type_check.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/type_check.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..4a7ef36e9e2658c924e78604362f550a45679d0b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/type_check.pyi
@@ -0,0 +1,79 @@
+from typing import Any, Literal
+
+import numpy as np
+import numpy.typing as npt
+from numpy._typing import _16Bit, _32Bit, _64Bit, _128Bit
+
+from typing_extensions import assert_type
+
+f8: np.float64
+f: float
+
+# NOTE: Avoid importing the platform specific `np.float128` type
+AR_i8: npt.NDArray[np.int64]
+AR_i4: npt.NDArray[np.int32]
+AR_f2: npt.NDArray[np.float16]
+AR_f8: npt.NDArray[np.float64]
+AR_f16: npt.NDArray[np.floating[_128Bit]]
+AR_c8: npt.NDArray[np.complex64]
+AR_c16: npt.NDArray[np.complex128]
+
+AR_LIKE_f: list[float]
+
+class ComplexObj:
+ real: slice
+ imag: slice
+
+assert_type(np.mintypecode(["f8"], typeset="qfQF"), str)
+
+assert_type(np.real(ComplexObj()), slice)
+assert_type(np.real(AR_f8), npt.NDArray[np.float64])
+assert_type(np.real(AR_c16), npt.NDArray[np.float64])
+assert_type(np.real(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.imag(ComplexObj()), slice)
+assert_type(np.imag(AR_f8), npt.NDArray[np.float64])
+assert_type(np.imag(AR_c16), npt.NDArray[np.float64])
+assert_type(np.imag(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.iscomplex(f8), np.bool)
+assert_type(np.iscomplex(AR_f8), npt.NDArray[np.bool])
+assert_type(np.iscomplex(AR_LIKE_f), npt.NDArray[np.bool])
+
+assert_type(np.isreal(f8), np.bool)
+assert_type(np.isreal(AR_f8), npt.NDArray[np.bool])
+assert_type(np.isreal(AR_LIKE_f), npt.NDArray[np.bool])
+
+assert_type(np.iscomplexobj(f8), bool)
+assert_type(np.isrealobj(f8), bool)
+
+assert_type(np.nan_to_num(f8), np.float64)
+assert_type(np.nan_to_num(f, copy=True), Any)
+assert_type(np.nan_to_num(AR_f8, nan=1.5), npt.NDArray[np.float64])
+assert_type(np.nan_to_num(AR_LIKE_f, posinf=9999), npt.NDArray[Any])
+
+assert_type(np.real_if_close(AR_f8), npt.NDArray[np.float64])
+assert_type(
+ np.real_if_close(AR_c16),
+ npt.NDArray[np.floating[_64Bit]] | npt.NDArray[np.complexfloating[_64Bit, _64Bit]],
+)
+assert_type(np.real_if_close(AR_c8), npt.NDArray[np.float32] | npt.NDArray[np.complex64])
+assert_type(np.real_if_close(AR_LIKE_f), npt.NDArray[Any])
+
+assert_type(np.typename("h"), Literal["short"])
+assert_type(np.typename("B"), Literal["unsigned char"])
+assert_type(np.typename("V"), Literal["void"])
+assert_type(np.typename("S1"), Literal["character"])
+
+assert_type(np.common_type(AR_i4), type[np.floating[_64Bit]])
+assert_type(np.common_type(AR_f2), type[np.float16])
+assert_type(np.common_type(AR_f2, AR_i4), type[np.floating[_16Bit | _64Bit]])
+assert_type(np.common_type(AR_f16, AR_i4), type[np.floating[_64Bit | _128Bit]])
+assert_type(
+ np.common_type(AR_c8, AR_f2),
+ type[np.complexfloating[_16Bit | _32Bit, _16Bit | _32Bit]],
+)
+assert_type(
+ np.common_type(AR_f2, AR_c8, AR_i4),
+ type[np.complexfloating[_16Bit | _32Bit | _64Bit, _16Bit | _32Bit | _64Bit]],
+)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..b98157d1d4515e411ade4e8957ac46844f3051e8
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunc_config.pyi
@@ -0,0 +1,31 @@
+"""Typing tests for `_core._ufunc_config`."""
+
+from _typeshed import SupportsWrite
+from typing import Any
+from collections.abc import Callable
+
+import numpy as np
+
+from typing_extensions import assert_type
+
+def func(a: str, b: int) -> None: ...
+
+class Write:
+ def write(self, value: str) -> None: ...
+
+assert_type(np.seterr(all=None), np._core._ufunc_config._ErrDict)
+assert_type(np.seterr(divide="ignore"), np._core._ufunc_config._ErrDict)
+assert_type(np.seterr(over="warn"), np._core._ufunc_config._ErrDict)
+assert_type(np.seterr(under="call"), np._core._ufunc_config._ErrDict)
+assert_type(np.seterr(invalid="raise"), np._core._ufunc_config._ErrDict)
+assert_type(np.geterr(), np._core._ufunc_config._ErrDict)
+
+assert_type(np.setbufsize(4096), int)
+assert_type(np.getbufsize(), int)
+
+assert_type(np.seterrcall(func), Callable[[str, int], Any] | None | SupportsWrite[str])
+assert_type(np.seterrcall(Write()), Callable[[str, int], Any] | None | SupportsWrite[str])
+assert_type(np.geterrcall(), Callable[[str, int], Any] | None | SupportsWrite[str])
+
+assert_type(np.errstate(call=func, all="call"), np.errstate)
+assert_type(np.errstate(call=Write(), divide="log", over="log"), np.errstate)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..2a0c6c65ea5da1ea26ce296dc2330e3544c7c3bd
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufunclike.pyi
@@ -0,0 +1,33 @@
+from typing import Any
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+AR_LIKE_b: list[bool]
+AR_LIKE_u: list[np.uint32]
+AR_LIKE_i: list[int]
+AR_LIKE_f: list[float]
+AR_LIKE_O: list[np.object_]
+
+AR_U: npt.NDArray[np.str_]
+
+assert_type(np.fix(AR_LIKE_b), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_u), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_i), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_f), npt.NDArray[np.floating[Any]])
+assert_type(np.fix(AR_LIKE_O), npt.NDArray[np.object_])
+assert_type(np.fix(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
+
+assert_type(np.isposinf(AR_LIKE_b), npt.NDArray[np.bool])
+assert_type(np.isposinf(AR_LIKE_u), npt.NDArray[np.bool])
+assert_type(np.isposinf(AR_LIKE_i), npt.NDArray[np.bool])
+assert_type(np.isposinf(AR_LIKE_f), npt.NDArray[np.bool])
+assert_type(np.isposinf(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
+
+assert_type(np.isneginf(AR_LIKE_b), npt.NDArray[np.bool])
+assert_type(np.isneginf(AR_LIKE_u), npt.NDArray[np.bool])
+assert_type(np.isneginf(AR_LIKE_i), npt.NDArray[np.bool])
+assert_type(np.isneginf(AR_LIKE_f), npt.NDArray[np.bool])
+assert_type(np.isneginf(AR_LIKE_f, out=AR_U), npt.NDArray[np.str_])
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..8d3527ac84157d931bd3063d5afe6467fa39badb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/ufuncs.pyi
@@ -0,0 +1,125 @@
+from typing import Literal, Any, NoReturn
+
+import numpy as np
+import numpy.typing as npt
+
+from typing_extensions import assert_type
+
+i8: np.int64
+f8: np.float64
+AR_f8: npt.NDArray[np.float64]
+AR_i8: npt.NDArray[np.int64]
+
+assert_type(np.absolute.__doc__, str)
+assert_type(np.absolute.types, list[str])
+
+assert_type(np.absolute.__name__, Literal["absolute"])
+assert_type(np.absolute.__qualname__, Literal["absolute"])
+assert_type(np.absolute.ntypes, Literal[20])
+assert_type(np.absolute.identity, None)
+assert_type(np.absolute.nin, Literal[1])
+assert_type(np.absolute.nin, Literal[1])
+assert_type(np.absolute.nout, Literal[1])
+assert_type(np.absolute.nargs, Literal[2])
+assert_type(np.absolute.signature, None)
+assert_type(np.absolute(f8), Any)
+assert_type(np.absolute(AR_f8), npt.NDArray[Any])
+assert_type(np.absolute.at(AR_f8, AR_i8), None)
+
+assert_type(np.add.__name__, Literal["add"])
+assert_type(np.add.__qualname__, Literal["add"])
+assert_type(np.add.ntypes, Literal[22])
+assert_type(np.add.identity, Literal[0])
+assert_type(np.add.nin, Literal[2])
+assert_type(np.add.nout, Literal[1])
+assert_type(np.add.nargs, Literal[3])
+assert_type(np.add.signature, None)
+assert_type(np.add(f8, f8), Any)
+assert_type(np.add(AR_f8, f8), npt.NDArray[Any])
+assert_type(np.add.at(AR_f8, AR_i8, f8), None)
+assert_type(np.add.reduce(AR_f8, axis=0), Any)
+assert_type(np.add.accumulate(AR_f8), npt.NDArray[Any])
+assert_type(np.add.reduceat(AR_f8, AR_i8), npt.NDArray[Any])
+assert_type(np.add.outer(f8, f8), Any)
+assert_type(np.add.outer(AR_f8, f8), npt.NDArray[Any])
+
+assert_type(np.frexp.__name__, Literal["frexp"])
+assert_type(np.frexp.__qualname__, Literal["frexp"])
+assert_type(np.frexp.ntypes, Literal[4])
+assert_type(np.frexp.identity, None)
+assert_type(np.frexp.nin, Literal[1])
+assert_type(np.frexp.nout, Literal[2])
+assert_type(np.frexp.nargs, Literal[3])
+assert_type(np.frexp.signature, None)
+assert_type(np.frexp(f8), tuple[Any, Any])
+assert_type(np.frexp(AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.divmod.__name__, Literal["divmod"])
+assert_type(np.divmod.__qualname__, Literal["divmod"])
+assert_type(np.divmod.ntypes, Literal[15])
+assert_type(np.divmod.identity, None)
+assert_type(np.divmod.nin, Literal[2])
+assert_type(np.divmod.nout, Literal[2])
+assert_type(np.divmod.nargs, Literal[4])
+assert_type(np.divmod.signature, None)
+assert_type(np.divmod(f8, f8), tuple[Any, Any])
+assert_type(np.divmod(AR_f8, f8), tuple[npt.NDArray[Any], npt.NDArray[Any]])
+
+assert_type(np.matmul.__name__, Literal["matmul"])
+assert_type(np.matmul.__qualname__, Literal["matmul"])
+assert_type(np.matmul.ntypes, Literal[19])
+assert_type(np.matmul.identity, None)
+assert_type(np.matmul.nin, Literal[2])
+assert_type(np.matmul.nout, Literal[1])
+assert_type(np.matmul.nargs, Literal[3])
+assert_type(np.matmul.signature, Literal["(n?,k),(k,m?)->(n?,m?)"])
+assert_type(np.matmul.identity, None)
+assert_type(np.matmul(AR_f8, AR_f8), Any)
+assert_type(np.matmul(AR_f8, AR_f8, axes=[(0, 1), (0, 1), (0, 1)]), Any)
+
+assert_type(np.vecdot.__name__, Literal["vecdot"])
+assert_type(np.vecdot.__qualname__, Literal["vecdot"])
+assert_type(np.vecdot.ntypes, Literal[19])
+assert_type(np.vecdot.identity, None)
+assert_type(np.vecdot.nin, Literal[2])
+assert_type(np.vecdot.nout, Literal[1])
+assert_type(np.vecdot.nargs, Literal[3])
+assert_type(np.vecdot.signature, Literal["(n),(n)->()"])
+assert_type(np.vecdot.identity, None)
+assert_type(np.vecdot(AR_f8, AR_f8), Any)
+
+assert_type(np.bitwise_count.__name__, Literal["bitwise_count"])
+assert_type(np.bitwise_count.__qualname__, Literal["bitwise_count"])
+assert_type(np.bitwise_count.ntypes, Literal[11])
+assert_type(np.bitwise_count.identity, None)
+assert_type(np.bitwise_count.nin, Literal[1])
+assert_type(np.bitwise_count.nout, Literal[1])
+assert_type(np.bitwise_count.nargs, Literal[2])
+assert_type(np.bitwise_count.signature, None)
+assert_type(np.bitwise_count.identity, None)
+assert_type(np.bitwise_count(i8), Any)
+assert_type(np.bitwise_count(AR_i8), npt.NDArray[Any])
+
+assert_type(np.absolute.outer(), NoReturn)
+assert_type(np.frexp.outer(), NoReturn)
+assert_type(np.divmod.outer(), NoReturn)
+assert_type(np.matmul.outer(), NoReturn)
+
+assert_type(np.absolute.reduceat(), NoReturn)
+assert_type(np.frexp.reduceat(), NoReturn)
+assert_type(np.divmod.reduceat(), NoReturn)
+assert_type(np.matmul.reduceat(), NoReturn)
+
+assert_type(np.absolute.reduce(), NoReturn)
+assert_type(np.frexp.reduce(), NoReturn)
+assert_type(np.divmod.reduce(), NoReturn)
+assert_type(np.matmul.reduce(), NoReturn)
+
+assert_type(np.absolute.accumulate(), NoReturn)
+assert_type(np.frexp.accumulate(), NoReturn)
+assert_type(np.divmod.accumulate(), NoReturn)
+assert_type(np.matmul.accumulate(), NoReturn)
+
+assert_type(np.frexp.at(), NoReturn)
+assert_type(np.divmod.at(), NoReturn)
+assert_type(np.matmul.at(), NoReturn)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..9b1e23dfb081fc38213959d6a1937fc46f81daaf
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/data/reveal/warnings_and_errors.pyi
@@ -0,0 +1,11 @@
+import numpy.exceptions as ex
+
+from typing_extensions import assert_type
+
+assert_type(ex.ModuleDeprecationWarning(), ex.ModuleDeprecationWarning)
+assert_type(ex.VisibleDeprecationWarning(), ex.VisibleDeprecationWarning)
+assert_type(ex.ComplexWarning(), ex.ComplexWarning)
+assert_type(ex.RankWarning(), ex.RankWarning)
+assert_type(ex.TooHardError(), ex.TooHardError)
+assert_type(ex.AxisError("test"), ex.AxisError)
+assert_type(ex.AxisError(5, 1), ex.AxisError)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_isfile.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_isfile.py
new file mode 100644
index 0000000000000000000000000000000000000000..e77b560f8c762b5df16bdccd6fd4193583de5c21
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_isfile.py
@@ -0,0 +1,32 @@
+import os
+import sys
+from pathlib import Path
+
+import numpy as np
+from numpy.testing import assert_
+
+ROOT = Path(np.__file__).parents[0]
+FILES = [
+ ROOT / "py.typed",
+ ROOT / "__init__.pyi",
+ ROOT / "ctypeslib.pyi",
+ ROOT / "_core" / "__init__.pyi",
+ ROOT / "f2py" / "__init__.pyi",
+ ROOT / "fft" / "__init__.pyi",
+ ROOT / "lib" / "__init__.pyi",
+ ROOT / "linalg" / "__init__.pyi",
+ ROOT / "ma" / "__init__.pyi",
+ ROOT / "matrixlib" / "__init__.pyi",
+ ROOT / "polynomial" / "__init__.pyi",
+ ROOT / "random" / "__init__.pyi",
+ ROOT / "testing" / "__init__.pyi",
+]
+if sys.version_info < (3, 12):
+ FILES += [ROOT / "distutils" / "__init__.pyi"]
+
+
+class TestIsFile:
+ def test_isfile(self):
+ """Test if all ``.pyi`` files are properly installed."""
+ for file in FILES:
+ assert_(os.path.isfile(file))
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_runtime.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_runtime.py
new file mode 100644
index 0000000000000000000000000000000000000000..c32c5db3266aff7643cc70b1e139aa17e24a26f6
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_runtime.py
@@ -0,0 +1,109 @@
+"""Test the runtime usage of `numpy.typing`."""
+
+from __future__ import annotations
+
+from typing import (
+ get_type_hints,
+ Union,
+ NamedTuple,
+ get_args,
+ get_origin,
+ Any,
+)
+
+import pytest
+import numpy as np
+import numpy.typing as npt
+import numpy._typing as _npt
+
+
+class TypeTup(NamedTuple):
+ typ: type
+ args: tuple[type, ...]
+ origin: None | type
+
+
+NDArrayTup = TypeTup(npt.NDArray, npt.NDArray.__args__, np.ndarray)
+
+TYPES = {
+ "ArrayLike": TypeTup(npt.ArrayLike, npt.ArrayLike.__args__, Union),
+ "DTypeLike": TypeTup(npt.DTypeLike, npt.DTypeLike.__args__, Union),
+ "NBitBase": TypeTup(npt.NBitBase, (), None),
+ "NDArray": NDArrayTup,
+}
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_args(name: type, tup: TypeTup) -> None:
+ """Test `typing.get_args`."""
+ typ, ref = tup.typ, tup.args
+ out = get_args(typ)
+ assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_origin(name: type, tup: TypeTup) -> None:
+ """Test `typing.get_origin`."""
+ typ, ref = tup.typ, tup.origin
+ out = get_origin(typ)
+ assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_type_hints(name: type, tup: TypeTup) -> None:
+ """Test `typing.get_type_hints`."""
+ typ = tup.typ
+
+ # Explicitly set `__annotations__` in order to circumvent the
+ # stringification performed by `from __future__ import annotations`
+ def func(a): pass
+ func.__annotations__ = {"a": typ, "return": None}
+
+ out = get_type_hints(func)
+ ref = {"a": typ, "return": type(None)}
+ assert out == ref
+
+
+@pytest.mark.parametrize("name,tup", TYPES.items(), ids=TYPES.keys())
+def test_get_type_hints_str(name: type, tup: TypeTup) -> None:
+ """Test `typing.get_type_hints` with string-representation of types."""
+ typ_str, typ = f"npt.{name}", tup.typ
+
+ # Explicitly set `__annotations__` in order to circumvent the
+ # stringification performed by `from __future__ import annotations`
+ def func(a): pass
+ func.__annotations__ = {"a": typ_str, "return": None}
+
+ out = get_type_hints(func)
+ ref = {"a": typ, "return": type(None)}
+ assert out == ref
+
+
+def test_keys() -> None:
+ """Test that ``TYPES.keys()`` and ``numpy.typing.__all__`` are synced."""
+ keys = TYPES.keys()
+ ref = set(npt.__all__)
+ assert keys == ref
+
+
+PROTOCOLS: dict[str, tuple[type[Any], object]] = {
+ "_SupportsDType": (_npt._SupportsDType, np.int64(1)),
+ "_SupportsArray": (_npt._SupportsArray, np.arange(10)),
+ "_SupportsArrayFunc": (_npt._SupportsArrayFunc, np.arange(10)),
+ "_NestedSequence": (_npt._NestedSequence, [1]),
+}
+
+
+@pytest.mark.parametrize("cls,obj", PROTOCOLS.values(), ids=PROTOCOLS.keys())
+class TestRuntimeProtocol:
+ def test_isinstance(self, cls: type[Any], obj: object) -> None:
+ assert isinstance(obj, cls)
+ assert not isinstance(None, cls)
+
+ def test_issubclass(self, cls: type[Any], obj: object) -> None:
+ if cls is _npt._SupportsDType:
+ pytest.xfail(
+ "Protocols with non-method members don't support issubclass()"
+ )
+ assert issubclass(type(obj), cls)
+ assert not issubclass(type(None), cls)
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_typing.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_typing.py
new file mode 100644
index 0000000000000000000000000000000000000000..86d6f0d4df26b435675b549ac322b4688651ddf2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/numpy/typing/tests/test_typing.py
@@ -0,0 +1,286 @@
+from __future__ import annotations
+
+import importlib.util
+import os
+import re
+import shutil
+from collections import defaultdict
+from typing import TYPE_CHECKING
+
+import pytest
+from numpy.typing.mypy_plugin import _EXTENDED_PRECISION_LIST
+
+
+# Only trigger a full `mypy` run if this environment variable is set
+# Note that these tests tend to take over a minute even on a macOS M1 CPU,
+# and more than that in CI.
+RUN_MYPY = "NPY_RUN_MYPY_IN_TESTSUITE" in os.environ
+if RUN_MYPY and RUN_MYPY not in ('0', '', 'false'):
+ RUN_MYPY = True
+
+# Skips all functions in this file
+pytestmark = pytest.mark.skipif(
+ not RUN_MYPY,
+ reason="`NPY_RUN_MYPY_IN_TESTSUITE` not set"
+)
+
+
+try:
+ from mypy import api
+except ImportError:
+ NO_MYPY = True
+else:
+ NO_MYPY = False
+
+if TYPE_CHECKING:
+ from collections.abc import Iterator
+ # We need this as annotation, but it's located in a private namespace.
+ # As a compromise, do *not* import it during runtime
+ from _pytest.mark.structures import ParameterSet
+
+DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
+PASS_DIR = os.path.join(DATA_DIR, "pass")
+FAIL_DIR = os.path.join(DATA_DIR, "fail")
+REVEAL_DIR = os.path.join(DATA_DIR, "reveal")
+MISC_DIR = os.path.join(DATA_DIR, "misc")
+MYPY_INI = os.path.join(DATA_DIR, "mypy.ini")
+CACHE_DIR = os.path.join(DATA_DIR, ".mypy_cache")
+
+#: A dictionary with file names as keys and lists of the mypy stdout as values.
+#: To-be populated by `run_mypy`.
+OUTPUT_MYPY: defaultdict[str, list[str]] = defaultdict(list)
+
+
+def _key_func(key: str) -> str:
+ """Split at the first occurrence of the ``:`` character.
+
+ Windows drive-letters (*e.g.* ``C:``) are ignored herein.
+ """
+ drive, tail = os.path.splitdrive(key)
+ return os.path.join(drive, tail.split(":", 1)[0])
+
+
+def _strip_filename(msg: str) -> tuple[int, str]:
+ """Strip the filename and line number from a mypy message."""
+ _, tail = os.path.splitdrive(msg)
+ _, lineno, msg = tail.split(":", 2)
+ return int(lineno), msg.strip()
+
+
+def strip_func(match: re.Match[str]) -> str:
+ """`re.sub` helper function for stripping module names."""
+ return match.groups()[1]
+
+
+@pytest.fixture(scope="module", autouse=True)
+def run_mypy() -> None:
+ """Clears the cache and run mypy before running any of the typing tests.
+
+ The mypy results are cached in `OUTPUT_MYPY` for further use.
+
+ The cache refresh can be skipped using
+
+ NUMPY_TYPING_TEST_CLEAR_CACHE=0 pytest numpy/typing/tests
+ """
+ if (
+ os.path.isdir(CACHE_DIR)
+ and bool(os.environ.get("NUMPY_TYPING_TEST_CLEAR_CACHE", True))
+ ):
+ shutil.rmtree(CACHE_DIR)
+
+ split_pattern = re.compile(r"(\s+)?\^(\~+)?")
+ for directory in (PASS_DIR, REVEAL_DIR, FAIL_DIR, MISC_DIR):
+ # Run mypy
+ stdout, stderr, exit_code = api.run([
+ "--config-file",
+ MYPY_INI,
+ "--cache-dir",
+ CACHE_DIR,
+ directory,
+ ])
+ if stderr:
+ pytest.fail(f"Unexpected mypy standard error\n\n{stderr}")
+ elif exit_code not in {0, 1}:
+ pytest.fail(f"Unexpected mypy exit code: {exit_code}\n\n{stdout}")
+
+ str_concat = ""
+ filename: str | None = None
+ for i in stdout.split("\n"):
+ if "note:" in i:
+ continue
+ if filename is None:
+ filename = _key_func(i)
+
+ str_concat += f"{i}\n"
+ if split_pattern.match(i) is not None:
+ OUTPUT_MYPY[filename].append(str_concat)
+ str_concat = ""
+ filename = None
+
+
+def get_test_cases(directory: str) -> Iterator[ParameterSet]:
+ for root, _, files in os.walk(directory):
+ for fname in files:
+ short_fname, ext = os.path.splitext(fname)
+ if ext in (".pyi", ".py"):
+ fullpath = os.path.join(root, fname)
+ yield pytest.param(fullpath, id=short_fname)
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(PASS_DIR))
+def test_success(path) -> None:
+ # Alias `OUTPUT_MYPY` so that it appears in the local namespace
+ output_mypy = OUTPUT_MYPY
+ if path in output_mypy:
+ msg = "Unexpected mypy output\n\n"
+ msg += "\n".join(_strip_filename(v)[1] for v in output_mypy[path])
+ raise AssertionError(msg)
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(FAIL_DIR))
+def test_fail(path: str) -> None:
+ __tracebackhide__ = True
+
+ with open(path) as fin:
+ lines = fin.readlines()
+
+ errors = defaultdict(lambda: "")
+
+ output_mypy = OUTPUT_MYPY
+ assert path in output_mypy
+
+ for error_line in output_mypy[path]:
+ lineno, error_line = _strip_filename(error_line)
+ errors[lineno] += f'{error_line}\n'
+
+ for i, line in enumerate(lines):
+ lineno = i + 1
+ if (
+ line.startswith('#')
+ or (" E:" not in line and lineno not in errors)
+ ):
+ continue
+
+ target_line = lines[lineno - 1]
+ if "# E:" in target_line:
+ expression, _, marker = target_line.partition(" # E: ")
+ error = errors[lineno].strip()
+ expected_error = marker.strip()
+ _test_fail(path, expression, error, expected_error, lineno)
+ else:
+ pytest.fail(
+ f"Unexpected mypy output at line {lineno}\n\n{errors[lineno]}"
+ )
+
+
+_FAIL_MSG1 = """Extra error at line {}
+
+Expression: {}
+Extra error: {!r}
+"""
+
+_FAIL_MSG2 = """Error mismatch at line {}
+
+Expression: {}
+Expected error: {}
+Observed error: {!r}
+"""
+
+
+def _test_fail(
+ path: str,
+ expression: str,
+ error: str,
+ expected_error: None | str,
+ lineno: int,
+) -> None:
+ if expected_error is None:
+ raise AssertionError(_FAIL_MSG1.format(lineno, expression, error))
+ elif expected_error not in error:
+ raise AssertionError(_FAIL_MSG2.format(
+ lineno, expression, expected_error, error
+ ))
+
+
+_REVEAL_MSG = """Reveal mismatch at line {}
+
+{}
+"""
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(REVEAL_DIR))
+def test_reveal(path: str) -> None:
+ """Validate that mypy correctly infers the return-types of
+ the expressions in `path`.
+ """
+ __tracebackhide__ = True
+
+ output_mypy = OUTPUT_MYPY
+ if path not in output_mypy:
+ return
+
+ for error_line in output_mypy[path]:
+ lineno, error_line = _strip_filename(error_line)
+ raise AssertionError(_REVEAL_MSG.format(lineno, error_line))
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+@pytest.mark.parametrize("path", get_test_cases(PASS_DIR))
+def test_code_runs(path: str) -> None:
+ """Validate that the code in `path` properly during runtime."""
+ path_without_extension, _ = os.path.splitext(path)
+ dirname, filename = path.split(os.sep)[-2:]
+
+ spec = importlib.util.spec_from_file_location(
+ f"{dirname}.{filename}", path
+ )
+ assert spec is not None
+ assert spec.loader is not None
+
+ test_module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(test_module)
+
+
+LINENO_MAPPING = {
+ 11: "uint128",
+ 12: "uint256",
+ 14: "int128",
+ 15: "int256",
+ 17: "float80",
+ 18: "float96",
+ 19: "float128",
+ 20: "float256",
+ 22: "complex160",
+ 23: "complex192",
+ 24: "complex256",
+ 25: "complex512",
+}
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed")
+def test_extended_precision() -> None:
+ path = os.path.join(MISC_DIR, "extended_precision.pyi")
+ output_mypy = OUTPUT_MYPY
+ assert path in output_mypy
+
+ with open(path) as f:
+ expression_list = f.readlines()
+
+ for _msg in output_mypy[path]:
+ lineno, msg = _strip_filename(_msg)
+ expression = expression_list[lineno - 1].rstrip("\n")
+
+ if LINENO_MAPPING[lineno] in _EXTENDED_PRECISION_LIST:
+ raise AssertionError(_REVEAL_MSG.format(lineno, msg))
+ elif "error" not in msg:
+ _test_fail(
+ path, expression, msg, 'Expression is of type "Any"', lineno
+ )
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas.h
new file mode 100644
index 0000000000000000000000000000000000000000..96eadad8a8e8c3979b99910ceea41ceaf2c8b58e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas.h
@@ -0,0 +1,891 @@
+/*
+ * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+/*
+ * This is the public header file for the CUBLAS library, defining the API
+ *
+ * CUBLAS is an implementation of BLAS (Basic Linear Algebra Subroutines)
+ * on top of the CUDA runtime.
+ */
+
+#if !defined(CUBLAS_H_)
+#define CUBLAS_H_
+
+#if defined(CUBLAS_V2_H_)
+#error "It is an error to include both cublas.h and cublas_v2.h"
+#endif
+
+#include
+
+#ifndef CUBLASWINAPI
+#ifdef _WIN32
+#define CUBLASWINAPI __stdcall
+#else
+#define CUBLASWINAPI
+#endif
+#endif
+
+#undef CUBLASAPI
+#ifdef __CUDACC__
+#define CUBLASAPI __host__
+#else
+#define CUBLASAPI
+#endif
+
+#include "cublas_api.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* CUBLAS data types */
+#define cublasStatus cublasStatus_t
+
+cublasStatus CUBLASWINAPI cublasInit(void);
+cublasStatus CUBLASWINAPI cublasShutdown(void);
+cublasStatus CUBLASWINAPI cublasGetError(void);
+
+cublasStatus CUBLASWINAPI cublasGetVersion(int* version);
+cublasStatus CUBLASWINAPI cublasAlloc(int n, int elemSize, void** devicePtr);
+
+cublasStatus CUBLASWINAPI cublasFree(void* devicePtr);
+
+cublasStatus CUBLASWINAPI cublasSetKernelStream(cudaStream_t stream);
+
+/* ---------------- CUBLAS BLAS1 functions ---------------- */
+/* NRM2 */
+float CUBLASWINAPI cublasSnrm2(int n, const float* x, int incx);
+double CUBLASWINAPI cublasDnrm2(int n, const double* x, int incx);
+float CUBLASWINAPI cublasScnrm2(int n, const cuComplex* x, int incx);
+double CUBLASWINAPI cublasDznrm2(int n, const cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* DOT */
+float CUBLASWINAPI cublasSdot(int n, const float* x, int incx, const float* y, int incy);
+double CUBLASWINAPI cublasDdot(int n, const double* x, int incx, const double* y, int incy);
+cuComplex CUBLASWINAPI cublasCdotu(int n, const cuComplex* x, int incx, const cuComplex* y, int incy);
+cuComplex CUBLASWINAPI cublasCdotc(int n, const cuComplex* x, int incx, const cuComplex* y, int incy);
+cuDoubleComplex CUBLASWINAPI cublasZdotu(int n, const cuDoubleComplex* x, int incx, const cuDoubleComplex* y, int incy);
+cuDoubleComplex CUBLASWINAPI cublasZdotc(int n, const cuDoubleComplex* x, int incx, const cuDoubleComplex* y, int incy);
+/*------------------------------------------------------------------------*/
+/* SCAL */
+void CUBLASWINAPI cublasSscal(int n, float alpha, float* x, int incx);
+void CUBLASWINAPI cublasDscal(int n, double alpha, double* x, int incx);
+void CUBLASWINAPI cublasCscal(int n, cuComplex alpha, cuComplex* x, int incx);
+void CUBLASWINAPI cublasZscal(int n, cuDoubleComplex alpha, cuDoubleComplex* x, int incx);
+
+void CUBLASWINAPI cublasCsscal(int n, float alpha, cuComplex* x, int incx);
+void CUBLASWINAPI cublasZdscal(int n, double alpha, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* AXPY */
+void CUBLASWINAPI cublasSaxpy(int n, float alpha, const float* x, int incx, float* y, int incy);
+void CUBLASWINAPI cublasDaxpy(int n, double alpha, const double* x, int incx, double* y, int incy);
+void CUBLASWINAPI cublasCaxpy(int n, cuComplex alpha, const cuComplex* x, int incx, cuComplex* y, int incy);
+void CUBLASWINAPI
+cublasZaxpy(int n, cuDoubleComplex alpha, const cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy);
+/*------------------------------------------------------------------------*/
+/* COPY */
+void CUBLASWINAPI cublasScopy(int n, const float* x, int incx, float* y, int incy);
+void CUBLASWINAPI cublasDcopy(int n, const double* x, int incx, double* y, int incy);
+void CUBLASWINAPI cublasCcopy(int n, const cuComplex* x, int incx, cuComplex* y, int incy);
+void CUBLASWINAPI cublasZcopy(int n, const cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy);
+/*------------------------------------------------------------------------*/
+/* SWAP */
+void CUBLASWINAPI cublasSswap(int n, float* x, int incx, float* y, int incy);
+void CUBLASWINAPI cublasDswap(int n, double* x, int incx, double* y, int incy);
+void CUBLASWINAPI cublasCswap(int n, cuComplex* x, int incx, cuComplex* y, int incy);
+void CUBLASWINAPI cublasZswap(int n, cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy);
+/*------------------------------------------------------------------------*/
+/* AMAX */
+int CUBLASWINAPI cublasIsamax(int n, const float* x, int incx);
+int CUBLASWINAPI cublasIdamax(int n, const double* x, int incx);
+int CUBLASWINAPI cublasIcamax(int n, const cuComplex* x, int incx);
+int CUBLASWINAPI cublasIzamax(int n, const cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* AMIN */
+int CUBLASWINAPI cublasIsamin(int n, const float* x, int incx);
+int CUBLASWINAPI cublasIdamin(int n, const double* x, int incx);
+
+int CUBLASWINAPI cublasIcamin(int n, const cuComplex* x, int incx);
+int CUBLASWINAPI cublasIzamin(int n, const cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* ASUM */
+float CUBLASWINAPI cublasSasum(int n, const float* x, int incx);
+double CUBLASWINAPI cublasDasum(int n, const double* x, int incx);
+float CUBLASWINAPI cublasScasum(int n, const cuComplex* x, int incx);
+double CUBLASWINAPI cublasDzasum(int n, const cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* ROT */
+void CUBLASWINAPI cublasSrot(int n, float* x, int incx, float* y, int incy, float sc, float ss);
+void CUBLASWINAPI cublasDrot(int n, double* x, int incx, double* y, int incy, double sc, double ss);
+void CUBLASWINAPI cublasCrot(int n, cuComplex* x, int incx, cuComplex* y, int incy, float c, cuComplex s);
+void CUBLASWINAPI
+cublasZrot(int n, cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy, double sc, cuDoubleComplex cs);
+void CUBLASWINAPI cublasCsrot(int n, cuComplex* x, int incx, cuComplex* y, int incy, float c, float s);
+void CUBLASWINAPI cublasZdrot(int n, cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy, double c, double s);
+/*------------------------------------------------------------------------*/
+/* ROTG */
+void CUBLASWINAPI cublasSrotg(float* sa, float* sb, float* sc, float* ss);
+void CUBLASWINAPI cublasDrotg(double* sa, double* sb, double* sc, double* ss);
+void CUBLASWINAPI cublasCrotg(cuComplex* ca, cuComplex cb, float* sc, cuComplex* cs);
+void CUBLASWINAPI cublasZrotg(cuDoubleComplex* ca, cuDoubleComplex cb, double* sc, cuDoubleComplex* cs);
+/*------------------------------------------------------------------------*/
+/* ROTM */
+void CUBLASWINAPI cublasSrotm(int n, float* x, int incx, float* y, int incy, const float* sparam);
+void CUBLASWINAPI cublasDrotm(int n, double* x, int incx, double* y, int incy, const double* sparam);
+/*------------------------------------------------------------------------*/
+/* ROTMG */
+void CUBLASWINAPI cublasSrotmg(float* sd1, float* sd2, float* sx1, const float* sy1, float* sparam);
+void CUBLASWINAPI cublasDrotmg(double* sd1, double* sd2, double* sx1, const double* sy1, double* sparam);
+
+/* --------------- CUBLAS BLAS2 functions ---------------- */
+/* GEMV */
+void CUBLASWINAPI cublasSgemv(char trans,
+ int m,
+ int n,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ float beta,
+ float* y,
+ int incy);
+void CUBLASWINAPI cublasDgemv(char trans,
+ int m,
+ int n,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ double beta,
+ double* y,
+ int incy);
+void CUBLASWINAPI cublasCgemv(char trans,
+ int m,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ cuComplex beta,
+ cuComplex* y,
+ int incy);
+void CUBLASWINAPI cublasZgemv(char trans,
+ int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex beta,
+ cuDoubleComplex* y,
+ int incy);
+/*------------------------------------------------------------------------*/
+/* GBMV */
+void CUBLASWINAPI cublasSgbmv(char trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ float beta,
+ float* y,
+ int incy);
+void CUBLASWINAPI cublasDgbmv(char trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ double beta,
+ double* y,
+ int incy);
+void CUBLASWINAPI cublasCgbmv(char trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ cuComplex beta,
+ cuComplex* y,
+ int incy);
+void CUBLASWINAPI cublasZgbmv(char trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex beta,
+ cuDoubleComplex* y,
+ int incy);
+/*------------------------------------------------------------------------*/
+/* TRMV */
+void CUBLASWINAPI cublasStrmv(char uplo, char trans, char diag, int n, const float* A, int lda, float* x, int incx);
+void CUBLASWINAPI cublasDtrmv(char uplo, char trans, char diag, int n, const double* A, int lda, double* x, int incx);
+void CUBLASWINAPI
+cublasCtrmv(char uplo, char trans, char diag, int n, const cuComplex* A, int lda, cuComplex* x, int incx);
+void CUBLASWINAPI
+cublasZtrmv(char uplo, char trans, char diag, int n, const cuDoubleComplex* A, int lda, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* TBMV */
+void CUBLASWINAPI
+cublasStbmv(char uplo, char trans, char diag, int n, int k, const float* A, int lda, float* x, int incx);
+void CUBLASWINAPI
+cublasDtbmv(char uplo, char trans, char diag, int n, int k, const double* A, int lda, double* x, int incx);
+void CUBLASWINAPI
+cublasCtbmv(char uplo, char trans, char diag, int n, int k, const cuComplex* A, int lda, cuComplex* x, int incx);
+void CUBLASWINAPI cublasZtbmv(
+ char uplo, char trans, char diag, int n, int k, const cuDoubleComplex* A, int lda, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* TPMV */
+void CUBLASWINAPI cublasStpmv(char uplo, char trans, char diag, int n, const float* AP, float* x, int incx);
+
+void CUBLASWINAPI cublasDtpmv(char uplo, char trans, char diag, int n, const double* AP, double* x, int incx);
+
+void CUBLASWINAPI cublasCtpmv(char uplo, char trans, char diag, int n, const cuComplex* AP, cuComplex* x, int incx);
+
+void CUBLASWINAPI
+cublasZtpmv(char uplo, char trans, char diag, int n, const cuDoubleComplex* AP, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* TRSV */
+void CUBLASWINAPI cublasStrsv(char uplo, char trans, char diag, int n, const float* A, int lda, float* x, int incx);
+
+void CUBLASWINAPI cublasDtrsv(char uplo, char trans, char diag, int n, const double* A, int lda, double* x, int incx);
+
+void CUBLASWINAPI
+cublasCtrsv(char uplo, char trans, char diag, int n, const cuComplex* A, int lda, cuComplex* x, int incx);
+
+void CUBLASWINAPI
+cublasZtrsv(char uplo, char trans, char diag, int n, const cuDoubleComplex* A, int lda, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* TPSV */
+void CUBLASWINAPI cublasStpsv(char uplo, char trans, char diag, int n, const float* AP, float* x, int incx);
+
+void CUBLASWINAPI cublasDtpsv(char uplo, char trans, char diag, int n, const double* AP, double* x, int incx);
+
+void CUBLASWINAPI cublasCtpsv(char uplo, char trans, char diag, int n, const cuComplex* AP, cuComplex* x, int incx);
+
+void CUBLASWINAPI
+cublasZtpsv(char uplo, char trans, char diag, int n, const cuDoubleComplex* AP, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* TBSV */
+void CUBLASWINAPI
+cublasStbsv(char uplo, char trans, char diag, int n, int k, const float* A, int lda, float* x, int incx);
+
+void CUBLASWINAPI
+cublasDtbsv(char uplo, char trans, char diag, int n, int k, const double* A, int lda, double* x, int incx);
+void CUBLASWINAPI
+cublasCtbsv(char uplo, char trans, char diag, int n, int k, const cuComplex* A, int lda, cuComplex* x, int incx);
+
+void CUBLASWINAPI cublasZtbsv(
+ char uplo, char trans, char diag, int n, int k, const cuDoubleComplex* A, int lda, cuDoubleComplex* x, int incx);
+/*------------------------------------------------------------------------*/
+/* SYMV/HEMV */
+void CUBLASWINAPI cublasSsymv(
+ char uplo, int n, float alpha, const float* A, int lda, const float* x, int incx, float beta, float* y, int incy);
+void CUBLASWINAPI cublasDsymv(char uplo,
+ int n,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ double beta,
+ double* y,
+ int incy);
+void CUBLASWINAPI cublasChemv(char uplo,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ cuComplex beta,
+ cuComplex* y,
+ int incy);
+void CUBLASWINAPI cublasZhemv(char uplo,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex beta,
+ cuDoubleComplex* y,
+ int incy);
+/*------------------------------------------------------------------------*/
+/* SBMV/HBMV */
+void CUBLASWINAPI cublasSsbmv(char uplo,
+ int n,
+ int k,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ float beta,
+ float* y,
+ int incy);
+void CUBLASWINAPI cublasDsbmv(char uplo,
+ int n,
+ int k,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ double beta,
+ double* y,
+ int incy);
+void CUBLASWINAPI cublasChbmv(char uplo,
+ int n,
+ int k,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ cuComplex beta,
+ cuComplex* y,
+ int incy);
+void CUBLASWINAPI cublasZhbmv(char uplo,
+ int n,
+ int k,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex beta,
+ cuDoubleComplex* y,
+ int incy);
+/*------------------------------------------------------------------------*/
+/* SPMV/HPMV */
+void CUBLASWINAPI
+cublasSspmv(char uplo, int n, float alpha, const float* AP, const float* x, int incx, float beta, float* y, int incy);
+void CUBLASWINAPI cublasDspmv(
+ char uplo, int n, double alpha, const double* AP, const double* x, int incx, double beta, double* y, int incy);
+void CUBLASWINAPI cublasChpmv(char uplo,
+ int n,
+ cuComplex alpha,
+ const cuComplex* AP,
+ const cuComplex* x,
+ int incx,
+ cuComplex beta,
+ cuComplex* y,
+ int incy);
+void CUBLASWINAPI cublasZhpmv(char uplo,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* AP,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex beta,
+ cuDoubleComplex* y,
+ int incy);
+
+/*------------------------------------------------------------------------*/
+/* GER */
+void CUBLASWINAPI
+cublasSger(int m, int n, float alpha, const float* x, int incx, const float* y, int incy, float* A, int lda);
+void CUBLASWINAPI
+cublasDger(int m, int n, double alpha, const double* x, int incx, const double* y, int incy, double* A, int lda);
+
+void CUBLASWINAPI cublasCgeru(
+ int m, int n, cuComplex alpha, const cuComplex* x, int incx, const cuComplex* y, int incy, cuComplex* A, int lda);
+void CUBLASWINAPI cublasCgerc(
+ int m, int n, cuComplex alpha, const cuComplex* x, int incx, const cuComplex* y, int incy, cuComplex* A, int lda);
+void CUBLASWINAPI cublasZgeru(int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+void CUBLASWINAPI cublasZgerc(int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+/*------------------------------------------------------------------------*/
+/* SYR/HER */
+void CUBLASWINAPI cublasSsyr(char uplo, int n, float alpha, const float* x, int incx, float* A, int lda);
+void CUBLASWINAPI cublasDsyr(char uplo, int n, double alpha, const double* x, int incx, double* A, int lda);
+
+void CUBLASWINAPI cublasCher(char uplo, int n, float alpha, const cuComplex* x, int incx, cuComplex* A, int lda);
+void CUBLASWINAPI
+cublasZher(char uplo, int n, double alpha, const cuDoubleComplex* x, int incx, cuDoubleComplex* A, int lda);
+
+/*------------------------------------------------------------------------*/
+/* SPR/HPR */
+void CUBLASWINAPI cublasSspr(char uplo, int n, float alpha, const float* x, int incx, float* AP);
+void CUBLASWINAPI cublasDspr(char uplo, int n, double alpha, const double* x, int incx, double* AP);
+void CUBLASWINAPI cublasChpr(char uplo, int n, float alpha, const cuComplex* x, int incx, cuComplex* AP);
+void CUBLASWINAPI cublasZhpr(char uplo, int n, double alpha, const cuDoubleComplex* x, int incx, cuDoubleComplex* AP);
+/*------------------------------------------------------------------------*/
+/* SYR2/HER2 */
+void CUBLASWINAPI
+cublasSsyr2(char uplo, int n, float alpha, const float* x, int incx, const float* y, int incy, float* A, int lda);
+void CUBLASWINAPI
+cublasDsyr2(char uplo, int n, double alpha, const double* x, int incx, const double* y, int incy, double* A, int lda);
+void CUBLASWINAPI cublasCher2(char uplo,
+ int n,
+ cuComplex alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* A,
+ int lda);
+void CUBLASWINAPI cublasZher2(char uplo,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+
+/*------------------------------------------------------------------------*/
+/* SPR2/HPR2 */
+void CUBLASWINAPI
+cublasSspr2(char uplo, int n, float alpha, const float* x, int incx, const float* y, int incy, float* AP);
+void CUBLASWINAPI
+cublasDspr2(char uplo, int n, double alpha, const double* x, int incx, const double* y, int incy, double* AP);
+void CUBLASWINAPI cublasChpr2(
+ char uplo, int n, cuComplex alpha, const cuComplex* x, int incx, const cuComplex* y, int incy, cuComplex* AP);
+void CUBLASWINAPI cublasZhpr2(char uplo,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* AP);
+/* ------------------------BLAS3 Functions ------------------------------- */
+/* GEMM */
+void CUBLASWINAPI cublasSgemm(char transa,
+ char transb,
+ int m,
+ int n,
+ int k,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ float beta,
+ float* C,
+ int ldc);
+void CUBLASWINAPI cublasDgemm(char transa,
+ char transb,
+ int m,
+ int n,
+ int k,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ double beta,
+ double* C,
+ int ldc);
+void CUBLASWINAPI cublasCgemm(char transa,
+ char transb,
+ int m,
+ int n,
+ int k,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ cuComplex beta,
+ cuComplex* C,
+ int ldc);
+void CUBLASWINAPI cublasZgemm(char transa,
+ char transb,
+ int m,
+ int n,
+ int k,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex beta,
+ cuDoubleComplex* C,
+ int ldc);
+/* -------------------------------------------------------*/
+/* SYRK */
+void CUBLASWINAPI
+cublasSsyrk(char uplo, char trans, int n, int k, float alpha, const float* A, int lda, float beta, float* C, int ldc);
+void CUBLASWINAPI cublasDsyrk(
+ char uplo, char trans, int n, int k, double alpha, const double* A, int lda, double beta, double* C, int ldc);
+
+void CUBLASWINAPI cublasCsyrk(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ cuComplex beta,
+ cuComplex* C,
+ int ldc);
+void CUBLASWINAPI cublasZsyrk(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex beta,
+ cuDoubleComplex* C,
+ int ldc);
+/* ------------------------------------------------------- */
+/* HERK */
+void CUBLASWINAPI cublasCherk(
+ char uplo, char trans, int n, int k, float alpha, const cuComplex* A, int lda, float beta, cuComplex* C, int ldc);
+void CUBLASWINAPI cublasZherk(char uplo,
+ char trans,
+ int n,
+ int k,
+ double alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ double beta,
+ cuDoubleComplex* C,
+ int ldc);
+/* ------------------------------------------------------- */
+/* SYR2K */
+void CUBLASWINAPI cublasSsyr2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ float beta,
+ float* C,
+ int ldc);
+
+void CUBLASWINAPI cublasDsyr2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ double beta,
+ double* C,
+ int ldc);
+void CUBLASWINAPI cublasCsyr2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ cuComplex beta,
+ cuComplex* C,
+ int ldc);
+
+void CUBLASWINAPI cublasZsyr2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex beta,
+ cuDoubleComplex* C,
+ int ldc);
+/* ------------------------------------------------------- */
+/* HER2K */
+void CUBLASWINAPI cublasCher2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ float beta,
+ cuComplex* C,
+ int ldc);
+
+void CUBLASWINAPI cublasZher2k(char uplo,
+ char trans,
+ int n,
+ int k,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ double beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+/*------------------------------------------------------------------------*/
+/* SYMM*/
+void CUBLASWINAPI cublasSsymm(char side,
+ char uplo,
+ int m,
+ int n,
+ float alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ float beta,
+ float* C,
+ int ldc);
+void CUBLASWINAPI cublasDsymm(char side,
+ char uplo,
+ int m,
+ int n,
+ double alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ double beta,
+ double* C,
+ int ldc);
+
+void CUBLASWINAPI cublasCsymm(char side,
+ char uplo,
+ int m,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ cuComplex beta,
+ cuComplex* C,
+ int ldc);
+
+void CUBLASWINAPI cublasZsymm(char side,
+ char uplo,
+ int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex beta,
+ cuDoubleComplex* C,
+ int ldc);
+/*------------------------------------------------------------------------*/
+/* HEMM*/
+void CUBLASWINAPI cublasChemm(char side,
+ char uplo,
+ int m,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ cuComplex beta,
+ cuComplex* C,
+ int ldc);
+void CUBLASWINAPI cublasZhemm(char side,
+ char uplo,
+ int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+/*------------------------------------------------------------------------*/
+/* TRSM*/
+void CUBLASWINAPI cublasStrsm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ float alpha,
+ const float* A,
+ int lda,
+ float* B,
+ int ldb);
+
+void CUBLASWINAPI cublasDtrsm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ double alpha,
+ const double* A,
+ int lda,
+ double* B,
+ int ldb);
+
+void CUBLASWINAPI cublasCtrsm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ cuComplex* B,
+ int ldb);
+
+void CUBLASWINAPI cublasZtrsm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* B,
+ int ldb);
+/*------------------------------------------------------------------------*/
+/* TRMM*/
+void CUBLASWINAPI cublasStrmm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ float alpha,
+ const float* A,
+ int lda,
+ float* B,
+ int ldb);
+void CUBLASWINAPI cublasDtrmm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ double alpha,
+ const double* A,
+ int lda,
+ double* B,
+ int ldb);
+void CUBLASWINAPI cublasCtrmm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ cuComplex alpha,
+ const cuComplex* A,
+ int lda,
+ cuComplex* B,
+ int ldb);
+void CUBLASWINAPI cublasZtrmm(char side,
+ char uplo,
+ char transa,
+ char diag,
+ int m,
+ int n,
+ cuDoubleComplex alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* B,
+ int ldb);
+
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
+
+#endif /* !defined(CUBLAS_H_) */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasLt.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasLt.h
new file mode 100644
index 0000000000000000000000000000000000000000..217462f2ab4a16001f4ce6dc8c26a129d9f07b26
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasLt.h
@@ -0,0 +1,2511 @@
+/*
+ * Copyright 1993-2022 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+#pragma once
+
+#ifndef CUBLASAPI
+#ifdef __CUDACC__
+#define CUBLASAPI __host__ __device__
+#else
+#define CUBLASAPI
+#endif
+#endif
+
+#include
+
+#include
+#include
+#include
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* __cplusplus */
+
+/** Opaque structure holding CUBLASLT context
+ */
+typedef struct cublasLtContext* cublasLtHandle_t;
+
+cublasStatus_t CUBLASWINAPI cublasLtCreate(cublasLtHandle_t* lightHandle);
+
+cublasStatus_t CUBLASWINAPI cublasLtDestroy(cublasLtHandle_t lightHandle);
+
+const char* CUBLASWINAPI cublasLtGetStatusName(cublasStatus_t status);
+
+const char* CUBLASWINAPI cublasLtGetStatusString(cublasStatus_t status);
+
+size_t CUBLASWINAPI cublasLtGetVersion(void);
+
+size_t CUBLASWINAPI cublasLtGetCudartVersion(void);
+
+cublasStatus_t CUBLASWINAPI cublasLtGetProperty(libraryPropertyType type, int* value);
+
+cublasStatus_t CUBLASWINAPI cublasLtHeuristicsCacheGetCapacity(size_t* capacity);
+cublasStatus_t CUBLASWINAPI cublasLtHeuristicsCacheSetCapacity(size_t capacity);
+
+/** Restricts usage of CPU instructions (ISA) specified by the flags in the mask.
+ *
+ * Flags can be combined with bitwise OR(|) operator. Supported flags:
+ * - 0x1 -- x86-64 AVX512 ISA
+ *
+ * Default mask: 0 (any applicable ISA is allowed).
+ *
+ * The function returns the previous value of the mask.
+ * The function takes precedence over the environment variable CUBLASLT_DISABLE_CPU_INSTRUCTIONS_MASK.
+ */
+unsigned CUBLASWINAPI cublasLtDisableCpuInstructionsSetMask(unsigned mask);
+
+/** Semi-opaque descriptor for matrix memory layout
+ */
+typedef struct {
+ uint64_t data[8];
+} cublasLtMatrixLayoutOpaque_t;
+
+/** Opaque descriptor for matrix memory layout
+ */
+typedef cublasLtMatrixLayoutOpaque_t* cublasLtMatrixLayout_t;
+
+/** Semi-opaque algorithm descriptor (to avoid complicated alloc/free schemes)
+ *
+ * This structure can be trivially serialized and later restored for use with the same version of cuBLAS library to save
+ * on selecting the right configuration again.
+ */
+typedef struct {
+ uint64_t data[8];
+} cublasLtMatmulAlgo_t;
+
+/** Semi-opaque descriptor for cublasLtMatmul() operation details
+ */
+typedef struct {
+ uint64_t data[32];
+} cublasLtMatmulDescOpaque_t;
+
+/** Opaque descriptor for cublasLtMatmul() operation details
+ */
+typedef cublasLtMatmulDescOpaque_t* cublasLtMatmulDesc_t;
+
+/** Semi-opaque descriptor for cublasLtMatrixTransform() operation details
+ */
+typedef struct {
+ uint64_t data[8];
+} cublasLtMatrixTransformDescOpaque_t;
+
+/** Opaque descriptor for cublasLtMatrixTransform() operation details
+ */
+typedef cublasLtMatrixTransformDescOpaque_t* cublasLtMatrixTransformDesc_t;
+
+/** Semi-opaque descriptor for cublasLtMatmulPreference() operation details
+ */
+typedef struct {
+ uint64_t data[8];
+} cublasLtMatmulPreferenceOpaque_t;
+
+/** Opaque descriptor for cublasLtMatmulAlgoGetHeuristic() configuration
+ */
+typedef cublasLtMatmulPreferenceOpaque_t* cublasLtMatmulPreference_t;
+
+/** Tile size (in C/D matrix Rows x Cols)
+ *
+ * General order of tile IDs is sorted by size first and by first dimension second.
+ */
+typedef enum {
+ CUBLASLT_MATMUL_TILE_UNDEFINED = 0,
+ CUBLASLT_MATMUL_TILE_8x8 = 1,
+ CUBLASLT_MATMUL_TILE_8x16 = 2,
+ CUBLASLT_MATMUL_TILE_16x8 = 3,
+ CUBLASLT_MATMUL_TILE_8x32 = 4,
+ CUBLASLT_MATMUL_TILE_16x16 = 5,
+ CUBLASLT_MATMUL_TILE_32x8 = 6,
+ CUBLASLT_MATMUL_TILE_8x64 = 7,
+ CUBLASLT_MATMUL_TILE_16x32 = 8,
+ CUBLASLT_MATMUL_TILE_32x16 = 9,
+ CUBLASLT_MATMUL_TILE_64x8 = 10,
+ CUBLASLT_MATMUL_TILE_32x32 = 11,
+ CUBLASLT_MATMUL_TILE_32x64 = 12,
+ CUBLASLT_MATMUL_TILE_64x32 = 13,
+ CUBLASLT_MATMUL_TILE_32x128 = 14,
+ CUBLASLT_MATMUL_TILE_64x64 = 15,
+ CUBLASLT_MATMUL_TILE_128x32 = 16,
+ CUBLASLT_MATMUL_TILE_64x128 = 17,
+ CUBLASLT_MATMUL_TILE_128x64 = 18,
+ CUBLASLT_MATMUL_TILE_64x256 = 19,
+ CUBLASLT_MATMUL_TILE_128x128 = 20,
+ CUBLASLT_MATMUL_TILE_256x64 = 21,
+ CUBLASLT_MATMUL_TILE_64x512 = 22,
+ CUBLASLT_MATMUL_TILE_128x256 = 23,
+ CUBLASLT_MATMUL_TILE_256x128 = 24,
+ CUBLASLT_MATMUL_TILE_512x64 = 25,
+ CUBLASLT_MATMUL_TILE_64x96 = 26,
+ CUBLASLT_MATMUL_TILE_96x64 = 27,
+ CUBLASLT_MATMUL_TILE_96x128 = 28,
+ CUBLASLT_MATMUL_TILE_128x160 = 29,
+ CUBLASLT_MATMUL_TILE_160x128 = 30,
+ CUBLASLT_MATMUL_TILE_192x128 = 31,
+ CUBLASLT_MATMUL_TILE_128x192 = 32,
+ CUBLASLT_MATMUL_TILE_128x96 = 33,
+ CUBLASLT_MATMUL_TILE_32x256 = 34,
+ CUBLASLT_MATMUL_TILE_256x32 = 35,
+ CUBLASLT_MATMUL_TILE_8x128 = 36,
+ CUBLASLT_MATMUL_TILE_8x192 = 37,
+ CUBLASLT_MATMUL_TILE_8x256 = 38,
+ CUBLASLT_MATMUL_TILE_8x320 = 39,
+ CUBLASLT_MATMUL_TILE_8x384 = 40,
+ CUBLASLT_MATMUL_TILE_8x448 = 41,
+ CUBLASLT_MATMUL_TILE_8x512 = 42,
+ CUBLASLT_MATMUL_TILE_8x576 = 43,
+ CUBLASLT_MATMUL_TILE_8x640 = 44,
+ CUBLASLT_MATMUL_TILE_8x704 = 45,
+ CUBLASLT_MATMUL_TILE_8x768 = 46,
+ CUBLASLT_MATMUL_TILE_16x64 = 47,
+ CUBLASLT_MATMUL_TILE_16x128 = 48,
+ CUBLASLT_MATMUL_TILE_16x192 = 49,
+ CUBLASLT_MATMUL_TILE_16x256 = 50,
+ CUBLASLT_MATMUL_TILE_16x320 = 51,
+ CUBLASLT_MATMUL_TILE_16x384 = 52,
+ CUBLASLT_MATMUL_TILE_16x448 = 53,
+ CUBLASLT_MATMUL_TILE_16x512 = 54,
+ CUBLASLT_MATMUL_TILE_16x576 = 55,
+ CUBLASLT_MATMUL_TILE_16x640 = 56,
+ CUBLASLT_MATMUL_TILE_16x704 = 57,
+ CUBLASLT_MATMUL_TILE_16x768 = 58,
+ CUBLASLT_MATMUL_TILE_24x64 = 59,
+ CUBLASLT_MATMUL_TILE_24x128 = 60,
+ CUBLASLT_MATMUL_TILE_24x192 = 61,
+ CUBLASLT_MATMUL_TILE_24x256 = 62,
+ CUBLASLT_MATMUL_TILE_24x320 = 63,
+ CUBLASLT_MATMUL_TILE_24x384 = 64,
+ CUBLASLT_MATMUL_TILE_24x448 = 65,
+ CUBLASLT_MATMUL_TILE_24x512 = 66,
+ CUBLASLT_MATMUL_TILE_24x576 = 67,
+ CUBLASLT_MATMUL_TILE_24x640 = 68,
+ CUBLASLT_MATMUL_TILE_24x704 = 69,
+ CUBLASLT_MATMUL_TILE_24x768 = 70,
+ CUBLASLT_MATMUL_TILE_32x192 = 71,
+ CUBLASLT_MATMUL_TILE_32x320 = 72,
+ CUBLASLT_MATMUL_TILE_32x384 = 73,
+ CUBLASLT_MATMUL_TILE_32x448 = 74,
+ CUBLASLT_MATMUL_TILE_32x512 = 75,
+ CUBLASLT_MATMUL_TILE_32x576 = 76,
+ CUBLASLT_MATMUL_TILE_32x640 = 77,
+ CUBLASLT_MATMUL_TILE_32x704 = 78,
+ CUBLASLT_MATMUL_TILE_32x768 = 79,
+ CUBLASLT_MATMUL_TILE_40x64 = 80,
+ CUBLASLT_MATMUL_TILE_40x128 = 81,
+ CUBLASLT_MATMUL_TILE_40x192 = 82,
+ CUBLASLT_MATMUL_TILE_40x256 = 83,
+ CUBLASLT_MATMUL_TILE_40x320 = 84,
+ CUBLASLT_MATMUL_TILE_40x384 = 85,
+ CUBLASLT_MATMUL_TILE_40x448 = 86,
+ CUBLASLT_MATMUL_TILE_40x512 = 87,
+ CUBLASLT_MATMUL_TILE_40x576 = 88,
+ CUBLASLT_MATMUL_TILE_40x640 = 89,
+ CUBLASLT_MATMUL_TILE_40x704 = 90,
+ CUBLASLT_MATMUL_TILE_40x768 = 91,
+ CUBLASLT_MATMUL_TILE_48x64 = 92,
+ CUBLASLT_MATMUL_TILE_48x128 = 93,
+ CUBLASLT_MATMUL_TILE_48x192 = 94,
+ CUBLASLT_MATMUL_TILE_48x256 = 95,
+ CUBLASLT_MATMUL_TILE_48x320 = 96,
+ CUBLASLT_MATMUL_TILE_48x384 = 97,
+ CUBLASLT_MATMUL_TILE_48x448 = 98,
+ CUBLASLT_MATMUL_TILE_48x512 = 99,
+ CUBLASLT_MATMUL_TILE_48x576 = 100,
+ CUBLASLT_MATMUL_TILE_48x640 = 101,
+ CUBLASLT_MATMUL_TILE_48x704 = 102,
+ CUBLASLT_MATMUL_TILE_48x768 = 103,
+ CUBLASLT_MATMUL_TILE_56x64 = 104,
+ CUBLASLT_MATMUL_TILE_56x128 = 105,
+ CUBLASLT_MATMUL_TILE_56x192 = 106,
+ CUBLASLT_MATMUL_TILE_56x256 = 107,
+ CUBLASLT_MATMUL_TILE_56x320 = 108,
+ CUBLASLT_MATMUL_TILE_56x384 = 109,
+ CUBLASLT_MATMUL_TILE_56x448 = 110,
+ CUBLASLT_MATMUL_TILE_56x512 = 111,
+ CUBLASLT_MATMUL_TILE_56x576 = 112,
+ CUBLASLT_MATMUL_TILE_56x640 = 113,
+ CUBLASLT_MATMUL_TILE_56x704 = 114,
+ CUBLASLT_MATMUL_TILE_56x768 = 115,
+ CUBLASLT_MATMUL_TILE_64x192 = 116,
+ CUBLASLT_MATMUL_TILE_64x320 = 117,
+ CUBLASLT_MATMUL_TILE_64x384 = 118,
+ CUBLASLT_MATMUL_TILE_64x448 = 119,
+ CUBLASLT_MATMUL_TILE_64x576 = 120,
+ CUBLASLT_MATMUL_TILE_64x640 = 121,
+ CUBLASLT_MATMUL_TILE_64x704 = 122,
+ CUBLASLT_MATMUL_TILE_64x768 = 123,
+ CUBLASLT_MATMUL_TILE_72x64 = 124,
+ CUBLASLT_MATMUL_TILE_72x128 = 125,
+ CUBLASLT_MATMUL_TILE_72x192 = 126,
+ CUBLASLT_MATMUL_TILE_72x256 = 127,
+ CUBLASLT_MATMUL_TILE_72x320 = 128,
+ CUBLASLT_MATMUL_TILE_72x384 = 129,
+ CUBLASLT_MATMUL_TILE_72x448 = 130,
+ CUBLASLT_MATMUL_TILE_72x512 = 131,
+ CUBLASLT_MATMUL_TILE_72x576 = 132,
+ CUBLASLT_MATMUL_TILE_72x640 = 133,
+ CUBLASLT_MATMUL_TILE_80x64 = 134,
+ CUBLASLT_MATMUL_TILE_80x128 = 135,
+ CUBLASLT_MATMUL_TILE_80x192 = 136,
+ CUBLASLT_MATMUL_TILE_80x256 = 137,
+ CUBLASLT_MATMUL_TILE_80x320 = 138,
+ CUBLASLT_MATMUL_TILE_80x384 = 139,
+ CUBLASLT_MATMUL_TILE_80x448 = 140,
+ CUBLASLT_MATMUL_TILE_80x512 = 141,
+ CUBLASLT_MATMUL_TILE_80x576 = 142,
+ CUBLASLT_MATMUL_TILE_88x64 = 143,
+ CUBLASLT_MATMUL_TILE_88x128 = 144,
+ CUBLASLT_MATMUL_TILE_88x192 = 145,
+ CUBLASLT_MATMUL_TILE_88x256 = 146,
+ CUBLASLT_MATMUL_TILE_88x320 = 147,
+ CUBLASLT_MATMUL_TILE_88x384 = 148,
+ CUBLASLT_MATMUL_TILE_88x448 = 149,
+ CUBLASLT_MATMUL_TILE_88x512 = 150,
+ CUBLASLT_MATMUL_TILE_96x192 = 151,
+ CUBLASLT_MATMUL_TILE_96x256 = 152,
+ CUBLASLT_MATMUL_TILE_96x320 = 153,
+ CUBLASLT_MATMUL_TILE_96x384 = 154,
+ CUBLASLT_MATMUL_TILE_96x448 = 155,
+ CUBLASLT_MATMUL_TILE_96x512 = 156,
+ CUBLASLT_MATMUL_TILE_104x64 = 157,
+ CUBLASLT_MATMUL_TILE_104x128 = 158,
+ CUBLASLT_MATMUL_TILE_104x192 = 159,
+ CUBLASLT_MATMUL_TILE_104x256 = 160,
+ CUBLASLT_MATMUL_TILE_104x320 = 161,
+ CUBLASLT_MATMUL_TILE_104x384 = 162,
+ CUBLASLT_MATMUL_TILE_104x448 = 163,
+ CUBLASLT_MATMUL_TILE_112x64 = 164,
+ CUBLASLT_MATMUL_TILE_112x128 = 165,
+ CUBLASLT_MATMUL_TILE_112x192 = 166,
+ CUBLASLT_MATMUL_TILE_112x256 = 167,
+ CUBLASLT_MATMUL_TILE_112x320 = 168,
+ CUBLASLT_MATMUL_TILE_112x384 = 169,
+ CUBLASLT_MATMUL_TILE_120x64 = 170,
+ CUBLASLT_MATMUL_TILE_120x128 = 171,
+ CUBLASLT_MATMUL_TILE_120x192 = 172,
+ CUBLASLT_MATMUL_TILE_120x256 = 173,
+ CUBLASLT_MATMUL_TILE_120x320 = 174,
+ CUBLASLT_MATMUL_TILE_120x384 = 175,
+ CUBLASLT_MATMUL_TILE_128x320 = 176,
+ CUBLASLT_MATMUL_TILE_128x384 = 177,
+ CUBLASLT_MATMUL_TILE_136x64 = 178,
+ CUBLASLT_MATMUL_TILE_136x128 = 179,
+ CUBLASLT_MATMUL_TILE_136x192 = 180,
+ CUBLASLT_MATMUL_TILE_136x256 = 181,
+ CUBLASLT_MATMUL_TILE_136x320 = 182,
+ CUBLASLT_MATMUL_TILE_144x64 = 183,
+ CUBLASLT_MATMUL_TILE_144x128 = 184,
+ CUBLASLT_MATMUL_TILE_144x192 = 185,
+ CUBLASLT_MATMUL_TILE_144x256 = 186,
+ CUBLASLT_MATMUL_TILE_144x320 = 187,
+ CUBLASLT_MATMUL_TILE_152x64 = 188,
+ CUBLASLT_MATMUL_TILE_152x128 = 189,
+ CUBLASLT_MATMUL_TILE_152x192 = 190,
+ CUBLASLT_MATMUL_TILE_152x256 = 191,
+ CUBLASLT_MATMUL_TILE_152x320 = 192,
+ CUBLASLT_MATMUL_TILE_160x64 = 193,
+ CUBLASLT_MATMUL_TILE_160x192 = 194,
+ CUBLASLT_MATMUL_TILE_160x256 = 195,
+ CUBLASLT_MATMUL_TILE_168x64 = 196,
+ CUBLASLT_MATMUL_TILE_168x128 = 197,
+ CUBLASLT_MATMUL_TILE_168x192 = 198,
+ CUBLASLT_MATMUL_TILE_168x256 = 199,
+ CUBLASLT_MATMUL_TILE_176x64 = 200,
+ CUBLASLT_MATMUL_TILE_176x128 = 201,
+ CUBLASLT_MATMUL_TILE_176x192 = 202,
+ CUBLASLT_MATMUL_TILE_176x256 = 203,
+ CUBLASLT_MATMUL_TILE_184x64 = 204,
+ CUBLASLT_MATMUL_TILE_184x128 = 205,
+ CUBLASLT_MATMUL_TILE_184x192 = 206,
+ CUBLASLT_MATMUL_TILE_184x256 = 207,
+ CUBLASLT_MATMUL_TILE_192x64 = 208,
+ CUBLASLT_MATMUL_TILE_192x192 = 209,
+ CUBLASLT_MATMUL_TILE_192x256 = 210,
+ CUBLASLT_MATMUL_TILE_200x64 = 211,
+ CUBLASLT_MATMUL_TILE_200x128 = 212,
+ CUBLASLT_MATMUL_TILE_200x192 = 213,
+ CUBLASLT_MATMUL_TILE_208x64 = 214,
+ CUBLASLT_MATMUL_TILE_208x128 = 215,
+ CUBLASLT_MATMUL_TILE_208x192 = 216,
+ CUBLASLT_MATMUL_TILE_216x64 = 217,
+ CUBLASLT_MATMUL_TILE_216x128 = 218,
+ CUBLASLT_MATMUL_TILE_216x192 = 219,
+ CUBLASLT_MATMUL_TILE_224x64 = 220,
+ CUBLASLT_MATMUL_TILE_224x128 = 221,
+ CUBLASLT_MATMUL_TILE_224x192 = 222,
+ CUBLASLT_MATMUL_TILE_232x64 = 223,
+ CUBLASLT_MATMUL_TILE_232x128 = 224,
+ CUBLASLT_MATMUL_TILE_232x192 = 225,
+ CUBLASLT_MATMUL_TILE_240x64 = 226,
+ CUBLASLT_MATMUL_TILE_240x128 = 227,
+ CUBLASLT_MATMUL_TILE_240x192 = 228,
+ CUBLASLT_MATMUL_TILE_248x64 = 229,
+ CUBLASLT_MATMUL_TILE_248x128 = 230,
+ CUBLASLT_MATMUL_TILE_248x192 = 231,
+ CUBLASLT_MATMUL_TILE_256x192 = 232,
+ CUBLASLT_MATMUL_TILE_264x64 = 233,
+ CUBLASLT_MATMUL_TILE_264x128 = 234,
+ CUBLASLT_MATMUL_TILE_272x64 = 235,
+ CUBLASLT_MATMUL_TILE_272x128 = 236,
+ CUBLASLT_MATMUL_TILE_280x64 = 237,
+ CUBLASLT_MATMUL_TILE_280x128 = 238,
+ CUBLASLT_MATMUL_TILE_288x64 = 239,
+ CUBLASLT_MATMUL_TILE_288x128 = 240,
+ CUBLASLT_MATMUL_TILE_296x64 = 241,
+ CUBLASLT_MATMUL_TILE_296x128 = 242,
+ CUBLASLT_MATMUL_TILE_304x64 = 243,
+ CUBLASLT_MATMUL_TILE_304x128 = 244,
+ CUBLASLT_MATMUL_TILE_312x64 = 245,
+ CUBLASLT_MATMUL_TILE_312x128 = 246,
+ CUBLASLT_MATMUL_TILE_320x64 = 247,
+ CUBLASLT_MATMUL_TILE_320x128 = 248,
+ CUBLASLT_MATMUL_TILE_328x64 = 249,
+ CUBLASLT_MATMUL_TILE_328x128 = 250,
+ CUBLASLT_MATMUL_TILE_336x64 = 251,
+ CUBLASLT_MATMUL_TILE_336x128 = 252,
+ CUBLASLT_MATMUL_TILE_344x64 = 253,
+ CUBLASLT_MATMUL_TILE_344x128 = 254,
+ CUBLASLT_MATMUL_TILE_352x64 = 255,
+ CUBLASLT_MATMUL_TILE_352x128 = 256,
+ CUBLASLT_MATMUL_TILE_360x64 = 257,
+ CUBLASLT_MATMUL_TILE_360x128 = 258,
+ CUBLASLT_MATMUL_TILE_368x64 = 259,
+ CUBLASLT_MATMUL_TILE_368x128 = 260,
+ CUBLASLT_MATMUL_TILE_376x64 = 261,
+ CUBLASLT_MATMUL_TILE_376x128 = 262,
+ CUBLASLT_MATMUL_TILE_384x64 = 263,
+ CUBLASLT_MATMUL_TILE_384x128 = 264,
+ CUBLASLT_MATMUL_TILE_392x64 = 265,
+ CUBLASLT_MATMUL_TILE_400x64 = 266,
+ CUBLASLT_MATMUL_TILE_408x64 = 267,
+ CUBLASLT_MATMUL_TILE_416x64 = 268,
+ CUBLASLT_MATMUL_TILE_424x64 = 269,
+ CUBLASLT_MATMUL_TILE_432x64 = 270,
+ CUBLASLT_MATMUL_TILE_440x64 = 271,
+ CUBLASLT_MATMUL_TILE_448x64 = 272,
+ CUBLASLT_MATMUL_TILE_456x64 = 273,
+ CUBLASLT_MATMUL_TILE_464x64 = 274,
+ CUBLASLT_MATMUL_TILE_472x64 = 275,
+ CUBLASLT_MATMUL_TILE_480x64 = 276,
+ CUBLASLT_MATMUL_TILE_488x64 = 277,
+ CUBLASLT_MATMUL_TILE_496x64 = 278,
+ CUBLASLT_MATMUL_TILE_504x64 = 279,
+ CUBLASLT_MATMUL_TILE_520x64 = 280,
+ CUBLASLT_MATMUL_TILE_528x64 = 281,
+ CUBLASLT_MATMUL_TILE_536x64 = 282,
+ CUBLASLT_MATMUL_TILE_544x64 = 283,
+ CUBLASLT_MATMUL_TILE_552x64 = 284,
+ CUBLASLT_MATMUL_TILE_560x64 = 285,
+ CUBLASLT_MATMUL_TILE_568x64 = 286,
+ CUBLASLT_MATMUL_TILE_576x64 = 287,
+ CUBLASLT_MATMUL_TILE_584x64 = 288,
+ CUBLASLT_MATMUL_TILE_592x64 = 289,
+ CUBLASLT_MATMUL_TILE_600x64 = 290,
+ CUBLASLT_MATMUL_TILE_608x64 = 291,
+ CUBLASLT_MATMUL_TILE_616x64 = 292,
+ CUBLASLT_MATMUL_TILE_624x64 = 293,
+ CUBLASLT_MATMUL_TILE_632x64 = 294,
+ CUBLASLT_MATMUL_TILE_640x64 = 295,
+ CUBLASLT_MATMUL_TILE_648x64 = 296,
+ CUBLASLT_MATMUL_TILE_656x64 = 297,
+ CUBLASLT_MATMUL_TILE_664x64 = 298,
+ CUBLASLT_MATMUL_TILE_672x64 = 299,
+ CUBLASLT_MATMUL_TILE_680x64 = 300,
+ CUBLASLT_MATMUL_TILE_688x64 = 301,
+ CUBLASLT_MATMUL_TILE_696x64 = 302,
+ CUBLASLT_MATMUL_TILE_704x64 = 303,
+ CUBLASLT_MATMUL_TILE_712x64 = 304,
+ CUBLASLT_MATMUL_TILE_720x64 = 305,
+ CUBLASLT_MATMUL_TILE_728x64 = 306,
+ CUBLASLT_MATMUL_TILE_736x64 = 307,
+ CUBLASLT_MATMUL_TILE_744x64 = 308,
+ CUBLASLT_MATMUL_TILE_752x64 = 309,
+ CUBLASLT_MATMUL_TILE_760x64 = 310,
+ CUBLASLT_MATMUL_TILE_768x64 = 311,
+ CUBLASLT_MATMUL_TILE_64x16 = 312,
+ CUBLASLT_MATMUL_TILE_64x24 = 313,
+ CUBLASLT_MATMUL_TILE_64x40 = 314,
+ CUBLASLT_MATMUL_TILE_64x48 = 315,
+ CUBLASLT_MATMUL_TILE_64x56 = 316,
+ CUBLASLT_MATMUL_TILE_64x72 = 317,
+ CUBLASLT_MATMUL_TILE_64x80 = 318,
+ CUBLASLT_MATMUL_TILE_64x88 = 319,
+ CUBLASLT_MATMUL_TILE_64x104 = 320,
+ CUBLASLT_MATMUL_TILE_64x112 = 321,
+ CUBLASLT_MATMUL_TILE_64x120 = 322,
+ CUBLASLT_MATMUL_TILE_64x136 = 323,
+ CUBLASLT_MATMUL_TILE_64x144 = 324,
+ CUBLASLT_MATMUL_TILE_64x152 = 325,
+ CUBLASLT_MATMUL_TILE_64x160 = 326,
+ CUBLASLT_MATMUL_TILE_64x168 = 327,
+ CUBLASLT_MATMUL_TILE_64x176 = 328,
+ CUBLASLT_MATMUL_TILE_64x184 = 329,
+ CUBLASLT_MATMUL_TILE_64x200 = 330,
+ CUBLASLT_MATMUL_TILE_64x208 = 331,
+ CUBLASLT_MATMUL_TILE_64x216 = 332,
+ CUBLASLT_MATMUL_TILE_64x224 = 333,
+ CUBLASLT_MATMUL_TILE_64x232 = 334,
+ CUBLASLT_MATMUL_TILE_64x240 = 335,
+ CUBLASLT_MATMUL_TILE_64x248 = 336,
+ CUBLASLT_MATMUL_TILE_64x264 = 337,
+ CUBLASLT_MATMUL_TILE_64x272 = 338,
+ CUBLASLT_MATMUL_TILE_64x280 = 339,
+ CUBLASLT_MATMUL_TILE_64x288 = 340,
+ CUBLASLT_MATMUL_TILE_64x296 = 341,
+ CUBLASLT_MATMUL_TILE_64x304 = 342,
+ CUBLASLT_MATMUL_TILE_64x312 = 343,
+ CUBLASLT_MATMUL_TILE_64x328 = 344,
+ CUBLASLT_MATMUL_TILE_64x336 = 345,
+ CUBLASLT_MATMUL_TILE_64x344 = 346,
+ CUBLASLT_MATMUL_TILE_64x352 = 347,
+ CUBLASLT_MATMUL_TILE_64x360 = 348,
+ CUBLASLT_MATMUL_TILE_64x368 = 349,
+ CUBLASLT_MATMUL_TILE_64x376 = 350,
+ CUBLASLT_MATMUL_TILE_64x392 = 351,
+ CUBLASLT_MATMUL_TILE_64x400 = 352,
+ CUBLASLT_MATMUL_TILE_64x408 = 353,
+ CUBLASLT_MATMUL_TILE_64x416 = 354,
+ CUBLASLT_MATMUL_TILE_64x424 = 355,
+ CUBLASLT_MATMUL_TILE_64x432 = 356,
+ CUBLASLT_MATMUL_TILE_64x440 = 357,
+ CUBLASLT_MATMUL_TILE_64x456 = 358,
+ CUBLASLT_MATMUL_TILE_64x464 = 359,
+ CUBLASLT_MATMUL_TILE_64x472 = 360,
+ CUBLASLT_MATMUL_TILE_64x480 = 361,
+ CUBLASLT_MATMUL_TILE_64x488 = 362,
+ CUBLASLT_MATMUL_TILE_64x496 = 363,
+ CUBLASLT_MATMUL_TILE_64x504 = 364,
+ CUBLASLT_MATMUL_TILE_64x520 = 365,
+ CUBLASLT_MATMUL_TILE_64x528 = 366,
+ CUBLASLT_MATMUL_TILE_64x536 = 367,
+ CUBLASLT_MATMUL_TILE_64x544 = 368,
+ CUBLASLT_MATMUL_TILE_64x552 = 369,
+ CUBLASLT_MATMUL_TILE_64x560 = 370,
+ CUBLASLT_MATMUL_TILE_64x568 = 371,
+ CUBLASLT_MATMUL_TILE_64x584 = 372,
+ CUBLASLT_MATMUL_TILE_64x592 = 373,
+ CUBLASLT_MATMUL_TILE_64x600 = 374,
+ CUBLASLT_MATMUL_TILE_64x608 = 375,
+ CUBLASLT_MATMUL_TILE_64x616 = 376,
+ CUBLASLT_MATMUL_TILE_64x624 = 377,
+ CUBLASLT_MATMUL_TILE_64x632 = 378,
+ CUBLASLT_MATMUL_TILE_64x648 = 379,
+ CUBLASLT_MATMUL_TILE_64x656 = 380,
+ CUBLASLT_MATMUL_TILE_64x664 = 381,
+ CUBLASLT_MATMUL_TILE_64x672 = 382,
+ CUBLASLT_MATMUL_TILE_64x680 = 383,
+ CUBLASLT_MATMUL_TILE_64x688 = 384,
+ CUBLASLT_MATMUL_TILE_64x696 = 385,
+ CUBLASLT_MATMUL_TILE_64x712 = 386,
+ CUBLASLT_MATMUL_TILE_64x720 = 387,
+ CUBLASLT_MATMUL_TILE_64x728 = 388,
+ CUBLASLT_MATMUL_TILE_64x736 = 389,
+ CUBLASLT_MATMUL_TILE_64x744 = 390,
+ CUBLASLT_MATMUL_TILE_64x752 = 391,
+ CUBLASLT_MATMUL_TILE_64x760 = 392,
+ CUBLASLT_MATMUL_TILE_128x8 = 393,
+ CUBLASLT_MATMUL_TILE_128x16 = 394,
+ CUBLASLT_MATMUL_TILE_128x24 = 395,
+ CUBLASLT_MATMUL_TILE_128x40 = 396,
+ CUBLASLT_MATMUL_TILE_128x48 = 397,
+ CUBLASLT_MATMUL_TILE_128x56 = 398,
+ CUBLASLT_MATMUL_TILE_128x72 = 399,
+ CUBLASLT_MATMUL_TILE_128x80 = 400,
+ CUBLASLT_MATMUL_TILE_128x88 = 401,
+ CUBLASLT_MATMUL_TILE_128x104 = 402,
+ CUBLASLT_MATMUL_TILE_128x112 = 403,
+ CUBLASLT_MATMUL_TILE_128x120 = 404,
+ CUBLASLT_MATMUL_TILE_128x136 = 405,
+ CUBLASLT_MATMUL_TILE_128x144 = 406,
+ CUBLASLT_MATMUL_TILE_128x152 = 407,
+ CUBLASLT_MATMUL_TILE_128x168 = 408,
+ CUBLASLT_MATMUL_TILE_128x176 = 409,
+ CUBLASLT_MATMUL_TILE_128x184 = 410,
+ CUBLASLT_MATMUL_TILE_128x200 = 411,
+ CUBLASLT_MATMUL_TILE_128x208 = 412,
+ CUBLASLT_MATMUL_TILE_128x216 = 413,
+ CUBLASLT_MATMUL_TILE_128x224 = 414,
+ CUBLASLT_MATMUL_TILE_128x232 = 415,
+ CUBLASLT_MATMUL_TILE_128x240 = 416,
+ CUBLASLT_MATMUL_TILE_128x248 = 417,
+ CUBLASLT_MATMUL_TILE_128x264 = 418,
+ CUBLASLT_MATMUL_TILE_128x272 = 419,
+ CUBLASLT_MATMUL_TILE_128x280 = 420,
+ CUBLASLT_MATMUL_TILE_128x288 = 421,
+ CUBLASLT_MATMUL_TILE_128x296 = 422,
+ CUBLASLT_MATMUL_TILE_128x304 = 423,
+ CUBLASLT_MATMUL_TILE_128x312 = 424,
+ CUBLASLT_MATMUL_TILE_128x328 = 425,
+ CUBLASLT_MATMUL_TILE_128x336 = 426,
+ CUBLASLT_MATMUL_TILE_128x344 = 427,
+ CUBLASLT_MATMUL_TILE_128x352 = 428,
+ CUBLASLT_MATMUL_TILE_128x360 = 429,
+ CUBLASLT_MATMUL_TILE_128x368 = 430,
+ CUBLASLT_MATMUL_TILE_128x376 = 431,
+ CUBLASLT_MATMUL_TILE_128x392 = 432,
+ CUBLASLT_MATMUL_TILE_128x400 = 433,
+ CUBLASLT_MATMUL_TILE_128x408 = 434,
+ CUBLASLT_MATMUL_TILE_128x416 = 435,
+ CUBLASLT_MATMUL_TILE_128x424 = 436,
+ CUBLASLT_MATMUL_TILE_128x432 = 437,
+ CUBLASLT_MATMUL_TILE_128x440 = 438,
+ CUBLASLT_MATMUL_TILE_128x448 = 439,
+ CUBLASLT_MATMUL_TILE_128x456 = 440,
+ CUBLASLT_MATMUL_TILE_128x464 = 441,
+ CUBLASLT_MATMUL_TILE_128x472 = 442,
+ CUBLASLT_MATMUL_TILE_128x480 = 443,
+ CUBLASLT_MATMUL_TILE_128x488 = 444,
+ CUBLASLT_MATMUL_TILE_128x496 = 445,
+ CUBLASLT_MATMUL_TILE_128x504 = 446,
+ CUBLASLT_MATMUL_TILE_128x512 = 447,
+ CUBLASLT_MATMUL_TILE_192x8 = 448,
+ CUBLASLT_MATMUL_TILE_192x16 = 449,
+ CUBLASLT_MATMUL_TILE_192x24 = 450,
+ CUBLASLT_MATMUL_TILE_192x32 = 451,
+ CUBLASLT_MATMUL_TILE_192x40 = 452,
+ CUBLASLT_MATMUL_TILE_192x48 = 453,
+ CUBLASLT_MATMUL_TILE_192x56 = 454,
+ CUBLASLT_MATMUL_TILE_192x72 = 455,
+ CUBLASLT_MATMUL_TILE_192x80 = 456,
+ CUBLASLT_MATMUL_TILE_192x88 = 457,
+ CUBLASLT_MATMUL_TILE_192x96 = 458,
+ CUBLASLT_MATMUL_TILE_192x104 = 459,
+ CUBLASLT_MATMUL_TILE_192x112 = 460,
+ CUBLASLT_MATMUL_TILE_192x120 = 461,
+ CUBLASLT_MATMUL_TILE_192x136 = 462,
+ CUBLASLT_MATMUL_TILE_192x144 = 463,
+ CUBLASLT_MATMUL_TILE_192x152 = 464,
+ CUBLASLT_MATMUL_TILE_192x160 = 465,
+ CUBLASLT_MATMUL_TILE_192x168 = 466,
+ CUBLASLT_MATMUL_TILE_192x176 = 467,
+ CUBLASLT_MATMUL_TILE_192x184 = 468,
+ CUBLASLT_MATMUL_TILE_192x200 = 469,
+ CUBLASLT_MATMUL_TILE_192x208 = 470,
+ CUBLASLT_MATMUL_TILE_192x216 = 471,
+ CUBLASLT_MATMUL_TILE_192x224 = 472,
+ CUBLASLT_MATMUL_TILE_192x232 = 473,
+ CUBLASLT_MATMUL_TILE_192x240 = 474,
+ CUBLASLT_MATMUL_TILE_192x248 = 475,
+ CUBLASLT_MATMUL_TILE_192x264 = 476,
+ CUBLASLT_MATMUL_TILE_192x272 = 477,
+ CUBLASLT_MATMUL_TILE_192x280 = 478,
+ CUBLASLT_MATMUL_TILE_192x288 = 479,
+ CUBLASLT_MATMUL_TILE_192x296 = 480,
+ CUBLASLT_MATMUL_TILE_192x304 = 481,
+ CUBLASLT_MATMUL_TILE_192x312 = 482,
+ CUBLASLT_MATMUL_TILE_192x320 = 483,
+ CUBLASLT_MATMUL_TILE_192x328 = 484,
+ CUBLASLT_MATMUL_TILE_192x336 = 485,
+ CUBLASLT_MATMUL_TILE_256x8 = 486,
+ CUBLASLT_MATMUL_TILE_256x16 = 487,
+ CUBLASLT_MATMUL_TILE_256x24 = 488,
+ CUBLASLT_MATMUL_TILE_256x40 = 489,
+ CUBLASLT_MATMUL_TILE_256x48 = 490,
+ CUBLASLT_MATMUL_TILE_256x56 = 491,
+ CUBLASLT_MATMUL_TILE_256x72 = 492,
+ CUBLASLT_MATMUL_TILE_256x80 = 493,
+ CUBLASLT_MATMUL_TILE_256x88 = 494,
+ CUBLASLT_MATMUL_TILE_256x96 = 495,
+ CUBLASLT_MATMUL_TILE_256x104 = 496,
+ CUBLASLT_MATMUL_TILE_256x112 = 497,
+ CUBLASLT_MATMUL_TILE_256x120 = 498,
+ CUBLASLT_MATMUL_TILE_256x136 = 499,
+ CUBLASLT_MATMUL_TILE_256x144 = 500,
+ CUBLASLT_MATMUL_TILE_256x152 = 501,
+ CUBLASLT_MATMUL_TILE_256x160 = 502,
+ CUBLASLT_MATMUL_TILE_256x168 = 503,
+ CUBLASLT_MATMUL_TILE_256x176 = 504,
+ CUBLASLT_MATMUL_TILE_256x184 = 505,
+ CUBLASLT_MATMUL_TILE_256x200 = 506,
+ CUBLASLT_MATMUL_TILE_256x208 = 507,
+ CUBLASLT_MATMUL_TILE_256x216 = 508,
+ CUBLASLT_MATMUL_TILE_256x224 = 509,
+ CUBLASLT_MATMUL_TILE_256x232 = 510,
+ CUBLASLT_MATMUL_TILE_256x240 = 511,
+ CUBLASLT_MATMUL_TILE_256x248 = 512,
+ CUBLASLT_MATMUL_TILE_256x256 = 513,
+ CUBLASLT_MATMUL_TILE_320x8 = 514,
+ CUBLASLT_MATMUL_TILE_320x16 = 515,
+ CUBLASLT_MATMUL_TILE_320x24 = 516,
+ CUBLASLT_MATMUL_TILE_320x32 = 517,
+ CUBLASLT_MATMUL_TILE_320x40 = 518,
+ CUBLASLT_MATMUL_TILE_320x48 = 519,
+ CUBLASLT_MATMUL_TILE_320x56 = 520,
+ CUBLASLT_MATMUL_TILE_320x72 = 521,
+ CUBLASLT_MATMUL_TILE_320x80 = 522,
+ CUBLASLT_MATMUL_TILE_320x88 = 523,
+ CUBLASLT_MATMUL_TILE_320x96 = 524,
+ CUBLASLT_MATMUL_TILE_320x104 = 525,
+ CUBLASLT_MATMUL_TILE_320x112 = 526,
+ CUBLASLT_MATMUL_TILE_320x120 = 527,
+ CUBLASLT_MATMUL_TILE_320x136 = 528,
+ CUBLASLT_MATMUL_TILE_320x144 = 529,
+ CUBLASLT_MATMUL_TILE_320x152 = 530,
+ CUBLASLT_MATMUL_TILE_320x160 = 531,
+ CUBLASLT_MATMUL_TILE_320x168 = 532,
+ CUBLASLT_MATMUL_TILE_320x176 = 533,
+ CUBLASLT_MATMUL_TILE_320x184 = 534,
+ CUBLASLT_MATMUL_TILE_320x192 = 535,
+ CUBLASLT_MATMUL_TILE_320x200 = 536,
+ CUBLASLT_MATMUL_TILE_384x8 = 537,
+ CUBLASLT_MATMUL_TILE_384x16 = 538,
+ CUBLASLT_MATMUL_TILE_384x24 = 539,
+ CUBLASLT_MATMUL_TILE_384x32 = 540,
+ CUBLASLT_MATMUL_TILE_384x40 = 541,
+ CUBLASLT_MATMUL_TILE_384x48 = 542,
+ CUBLASLT_MATMUL_TILE_384x56 = 543,
+ CUBLASLT_MATMUL_TILE_384x72 = 544,
+ CUBLASLT_MATMUL_TILE_384x80 = 545,
+ CUBLASLT_MATMUL_TILE_384x88 = 546,
+ CUBLASLT_MATMUL_TILE_384x96 = 547,
+ CUBLASLT_MATMUL_TILE_384x104 = 548,
+ CUBLASLT_MATMUL_TILE_384x112 = 549,
+ CUBLASLT_MATMUL_TILE_384x120 = 550,
+ CUBLASLT_MATMUL_TILE_384x136 = 551,
+ CUBLASLT_MATMUL_TILE_384x144 = 552,
+ CUBLASLT_MATMUL_TILE_384x152 = 553,
+ CUBLASLT_MATMUL_TILE_384x160 = 554,
+ CUBLASLT_MATMUL_TILE_384x168 = 555,
+ CUBLASLT_MATMUL_TILE_448x8 = 556,
+ CUBLASLT_MATMUL_TILE_448x16 = 557,
+ CUBLASLT_MATMUL_TILE_448x24 = 558,
+ CUBLASLT_MATMUL_TILE_448x32 = 559,
+ CUBLASLT_MATMUL_TILE_448x40 = 560,
+ CUBLASLT_MATMUL_TILE_448x48 = 561,
+ CUBLASLT_MATMUL_TILE_448x56 = 562,
+ CUBLASLT_MATMUL_TILE_448x72 = 563,
+ CUBLASLT_MATMUL_TILE_448x80 = 564,
+ CUBLASLT_MATMUL_TILE_448x88 = 565,
+ CUBLASLT_MATMUL_TILE_448x96 = 566,
+ CUBLASLT_MATMUL_TILE_448x104 = 567,
+ CUBLASLT_MATMUL_TILE_448x112 = 568,
+ CUBLASLT_MATMUL_TILE_448x120 = 569,
+ CUBLASLT_MATMUL_TILE_448x128 = 570,
+ CUBLASLT_MATMUL_TILE_448x136 = 571,
+ CUBLASLT_MATMUL_TILE_448x144 = 572,
+ CUBLASLT_MATMUL_TILE_512x8 = 573,
+ CUBLASLT_MATMUL_TILE_512x16 = 574,
+ CUBLASLT_MATMUL_TILE_512x24 = 575,
+ CUBLASLT_MATMUL_TILE_512x32 = 576,
+ CUBLASLT_MATMUL_TILE_512x40 = 577,
+ CUBLASLT_MATMUL_TILE_512x48 = 578,
+ CUBLASLT_MATMUL_TILE_512x56 = 579,
+ CUBLASLT_MATMUL_TILE_512x72 = 580,
+ CUBLASLT_MATMUL_TILE_512x80 = 581,
+ CUBLASLT_MATMUL_TILE_512x88 = 582,
+ CUBLASLT_MATMUL_TILE_512x96 = 583,
+ CUBLASLT_MATMUL_TILE_512x104 = 584,
+ CUBLASLT_MATMUL_TILE_512x112 = 585,
+ CUBLASLT_MATMUL_TILE_512x120 = 586,
+ CUBLASLT_MATMUL_TILE_512x128 = 587,
+ CUBLASLT_MATMUL_TILE_576x8 = 588,
+ CUBLASLT_MATMUL_TILE_576x16 = 589,
+ CUBLASLT_MATMUL_TILE_576x24 = 590,
+ CUBLASLT_MATMUL_TILE_576x32 = 591,
+ CUBLASLT_MATMUL_TILE_576x40 = 592,
+ CUBLASLT_MATMUL_TILE_576x48 = 593,
+ CUBLASLT_MATMUL_TILE_576x56 = 594,
+ CUBLASLT_MATMUL_TILE_576x72 = 595,
+ CUBLASLT_MATMUL_TILE_576x80 = 596,
+ CUBLASLT_MATMUL_TILE_576x88 = 597,
+ CUBLASLT_MATMUL_TILE_576x96 = 598,
+ CUBLASLT_MATMUL_TILE_576x104 = 599,
+ CUBLASLT_MATMUL_TILE_576x112 = 600,
+ CUBLASLT_MATMUL_TILE_640x8 = 601,
+ CUBLASLT_MATMUL_TILE_640x16 = 602,
+ CUBLASLT_MATMUL_TILE_640x24 = 603,
+ CUBLASLT_MATMUL_TILE_640x32 = 604,
+ CUBLASLT_MATMUL_TILE_640x40 = 605,
+ CUBLASLT_MATMUL_TILE_640x48 = 606,
+ CUBLASLT_MATMUL_TILE_640x56 = 607,
+ CUBLASLT_MATMUL_TILE_640x72 = 608,
+ CUBLASLT_MATMUL_TILE_640x80 = 609,
+ CUBLASLT_MATMUL_TILE_640x88 = 610,
+ CUBLASLT_MATMUL_TILE_640x96 = 611,
+ CUBLASLT_MATMUL_TILE_704x8 = 612,
+ CUBLASLT_MATMUL_TILE_704x16 = 613,
+ CUBLASLT_MATMUL_TILE_704x24 = 614,
+ CUBLASLT_MATMUL_TILE_704x32 = 615,
+ CUBLASLT_MATMUL_TILE_704x40 = 616,
+ CUBLASLT_MATMUL_TILE_704x48 = 617,
+ CUBLASLT_MATMUL_TILE_704x56 = 618,
+ CUBLASLT_MATMUL_TILE_704x72 = 619,
+ CUBLASLT_MATMUL_TILE_704x80 = 620,
+ CUBLASLT_MATMUL_TILE_704x88 = 621,
+ CUBLASLT_MATMUL_TILE_768x8 = 622,
+ CUBLASLT_MATMUL_TILE_768x16 = 623,
+ CUBLASLT_MATMUL_TILE_768x24 = 624,
+ CUBLASLT_MATMUL_TILE_768x32 = 625,
+ CUBLASLT_MATMUL_TILE_768x40 = 626,
+ CUBLASLT_MATMUL_TILE_768x48 = 627,
+ CUBLASLT_MATMUL_TILE_768x56 = 628,
+ CUBLASLT_MATMUL_TILE_768x72 = 629,
+ CUBLASLT_MATMUL_TILE_768x80 = 630,
+ CUBLASLT_MATMUL_TILE_256x512 = 631,
+ CUBLASLT_MATMUL_TILE_256x1024 = 632,
+ CUBLASLT_MATMUL_TILE_512x512 = 633,
+ CUBLASLT_MATMUL_TILE_512x1024 = 634,
+ CUBLASLT_MATMUL_TILE_END
+} cublasLtMatmulTile_t;
+
+/** Size and number of stages in which elements are read into shared memory
+ *
+ * General order of stages IDs is sorted by stage size first and by number of stages second.
+ */
+typedef enum {
+ CUBLASLT_MATMUL_STAGES_UNDEFINED = 0,
+ CUBLASLT_MATMUL_STAGES_16x1 = 1,
+ CUBLASLT_MATMUL_STAGES_16x2 = 2,
+ CUBLASLT_MATMUL_STAGES_16x3 = 3,
+ CUBLASLT_MATMUL_STAGES_16x4 = 4,
+ CUBLASLT_MATMUL_STAGES_16x5 = 5,
+ CUBLASLT_MATMUL_STAGES_16x6 = 6,
+ CUBLASLT_MATMUL_STAGES_32x1 = 7,
+ CUBLASLT_MATMUL_STAGES_32x2 = 8,
+ CUBLASLT_MATMUL_STAGES_32x3 = 9,
+ CUBLASLT_MATMUL_STAGES_32x4 = 10,
+ CUBLASLT_MATMUL_STAGES_32x5 = 11,
+ CUBLASLT_MATMUL_STAGES_32x6 = 12,
+ CUBLASLT_MATMUL_STAGES_64x1 = 13,
+ CUBLASLT_MATMUL_STAGES_64x2 = 14,
+ CUBLASLT_MATMUL_STAGES_64x3 = 15,
+ CUBLASLT_MATMUL_STAGES_64x4 = 16,
+ CUBLASLT_MATMUL_STAGES_64x5 = 17,
+ CUBLASLT_MATMUL_STAGES_64x6 = 18,
+ CUBLASLT_MATMUL_STAGES_128x1 = 19,
+ CUBLASLT_MATMUL_STAGES_128x2 = 20,
+ CUBLASLT_MATMUL_STAGES_128x3 = 21,
+ CUBLASLT_MATMUL_STAGES_128x4 = 22,
+ CUBLASLT_MATMUL_STAGES_128x5 = 23,
+ CUBLASLT_MATMUL_STAGES_128x6 = 24,
+ CUBLASLT_MATMUL_STAGES_32x10 = 25,
+ CUBLASLT_MATMUL_STAGES_8x4 = 26,
+ CUBLASLT_MATMUL_STAGES_16x10 = 27,
+ CUBLASLT_MATMUL_STAGES_8x5 = 28,
+ CUBLASLT_MATMUL_STAGES_8x3 = 31,
+ CUBLASLT_MATMUL_STAGES_8xAUTO = 32,
+ CUBLASLT_MATMUL_STAGES_16xAUTO = 33,
+ CUBLASLT_MATMUL_STAGES_32xAUTO = 34,
+ CUBLASLT_MATMUL_STAGES_64xAUTO = 35,
+ CUBLASLT_MATMUL_STAGES_128xAUTO = 36,
+ CUBLASLT_MATMUL_STAGES_256xAUTO = 37,
+ CUBLASLT_MATMUL_STAGES_END
+} cublasLtMatmulStages_t;
+
+/** Thread Block Cluster size
+ *
+ * Typically dimensioned similar to cublasLtMatmulTile_t, with the third coordinate unused at this time.
+ */
+typedef enum {
+ /** Let library pick cluster shape automatically */
+ CUBLASLT_CLUSTER_SHAPE_AUTO = 0,
+ CUBLASLT_CLUSTER_SHAPE_1x1x1 = 2,
+ CUBLASLT_CLUSTER_SHAPE_2x1x1 = 3,
+ CUBLASLT_CLUSTER_SHAPE_4x1x1 = 4,
+ CUBLASLT_CLUSTER_SHAPE_1x2x1 = 5,
+ CUBLASLT_CLUSTER_SHAPE_2x2x1 = 6,
+ CUBLASLT_CLUSTER_SHAPE_4x2x1 = 7,
+ CUBLASLT_CLUSTER_SHAPE_1x4x1 = 8,
+ CUBLASLT_CLUSTER_SHAPE_2x4x1 = 9,
+ CUBLASLT_CLUSTER_SHAPE_4x4x1 = 10,
+ CUBLASLT_CLUSTER_SHAPE_8x1x1 = 11,
+ CUBLASLT_CLUSTER_SHAPE_1x8x1 = 12,
+ CUBLASLT_CLUSTER_SHAPE_8x2x1 = 13,
+ CUBLASLT_CLUSTER_SHAPE_2x8x1 = 14,
+ CUBLASLT_CLUSTER_SHAPE_16x1x1 = 15,
+ CUBLASLT_CLUSTER_SHAPE_1x16x1 = 16,
+ CUBLASLT_CLUSTER_SHAPE_3x1x1 = 17,
+ CUBLASLT_CLUSTER_SHAPE_5x1x1 = 18,
+ CUBLASLT_CLUSTER_SHAPE_6x1x1 = 19,
+ CUBLASLT_CLUSTER_SHAPE_7x1x1 = 20,
+ CUBLASLT_CLUSTER_SHAPE_9x1x1 = 21,
+ CUBLASLT_CLUSTER_SHAPE_10x1x1 = 22,
+ CUBLASLT_CLUSTER_SHAPE_11x1x1 = 23,
+ CUBLASLT_CLUSTER_SHAPE_12x1x1 = 24,
+ CUBLASLT_CLUSTER_SHAPE_13x1x1 = 25,
+ CUBLASLT_CLUSTER_SHAPE_14x1x1 = 26,
+ CUBLASLT_CLUSTER_SHAPE_15x1x1 = 27,
+ CUBLASLT_CLUSTER_SHAPE_3x2x1 = 28,
+ CUBLASLT_CLUSTER_SHAPE_5x2x1 = 29,
+ CUBLASLT_CLUSTER_SHAPE_6x2x1 = 30,
+ CUBLASLT_CLUSTER_SHAPE_7x2x1 = 31,
+ CUBLASLT_CLUSTER_SHAPE_1x3x1 = 32,
+ CUBLASLT_CLUSTER_SHAPE_2x3x1 = 33,
+ CUBLASLT_CLUSTER_SHAPE_3x3x1 = 34,
+ CUBLASLT_CLUSTER_SHAPE_4x3x1 = 35,
+ CUBLASLT_CLUSTER_SHAPE_5x3x1 = 36,
+ CUBLASLT_CLUSTER_SHAPE_3x4x1 = 37,
+ CUBLASLT_CLUSTER_SHAPE_1x5x1 = 38,
+ CUBLASLT_CLUSTER_SHAPE_2x5x1 = 39,
+ CUBLASLT_CLUSTER_SHAPE_3x5x1 = 40,
+ CUBLASLT_CLUSTER_SHAPE_1x6x1 = 41,
+ CUBLASLT_CLUSTER_SHAPE_2x6x1 = 42,
+ CUBLASLT_CLUSTER_SHAPE_1x7x1 = 43,
+ CUBLASLT_CLUSTER_SHAPE_2x7x1 = 44,
+ CUBLASLT_CLUSTER_SHAPE_1x9x1 = 45,
+ CUBLASLT_CLUSTER_SHAPE_1x10x1 = 46,
+ CUBLASLT_CLUSTER_SHAPE_1x11x1 = 47,
+ CUBLASLT_CLUSTER_SHAPE_1x12x1 = 48,
+ CUBLASLT_CLUSTER_SHAPE_1x13x1 = 49,
+ CUBLASLT_CLUSTER_SHAPE_1x14x1 = 50,
+ CUBLASLT_CLUSTER_SHAPE_1x15x1 = 51,
+ CUBLASLT_CLUSTER_SHAPE_END
+} cublasLtClusterShape_t;
+
+/** Inner size of the kernel
+ *
+ * Represents various aspects of internal kernel design, that don't impact CUDA grid size but may have other more subtle
+ * effects.
+ *
+ */
+typedef enum {
+ CUBLASLT_MATMUL_INNER_SHAPE_UNDEFINED = 0,
+ CUBLASLT_MATMUL_INNER_SHAPE_MMA884 = 1,
+ CUBLASLT_MATMUL_INNER_SHAPE_MMA1684 = 2,
+ CUBLASLT_MATMUL_INNER_SHAPE_MMA1688 = 3,
+ CUBLASLT_MATMUL_INNER_SHAPE_MMA16816 = 4,
+ CUBLASLT_MATMUL_INNER_SHAPE_END
+} cublasLtMatmulInnerShape_t;
+
+/** Scaling mode for per-matrix scaling */
+typedef enum {
+ /** Scaling factors are single precision scalars applied to the whole tensor */
+ CUBLASLT_MATMUL_MATRIX_SCALE_SCALAR_32F = 0,
+ /** Scaling factors are tensors that contain a dedicated scaling factor stored as an 8-bit CUDA_R_8F_UE4M3 value for
+ each 16-element block in the innermost dimension of the corresponding data tensor */
+ CUBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3 = 1,
+ /** Same as above, except that scaling factor tensor elements have type CUDA_R_8F_UE8M0 and the block size is 32
+ elements*/
+ CUBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0 = 2,
+ CUBLASLT_MATMUL_MATRIX_SCALE_END
+} cublasLtMatmulMatrixScale_t;
+
+/** Pointer mode to use for alpha/beta */
+typedef enum {
+ /** matches CUBLAS_POINTER_MODE_HOST, pointer targets a single value host memory */
+ CUBLASLT_POINTER_MODE_HOST = CUBLAS_POINTER_MODE_HOST,
+ /** matches CUBLAS_POINTER_MODE_DEVICE, pointer targets a single value device memory */
+ CUBLASLT_POINTER_MODE_DEVICE = CUBLAS_POINTER_MODE_DEVICE,
+ /** pointer targets an array in device memory */
+ CUBLASLT_POINTER_MODE_DEVICE_VECTOR = 2,
+ /** alpha pointer targets an array in device memory, beta is zero. Note:
+ CUBLASLT_MATMUL_DESC_ALPHA_VECTOR_BATCH_STRIDE is not supported, must be 0. */
+ CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_ZERO = 3,
+ /** alpha pointer targets an array in device memory, beta is a single value in host memory. */
+ CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_HOST = 4,
+} cublasLtPointerMode_t;
+
+/** Mask to define pointer mode capability */
+typedef enum {
+ /** see CUBLASLT_POINTER_MODE_HOST */
+ CUBLASLT_POINTER_MODE_MASK_HOST = 1,
+ /** see CUBLASLT_POINTER_MODE_DEVICE */
+ CUBLASLT_POINTER_MODE_MASK_DEVICE = 2,
+ /** see CUBLASLT_POINTER_MODE_DEVICE_VECTOR */
+ CUBLASLT_POINTER_MODE_MASK_DEVICE_VECTOR = 4,
+ /** see CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_ZERO */
+ CUBLASLT_POINTER_MODE_MASK_ALPHA_DEVICE_VECTOR_BETA_ZERO = 8,
+ /** see CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_HOST */
+ CUBLASLT_POINTER_MODE_MASK_ALPHA_DEVICE_VECTOR_BETA_HOST = 16,
+} cublasLtPointerModeMask_t;
+
+/** Implementation details that may affect numerical behavior of algorithms. */
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_FMA (0x01ull << 0)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_HMMA (0x02ull << 0)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_IMMA (0x04ull << 0)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_DMMA (0x08ull << 0)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_TENSOR_OP_MASK (0xfeull << 0)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_OP_TYPE_MASK (0xffull << 0)
+
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_ACCUMULATOR_16F (0x01ull << 8)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_ACCUMULATOR_32F (0x02ull << 8)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_ACCUMULATOR_64F (0x04ull << 8)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_ACCUMULATOR_32I (0x08ull << 8)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_ACCUMULATOR_TYPE_MASK (0xffull << 8)
+
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_16F (0x01ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_16BF (0x02ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_TF32 (0x04ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_32F (0x08ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_64F (0x10ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_8I (0x20ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_8F_E4M3 (0x40ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_INPUT_8F_E5M2 (0x80ull << 16)
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_OP_INPUT_TYPE_MASK (0xffull << 16)
+
+#define CUBLASLT_NUMERICAL_IMPL_FLAGS_GAUSSIAN (0x01ull << 32)
+typedef uint64_t cublasLtNumericalImplFlags_t;
+
+/** Execute matrix multiplication (D = alpha * op(A) * op(B) + beta * C).
+ *
+ * \retval CUBLAS_STATUS_NOT_INITIALIZED if cuBLASLt handle has not been initialized
+ * \retval CUBLAS_STATUS_INVALID_VALUE if parameters are in conflict or in an impossible configuration; e.g.
+ * when workspaceSizeInBytes is less than workspace required by configured
+ * algo
+ * \retval CUBLAS_STATUS_NOT_SUPPORTED if current implementation on selected device doesn't support configured
+ * operation
+ * \retval CUBLAS_STATUS_ARCH_MISMATCH if configured operation cannot be run using selected device
+ * \retval CUBLAS_STATUS_EXECUTION_FAILED if cuda reported execution error from the device
+ * \retval CUBLAS_STATUS_SUCCESS if the operation completed successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmul(cublasLtHandle_t lightHandle,
+ cublasLtMatmulDesc_t computeDesc,
+ const void* alpha, /* host or device pointer */
+ const void* A,
+ cublasLtMatrixLayout_t Adesc,
+ const void* B,
+ cublasLtMatrixLayout_t Bdesc,
+ const void* beta, /* host or device pointer */
+ const void* C,
+ cublasLtMatrixLayout_t Cdesc,
+ void* D,
+ cublasLtMatrixLayout_t Ddesc,
+ const cublasLtMatmulAlgo_t* algo,
+ void* workspace,
+ size_t workspaceSizeInBytes,
+ cudaStream_t stream);
+
+/** Matrix layout conversion helper (C = alpha * op(A) + beta * op(B))
+ *
+ * Can be used to change memory order of data or to scale and shift the values.
+ *
+ * \retval CUBLAS_STATUS_NOT_INITIALIZED if cuBLASLt handle has not been initialized
+ * \retval CUBLAS_STATUS_INVALID_VALUE if parameters are in conflict or in an impossible configuration; e.g.
+ * when A is not NULL, but Adesc is NULL
+ * \retval CUBLAS_STATUS_NOT_SUPPORTED if current implementation on selected device doesn't support configured
+ * operation
+ * \retval CUBLAS_STATUS_ARCH_MISMATCH if configured operation cannot be run using selected device
+ * \retval CUBLAS_STATUS_EXECUTION_FAILED if cuda reported execution error from the device
+ * \retval CUBLAS_STATUS_SUCCESS if the operation completed successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransform(cublasLtHandle_t lightHandle,
+ cublasLtMatrixTransformDesc_t transformDesc,
+ const void* alpha, /* host or device pointer */
+ const void* A,
+ cublasLtMatrixLayout_t Adesc,
+ const void* beta, /* host or device pointer */
+ const void* B,
+ cublasLtMatrixLayout_t Bdesc,
+ void* C,
+ cublasLtMatrixLayout_t Cdesc,
+ cudaStream_t stream);
+
+/* ---------------------------------------------------------------------------------------*/
+/* Helper functions for cublasLtMatrixLayout_t */
+/* ---------------------------------------------------------------------------------------*/
+
+/** Enum for data ordering */
+typedef enum {
+ /** Column-major
+ *
+ * Leading dimension is the stride (in elements) to the beginning of next column in memory.
+ */
+ CUBLASLT_ORDER_COL = 0,
+ /** Row major
+ *
+ * Leading dimension is the stride (in elements) to the beginning of next row in memory.
+ */
+ CUBLASLT_ORDER_ROW = 1,
+ /** Column-major ordered tiles of 32 columns.
+ *
+ * Leading dimension is the stride (in elements) to the beginning of next group of 32-columns. E.g. if matrix has 33
+ * columns and 2 rows, ld must be at least (32) * 2 = 64.
+ */
+ CUBLASLT_ORDER_COL32 = 2,
+ /** Column-major ordered tiles of composite tiles with total 32 columns and 8 rows, tile composed of interleaved
+ * inner tiles of 4 columns within 4 even or odd rows in an alternating pattern.
+ *
+ * Leading dimension is the stride (in elements) to the beginning of the first 32 column x 8 row tile for the next
+ * 32-wide group of columns. E.g. if matrix has 33 columns and 1 row, ld must be at least (32 * 8) * 1 = 256.
+ */
+ CUBLASLT_ORDER_COL4_4R2_8C = 3,
+ /** Column-major ordered tiles of composite tiles with total 32 columns ands 32 rows.
+ * Element offset within the tile is calculated as (((row%8)/2*4+row/8)*2+row%2)*32+col.
+ *
+ * Leading dimension is the stride (in elements) to the beginning of the first 32 column x 32 row tile for the next
+ * 32-wide group of columns. E.g. if matrix has 33 columns and 1 row, ld must be at least (32*32)*1 = 1024.
+ */
+ CUBLASLT_ORDER_COL32_2R_4R4 = 4,
+
+} cublasLtOrder_t;
+
+/** Attributes of memory layout */
+typedef enum {
+ /** Data type, see cudaDataType.
+ *
+ * uint32_t
+ */
+ CUBLASLT_MATRIX_LAYOUT_TYPE = 0,
+
+ /** Memory order of the data, see cublasLtOrder_t.
+ *
+ * int32_t, default: CUBLASLT_ORDER_COL
+ */
+ CUBLASLT_MATRIX_LAYOUT_ORDER = 1,
+
+ /** Number of rows.
+ *
+ * Usually only values that can be expressed as int32_t are supported.
+ *
+ * uint64_t
+ */
+ CUBLASLT_MATRIX_LAYOUT_ROWS = 2,
+
+ /** Number of columns.
+ *
+ * Usually only values that can be expressed as int32_t are supported.
+ *
+ * uint64_t
+ */
+ CUBLASLT_MATRIX_LAYOUT_COLS = 3,
+
+ /** Matrix leading dimension.
+ *
+ * For CUBLASLT_ORDER_COL this is stride (in elements) of matrix column, for more details and documentation for
+ * other memory orders see documentation for cublasLtOrder_t values.
+ *
+ * Currently only non-negative values are supported, must be large enough so that matrix memory locations are not
+ * overlapping (e.g. greater or equal to CUBLASLT_MATRIX_LAYOUT_ROWS in case of CUBLASLT_ORDER_COL).
+ *
+ * int64_t;
+ */
+ CUBLASLT_MATRIX_LAYOUT_LD = 4,
+
+ /** Number of matmul operations to perform in the batch.
+ *
+ * See also CUBLASLT_ALGO_CAP_STRIDED_BATCH_SUPPORT
+ *
+ * int32_t, default: 1
+ */
+ CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT = 5,
+
+ /** Stride (in elements) to the next matrix for strided batch operation.
+ *
+ * When matrix type is planar-complex (CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET != 0), batch stride
+ * is interpreted by cublasLtMatmul() in number of real valued sub-elements. E.g. for data of type CUDA_C_16F,
+ * offset of 1024B is encoded as a stride of value 512 (since each element of the real and imaginary matrices
+ * is a 2B (16bit) floating point type).
+ *
+ * NOTE: A bug in cublasLtMatrixTransform() causes it to interpret the batch stride for a planar-complex matrix
+ * as if it was specified in number of complex elements. Therefore an offset of 1024B must be encoded as stride
+ * value 256 when calling cublasLtMatrixTransform() (each complex element is 4B with real and imaginary values 2B
+ * each). This behavior is expected to be corrected in the next major cuBLAS version.
+ *
+ * int64_t, default: 0
+ */
+ CUBLASLT_MATRIX_LAYOUT_STRIDED_BATCH_OFFSET = 6,
+
+ /** Stride (in bytes) to the imaginary plane for planar complex layout.
+ *
+ * int64_t, default: 0 - 0 means that layout is regular (real and imaginary parts of complex numbers are interleaved
+ * in memory in each element)
+ */
+ CUBLASLT_MATRIX_LAYOUT_PLANE_OFFSET = 7,
+} cublasLtMatrixLayoutAttribute_t;
+
+/** Internal. Do not use directly.
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixLayoutInit_internal( //
+ cublasLtMatrixLayout_t matLayout,
+ size_t size,
+ cudaDataType type,
+ uint64_t rows,
+ uint64_t cols,
+ int64_t ld);
+
+/** Initialize matrix layout descriptor in pre-allocated space.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if size of the pre-allocated space is insufficient
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+static inline cublasStatus_t cublasLtMatrixLayoutInit(
+ cublasLtMatrixLayout_t matLayout, cudaDataType type, uint64_t rows, uint64_t cols, int64_t ld) {
+ return cublasLtMatrixLayoutInit_internal(matLayout, sizeof(*matLayout), type, rows, cols, ld);
+}
+
+/** Create new matrix layout descriptor.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if memory could not be allocated
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixLayoutCreate( //
+ cublasLtMatrixLayout_t* matLayout,
+ cudaDataType type,
+ uint64_t rows,
+ uint64_t cols,
+ int64_t ld);
+
+/** Destroy matrix layout descriptor.
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if operation was successful
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixLayoutDestroy(cublasLtMatrixLayout_t matLayout);
+
+/** Set matrix layout descriptor attribute.
+ *
+ * \param[in] matLayout The descriptor
+ * \param[in] attr The attribute
+ * \param[in] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixLayoutSetAttribute( //
+ cublasLtMatrixLayout_t matLayout,
+ cublasLtMatrixLayoutAttribute_t attr,
+ const void* buf,
+ size_t sizeInBytes);
+
+/** Get matrix layout descriptor attribute.
+ *
+ * \param[in] matLayout The descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number of
+ * bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixLayoutGetAttribute( //
+ cublasLtMatrixLayout_t matLayout,
+ cublasLtMatrixLayoutAttribute_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/* ---------------------------------------------------------------------------------------*/
+/* Helper functions for cublasLtMatmulDesc_t */
+/* ---------------------------------------------------------------------------------------*/
+
+/** Matmul descriptor attributes to define details of the operation. */
+typedef enum {
+ /** Compute type, see cudaDataType. Defines data type used for multiply and accumulate operations and the
+ * accumulator during matrix multiplication.
+ *
+ * int32_t
+ */
+ CUBLASLT_MATMUL_DESC_COMPUTE_TYPE = 0,
+
+ /** Scale type, see cudaDataType. Defines data type of alpha and beta. Accumulator and value from matrix C are
+ * typically converted to scale type before final scaling. Value is then converted from scale type to type of matrix
+ * D before being stored in memory.
+ *
+ * int32_t, default: same as CUBLASLT_MATMUL_DESC_COMPUTE_TYPE
+ */
+ CUBLASLT_MATMUL_DESC_SCALE_TYPE = 1,
+
+ /** Pointer mode of alpha and beta, see cublasLtPointerMode_t. When CUBLASLT_POINTER_MODE_DEVICE_VECTOR is in use,
+ * alpha/beta vector lenghts must match number of output matrix rows.
+ *
+ * int32_t, default: CUBLASLT_POINTER_MODE_HOST
+ */
+ CUBLASLT_MATMUL_DESC_POINTER_MODE = 2,
+
+ /** Transform of matrix A, see cublasOperation_t.
+ *
+ * int32_t, default: CUBLAS_OP_N
+ */
+ CUBLASLT_MATMUL_DESC_TRANSA = 3,
+
+ /** Transform of matrix B, see cublasOperation_t.
+ *
+ * int32_t, default: CUBLAS_OP_N
+ */
+ CUBLASLT_MATMUL_DESC_TRANSB = 4,
+
+ /** Transform of matrix C, see cublasOperation_t.
+ *
+ * Currently only CUBLAS_OP_N is supported.
+ *
+ * int32_t, default: CUBLAS_OP_N
+ */
+ CUBLASLT_MATMUL_DESC_TRANSC = 5,
+
+ /** Matrix fill mode, see cublasFillMode_t.
+ *
+ * int32_t, default: CUBLAS_FILL_MODE_FULL
+ */
+ CUBLASLT_MATMUL_DESC_FILL_MODE = 6,
+
+ /** Epilogue function, see cublasLtEpilogue_t.
+ *
+ * uint32_t, default: CUBLASLT_EPILOGUE_DEFAULT
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE = 7,
+
+ /** Bias or bias gradient vector pointer in the device memory.
+ *
+ * Bias case. See CUBLASLT_EPILOGUE_BIAS.
+ * For bias data type see CUBLASLT_MATMUL_DESC_BIAS_DATA_TYPE.
+ *
+ * Bias vector length must match matrix D rows count.
+ *
+ * Bias gradient case. See CUBLASLT_EPILOGUE_DRELU_BGRAD and CUBLASLT_EPILOGUE_DGELU_BGRAD.
+ * Bias gradient vector elements are the same type as the output elements
+ * (Ctype) with the exception of IMMA kernels (see above).
+ *
+ * Routines that don't dereference this pointer, like cublasLtMatmulAlgoGetHeuristic()
+ * depend on its value to determine expected pointer alignment.
+ *
+ * Bias case: const void *, default: NULL
+ * Bias gradient case: void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_BIAS_POINTER = 8,
+
+ /** Batch stride for bias or bias gradient vector.
+ *
+ * Used together with CUBLASLT_MATMUL_DESC_BIAS_POINTER when matrix D's CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT > 1.
+ *
+ * int64_t, default: 0
+ */
+ CUBLASLT_MATMUL_DESC_BIAS_BATCH_STRIDE = 10,
+
+ /** Pointer for epilogue auxiliary buffer.
+ *
+ * - Output vector for ReLu bit-mask in forward pass when CUBLASLT_EPILOGUE_RELU_AUX
+ * or CUBLASLT_EPILOGUE_RELU_AUX_BIAS epilogue is used.
+ * - Input vector for ReLu bit-mask in backward pass when
+ * CUBLASLT_EPILOGUE_DRELU_BGRAD epilogue is used.
+ *
+ * - Output of GELU input matrix in forward pass when
+ * CUBLASLT_EPILOGUE_GELU_AUX_BIAS epilogue is used.
+ * - Input of GELU input matrix for backward pass when
+ * CUBLASLT_EPILOGUE_DGELU_BGRAD epilogue is used.
+ *
+ * For aux data type see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_DATA_TYPE.
+ *
+ * Routines that don't dereference this pointer, like cublasLtMatmulAlgoGetHeuristic()
+ * depend on its value to determine expected pointer alignment.
+ *
+ * Requires setting CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_LD attribute.
+ *
+ * Forward pass: void *, default: NULL
+ * Backward pass: const void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER = 11,
+
+ /** Leading dimension for epilogue auxiliary buffer.
+ *
+ * - ReLu bit-mask matrix leading dimension in elements (i.e. bits)
+ * when CUBLASLT_EPILOGUE_RELU_AUX, CUBLASLT_EPILOGUE_RELU_AUX_BIAS or CUBLASLT_EPILOGUE_DRELU_BGRAD epilogue is
+ * used. Must be divisible by 128 and be no less than the number of rows in the output matrix.
+ *
+ * - GELU input matrix leading dimension in elements
+ * when CUBLASLT_EPILOGUE_GELU_AUX_BIAS or CUBLASLT_EPILOGUE_DGELU_BGRAD epilogue used.
+ * Must be divisible by 8 and be no less than the number of rows in the output matrix.
+ *
+ * int64_t, default: 0
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_LD = 12,
+
+ /** Batch stride for epilogue auxiliary buffer.
+ *
+ * - ReLu bit-mask matrix batch stride in elements (i.e. bits)
+ * when CUBLASLT_EPILOGUE_RELU_AUX, CUBLASLT_EPILOGUE_RELU_AUX_BIAS or CUBLASLT_EPILOGUE_DRELU_BGRAD epilogue is
+ * used. Must be divisible by 128.
+ *
+ * - GELU input matrix batch stride in elements
+ * when CUBLASLT_EPILOGUE_GELU_AUX_BIAS or CUBLASLT_EPILOGUE_DGELU_BGRAD epilogue used.
+ * Must be divisible by 8.
+ *
+ * int64_t, default: 0
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_BATCH_STRIDE = 13,
+
+ /** Batch stride for alpha vector.
+ *
+ * Used together with CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_HOST when matrix D's
+ * CUBLASLT_MATRIX_LAYOUT_BATCH_COUNT > 1. If CUBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_ZERO is set then
+ * CUBLASLT_MATMUL_DESC_ALPHA_VECTOR_BATCH_STRIDE must be set to 0 as this mode doesnt supported batched alpha vector.
+ *
+ * int64_t, default: 0
+ */
+ CUBLASLT_MATMUL_DESC_ALPHA_VECTOR_BATCH_STRIDE = 14,
+
+ /** Number of SMs to target for parallel execution. Optimizes heuristics for execution on a different number of SMs
+ * when user expects a concurrent stream to be using some of the device resources.
+ *
+ * int32_t, default: 0 - use the number reported by the device.
+ */
+ CUBLASLT_MATMUL_DESC_SM_COUNT_TARGET = 15,
+
+ /** Device pointer to the scale factor value that converts data in matrix A to the compute data type range.
+ *
+ * The scaling factor value must have the same type as the compute type.
+ *
+ * If not specified, or set to NULL, the scaling factor is assumed to be 1.
+ *
+ * If set for an unsupported matrix data, scale, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * const void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_A_SCALE_POINTER = 17,
+
+ /** Device pointer to the scale factor value to convert data in matrix B to compute data type range.
+ *
+ * The scaling factor value must have the same type as the compute type.
+ *
+ * If not specified, or set to NULL, the scaling factor is assumed to be 1.
+ *
+ * If set for an unsupported matrix data, scale, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * const void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_B_SCALE_POINTER = 18,
+
+ /** Device pointer to the scale factor value to convert data in matrix C to compute data type range.
+ *
+ * The scaling factor value must have the same type as the compute type.
+ *
+ * If not specified, or set to NULL, the scaling factor is assumed to be 1.
+ *
+ * If set for an unsupported matrix data, scale, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * const void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_C_SCALE_POINTER = 19,
+
+ /** Device pointer to the scale factor value to convert data in matrix D to compute data type range.
+ *
+ * The scaling factor value must have the same type as the compute type.
+ *
+ * If not specified, or set to NULL, the scaling factor is assumed to be 1.
+ *
+ * If set for an unsupported matrix data, scale, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * const void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_D_SCALE_POINTER = 20,
+
+ /** Device pointer to the memory location that on completion will be set to the maximum of absolute values in the
+ * output matrix.
+ *
+ * The computed value has the same type as the compute type.
+ *
+ * If not specified or set to NULL, the maximum absolute value is not computed. If set for an unsupported matrix
+ * data, scale, and compute type combination, calling cublasLtMatmul() will return CUBLAS_INVALID_VALUE.
+ *
+ * void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_AMAX_D_POINTER = 21,
+
+ /** Type of the data to be stored to the memory pointed to by CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ *
+ * If unset, the data type defaults to the type of elements of the output matrix with some exceptions, see details
+ * below.
+ *
+ * ReLu uses a bit-mask.
+ *
+ * GELU input matrix elements type is the same as the type of elements of
+ * the output matrix with some exceptions, see details below.
+ *
+ * For fp8 kernels with output type CUDA_R_8F_E4M3 the aux data type can be CUDA_R_8F_E4M3 or CUDA_R_16F with some
+ * restrictions. See https://docs.nvidia.com/cuda/cublas/index.html#cublasLtMatmulDescAttributes_t for more details.
+ *
+ * If set for an unsupported matrix data, scale, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * int32_t based on cudaDataType, default: -1
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_DATA_TYPE = 22,
+
+ /** Device pointer to the scaling factor value to convert results from compute type data range to storage
+ * data range in the auxiliary matrix that is set via CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ *
+ * The scaling factor value must have the same type as the compute type.
+ *
+ * If not specified, or set to NULL, the scaling factor is assumed to be 1. If set for an unsupported matrix data,
+ * scale, and compute type combination, calling cublasLtMatmul() will return CUBLAS_INVALID_VALUE.
+ *
+ * void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_SCALE_POINTER = 23,
+
+ /** Device pointer to the memory location that on completion will be set to the maximum of absolute values in the
+ * buffer that is set via CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ *
+ * The computed value has the same type as the compute type.
+ *
+ * If not specified or set to NULL, the maximum absolute value is not computed. If set for an unsupported matrix
+ * data, scale, and compute type combination, calling cublasLtMatmul() will return CUBLAS_INVALID_VALUE.
+ *
+ * void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_AMAX_POINTER = 24,
+
+ /** Flag for managing fp8 fast accumulation mode.
+ * When enabled, problem execution might be faster but at the cost of lower accuracy because intermediate results
+ * will not periodically be promoted to a higher precision.
+ *
+ * int8_t, default: 0 - fast accumulation mode is disabled.
+ */
+ CUBLASLT_MATMUL_DESC_FAST_ACCUM = 25,
+
+ /** Type of bias or bias gradient vector in the device memory.
+ *
+ * Bias case: see CUBLASLT_EPILOGUE_BIAS.
+ *
+ * Bias vector elements are the same type as the elements of output matrix (Dtype) with the following exceptions:
+ * - IMMA kernels with computeType=CUDA_R_32I and Ctype=CUDA_R_8I where the bias vector elements
+ * are the same type as alpha, beta (CUBLASLT_MATMUL_DESC_SCALE_TYPE=CUDA_R_32F)
+ * - fp8 kernels with an output type of CUDA_R_32F, CUDA_R_8F_E4M3 or CUDA_R_8F_E5M2, See
+ * https://docs.nvidia.com/cuda/cublas/index.html#cublasLtMatmul for details.
+ *
+ * int32_t based on cudaDataType, default: -1
+ */
+ CUBLASLT_MATMUL_DESC_BIAS_DATA_TYPE = 26,
+
+ /** EXPERIMENTAL, DEPRECATED: Number of atomic synchronization chunks in the row dimension of the output matrix D.
+ *
+ * int32_t, default 0 (atomic synchronization disabled)
+ */
+ CUBLASLT_MATMUL_DESC_ATOMIC_SYNC_NUM_CHUNKS_D_ROWS = 27,
+
+ /** EXPERIMENTAL, DEPRECATED: Number of atomic synchronization chunks in the column dimension of the output matrix D.
+ *
+ * int32_t, default 0 (atomic synchronization disabled)
+ */
+ CUBLASLT_MATMUL_DESC_ATOMIC_SYNC_NUM_CHUNKS_D_COLS = 28,
+
+ /** EXPERIMENTAL: Pointer to a device array of input atomic counters consumed by a matmul.
+ *
+ * int32_t *, default: NULL
+ * */
+ CUBLASLT_MATMUL_DESC_ATOMIC_SYNC_IN_COUNTERS_POINTER = 29,
+
+ /** EXPERIMENTAL: Pointer to a device array of output atomic counters produced by a matmul.
+ *
+ * int32_t *, default: NULL
+ * */
+ CUBLASLT_MATMUL_DESC_ATOMIC_SYNC_OUT_COUNTERS_POINTER = 30,
+
+ /** Scaling mode that defines how the matrix scaling factor for matrix A is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_A_SCALE_MODE = 31,
+
+ /** Scaling mode that defines how the matrix scaling factor for matrix B is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_B_SCALE_MODE = 32,
+
+ /** Scaling mode that defines how the matrix scaling factor for matrix C is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_C_SCALE_MODE = 33,
+
+ /** Scaling mode that defines how the matrix scaling factor for matrix D is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_D_SCALE_MODE = 34,
+
+ /** Scaling mode that defines how the matrix scaling factor for the auxiliary matrix is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_SCALE_MODE = 35,
+
+ /** Device pointer to the scale factors that are used to convert data in matrix D to the compute data type range.
+ *
+ * The scaling factor value type is defined by the scaling mode (see CUBLASLT_MATMUL_DESC_D_OUT_SCALE_MODE)
+ *
+ * If set for an unsupported matrix data, scale, scale mode, and compute type combination, calling cublasLtMatmul()
+ * will return CUBLAS_INVALID_VALUE.
+ *
+ * void *, default: NULL
+ */
+ CUBLASLT_MATMUL_DESC_D_OUT_SCALE_POINTER = 36,
+
+ /** Scaling mode that defines how the output matrix scaling factor for matrix D is interpreted
+ *
+ * int32_t, default: 0 */
+ CUBLASLT_MATMUL_DESC_D_OUT_SCALE_MODE = 37,
+} cublasLtMatmulDescAttributes_t;
+
+/** Internal. Do not use directly.
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulDescInit_internal( //
+ cublasLtMatmulDesc_t matmulDesc,
+ size_t size,
+ cublasComputeType_t computeType,
+ cudaDataType_t scaleType);
+
+/** Initialize matmul operation descriptor in pre-allocated space.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if size of the pre-allocated space is insufficient
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was initialized successfully
+ */
+static inline cublasStatus_t cublasLtMatmulDescInit( //
+ cublasLtMatmulDesc_t matmulDesc,
+ cublasComputeType_t computeType,
+ cudaDataType_t scaleType) {
+ return cublasLtMatmulDescInit_internal(matmulDesc, sizeof(*matmulDesc), computeType, scaleType);
+}
+
+/** Create new matmul operation descriptor.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if memory could not be allocated
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulDescCreate(cublasLtMatmulDesc_t* matmulDesc,
+ cublasComputeType_t computeType,
+ cudaDataType_t scaleType);
+
+/** Destroy matmul operation descriptor.
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if operation was successful
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulDescDestroy(cublasLtMatmulDesc_t matmulDesc);
+
+/** Set matmul operation descriptor attribute.
+ *
+ * \param[in] matmulDesc The descriptor
+ * \param[in] attr The attribute
+ * \param[in] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulDescSetAttribute( //
+ cublasLtMatmulDesc_t matmulDesc,
+ cublasLtMatmulDescAttributes_t attr,
+ const void* buf,
+ size_t sizeInBytes);
+
+/** Get matmul operation descriptor attribute.
+ *
+ * \param[in] matmulDesc The descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number of
+ * bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulDescGetAttribute( //
+ cublasLtMatmulDesc_t matmulDesc,
+ cublasLtMatmulDescAttributes_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/* ---------------------------------------------------------------------------------------*/
+/* Helper functions for cublasLtMatrixTransformDesc_t */
+/* ---------------------------------------------------------------------------------------*/
+
+/** Matrix transform descriptor attributes to define details of the operation.
+ */
+typedef enum {
+ /** Scale type, see cudaDataType. Inputs are converted to scale type for scaling and summation and results are then
+ * converted to output type to store in memory.
+ *
+ * int32_t
+ */
+ CUBLASLT_MATRIX_TRANSFORM_DESC_SCALE_TYPE,
+
+ /** Pointer mode of alpha and beta, see cublasLtPointerMode_t.
+ *
+ * int32_t, default: CUBLASLT_POINTER_MODE_HOST
+ */
+ CUBLASLT_MATRIX_TRANSFORM_DESC_POINTER_MODE,
+
+ /** Transform of matrix A, see cublasOperation_t.
+ *
+ * int32_t, default: CUBLAS_OP_N
+ */
+ CUBLASLT_MATRIX_TRANSFORM_DESC_TRANSA,
+
+ /** Transform of matrix B, see cublasOperation_t.
+ *
+ * int32_t, default: CUBLAS_OP_N
+ */
+ CUBLASLT_MATRIX_TRANSFORM_DESC_TRANSB,
+} cublasLtMatrixTransformDescAttributes_t;
+
+/** Internal. Do not use directly.
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransformDescInit_internal(cublasLtMatrixTransformDesc_t transformDesc,
+ size_t size,
+ cudaDataType scaleType);
+
+/** Initialize matrix transform operation descriptor in pre-allocated space.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if size of the pre-allocated space is insufficient
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+static inline cublasStatus_t cublasLtMatrixTransformDescInit(cublasLtMatrixTransformDesc_t transformDesc,
+ cudaDataType scaleType) {
+ return cublasLtMatrixTransformDescInit_internal(transformDesc, sizeof(*transformDesc), scaleType);
+}
+
+/** Create new matrix transform operation descriptor.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if memory could not be allocated
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransformDescCreate(cublasLtMatrixTransformDesc_t* transformDesc,
+ cudaDataType scaleType);
+
+/** Destroy matrix transform operation descriptor.
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if operation was successful
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransformDescDestroy(cublasLtMatrixTransformDesc_t transformDesc);
+
+/** Set matrix transform operation descriptor attribute.
+ *
+ * \param[in] transformDesc The descriptor
+ * \param[in] attr The attribute
+ * \param[in] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransformDescSetAttribute( //
+ cublasLtMatrixTransformDesc_t transformDesc,
+ cublasLtMatrixTransformDescAttributes_t attr,
+ const void* buf,
+ size_t sizeInBytes);
+
+/** Get matrix transform operation descriptor attribute.
+ *
+ * \param[in] transformDesc The descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number
+ * of bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatrixTransformDescGetAttribute( //
+ cublasLtMatrixTransformDesc_t transformDesc,
+ cublasLtMatrixTransformDescAttributes_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/** Reduction scheme for portions of the dot-product calculated in parallel (a. k. a. "split - K").
+ */
+typedef enum {
+ /** No reduction scheme, dot-product shall be performed in one sequence.
+ */
+ CUBLASLT_REDUCTION_SCHEME_NONE = 0,
+
+ /** Reduction is performed "in place" - using the output buffer (and output data type) and counters (in workspace) to
+ * guarantee the sequentiality.
+ */
+ CUBLASLT_REDUCTION_SCHEME_INPLACE = 1,
+
+ /** Intermediate results are stored in compute type in the workspace and reduced in a separate step.
+ */
+ CUBLASLT_REDUCTION_SCHEME_COMPUTE_TYPE = 2,
+
+ /** Intermediate results are stored in output type in the workspace and reduced in a separate step.
+ */
+ CUBLASLT_REDUCTION_SCHEME_OUTPUT_TYPE = 4,
+
+ CUBLASLT_REDUCTION_SCHEME_MASK = 0x7,
+} cublasLtReductionScheme_t;
+
+/** Postprocessing options for the epilogue
+ */
+typedef enum {
+ /** No special postprocessing, just scale and quantize results if necessary.
+ */
+ CUBLASLT_EPILOGUE_DEFAULT = 1,
+
+ /** ReLu, apply ReLu point-wise transform to the results (x:=max(x, 0)).
+ */
+ CUBLASLT_EPILOGUE_RELU = 2,
+
+ /** ReLu, apply ReLu point-wise transform to the results (x:=max(x, 0)).
+ *
+ * This epilogue mode produces an extra output, a ReLu bit-mask matrix,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_RELU_AUX = (CUBLASLT_EPILOGUE_RELU | 128),
+
+ /** Bias, apply (broadcasted) Bias from bias vector. Bias vector length must match matrix D rows, it must be packed
+ * (stride between vector elements is 1). Bias vector is broadcasted to all columns and added before applying final
+ * postprocessing.
+ */
+ CUBLASLT_EPILOGUE_BIAS = 4,
+
+ /** ReLu and Bias, apply Bias and then ReLu transform
+ */
+ CUBLASLT_EPILOGUE_RELU_BIAS = (CUBLASLT_EPILOGUE_RELU | CUBLASLT_EPILOGUE_BIAS),
+
+ /** ReLu and Bias, apply Bias and then ReLu transform
+ *
+ * This epilogue mode produces an extra output, a ReLu bit-mask matrix,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_RELU_AUX_BIAS = (CUBLASLT_EPILOGUE_RELU_AUX | CUBLASLT_EPILOGUE_BIAS),
+
+ /* ReLu gradient. Apply ReLu gradient to matmul output. Store ReLu gradient in the output matrix.
+ *
+ * This epilogue mode requires an extra input,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_DRELU = 8 | 128,
+
+ /* ReLu and Bias gradients. Apply independently ReLu and Bias gradient to
+ * matmul output. Store ReLu gradient in the output matrix, and Bias gradient
+ * in the auxiliary output (see CUBLASLT_MATMUL_DESC_BIAS_POINTER).
+ *
+ * This epilogue mode requires an extra input,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_DRELU_BGRAD = CUBLASLT_EPILOGUE_DRELU | 16,
+
+ /** GELU, apply GELU point-wise transform to the results (x:=GELU(x)).
+ */
+ CUBLASLT_EPILOGUE_GELU = 32,
+
+ /** GELU, apply GELU point-wise transform to the results (x:=GELU(x)).
+ *
+ * This epilogue mode outputs GELU input as a separate matrix (useful for training).
+ * See CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_GELU_AUX = (CUBLASLT_EPILOGUE_GELU | 128),
+
+ /** GELU and Bias, apply Bias and then GELU transform
+ */
+ CUBLASLT_EPILOGUE_GELU_BIAS = (CUBLASLT_EPILOGUE_GELU | CUBLASLT_EPILOGUE_BIAS),
+
+ /** GELU and Bias, apply Bias and then GELU transform
+ *
+ * This epilogue mode outputs GELU input as a separate matrix (useful for training).
+ * See CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_GELU_AUX_BIAS = (CUBLASLT_EPILOGUE_GELU_AUX | CUBLASLT_EPILOGUE_BIAS),
+
+ /* GELU gradient. Apply GELU gradient to matmul output. Store GELU gradient in the output matrix.
+ *
+ * This epilogue mode requires an extra input,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_DGELU = 64 | 128,
+
+ /* GELU and Bias gradients. Apply independently GELU and Bias gradient to
+ * matmul output. Store GELU gradient in the output matrix, and Bias gradient
+ * in the auxiliary output (see CUBLASLT_MATMUL_DESC_BIAS_POINTER).
+ *
+ * This epilogue mode requires an extra input,
+ * see CUBLASLT_MATMUL_DESC_EPILOGUE_AUX_POINTER.
+ */
+ CUBLASLT_EPILOGUE_DGELU_BGRAD = CUBLASLT_EPILOGUE_DGELU | 16,
+
+ /** Bias gradient based on the input matrix A.
+ *
+ * The bias size corresponds to the number of rows of the matrix D.
+ * The reduction happens over the GEMM's "k" dimension.
+ *
+ * Stores Bias gradient in the auxiliary output
+ * (see CUBLASLT_MATMUL_DESC_BIAS_POINTER).
+ */
+ CUBLASLT_EPILOGUE_BGRADA = 256,
+
+ /** Bias gradient based on the input matrix B.
+ *
+ * The bias size corresponds to the number of columns of the matrix D.
+ * The reduction happens over the GEMM's "k" dimension.
+ *
+ * Stores Bias gradient in the auxiliary output
+ * (see CUBLASLT_MATMUL_DESC_BIAS_POINTER).
+ */
+ CUBLASLT_EPILOGUE_BGRADB = 512,
+} cublasLtEpilogue_t;
+
+/** Matmul heuristic search mode
+ */
+typedef enum {
+ /** ask heuristics for best algo for given usecase
+ */
+ CUBLASLT_SEARCH_BEST_FIT = 0,
+ /** only try to find best config for preconfigured algo id
+ */
+ CUBLASLT_SEARCH_LIMITED_BY_ALGO_ID = 1,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_02 = 2,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_03 = 3,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_04 = 4,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_05 = 5,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_06 = 6,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_07 = 7,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_08 = 8,
+ /** reserved for future use
+ */
+ CUBLASLT_SEARCH_RESERVED_09 = 9,
+} cublasLtMatmulSearch_t;
+
+/** Algo search preference to fine tune the heuristic function. */
+typedef enum {
+ /** Search mode, see cublasLtMatmulSearch_t.
+ *
+ * uint32_t, default: CUBLASLT_SEARCH_BEST_FIT
+ */
+ CUBLASLT_MATMUL_PREF_SEARCH_MODE = 0,
+
+ /** Maximum allowed workspace size in bytes.
+ *
+ * uint64_t, default: 0 - no workspace allowed
+ */
+ CUBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES = 1,
+
+ /** Reduction scheme mask, see cublasLtReductionScheme_t. Filters heuristic result to only include algo configs that
+ * use one of the required modes.
+ *
+ * E.g. mask value of 0x03 will allow only INPLACE and COMPUTE_TYPE reduction schemes.
+ *
+ * uint32_t, default: CUBLASLT_REDUCTION_SCHEME_MASK (allows all reduction schemes)
+ */
+ CUBLASLT_MATMUL_PREF_REDUCTION_SCHEME_MASK = 3,
+
+ /** Minimum buffer alignment for matrix A (in bytes).
+ *
+ * Selecting a smaller value will exclude algorithms that can not work with matrix A that is not as strictly aligned
+ * as they need.
+ *
+ * uint32_t, default: 256
+ */
+ CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_A_BYTES = 5,
+
+ /** Minimum buffer alignment for matrix B (in bytes).
+ *
+ * Selecting a smaller value will exclude algorithms that can not work with matrix B that is not as strictly aligned
+ * as they need.
+ *
+ * uint32_t, default: 256
+ */
+ CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_B_BYTES = 6,
+
+ /** Minimum buffer alignment for matrix C (in bytes).
+ *
+ * Selecting a smaller value will exclude algorithms that can not work with matrix C that is not as strictly aligned
+ * as they need.
+ *
+ * uint32_t, default: 256
+ */
+ CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_C_BYTES = 7,
+
+ /** Minimum buffer alignment for matrix D (in bytes).
+ *
+ * Selecting a smaller value will exclude algorithms that can not work with matrix D that is not as strictly aligned
+ * as they need.
+ *
+ * uint32_t, default: 256
+ */
+ CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_D_BYTES = 8,
+
+ /** Maximum wave count.
+ *
+ * See cublasLtMatmulHeuristicResult_t::wavesCount.
+ *
+ * Selecting a non-zero value will exclude algorithms that report device utilization higher than specified.
+ *
+ * float, default: 0.0f
+ */
+ CUBLASLT_MATMUL_PREF_MAX_WAVES_COUNT = 9,
+
+ /** Numerical implementation details mask, see cublasLtNumericalImplFlags_t. Filters heuristic result to only include
+ * algorithms that use the allowed implementations.
+ *
+ * uint64_t, default: uint64_t(-1) (allow everything)
+ */
+ CUBLASLT_MATMUL_PREF_IMPL_MASK = 12,
+} cublasLtMatmulPreferenceAttributes_t;
+
+/** Internal. Do not use directly.
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceInit_internal(cublasLtMatmulPreference_t pref, size_t size);
+
+/** Initialize matmul heuristic search preference descriptor in pre-allocated space.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if size of the pre-allocated space is insufficient
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+static inline cublasStatus_t cublasLtMatmulPreferenceInit(cublasLtMatmulPreference_t pref) {
+ return cublasLtMatmulPreferenceInit_internal(pref, sizeof(*pref));
+}
+
+/** Create new matmul heuristic search preference descriptor.
+ *
+ * \retval CUBLAS_STATUS_ALLOC_FAILED if memory could not be allocated
+ * \retval CUBLAS_STATUS_SUCCESS if desciptor was created successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceCreate(cublasLtMatmulPreference_t* pref);
+
+/** Destroy matmul heuristic search preference descriptor.
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if operation was successful
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceDestroy(cublasLtMatmulPreference_t pref);
+
+/** Set matmul heuristic search preference descriptor attribute.
+ *
+ * \param[in] pref The descriptor
+ * \param[in] attr The attribute
+ * \param[in] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceSetAttribute( //
+ cublasLtMatmulPreference_t pref,
+ cublasLtMatmulPreferenceAttributes_t attr,
+ const void* buf,
+ size_t sizeInBytes);
+
+/** Get matmul heuristic search preference descriptor attribute.
+ *
+ * \param[in] pref The descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number of
+ * bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceGetAttribute( //
+ cublasLtMatmulPreference_t pref,
+ cublasLtMatmulPreferenceAttributes_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/** Results structure used by cublasLtMatmulAlgoGetHeuristic
+ *
+ * Holds returned configured algo descriptor and its runtime properties.
+ */
+typedef struct {
+ /** Matmul algorithm descriptor.
+ *
+ * Must be initialized with cublasLtMatmulAlgoInit() if preferences' CUBLASLT_MATMUL_PERF_SEARCH_MODE is set to
+ * CUBLASLT_SEARCH_LIMITED_BY_ALGO_ID
+ */
+ cublasLtMatmulAlgo_t algo;
+
+ /** Actual size of workspace memory required.
+ */
+ size_t workspaceSize;
+
+ /** Result status, other fields are only valid if after call to cublasLtMatmulAlgoGetHeuristic() this member is set to
+ * CUBLAS_STATUS_SUCCESS.
+ */
+ cublasStatus_t state;
+
+ /** Waves count - a device utilization metric.
+ *
+ * wavesCount value of 1.0f suggests that when kernel is launched it will fully occupy the GPU.
+ */
+ float wavesCount;
+
+ int reserved[4];
+} cublasLtMatmulHeuristicResult_t;
+
+/** Query cublasLt heuristic for algorithm appropriate for given use case.
+ *
+ * \param[in] lightHandle Pointer to the allocated cuBLASLt handle for the cuBLASLt
+ * context. See cublasLtHandle_t.
+ * \param[in] operationDesc Handle to the matrix multiplication descriptor.
+ * \param[in] Adesc Handle to the layout descriptors for matrix A.
+ * \param[in] Bdesc Handle to the layout descriptors for matrix B.
+ * \param[in] Cdesc Handle to the layout descriptors for matrix C.
+ * \param[in] Ddesc Handle to the layout descriptors for matrix D.
+ * \param[in] preference Pointer to the structure holding the heuristic search
+ * preferences descriptor. See cublasLtMatrixLayout_t.
+ * \param[in] requestedAlgoCount Size of heuristicResultsArray (in elements) and requested
+ * maximum number of algorithms to return.
+ * \param[in, out] heuristicResultsArray Output algorithms and associated runtime characteristics,
+ * ordered in increasing estimated compute time.
+ * \param[out] returnAlgoCount The number of heuristicResultsArray elements written.
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if requestedAlgoCount is less or equal to zero
+ * \retval CUBLAS_STATUS_NOT_SUPPORTED if no heuristic function available for current configuration
+ * \retval CUBLAS_STATUS_SUCCESS if query was successful, inspect
+ * heuristicResultsArray[0 to (returnAlgoCount - 1)].state
+ * for detail status of results
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoGetHeuristic(cublasLtHandle_t lightHandle,
+ cublasLtMatmulDesc_t operationDesc,
+ cublasLtMatrixLayout_t Adesc,
+ cublasLtMatrixLayout_t Bdesc,
+ cublasLtMatrixLayout_t Cdesc,
+ cublasLtMatrixLayout_t Ddesc,
+ cublasLtMatmulPreference_t preference,
+ int requestedAlgoCount,
+ cublasLtMatmulHeuristicResult_t heuristicResultsArray[],
+ int* returnAlgoCount);
+
+/* ---------------------------------------------------------------------------------------*/
+/* Lower level API to be able to implement own Heuristic and Find routines */
+/* ---------------------------------------------------------------------------------------*/
+
+/** Routine to get all algo IDs that can potentially run
+ *
+ * \param[in] int requestedAlgoCount requested number of algos (must be less or equal to size of algoIdsA
+ * (in elements)) \param[out] algoIdsA array to write algoIds to \param[out] returnAlgoCount number of algoIds
+ * actually written
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if requestedAlgoCount is less or equal to zero
+ * \retval CUBLAS_STATUS_SUCCESS if query was successful, inspect returnAlgoCount to get actual number of IDs
+ * available
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoGetIds(cublasLtHandle_t lightHandle,
+ cublasComputeType_t computeType,
+ cudaDataType_t scaleType,
+ cudaDataType_t Atype,
+ cudaDataType_t Btype,
+ cudaDataType_t Ctype,
+ cudaDataType_t Dtype,
+ int requestedAlgoCount,
+ int algoIdsArray[],
+ int* returnAlgoCount);
+
+/** Initialize algo structure
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if algo is NULL or algoId is outside of recognized range
+ * \retval CUBLAS_STATUS_NOT_SUPPORTED if algoId is not supported for given combination of data types
+ * \retval CUBLAS_STATUS_SUCCESS if the structure was successfully initialized
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoInit(cublasLtHandle_t lightHandle,
+ cublasComputeType_t computeType,
+ cudaDataType_t scaleType,
+ cudaDataType_t Atype,
+ cudaDataType_t Btype,
+ cudaDataType_t Ctype,
+ cudaDataType_t Dtype,
+ int algoId,
+ cublasLtMatmulAlgo_t* algo);
+
+/** Check configured algo descriptor for correctness and support on current device.
+ *
+ * Result includes required workspace size and calculated wave count.
+ *
+ * CUBLAS_STATUS_SUCCESS doesn't fully guarantee algo will run (will fail if e.g. buffers are not correctly aligned);
+ * but if cublasLtMatmulAlgoCheck fails, the algo will not run.
+ *
+ * \param[in] algo algo configuration to check
+ * \param[out] result result structure to report algo runtime characteristics; algo field is never updated
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if matrix layout descriptors or operation descriptor don't match algo
+ * descriptor
+ * \retval CUBLAS_STATUS_NOT_SUPPORTED if algo configuration or data type combination is not currently supported on
+ * given device
+ * \retval CUBLAS_STATUS_ARCH_MISMATCH if algo configuration cannot be run using the selected device
+ * \retval CUBLAS_STATUS_SUCCESS if check was successful
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoCheck( //
+ cublasLtHandle_t lightHandle,
+ cublasLtMatmulDesc_t operationDesc,
+ cublasLtMatrixLayout_t Adesc,
+ cublasLtMatrixLayout_t Bdesc,
+ cublasLtMatrixLayout_t Cdesc,
+ cublasLtMatrixLayout_t Ddesc,
+ const cublasLtMatmulAlgo_t* algo, ///< may point to result->algo
+ cublasLtMatmulHeuristicResult_t* result);
+
+/** Capabilities Attributes that can be retrieved from an initialized Algo structure
+ */
+typedef enum {
+ /** support for split K, see CUBLASLT_ALGO_CONFIG_SPLITK_NUM
+ *
+ * int32_t, 0 means no support, supported otherwise
+ */
+ CUBLASLT_ALGO_CAP_SPLITK_SUPPORT = 0,
+
+ /** reduction scheme mask, see cublasLtReductionScheme_t; shows supported reduction schemes, if reduction scheme is
+ * not masked out it is supported.
+ *
+ * e.g. int isReductionSchemeComputeTypeSupported ? (reductionSchemeMask & CUBLASLT_REDUCTION_SCHEME_COMPUTE_TYPE) ==
+ * CUBLASLT_REDUCTION_SCHEME_COMPUTE_TYPE ? 1 : 0;
+ *
+ * uint32_t
+ */
+ CUBLASLT_ALGO_CAP_REDUCTION_SCHEME_MASK = 1,
+
+ /** support for cta swizzling, see CUBLASLT_ALGO_CONFIG_CTA_SWIZZLING
+ *
+ * uint32_t, 0 means no support, 1 means supported value of 1, other values are reserved
+ */
+ CUBLASLT_ALGO_CAP_CTA_SWIZZLING_SUPPORT = 2,
+
+ /** support strided batch
+ *
+ * int32_t, 0 means no support, supported otherwise
+ */
+ CUBLASLT_ALGO_CAP_STRIDED_BATCH_SUPPORT = 3,
+
+ /** support results out of place (D != C in D = alpha.A.B + beta.C)
+ *
+ * int32_t, 0 means no support, supported otherwise
+ */
+ CUBLASLT_ALGO_CAP_OUT_OF_PLACE_RESULT_SUPPORT = 4,
+
+ /** syrk/herk support (on top of regular gemm)
+ *
+ * int32_t, 0 means no support, supported otherwise
+ */
+ CUBLASLT_ALGO_CAP_UPLO_SUPPORT = 5,
+
+ /** tile ids possible to use, see cublasLtMatmulTile_t; if no tile ids are supported use
+ * CUBLASLT_MATMUL_TILE_UNDEFINED
+ *
+ * use cublasLtMatmulAlgoCapGetAttribute() with sizeInBytes=0 to query actual count
+ *
+ * array of uint32_t
+ */
+ CUBLASLT_ALGO_CAP_TILE_IDS = 6,
+
+ /** custom option range is from 0 to CUBLASLT_ALGO_CAP_CUSTOM_OPTION_MAX (inclusive), see
+ * CUBLASLT_ALGO_CONFIG_CUSTOM_OPTION
+ *
+ * int32_t
+ */
+ CUBLASLT_ALGO_CAP_CUSTOM_OPTION_MAX = 7,
+
+ /** whether algorithm supports custom (not COL or ROW memory order), see cublasLtOrder_t
+ *
+ * int32_t 0 means only COL and ROW memory order is allowed, non-zero means that algo might have different
+ * requirements;
+ */
+ CUBLASLT_ALGO_CAP_CUSTOM_MEMORY_ORDER = 10,
+
+ /** bitmask enumerating pointer modes algorithm supports
+ *
+ * uint32_t, see cublasLtPointerModeMask_t
+ */
+ CUBLASLT_ALGO_CAP_POINTER_MODE_MASK = 11,
+
+ /** bitmask enumerating kinds of postprocessing algorithm supports in the epilogue
+ *
+ * uint32_t, see cublasLtEpilogue_t
+ */
+ CUBLASLT_ALGO_CAP_EPILOGUE_MASK = 12,
+
+ /** stages ids possible to use, see cublasLtMatmulStages_t; if no stages ids are supported use
+ * CUBLASLT_MATMUL_STAGES_UNDEFINED
+ *
+ * use cublasLtMatmulAlgoCapGetAttribute() with sizeInBytes=0 to query actual count
+ *
+ * array of uint32_t
+ */
+ CUBLASLT_ALGO_CAP_STAGES_IDS = 13,
+
+ /** support for nagative ld for all of the matrices
+ *
+ * int32_t 0 means no support, supported otherwise
+ */
+ CUBLASLT_ALGO_CAP_LD_NEGATIVE = 14,
+
+ /** details about algorithm's implementation that affect it's numerical behavior
+ *
+ * uint64_t, see cublasLtNumericalImplFlags_t
+ */
+ CUBLASLT_ALGO_CAP_NUMERICAL_IMPL_FLAGS = 15,
+
+ /** minimum alignment required for A matrix in bytes
+ * (required for buffer pointer, leading dimension, and possibly other strides defined for matrix memory order)
+ *
+ * uint32_t
+ */
+ CUBLASLT_ALGO_CAP_MIN_ALIGNMENT_A_BYTES = 16,
+
+ /** minimum alignment required for B matrix in bytes
+ * (required for buffer pointer, leading dimension, and possibly other strides defined for matrix memory order)
+ *
+ * uint32_t
+ */
+ CUBLASLT_ALGO_CAP_MIN_ALIGNMENT_B_BYTES = 17,
+
+ /** minimum alignment required for C matrix in bytes
+ * (required for buffer pointer, leading dimension, and possibly other strides defined for matrix memory order)
+ *
+ * uint32_t
+ */
+ CUBLASLT_ALGO_CAP_MIN_ALIGNMENT_C_BYTES = 18,
+
+ /** minimum alignment required for D matrix in bytes
+ * (required for buffer pointer, leading dimension, and possibly other strides defined for matrix memory order)
+ *
+ * uint32_t
+ */
+ CUBLASLT_ALGO_CAP_MIN_ALIGNMENT_D_BYTES = 19,
+
+ /** EXPERIMENTAL: support for synchronization via atomic counters
+ *
+ * int32_t
+ */
+ CUBLASLT_ALGO_CAP_ATOMIC_SYNC = 20,
+} cublasLtMatmulAlgoCapAttributes_t;
+
+/** Get algo capability attribute.
+ *
+ * E.g. to get list of supported Tile IDs:
+ * cublasLtMatmulTile_t tiles[CUBLASLT_MATMUL_TILE_END];
+ * size_t num_tiles, size_written;
+ * if (cublasLtMatmulAlgoCapGetAttribute(algo, CUBLASLT_ALGO_CAP_TILE_IDS, tiles, sizeof(tiles), size_written) ==
+ * CUBLAS_STATUS_SUCCESS) { num_tiles = size_written / sizeof(tiles[0]);
+ * }
+ *
+ * \param[in] algo The algo descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number of
+ * bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoCapGetAttribute(const cublasLtMatmulAlgo_t* algo,
+ cublasLtMatmulAlgoCapAttributes_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/** Algo Configuration Attributes that can be set according to the Algo capabilities
+ */
+typedef enum {
+ /** algorithm index, see cublasLtMatmulAlgoGetIds()
+ *
+ * readonly, set by cublasLtMatmulAlgoInit()
+ * int32_t
+ */
+ CUBLASLT_ALGO_CONFIG_ID = 0,
+ /** tile id, see cublasLtMatmulTile_t
+ *
+ * uint32_t, default: CUBLASLT_MATMUL_TILE_UNDEFINED
+ */
+ CUBLASLT_ALGO_CONFIG_TILE_ID = 1,
+ /** Number of K splits. If the number of K splits is greater than one, SPLITK_NUM parts
+ * of matrix multiplication will be computed in parallel. The results will be accumulated
+ * according to CUBLASLT_ALGO_CONFIG_REDUCTION_SCHEME
+ *
+ * int32_t, default: 1
+ */
+ CUBLASLT_ALGO_CONFIG_SPLITK_NUM = 2,
+ /** reduction scheme, see cublasLtReductionScheme_t
+ *
+ * uint32_t, default: CUBLASLT_REDUCTION_SCHEME_NONE
+ */
+ CUBLASLT_ALGO_CONFIG_REDUCTION_SCHEME = 3,
+ /** cta swizzling, change mapping from CUDA grid coordinates to parts of the matrices
+ *
+ * possible values: 0, 1, other values reserved
+ *
+ * uint32_t, default: 0
+ */
+ CUBLASLT_ALGO_CONFIG_CTA_SWIZZLING = 4,
+ /** custom option, each algorithm can support some custom options that don't fit description of the other config
+ * attributes, see CUBLASLT_ALGO_CAP_CUSTOM_OPTION_MAX to get accepted range for any specific case
+ *
+ * uint32_t, default: 0
+ */
+ CUBLASLT_ALGO_CONFIG_CUSTOM_OPTION = 5,
+ /** stages id, see cublasLtMatmulStages_t
+ *
+ * uint32_t, default: CUBLASLT_MATMUL_STAGES_UNDEFINED
+ */
+ CUBLASLT_ALGO_CONFIG_STAGES_ID = 6,
+ /** inner shape id, see cublasLtMatmulInnerShape_t
+ *
+ * uint16_t, default: 0 (CUBLASLT_MATMUL_INNER_SHAPE_UNDEFINED)
+ */
+ CUBLASLT_ALGO_CONFIG_INNER_SHAPE_ID = 7,
+ /** Thread Block Cluster shape id, see cublasLtClusterShape_t. Defines cluster size to use.
+ *
+ * uint16_t, default: 0 (CUBLASLT_CLUSTER_SHAPE_AUTO)
+ */
+ CUBLASLT_ALGO_CONFIG_CLUSTER_SHAPE_ID = 8,
+} cublasLtMatmulAlgoConfigAttributes_t;
+
+/** Set algo configuration attribute.
+ *
+ * \param[in] algo The algo descriptor
+ * \param[in] attr The attribute
+ * \param[in] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoConfigSetAttribute(cublasLtMatmulAlgo_t* algo,
+ cublasLtMatmulAlgoConfigAttributes_t attr,
+ const void* buf,
+ size_t sizeInBytes);
+
+/** Get algo configuration attribute.
+ *
+ * \param[in] algo The algo descriptor
+ * \param[in] attr The attribute
+ * \param[out] buf memory address containing the new value
+ * \param[in] sizeInBytes size of buf buffer for verification (in bytes)
+ * \param[out] sizeWritten only valid when return value is CUBLAS_STATUS_SUCCESS. If sizeInBytes is non-zero: number of
+ * bytes actually written, if sizeInBytes is 0: number of bytes needed to write full contents
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if sizeInBytes is 0 and sizeWritten is NULL, or if sizeInBytes is non-zero
+ * and buf is NULL or sizeInBytes doesn't match size of internal storage for
+ * selected attribute
+ * \retval CUBLAS_STATUS_SUCCESS if attribute's value was successfully written to user memory
+ */
+cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoConfigGetAttribute(const cublasLtMatmulAlgo_t* algo,
+ cublasLtMatmulAlgoConfigAttributes_t attr,
+ void* buf,
+ size_t sizeInBytes,
+ size_t* sizeWritten);
+
+/** Experimental: Logger callback type.
+ */
+typedef void (*cublasLtLoggerCallback_t)(int logLevel, const char* functionName, const char* message);
+
+/** Experimental: Logger callback setter.
+ *
+ * \param[in] callback a user defined callback function to be called by the logger
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if callback was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerSetCallback(cublasLtLoggerCallback_t callback);
+
+/** Experimental: Log file setter.
+ *
+ * \param[in] file an open file with write permissions
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if log file was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerSetFile(FILE* file);
+
+/** Experimental: Open log file.
+ *
+ * \param[in] logFile log file path. if the log file does not exist, it will be created
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if log file was created successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerOpenFile(const char* logFile);
+
+/** Experimental: Log level setter.
+ *
+ * \param[in] level log level, should be one of the following:
+ * 0. Off
+ * 1. Errors
+ * 2. Performance Trace
+ * 3. Performance Hints
+ * 4. Heuristics Trace
+ * 5. API Trace
+ *
+ * \retval CUBLAS_STATUS_INVALID_VALUE if log level is not one of the above levels
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if log level was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerSetLevel(int level);
+
+/** Experimental: Log mask setter.
+ *
+ * \param[in] mask log mask, should be a combination of the following masks:
+ * 0. Off
+ * 1. Errors
+ * 2. Performance Trace
+ * 4. Performance Hints
+ * 8. Heuristics Trace
+ * 16. API Trace
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if log mask was set successfully
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerSetMask(int mask);
+
+/** Experimental: Disable logging for the entire session.
+ *
+ * \retval CUBLAS_STATUS_SUCCESS if disabled logging
+ */
+cublasStatus_t CUBLASWINAPI cublasLtLoggerForceDisable();
+
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasXt.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasXt.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe0e6f99b952514874c45208e751f5330e71570c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublasXt.h
@@ -0,0 +1,693 @@
+/*
+ * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+/* cublasXt : Host API, Out of Core and Multi-GPU BLAS Library
+
+*/
+
+#if !defined(CUBLAS_XT_H_)
+#define CUBLAS_XT_H_
+
+#include "driver_types.h"
+#include "cuComplex.h" /* import complex data type */
+
+#include "cublas_v2.h"
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* __cplusplus */
+
+struct cublasXtContext;
+typedef struct cublasXtContext* cublasXtHandle_t;
+
+cublasStatus_t CUBLASWINAPI cublasXtCreate(cublasXtHandle_t* handle);
+cublasStatus_t CUBLASWINAPI cublasXtDestroy(cublasXtHandle_t handle);
+cublasStatus_t CUBLASWINAPI cublasXtGetNumBoards(int nbDevices, int deviceId[], int* nbBoards);
+cublasStatus_t CUBLASWINAPI cublasXtMaxBoards(int* nbGpuBoards);
+/* This routine selects the Gpus that the user want to use for CUBLAS-XT */
+cublasStatus_t CUBLASWINAPI cublasXtDeviceSelect(cublasXtHandle_t handle, int nbDevices, int deviceId[]);
+
+/* This routine allows to change the dimension of the tiles ( blockDim x blockDim ) */
+cublasStatus_t CUBLASWINAPI cublasXtSetBlockDim(cublasXtHandle_t handle, int blockDim);
+cublasStatus_t CUBLASWINAPI cublasXtGetBlockDim(cublasXtHandle_t handle, int* blockDim);
+
+typedef enum { CUBLASXT_PINNING_DISABLED = 0, CUBLASXT_PINNING_ENABLED = 1 } cublasXtPinnedMemMode_t;
+/* This routine allows to CUBLAS-XT to pin the Host memory if it find out that some of the matrix passed
+ are not pinned : Pinning/Unpinning the Host memory is still a costly operation
+ It is better if the user controls the memory on its own (by pinning/unpinning oly when necessary)
+*/
+cublasStatus_t CUBLASWINAPI cublasXtGetPinningMemMode(cublasXtHandle_t handle, cublasXtPinnedMemMode_t* mode);
+cublasStatus_t CUBLASWINAPI cublasXtSetPinningMemMode(cublasXtHandle_t handle, cublasXtPinnedMemMode_t mode);
+
+/* This routines is to provide a CPU Blas routines, used for too small sizes or hybrid computation */
+typedef enum {
+ CUBLASXT_FLOAT = 0,
+ CUBLASXT_DOUBLE = 1,
+ CUBLASXT_COMPLEX = 2,
+ CUBLASXT_DOUBLECOMPLEX = 3,
+} cublasXtOpType_t;
+
+typedef enum {
+ CUBLASXT_GEMM = 0,
+ CUBLASXT_SYRK = 1,
+ CUBLASXT_HERK = 2,
+ CUBLASXT_SYMM = 3,
+ CUBLASXT_HEMM = 4,
+ CUBLASXT_TRSM = 5,
+ CUBLASXT_SYR2K = 6,
+ CUBLASXT_HER2K = 7,
+
+ CUBLASXT_SPMM = 8,
+ CUBLASXT_SYRKX = 9,
+ CUBLASXT_HERKX = 10,
+ CUBLASXT_TRMM = 11,
+ CUBLASXT_ROUTINE_MAX = 12,
+} cublasXtBlasOp_t;
+
+/* Currently only 32-bit integer BLAS routines are supported */
+cublasStatus_t CUBLASWINAPI cublasXtSetCpuRoutine(cublasXtHandle_t handle,
+ cublasXtBlasOp_t blasOp,
+ cublasXtOpType_t type,
+ void* blasFunctor);
+
+/* Specified the percentage of work that should done by the CPU, default is 0 (no work) */
+cublasStatus_t CUBLASWINAPI cublasXtSetCpuRatio(cublasXtHandle_t handle,
+ cublasXtBlasOp_t blasOp,
+ cublasXtOpType_t type,
+ float ratio);
+
+/* GEMM */
+cublasStatus_t CUBLASWINAPI cublasXtSgemm(cublasXtHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ size_t m,
+ size_t n,
+ size_t k,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* B,
+ size_t ldb,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDgemm(cublasXtHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ size_t m,
+ size_t n,
+ size_t k,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* B,
+ size_t ldb,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCgemm(cublasXtHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ size_t m,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZgemm(cublasXtHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ size_t m,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* ------------------------------------------------------- */
+/* SYRK */
+cublasStatus_t CUBLASWINAPI cublasXtSsyrk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDsyrk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCsyrk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZsyrk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* -------------------------------------------------------------------- */
+/* HERK */
+cublasStatus_t CUBLASWINAPI cublasXtCherk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const float* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const float* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZherk(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const double* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const double* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* -------------------------------------------------------------------- */
+/* SYR2K */
+cublasStatus_t CUBLASWINAPI cublasXtSsyr2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* B,
+ size_t ldb,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDsyr2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* B,
+ size_t ldb,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCsyr2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZsyr2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* -------------------------------------------------------------------- */
+/* HERKX : variant extension of HERK */
+cublasStatus_t CUBLASWINAPI cublasXtCherkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const float* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZherkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+
+/* -------------------------------------------------------------------- */
+/* TRSM */
+cublasStatus_t CUBLASWINAPI cublasXtStrsm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ float* B,
+ size_t ldb);
+
+cublasStatus_t CUBLASWINAPI cublasXtDtrsm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ double* B,
+ size_t ldb);
+
+cublasStatus_t CUBLASWINAPI cublasXtCtrsm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ cuComplex* B,
+ size_t ldb);
+
+cublasStatus_t CUBLASWINAPI cublasXtZtrsm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ cuDoubleComplex* B,
+ size_t ldb);
+/* -------------------------------------------------------------------- */
+/* SYMM : Symmetric Multiply Matrix*/
+cublasStatus_t CUBLASWINAPI cublasXtSsymm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* B,
+ size_t ldb,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDsymm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* B,
+ size_t ldb,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCsymm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZsymm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* -------------------------------------------------------------------- */
+/* HEMM : Hermitian Matrix Multiply */
+cublasStatus_t CUBLASWINAPI cublasXtChemm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZhemm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+
+/* -------------------------------------------------------------------- */
+/* SYRKX : variant extension of SYRK */
+cublasStatus_t CUBLASWINAPI cublasXtSsyrkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* B,
+ size_t ldb,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDsyrkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* B,
+ size_t ldb,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCsyrkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZsyrkx(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+/* -------------------------------------------------------------------- */
+/* HER2K : variant extension of HERK */
+cublasStatus_t CUBLASWINAPI cublasXtCher2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ const float* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZher2k(cublasXtHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ size_t n,
+ size_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+
+/* -------------------------------------------------------------------- */
+/* SPMM : Symmetric Packed Multiply Matrix*/
+cublasStatus_t CUBLASWINAPI cublasXtSspmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const float* alpha,
+ const float* AP,
+ const float* B,
+ size_t ldb,
+ const float* beta,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDspmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const double* alpha,
+ const double* AP,
+ const double* B,
+ size_t ldb,
+ const double* beta,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCspmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuComplex* alpha,
+ const cuComplex* AP,
+ const cuComplex* B,
+ size_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZspmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ size_t m,
+ size_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* AP,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ size_t ldc);
+
+/* -------------------------------------------------------------------- */
+/* TRMM */
+cublasStatus_t CUBLASWINAPI cublasXtStrmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const float* alpha,
+ const float* A,
+ size_t lda,
+ const float* B,
+ size_t ldb,
+ float* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtDtrmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const double* alpha,
+ const double* A,
+ size_t lda,
+ const double* B,
+ size_t ldb,
+ double* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtCtrmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ size_t lda,
+ const cuComplex* B,
+ size_t ldb,
+ cuComplex* C,
+ size_t ldc);
+
+cublasStatus_t CUBLASWINAPI cublasXtZtrmm(cublasXtHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ size_t m,
+ size_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ size_t lda,
+ const cuDoubleComplex* B,
+ size_t ldb,
+ cuDoubleComplex* C,
+ size_t ldc);
+
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
+
+#endif /* !defined(CUBLAS_XT_H_) */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_api.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..95f4bdebe37089a8a68c5ad3ec39fd9d7bf96571
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_api.h
@@ -0,0 +1,5835 @@
+/*
+ * Copyright 1993-2022 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+/*
+ * This is the public header file for the CUBLAS library, defining the API
+ *
+ * CUBLAS is an implementation of BLAS (Basic Linear Algebra Subroutines)
+ * on top of the CUDA runtime.
+ */
+
+#if !defined(CUBLAS_API_H_)
+#define CUBLAS_API_H_
+
+#ifndef CUBLASWINAPI
+#ifdef _WIN32
+#define CUBLASWINAPI __stdcall
+#else
+#define CUBLASWINAPI
+#endif
+#endif
+
+#ifndef CUBLASAPI
+#error "This file should not be included without defining CUBLASAPI"
+#endif
+
+#include
+
+#include "driver_types.h"
+#include "cuComplex.h" /* import complex data type */
+
+#include
+#include
+
+#include
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* __cplusplus */
+
+#define CUBLAS_VER_MAJOR 12
+#define CUBLAS_VER_MINOR 8
+#define CUBLAS_VER_PATCH 4
+#define CUBLAS_VER_BUILD 1
+#define CUBLAS_VERSION (CUBLAS_VER_MAJOR * 10000 + CUBLAS_VER_MINOR * 100 + CUBLAS_VER_PATCH)
+
+/* CUBLAS status type returns */
+typedef enum {
+ CUBLAS_STATUS_SUCCESS = 0,
+ CUBLAS_STATUS_NOT_INITIALIZED = 1,
+ CUBLAS_STATUS_ALLOC_FAILED = 3,
+ CUBLAS_STATUS_INVALID_VALUE = 7,
+ CUBLAS_STATUS_ARCH_MISMATCH = 8,
+ CUBLAS_STATUS_MAPPING_ERROR = 11,
+ CUBLAS_STATUS_EXECUTION_FAILED = 13,
+ CUBLAS_STATUS_INTERNAL_ERROR = 14,
+ CUBLAS_STATUS_NOT_SUPPORTED = 15,
+ CUBLAS_STATUS_LICENSE_ERROR = 16
+} cublasStatus_t;
+
+typedef enum { CUBLAS_FILL_MODE_LOWER = 0, CUBLAS_FILL_MODE_UPPER = 1, CUBLAS_FILL_MODE_FULL = 2 } cublasFillMode_t;
+
+typedef enum { CUBLAS_DIAG_NON_UNIT = 0, CUBLAS_DIAG_UNIT = 1 } cublasDiagType_t;
+
+typedef enum { CUBLAS_SIDE_LEFT = 0, CUBLAS_SIDE_RIGHT = 1 } cublasSideMode_t;
+
+typedef enum {
+ CUBLAS_OP_N = 0,
+ CUBLAS_OP_T = 1,
+ CUBLAS_OP_C = 2,
+ CUBLAS_OP_HERMITAN = 2, /* synonym if CUBLAS_OP_C */
+ CUBLAS_OP_CONJG = 3 /* conjugate, placeholder - not supported in the current release */
+} cublasOperation_t;
+
+typedef enum { CUBLAS_POINTER_MODE_HOST = 0, CUBLAS_POINTER_MODE_DEVICE = 1 } cublasPointerMode_t;
+
+typedef enum { CUBLAS_ATOMICS_NOT_ALLOWED = 0, CUBLAS_ATOMICS_ALLOWED = 1 } cublasAtomicsMode_t;
+
+/*For different GEMM algorithm */
+typedef enum {
+ CUBLAS_GEMM_DFALT = -1,
+ CUBLAS_GEMM_DEFAULT = -1,
+ CUBLAS_GEMM_ALGO0 = 0,
+ CUBLAS_GEMM_ALGO1 = 1,
+ CUBLAS_GEMM_ALGO2 = 2,
+ CUBLAS_GEMM_ALGO3 = 3,
+ CUBLAS_GEMM_ALGO4 = 4,
+ CUBLAS_GEMM_ALGO5 = 5,
+ CUBLAS_GEMM_ALGO6 = 6,
+ CUBLAS_GEMM_ALGO7 = 7,
+ CUBLAS_GEMM_ALGO8 = 8,
+ CUBLAS_GEMM_ALGO9 = 9,
+ CUBLAS_GEMM_ALGO10 = 10,
+ CUBLAS_GEMM_ALGO11 = 11,
+ CUBLAS_GEMM_ALGO12 = 12,
+ CUBLAS_GEMM_ALGO13 = 13,
+ CUBLAS_GEMM_ALGO14 = 14,
+ CUBLAS_GEMM_ALGO15 = 15,
+ CUBLAS_GEMM_ALGO16 = 16,
+ CUBLAS_GEMM_ALGO17 = 17,
+ CUBLAS_GEMM_ALGO18 = 18, // sliced 32x32
+ CUBLAS_GEMM_ALGO19 = 19, // sliced 64x32
+ CUBLAS_GEMM_ALGO20 = 20, // sliced 128x32
+ CUBLAS_GEMM_ALGO21 = 21, // sliced 32x32 -splitK
+ CUBLAS_GEMM_ALGO22 = 22, // sliced 64x32 -splitK
+ CUBLAS_GEMM_ALGO23 = 23, // sliced 128x32 -splitK
+ CUBLAS_GEMM_DEFAULT_TENSOR_OP = 99,
+ CUBLAS_GEMM_DFALT_TENSOR_OP = 99,
+ CUBLAS_GEMM_ALGO0_TENSOR_OP = 100,
+ CUBLAS_GEMM_ALGO1_TENSOR_OP = 101,
+ CUBLAS_GEMM_ALGO2_TENSOR_OP = 102,
+ CUBLAS_GEMM_ALGO3_TENSOR_OP = 103,
+ CUBLAS_GEMM_ALGO4_TENSOR_OP = 104,
+ CUBLAS_GEMM_ALGO5_TENSOR_OP = 105,
+ CUBLAS_GEMM_ALGO6_TENSOR_OP = 106,
+ CUBLAS_GEMM_ALGO7_TENSOR_OP = 107,
+ CUBLAS_GEMM_ALGO8_TENSOR_OP = 108,
+ CUBLAS_GEMM_ALGO9_TENSOR_OP = 109,
+ CUBLAS_GEMM_ALGO10_TENSOR_OP = 110,
+ CUBLAS_GEMM_ALGO11_TENSOR_OP = 111,
+ CUBLAS_GEMM_ALGO12_TENSOR_OP = 112,
+ CUBLAS_GEMM_ALGO13_TENSOR_OP = 113,
+ CUBLAS_GEMM_ALGO14_TENSOR_OP = 114,
+ CUBLAS_GEMM_ALGO15_TENSOR_OP = 115
+} cublasGemmAlgo_t;
+
+/*Enum for default math mode/tensor operation*/
+typedef enum {
+ CUBLAS_DEFAULT_MATH = 0,
+
+ /* deprecated, same effect as using CUBLAS_COMPUTE_32F_FAST_16F, will be removed in a future release */
+ CUBLAS_TENSOR_OP_MATH = 1,
+
+ /* same as using matching _PEDANTIC compute type when using cublasroutine calls or cublasEx() calls with
+ cudaDataType as compute type */
+ CUBLAS_PEDANTIC_MATH = 2,
+
+ /* allow accelerating single precision routines using TF32 tensor cores */
+ CUBLAS_TF32_TENSOR_OP_MATH = 3,
+
+ /* flag to force any reductons to use the accumulator type and not output type in case of mixed precision routines
+ with lower size output type */
+ CUBLAS_MATH_DISALLOW_REDUCED_PRECISION_REDUCTION = 16,
+} cublasMath_t;
+
+/* For backward compatibility purposes */
+typedef cudaDataType cublasDataType_t;
+
+/* Enum for compute type
+ *
+ * - default types provide best available performance using all available hardware features
+ * and guarantee internal storage precision with at least the same precision and range;
+ * - _PEDANTIC types ensure standard arithmetic and exact specified internal storage format;
+ * - _FAST types allow for some loss of precision to enable higher throughput arithmetic.
+ */
+typedef enum {
+ CUBLAS_COMPUTE_16F = 64, /* half - default */
+ CUBLAS_COMPUTE_16F_PEDANTIC = 65, /* half - pedantic */
+ CUBLAS_COMPUTE_32F = 68, /* float - default */
+ CUBLAS_COMPUTE_32F_PEDANTIC = 69, /* float - pedantic */
+ CUBLAS_COMPUTE_32F_FAST_16F = 74, /* float - fast, allows down-converting inputs to half or TF32 */
+ CUBLAS_COMPUTE_32F_FAST_16BF = 75, /* float - fast, allows down-converting inputs to bfloat16 or TF32 */
+ CUBLAS_COMPUTE_32F_FAST_TF32 = 77, /* float - fast, allows down-converting inputs to TF32 */
+ CUBLAS_COMPUTE_64F = 70, /* double - default */
+ CUBLAS_COMPUTE_64F_PEDANTIC = 71, /* double - pedantic */
+ CUBLAS_COMPUTE_32I = 72, /* signed 32-bit int - default */
+ CUBLAS_COMPUTE_32I_PEDANTIC = 73, /* signed 32-bit int - pedantic */
+} cublasComputeType_t;
+
+/* Opaque structure holding CUBLAS library context */
+struct cublasContext;
+typedef struct cublasContext* cublasHandle_t;
+
+/* Cublas logging */
+typedef void (*cublasLogCallback)(const char* msg);
+
+/* cuBLAS Exported API {{{ */
+
+/* --------------- CUBLAS Helper Functions ---------------- */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCreate_v2(cublasHandle_t* handle);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDestroy_v2(cublasHandle_t handle);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetVersion_v2(cublasHandle_t handle, int* version);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetProperty(libraryPropertyType type, int* value);
+
+CUBLASAPI size_t CUBLASWINAPI cublasGetCudartVersion(void);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetWorkspace_v2(cublasHandle_t handle,
+ void* workspace,
+ size_t workspaceSizeInBytes);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetStream_v2(cublasHandle_t handle, cudaStream_t streamId);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetStream_v2(cublasHandle_t handle, cudaStream_t* streamId);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetPointerMode_v2(cublasHandle_t handle, cublasPointerMode_t* mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetPointerMode_v2(cublasHandle_t handle, cublasPointerMode_t mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetAtomicsMode(cublasHandle_t handle, cublasAtomicsMode_t* mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetAtomicsMode(cublasHandle_t handle, cublasAtomicsMode_t mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetMathMode(cublasHandle_t handle, cublasMath_t* mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetMathMode(cublasHandle_t handle, cublasMath_t mode);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetSmCountTarget(cublasHandle_t handle, int* smCountTarget);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetSmCountTarget(cublasHandle_t handle, int smCountTarget);
+
+CUBLASAPI const char* CUBLASWINAPI cublasGetStatusName(cublasStatus_t status);
+
+CUBLASAPI const char* CUBLASWINAPI cublasGetStatusString(cublasStatus_t status);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasLoggerConfigure(int logIsOn,
+ int logToStdOut,
+ int logToStdErr,
+ const char* logFileName);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSetLoggerCallback(cublasLogCallback userCallback);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGetLoggerCallback(cublasLogCallback* userCallback);
+
+cublasStatus_t CUBLASWINAPI cublasSetVector(int n, int elemSize, const void* x, int incx, void* devicePtr, int incy);
+
+cublasStatus_t CUBLASWINAPI
+cublasSetVector_64(int64_t n, int64_t elemSize, const void* x, int64_t incx, void* devicePtr, int64_t incy);
+
+cublasStatus_t CUBLASWINAPI cublasGetVector(int n, int elemSize, const void* x, int incx, void* y, int incy);
+
+cublasStatus_t CUBLASWINAPI
+cublasGetVector_64(int64_t n, int64_t elemSize, const void* x, int64_t incx, void* y, int64_t incy);
+
+cublasStatus_t CUBLASWINAPI cublasSetMatrix(int rows, int cols, int elemSize, const void* A, int lda, void* B, int ldb);
+
+cublasStatus_t CUBLASWINAPI
+cublasSetMatrix_64(int64_t rows, int64_t cols, int64_t elemSize, const void* A, int64_t lda, void* B, int64_t ldb);
+
+cublasStatus_t CUBLASWINAPI cublasGetMatrix(int rows, int cols, int elemSize, const void* A, int lda, void* B, int ldb);
+
+cublasStatus_t CUBLASWINAPI
+cublasGetMatrix_64(int64_t rows, int64_t cols, int64_t elemSize, const void* A, int64_t lda, void* B, int64_t ldb);
+
+cublasStatus_t CUBLASWINAPI cublasSetVectorAsync(
+ int n, int elemSize, const void* hostPtr, int incx, void* devicePtr, int incy, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI cublasSetVectorAsync_64(
+ int64_t n, int64_t elemSize, const void* hostPtr, int64_t incx, void* devicePtr, int64_t incy, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI cublasGetVectorAsync(
+ int n, int elemSize, const void* devicePtr, int incx, void* hostPtr, int incy, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI cublasGetVectorAsync_64(
+ int64_t n, int64_t elemSize, const void* devicePtr, int64_t incx, void* hostPtr, int64_t incy, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI
+cublasSetMatrixAsync(int rows, int cols, int elemSize, const void* A, int lda, void* B, int ldb, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI cublasSetMatrixAsync_64(int64_t rows,
+ int64_t cols,
+ int64_t elemSize,
+ const void* A,
+ int64_t lda,
+ void* B,
+ int64_t ldb,
+ cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI
+cublasGetMatrixAsync(int rows, int cols, int elemSize, const void* A, int lda, void* B, int ldb, cudaStream_t stream);
+
+cublasStatus_t CUBLASWINAPI cublasGetMatrixAsync_64(int64_t rows,
+ int64_t cols,
+ int64_t elemSize,
+ const void* A,
+ int64_t lda,
+ void* B,
+ int64_t ldb,
+ cudaStream_t stream);
+
+CUBLASAPI void CUBLASWINAPI cublasXerbla(const char* srName, int info);
+
+/* --------------- CUBLAS BLAS1 Functions ---------------- */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex(cublasHandle_t handle,
+ int n,
+ const void* x,
+ cudaDataType xType,
+ int incx,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex_64(cublasHandle_t handle,
+ int64_t n,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSnrm2_v2(cublasHandle_t handle, int n, const float* x, int incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSnrm2_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDnrm2_v2(cublasHandle_t handle, int n, const double* x, int incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDnrm2_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScnrm2_v2(cublasHandle_t handle, int n, const cuComplex* x, int incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScnrm2_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDznrm2_v2(cublasHandle_t handle, int n, const cuDoubleComplex* x, int incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDznrm2_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDotEx(cublasHandle_t handle,
+ int n,
+ const void* x,
+ cudaDataType xType,
+ int incx,
+ const void* y,
+ cudaDataType yType,
+ int incy,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDotEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ const void* y,
+ cudaDataType yType,
+ int64_t incy,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDotcEx(cublasHandle_t handle,
+ int n,
+ const void* x,
+ cudaDataType xType,
+ int incx,
+ const void* y,
+ cudaDataType yType,
+ int incy,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDotcEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ const void* y,
+ cudaDataType yType,
+ int64_t incy,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSdot_v2(cublasHandle_t handle, int n, const float* x, int incx, const float* y, int incy, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSdot_v2_64(
+ cublasHandle_t handle, int64_t n, const float* x, int64_t incx, const float* y, int64_t incy, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDdot_v2(cublasHandle_t handle, int n, const double* x, int incx, const double* y, int incy, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDdot_v2_64(
+ cublasHandle_t handle, int64_t n, const double* x, int64_t incx, const double* y, int64_t incy, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdotu_v2(
+ cublasHandle_t handle, int n, const cuComplex* x, int incx, const cuComplex* y, int incy, cuComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdotu_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdotc_v2(
+ cublasHandle_t handle, int n, const cuComplex* x, int incx, const cuComplex* y, int incy, cuComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdotc_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdotu_v2(cublasHandle_t handle,
+ int n,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdotu_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdotc_v2(cublasHandle_t handle,
+ int n,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdotc_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasScalEx(cublasHandle_t handle,
+ int n,
+ const void* alpha,
+ cudaDataType alphaType,
+ void* x,
+ cudaDataType xType,
+ int incx,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasScalEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* alpha,
+ cudaDataType alphaType,
+ void* x,
+ cudaDataType xType,
+ int64_t incx,
+ cudaDataType executionType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSscal_v2(cublasHandle_t handle, int n, const float* alpha, float* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSscal_v2_64(cublasHandle_t handle, int64_t n, const float* alpha, float* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDscal_v2(cublasHandle_t handle, int n, const double* alpha, double* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDscal_v2_64(cublasHandle_t handle, int64_t n, const double* alpha, double* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCscal_v2(cublasHandle_t handle, int n, const cuComplex* alpha, cuComplex* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCscal_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* alpha, cuComplex* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCsscal_v2(cublasHandle_t handle, int n, const float* alpha, cuComplex* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCsscal_v2_64(cublasHandle_t handle, int64_t n, const float* alpha, cuComplex* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZscal_v2(cublasHandle_t handle, int n, const cuDoubleComplex* alpha, cuDoubleComplex* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZscal_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* alpha, cuDoubleComplex* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZdscal_v2(cublasHandle_t handle, int n, const double* alpha, cuDoubleComplex* x, int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZdscal_v2_64(cublasHandle_t handle, int64_t n, const double* alpha, cuDoubleComplex* x, int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasAxpyEx(cublasHandle_t handle,
+ int n,
+ const void* alpha,
+ cudaDataType alphaType,
+ const void* x,
+ cudaDataType xType,
+ int incx,
+ void* y,
+ cudaDataType yType,
+ int incy,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasAxpyEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* alpha,
+ cudaDataType alphaType,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* y,
+ cudaDataType yType,
+ int64_t incy,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSaxpy_v2(cublasHandle_t handle, int n, const float* alpha, const float* x, int incx, float* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSaxpy_v2_64(
+ cublasHandle_t handle, int64_t n, const float* alpha, const float* x, int64_t incx, float* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDaxpy_v2(cublasHandle_t handle, int n, const double* alpha, const double* x, int incx, double* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDaxpy_v2_64(
+ cublasHandle_t handle, int64_t n, const double* alpha, const double* x, int64_t incx, double* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCaxpy_v2(
+ cublasHandle_t handle, int n, const cuComplex* alpha, const cuComplex* x, int incx, cuComplex* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCaxpy_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZaxpy_v2(cublasHandle_t handle,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZaxpy_v2_64(cublasHandle_t handle,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCopyEx(
+ cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, void* y, cudaDataType yType, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCopyEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* y,
+ cudaDataType yType,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScopy_v2(cublasHandle_t handle, int n, const float* x, int incx, float* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScopy_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, float* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDcopy_v2(cublasHandle_t handle, int n, const double* x, int incx, double* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDcopy_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, double* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCcopy_v2(cublasHandle_t handle, int n, const cuComplex* x, int incx, cuComplex* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCcopy_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, cuComplex* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZcopy_v2(cublasHandle_t handle, int n, const cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZcopy_v2_64(
+ cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, cuDoubleComplex* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSswap_v2(cublasHandle_t handle, int n, float* x, int incx, float* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSswap_v2_64(cublasHandle_t handle, int64_t n, float* x, int64_t incx, float* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDswap_v2(cublasHandle_t handle, int n, double* x, int incx, double* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDswap_v2_64(cublasHandle_t handle, int64_t n, double* x, int64_t incx, double* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCswap_v2(cublasHandle_t handle, int n, cuComplex* x, int incx, cuComplex* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCswap_v2_64(cublasHandle_t handle, int64_t n, cuComplex* x, int64_t incx, cuComplex* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZswap_v2(cublasHandle_t handle, int n, cuDoubleComplex* x, int incx, cuDoubleComplex* y, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZswap_v2_64(cublasHandle_t handle, int64_t n, cuDoubleComplex* x, int64_t incx, cuDoubleComplex* y, int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSwapEx(
+ cublasHandle_t handle, int n, void* x, cudaDataType xType, int incx, void* y, cudaDataType yType, int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSwapEx_64(cublasHandle_t handle,
+ int64_t n,
+ void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* y,
+ cudaDataType yType,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIsamax_v2(cublasHandle_t handle, int n, const float* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIsamax_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIdamax_v2(cublasHandle_t handle, int n, const double* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIdamax_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIcamax_v2(cublasHandle_t handle, int n, const cuComplex* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIcamax_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIzamax_v2(cublasHandle_t handle, int n, const cuDoubleComplex* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIzamax_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIamaxEx(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIamaxEx_64(cublasHandle_t handle, int64_t n, const void* x, cudaDataType xType, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIsamin_v2(cublasHandle_t handle, int n, const float* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIsamin_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIdamin_v2(cublasHandle_t handle, int n, const double* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIdamin_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIcamin_v2(cublasHandle_t handle, int n, const cuComplex* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIcamin_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIzamin_v2(cublasHandle_t handle, int n, const cuDoubleComplex* x, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIzamin_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIaminEx(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, int* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasIaminEx_64(cublasHandle_t handle, int64_t n, const void* x, cudaDataType xType, int64_t incx, int64_t* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasAsumEx(cublasHandle_t handle,
+ int n,
+ const void* x,
+ cudaDataType xType,
+ int incx,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasAsumEx_64(cublasHandle_t handle,
+ int64_t n,
+ const void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* result,
+ cudaDataType resultType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSasum_v2(cublasHandle_t handle, int n, const float* x, int incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSasum_v2_64(cublasHandle_t handle, int64_t n, const float* x, int64_t incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDasum_v2(cublasHandle_t handle, int n, const double* x, int incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDasum_v2_64(cublasHandle_t handle, int64_t n, const double* x, int64_t incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScasum_v2(cublasHandle_t handle, int n, const cuComplex* x, int incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasScasum_v2_64(cublasHandle_t handle, int64_t n, const cuComplex* x, int64_t incx, float* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDzasum_v2(cublasHandle_t handle, int n, const cuDoubleComplex* x, int incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDzasum_v2_64(cublasHandle_t handle, int64_t n, const cuDoubleComplex* x, int64_t incx, double* result);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSrot_v2(cublasHandle_t handle, int n, float* x, int incx, float* y, int incy, const float* c, const float* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSrot_v2_64(
+ cublasHandle_t handle, int64_t n, float* x, int64_t incx, float* y, int64_t incy, const float* c, const float* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDrot_v2(cublasHandle_t handle, int n, double* x, int incx, double* y, int incy, const double* c, const double* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDrot_v2_64(cublasHandle_t handle,
+ int64_t n,
+ double* x,
+ int64_t incx,
+ double* y,
+ int64_t incy,
+ const double* c,
+ const double* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCrot_v2(
+ cublasHandle_t handle, int n, cuComplex* x, int incx, cuComplex* y, int incy, const float* c, const cuComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCrot_v2_64(cublasHandle_t handle,
+ int64_t n,
+ cuComplex* x,
+ int64_t incx,
+ cuComplex* y,
+ int64_t incy,
+ const float* c,
+ const cuComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsrot_v2(
+ cublasHandle_t handle, int n, cuComplex* x, int incx, cuComplex* y, int incy, const float* c, const float* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsrot_v2_64(cublasHandle_t handle,
+ int64_t n,
+ cuComplex* x,
+ int64_t incx,
+ cuComplex* y,
+ int64_t incy,
+ const float* c,
+ const float* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZrot_v2(cublasHandle_t handle,
+ int n,
+ cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* y,
+ int incy,
+ const double* c,
+ const cuDoubleComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZrot_v2_64(cublasHandle_t handle,
+ int64_t n,
+ cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* y,
+ int64_t incy,
+ const double* c,
+ const cuDoubleComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdrot_v2(cublasHandle_t handle,
+ int n,
+ cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* y,
+ int incy,
+ const double* c,
+ const double* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdrot_v2_64(cublasHandle_t handle,
+ int64_t n,
+ cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* y,
+ int64_t incy,
+ const double* c,
+ const double* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotEx(cublasHandle_t handle,
+ int n,
+ void* x,
+ cudaDataType xType,
+ int incx,
+ void* y,
+ cudaDataType yType,
+ int incy,
+ const void* c,
+ const void* s,
+ cudaDataType csType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotEx_64(cublasHandle_t handle,
+ int64_t n,
+ void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* y,
+ cudaDataType yType,
+ int64_t incy,
+ const void* c,
+ const void* s,
+ cudaDataType csType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSrotg_v2(cublasHandle_t handle, float* a, float* b, float* c, float* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDrotg_v2(cublasHandle_t handle, double* a, double* b, double* c, double* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCrotg_v2(cublasHandle_t handle, cuComplex* a, cuComplex* b, float* c, cuComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasZrotg_v2(cublasHandle_t handle, cuDoubleComplex* a, cuDoubleComplex* b, double* c, cuDoubleComplex* s);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotgEx(cublasHandle_t handle,
+ void* a,
+ void* b,
+ cudaDataType abType,
+ void* c,
+ void* s,
+ cudaDataType csType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSrotm_v2(cublasHandle_t handle, int n, float* x, int incx, float* y, int incy, const float* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSrotm_v2_64(cublasHandle_t handle, int64_t n, float* x, int64_t incx, float* y, int64_t incy, const float* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDrotm_v2(cublasHandle_t handle, int n, double* x, int incx, double* y, int incy, const double* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDrotm_v2_64(
+ cublasHandle_t handle, int64_t n, double* x, int64_t incx, double* y, int64_t incy, const double* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotmEx(cublasHandle_t handle,
+ int n,
+ void* x,
+ cudaDataType xType,
+ int incx,
+ void* y,
+ cudaDataType yType,
+ int incy,
+ const void* param,
+ cudaDataType paramType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotmEx_64(cublasHandle_t handle,
+ int64_t n,
+ void* x,
+ cudaDataType xType,
+ int64_t incx,
+ void* y,
+ cudaDataType yType,
+ int64_t incy,
+ const void* param,
+ cudaDataType paramType,
+ cudaDataType executiontype);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSrotmg_v2(cublasHandle_t handle, float* d1, float* d2, float* x1, const float* y1, float* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDrotmg_v2(cublasHandle_t handle, double* d1, double* d2, double* x1, const double* y1, double* param);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasRotmgEx(cublasHandle_t handle,
+ void* d1,
+ cudaDataType d1Type,
+ void* d2,
+ cudaDataType d2Type,
+ void* x1,
+ cudaDataType x1Type,
+ const void* y1,
+ cudaDataType y1Type,
+ void* param,
+ cudaDataType paramType,
+ cudaDataType executiontype);
+
+/* --------------- CUBLAS BLAS2 Functions ---------------- */
+
+/* GEMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ const float* beta,
+ float* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* x,
+ int64_t incx,
+ const float* beta,
+ float* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ const double* beta,
+ double* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* x,
+ int64_t incx,
+ const double* beta,
+ double* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+/* GBMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgbmv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ const float* beta,
+ float* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgbmv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ int64_t kl,
+ int64_t ku,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* x,
+ int64_t incx,
+ const float* beta,
+ float* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgbmv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ const double* beta,
+ double* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgbmv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ int64_t kl,
+ int64_t ku,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* x,
+ int64_t incx,
+ const double* beta,
+ double* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgbmv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgbmv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ int64_t kl,
+ int64_t ku,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgbmv_v2(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int kl,
+ int ku,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgbmv_v2_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ int64_t kl,
+ int64_t ku,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+/* TRMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const float* A,
+ int lda,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const float* A,
+ int64_t lda,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const double* A,
+ int lda,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const double* A,
+ int64_t lda,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuComplex* A,
+ int lda,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuComplex* A,
+ int64_t lda,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* TBMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const float* A,
+ int lda,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const float* A,
+ int64_t lda,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const double* A,
+ int lda,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const double* A,
+ int64_t lda,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const cuComplex* A,
+ int lda,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const cuComplex* A,
+ int64_t lda,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* TPMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const float* AP,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const float* AP,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const double* AP,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const double* AP,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuComplex* AP,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuComplex* AP,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuDoubleComplex* AP,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuDoubleComplex* AP,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* TRSV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const float* A,
+ int lda,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const float* A,
+ int64_t lda,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const double* A,
+ int lda,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const double* A,
+ int64_t lda,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuComplex* A,
+ int lda,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuComplex* A,
+ int64_t lda,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* TPSV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStpsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const float* AP,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStpsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const float* AP,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtpsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const double* AP,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtpsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const double* AP,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtpsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuComplex* AP,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtpsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuComplex* AP,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtpsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ const cuDoubleComplex* AP,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtpsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ const cuDoubleComplex* AP,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* TBSV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStbsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const float* A,
+ int lda,
+ float* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStbsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const float* A,
+ int64_t lda,
+ float* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtbsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const double* A,
+ int lda,
+ double* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtbsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const double* A,
+ int64_t lda,
+ double* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtbsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const cuComplex* A,
+ int lda,
+ cuComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtbsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const cuComplex* A,
+ int64_t lda,
+ cuComplex* x,
+ int64_t incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtbsv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int n,
+ int k,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* x,
+ int incx);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtbsv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ cuDoubleComplex* x,
+ int64_t incx);
+
+/* SYMV/HEMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsymv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ const float* beta,
+ float* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsymv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* x,
+ int64_t incx,
+ const float* beta,
+ float* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsymv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ const double* beta,
+ double* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsymv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* x,
+ int64_t incx,
+ const double* beta,
+ double* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsymv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsymv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsymv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsymv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChemv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChemv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhemv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhemv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+/* SBMV/HBMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ const float* beta,
+ float* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* x,
+ int64_t incx,
+ const float* beta,
+ float* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ const double* beta,
+ double* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* x,
+ int64_t incx,
+ const double* beta,
+ double* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhbmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhbmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+/* SPMV/HPMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const float* AP,
+ const float* x,
+ int incx,
+ const float* beta,
+ float* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* AP,
+ const float* x,
+ int64_t incx,
+ const float* beta,
+ float* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const double* AP,
+ const double* x,
+ int incx,
+ const double* beta,
+ double* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* AP,
+ const double* x,
+ int64_t incx,
+ const double* beta,
+ double* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* AP,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* AP,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpmv_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* AP,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpmv_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* AP,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy);
+
+/* GER */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSger_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const float* alpha,
+ const float* x,
+ int incx,
+ const float* y,
+ int incy,
+ float* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSger_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* x,
+ int64_t incx,
+ const float* y,
+ int64_t incy,
+ float* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDger_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const double* alpha,
+ const double* x,
+ int incx,
+ const double* y,
+ int incy,
+ double* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDger_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* x,
+ int64_t incx,
+ const double* y,
+ int64_t incy,
+ double* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgeru_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgeru_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgerc_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgerc_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgeru_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgeru_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgerc_v2(cublasHandle_t handle,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgerc_v2_64(cublasHandle_t handle,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+/* SYR/HER */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const float* x,
+ int incx,
+ float* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* x,
+ int64_t incx,
+ float* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const double* x,
+ int incx,
+ double* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* x,
+ int64_t incx,
+ double* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const cuComplex* x,
+ int incx,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+/* SPR/HPR */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspr_v2(
+ cublasHandle_t handle, cublasFillMode_t uplo, int n, const float* alpha, const float* x, int incx, float* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* x,
+ int64_t incx,
+ float* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspr_v2(
+ cublasHandle_t handle, cublasFillMode_t uplo, int n, const double* alpha, const double* x, int incx, double* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* x,
+ int64_t incx,
+ double* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const cuComplex* x,
+ int incx,
+ cuComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ cuComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpr_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpr_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* AP);
+
+/* SYR2/HER2 */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const float* x,
+ int incx,
+ const float* y,
+ int incy,
+ float* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* x,
+ int64_t incx,
+ const float* y,
+ int64_t incy,
+ float* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const double* x,
+ int incx,
+ const double* y,
+ int incy,
+ double* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* x,
+ int64_t incx,
+ const double* y,
+ int64_t incy,
+ double* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* A,
+ int64_t lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* A,
+ int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* A,
+ int64_t lda);
+
+/* SPR2/HPR2 */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const float* alpha,
+ const float* x,
+ int incx,
+ const float* y,
+ int incy,
+ float* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSspr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const float* alpha,
+ const float* x,
+ int64_t incx,
+ const float* y,
+ int64_t incy,
+ float* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const double* alpha,
+ const double* x,
+ int incx,
+ const double* y,
+ int incy,
+ double* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDspr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const double* alpha,
+ const double* x,
+ int64_t incx,
+ const double* y,
+ int64_t incy,
+ double* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int incx,
+ const cuComplex* y,
+ int incy,
+ cuComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChpr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* x,
+ int64_t incx,
+ const cuComplex* y,
+ int64_t incy,
+ cuComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpr2_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int incx,
+ const cuDoubleComplex* y,
+ int incy,
+ cuDoubleComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhpr2_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ const cuDoubleComplex* y,
+ int64_t incy,
+ cuDoubleComplex* AP);
+
+/* BATCH GEMV */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const float* const Aarray[],
+ int lda,
+ const float* const xarray[],
+ int incx,
+ const float* beta,
+ float* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* const Aarray[],
+ int64_t lda,
+ const float* const xarray[],
+ int64_t incx,
+ const float* beta,
+ float* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const double* alpha,
+ const double* const Aarray[],
+ int lda,
+ const double* const xarray[],
+ int incx,
+ const double* beta,
+ double* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* const Aarray[],
+ int64_t lda,
+ const double* const xarray[],
+ int64_t incx,
+ const double* beta,
+ double* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int lda,
+ const cuComplex* const xarray[],
+ int incx,
+ const cuComplex* beta,
+ cuComplex* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int64_t lda,
+ const cuComplex* const xarray[],
+ int64_t incx,
+ const cuComplex* beta,
+ cuComplex* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const Aarray[],
+ int lda,
+ const cuDoubleComplex* const xarray[],
+ int incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const Aarray[],
+ int64_t lda,
+ const cuDoubleComplex* const xarray[],
+ int64_t incx,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+#if defined(__cplusplus)
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSHgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __half* const Aarray[],
+ int lda,
+ const __half* const xarray[],
+ int incx,
+ const float* beta,
+ __half* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSHgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __half* const Aarray[],
+ int64_t lda,
+ const __half* const xarray[],
+ int64_t incx,
+ const float* beta,
+ __half* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSSgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __half* const Aarray[],
+ int lda,
+ const __half* const xarray[],
+ int incx,
+ const float* beta,
+ float* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSSgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __half* const Aarray[],
+ int64_t lda,
+ const __half* const xarray[],
+ int64_t incx,
+ const float* beta,
+ float* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSTgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __nv_bfloat16* const Aarray[],
+ int lda,
+ const __nv_bfloat16* const xarray[],
+ int incx,
+ const float* beta,
+ __nv_bfloat16* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSTgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __nv_bfloat16* const Aarray[],
+ int64_t lda,
+ const __nv_bfloat16* const xarray[],
+ int64_t incx,
+ const float* beta,
+ __nv_bfloat16* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSSgemvBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __nv_bfloat16* const Aarray[],
+ int lda,
+ const __nv_bfloat16* const xarray[],
+ int incx,
+ const float* beta,
+ float* const yarray[],
+ int incy,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSSgemvBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __nv_bfloat16* const Aarray[],
+ int64_t lda,
+ const __nv_bfloat16* const xarray[],
+ int64_t incx,
+ const float* beta,
+ float* const yarray[],
+ int64_t incy,
+ int64_t batchCount);
+
+#endif
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ long long int strideA,
+ const float* x,
+ int incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ long long int strideA,
+ const float* x,
+ int64_t incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ long long int strideA,
+ const double* x,
+ int incx,
+ long long int stridex,
+ const double* beta,
+ double* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ long long int strideA,
+ const double* x,
+ int64_t incx,
+ long long int stridex,
+ const double* beta,
+ double* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ long long int strideA,
+ const cuComplex* x,
+ int incx,
+ long long int stridex,
+ const cuComplex* beta,
+ cuComplex* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ long long int strideA,
+ const cuComplex* x,
+ int64_t incx,
+ long long int stridex,
+ const cuComplex* beta,
+ cuComplex* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ long long int strideA,
+ const cuDoubleComplex* x,
+ int incx,
+ long long int stridex,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ long long int strideA,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ long long int stridex,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+#if defined(__cplusplus)
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSHgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __half* A,
+ int lda,
+ long long int strideA,
+ const __half* x,
+ int incx,
+ long long int stridex,
+ const float* beta,
+ __half* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSHgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __half* A,
+ int64_t lda,
+ long long int strideA,
+ const __half* x,
+ int64_t incx,
+ long long int stridex,
+ const float* beta,
+ __half* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSSgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __half* A,
+ int lda,
+ long long int strideA,
+ const __half* x,
+ int incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHSSgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __half* A,
+ int64_t lda,
+ long long int strideA,
+ const __half* x,
+ int64_t incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSTgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __nv_bfloat16* A,
+ int lda,
+ long long int strideA,
+ const __nv_bfloat16* x,
+ int incx,
+ long long int stridex,
+ const float* beta,
+ __nv_bfloat16* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSTgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __nv_bfloat16* A,
+ int64_t lda,
+ long long int strideA,
+ const __nv_bfloat16* x,
+ int64_t incx,
+ long long int stridex,
+ const float* beta,
+ __nv_bfloat16* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSSgemvStridedBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ const float* alpha,
+ const __nv_bfloat16* A,
+ int lda,
+ long long int strideA,
+ const __nv_bfloat16* x,
+ int incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int incy,
+ long long int stridey,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasTSSgemvStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const __nv_bfloat16* A,
+ int64_t lda,
+ long long int strideA,
+ const __nv_bfloat16* x,
+ int64_t incx,
+ long long int stridex,
+ const float* beta,
+ float* y,
+ int64_t incy,
+ long long int stridey,
+ int64_t batchCount);
+
+#endif
+
+/* ---------------- CUBLAS BLAS3 Functions ---------------- */
+
+/* GEMM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemm_v2(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ const float* beta,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemm_v2_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* B,
+ int64_t ldb,
+ const float* beta,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemm_v2(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ const double* beta,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemm_v2_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* B,
+ int64_t ldb,
+ const double* beta,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm_v2(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm_v2_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3m(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3m_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const void* B,
+ cudaDataType Btype,
+ int64_t ldb,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemm_v2(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemm_v2_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemm3m(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemm3m_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+#if defined(__cplusplus)
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemm(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const __half* alpha,
+ const __half* A,
+ int lda,
+ const __half* B,
+ int ldb,
+ const __half* beta,
+ __half* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemm_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const __half* alpha,
+ const __half* A,
+ int64_t lda,
+ const __half* B,
+ int64_t ldb,
+ const __half* beta,
+ __half* C,
+ int64_t ldc);
+
+#endif
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const void* B,
+ cudaDataType Btype,
+ int64_t ldb,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ const void* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const void* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const void* B,
+ cudaDataType Btype,
+ int64_t ldb,
+ const void* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const void* B,
+ cudaDataType Btype,
+ int64_t ldb,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+/* SYRK */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyrk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* beta,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyrk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* beta,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyrk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* beta,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyrk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* beta,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyrk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyrk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrkEx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrkEx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrk3mEx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrk3mEx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const cuComplex* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+/* HERK */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const cuComplex* A,
+ int lda,
+ const float* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const float* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZherk_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const double* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const double* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZherk_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const double* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherkEx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherkEx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherk3mEx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherk3mEx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ const float* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc);
+
+/* SYR2K / HER2K */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ const float* beta,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyr2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* B,
+ int64_t ldb,
+ const float* beta,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ const double* beta,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyr2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* B,
+ int64_t ldb,
+ const double* beta,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyr2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyr2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const float* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCher2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const float* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher2k_v2(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZher2k_v2_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* SYRKX / HERKX */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyrkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ const float* beta,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsyrkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* B,
+ int64_t ldb,
+ const float* beta,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyrkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ const double* beta,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsyrkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* B,
+ int64_t ldb,
+ const double* beta,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsyrkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyrkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsyrkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const float* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCherkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const float* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZherkx(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZherkx_64(cublasHandle_t handle,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const double* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* SYMM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsymm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ const float* beta,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSsymm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* B,
+ int64_t ldb,
+ const float* beta,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsymm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ const double* beta,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDsymm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* B,
+ int64_t ldb,
+ const double* beta,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsymm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCsymm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsymm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZsymm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* HEMM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChemm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasChemm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhemm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZhemm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* TRSM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ float* B,
+ int ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ float* B,
+ int64_t ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ double* B,
+ int ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ double* B,
+ int64_t ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ cuComplex* B,
+ int ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ cuComplex* B,
+ int64_t ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ cuDoubleComplex* B,
+ int ldb);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ cuDoubleComplex* B,
+ int64_t ldb);
+
+/* TRMM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrmm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* B,
+ int ldb,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrmm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* B,
+ int64_t ldb,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrmm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* B,
+ int ldb,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrmm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* B,
+ int64_t ldb,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrmm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* B,
+ int ldb,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrmm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* B,
+ int64_t ldb,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrmm_v2(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrmm_v2_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* BATCH GEMM */
+
+#if defined(__cplusplus)
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemmBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const __half* alpha,
+ const __half* const Aarray[],
+ int lda,
+ const __half* const Barray[],
+ int ldb,
+ const __half* beta,
+ __half* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemmBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const __half* alpha,
+ const __half* const Aarray[],
+ int64_t lda,
+ const __half* const Barray[],
+ int64_t ldb,
+ const __half* beta,
+ __half* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+#endif
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const float* alpha,
+ const float* const Aarray[],
+ int lda,
+ const float* const Barray[],
+ int ldb,
+ const float* beta,
+ float* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* const Aarray[],
+ int64_t lda,
+ const float* const Barray[],
+ int64_t ldb,
+ const float* beta,
+ float* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const double* alpha,
+ const double* const Aarray[],
+ int lda,
+ const double* const Barray[],
+ int ldb,
+ const double* beta,
+ double* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* const Aarray[],
+ int64_t lda,
+ const double* const Barray[],
+ int64_t ldb,
+ const double* beta,
+ double* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int lda,
+ const cuComplex* const Barray[],
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int64_t lda,
+ const cuComplex* const Barray[],
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int lda,
+ const cuComplex* const Barray[],
+ int ldb,
+ const cuComplex* beta,
+ cuComplex* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* const Aarray[],
+ int64_t lda,
+ const cuComplex* const Barray[],
+ int64_t ldb,
+ const cuComplex* beta,
+ cuComplex* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemmBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const Aarray[],
+ int lda,
+ const cuDoubleComplex* const Barray[],
+ int ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* const Carray[],
+ int ldc,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemmBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const Aarray[],
+ int64_t lda,
+ const cuDoubleComplex* const Barray[],
+ int64_t ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* const Carray[],
+ int64_t ldc,
+ int64_t batchCount);
+
+#if defined(__cplusplus)
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemmStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const __half* alpha,
+ const __half* A,
+ int lda,
+ long long int strideA,
+ const __half* B,
+ int ldb,
+ long long int strideB,
+ const __half* beta,
+ __half* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasHgemmStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const __half* alpha,
+ const __half* A,
+ int64_t lda,
+ long long int strideA,
+ const __half* B,
+ int64_t ldb,
+ long long int strideB,
+ const __half* beta,
+ __half* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+#endif
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const float* alpha,
+ const float* A,
+ int lda,
+ long long int strideA,
+ const float* B,
+ int ldb,
+ long long int strideB,
+ const float* beta,
+ float* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ long long int strideA,
+ const float* B,
+ int64_t ldb,
+ long long int strideB,
+ const float* beta,
+ float* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const double* alpha,
+ const double* A,
+ int lda,
+ long long int strideA,
+ const double* B,
+ int ldb,
+ long long int strideB,
+ const double* beta,
+ double* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ long long int strideA,
+ const double* B,
+ int64_t ldb,
+ long long int strideB,
+ const double* beta,
+ double* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ long long int strideA,
+ const cuComplex* B,
+ int ldb,
+ long long int strideB,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemmStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ long long int strideA,
+ const cuComplex* B,
+ int64_t ldb,
+ long long int strideB,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ long long int strideA,
+ const cuComplex* B,
+ int ldb,
+ long long int strideB,
+ const cuComplex* beta,
+ cuComplex* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgemm3mStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ long long int strideA,
+ const cuComplex* B,
+ int64_t ldb,
+ long long int strideB,
+ const cuComplex* beta,
+ cuComplex* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemmStridedBatched(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ long long int strideA,
+ const cuDoubleComplex* B,
+ int ldb,
+ long long int strideB,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int ldc,
+ long long int strideC,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgemmStridedBatched_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ long long int strideA,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ long long int strideB,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* C,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmBatchedEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha,
+ const void* const Aarray[],
+ cudaDataType Atype,
+ int lda,
+ const void* const Barray[],
+ cudaDataType Btype,
+ int ldb,
+ const void* beta,
+ void* const Carray[],
+ cudaDataType Ctype,
+ int ldc,
+ int batchCount,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmBatchedEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const void* alpha,
+ const void* const Aarray[],
+ cudaDataType Atype,
+ int64_t lda,
+ const void* const Barray[],
+ cudaDataType Btype,
+ int64_t ldb,
+ const void* beta,
+ void* const Carray[],
+ cudaDataType Ctype,
+ int64_t ldc,
+ int64_t batchCount,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmStridedBatchedEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ long long int strideA,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ long long int strideB,
+ const void* beta,
+ void* C,
+ cudaDataType Ctype,
+ int ldc,
+ long long int strideC,
+ int batchCount,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmStridedBatchedEx_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ int64_t k,
+ const void* alpha,
+ const void* A,
+ cudaDataType Atype,
+ int64_t lda,
+ long long int strideA,
+ const void* B,
+ cudaDataType Btype,
+ int64_t ldb,
+ long long int strideB,
+ const void* beta,
+ void* C,
+ cudaDataType Ctype,
+ int64_t ldc,
+ long long int strideC,
+ int64_t batchCount,
+ cublasComputeType_t computeType,
+ cublasGemmAlgo_t algo);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmGroupedBatched(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int m_array[],
+ const int n_array[],
+ const int k_array[],
+ const float alpha_array[],
+ const float* const Aarray[],
+ const int lda_array[],
+ const float* const Barray[],
+ const int ldb_array[],
+ const float beta_array[],
+ float* const Carray[],
+ const int ldc_array[],
+ int group_count,
+ const int group_size[]);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgemmGroupedBatched_64(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int64_t m_array[],
+ const int64_t n_array[],
+ const int64_t k_array[],
+ const float alpha_array[],
+ const float* const Aarray[],
+ const int64_t lda_array[],
+ const float* const Barray[],
+ const int64_t ldb_array[],
+ const float beta_array[],
+ float* const Carray[],
+ const int64_t ldc_array[],
+ int64_t group_count,
+ const int64_t group_size[]);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmGroupedBatched(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int m_array[],
+ const int n_array[],
+ const int k_array[],
+ const double alpha_array[],
+ const double* const Aarray[],
+ const int lda_array[],
+ const double* const Barray[],
+ const int ldb_array[],
+ const double beta_array[],
+ double* const Carray[],
+ const int ldc_array[],
+ int group_count,
+ const int group_size[]);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgemmGroupedBatched_64(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int64_t m_array[],
+ const int64_t n_array[],
+ const int64_t k_array[],
+ const double alpha_array[],
+ const double* const Aarray[],
+ const int64_t lda_array[],
+ const double* const Barray[],
+ const int64_t ldb_array[],
+ const double beta_array[],
+ double* const Carray[],
+ const int64_t ldc_array[],
+ int64_t group_count,
+ const int64_t group_size[]);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmGroupedBatchedEx(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int m_array[],
+ const int n_array[],
+ const int k_array[],
+ const void* alpha_array,
+ const void* const Aarray[],
+ cudaDataType_t Atype,
+ const int lda_array[],
+ const void* const Barray[],
+ cudaDataType_t Btype,
+ const int ldb_array[],
+ const void* beta_array,
+ void* const Carray[],
+ cudaDataType_t Ctype,
+ const int ldc_array[],
+ int group_count,
+ const int group_size[],
+ cublasComputeType_t computeType);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasGemmGroupedBatchedEx_64(cublasHandle_t handle,
+ const cublasOperation_t transa_array[],
+ const cublasOperation_t transb_array[],
+ const int64_t m_array[],
+ const int64_t n_array[],
+ const int64_t k_array[],
+ const void* alpha_array,
+ const void* const Aarray[],
+ cudaDataType_t Atype,
+ const int64_t lda_array[],
+ const void* const Barray[],
+ cudaDataType_t Btype,
+ const int64_t ldb_array[],
+ const void* beta_array,
+ void* const Carray[],
+ cudaDataType_t Ctype,
+ const int64_t ldc_array[],
+ int64_t group_count,
+ const int64_t group_size[],
+ cublasComputeType_t computeType);
+
+/* ---------------- CUBLAS BLAS-like Extension ---------------- */
+
+/* GEAM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgeam(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ const float* alpha,
+ const float* A,
+ int lda,
+ const float* beta,
+ const float* B,
+ int ldb,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgeam_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* A,
+ int64_t lda,
+ const float* beta,
+ const float* B,
+ int64_t ldb,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgeam(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ const double* alpha,
+ const double* A,
+ int lda,
+ const double* beta,
+ const double* B,
+ int ldb,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgeam_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* A,
+ int64_t lda,
+ const double* beta,
+ const double* B,
+ int64_t ldb,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgeam(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* beta,
+ const cuComplex* B,
+ int ldb,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgeam_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* beta,
+ const cuComplex* B,
+ int64_t ldb,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgeam(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* beta,
+ const cuDoubleComplex* B,
+ int ldb,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgeam_64(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* beta,
+ const cuDoubleComplex* B,
+ int64_t ldb,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* TRSM - Batched Triangular Solver */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsmBatched(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const float* alpha,
+ const float* const A[],
+ int lda,
+ float* const B[],
+ int ldb,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasStrsmBatched_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const float* alpha,
+ const float* const A[],
+ int64_t lda,
+ float* const B[],
+ int64_t ldb,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsmBatched(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const double* alpha,
+ const double* const A[],
+ int lda,
+ double* const B[],
+ int ldb,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDtrsmBatched_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const double* alpha,
+ const double* const A[],
+ int64_t lda,
+ double* const B[],
+ int64_t ldb,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsmBatched(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuComplex* alpha,
+ const cuComplex* const A[],
+ int lda,
+ cuComplex* const B[],
+ int ldb,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCtrsmBatched_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuComplex* alpha,
+ const cuComplex* const A[],
+ int64_t lda,
+ cuComplex* const B[],
+ int64_t ldb,
+ int64_t batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsmBatched(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int m,
+ int n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const A[],
+ int lda,
+ cuDoubleComplex* const B[],
+ int ldb,
+ int batchCount);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrsmBatched_64(cublasHandle_t handle,
+ cublasSideMode_t side,
+ cublasFillMode_t uplo,
+ cublasOperation_t trans,
+ cublasDiagType_t diag,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* const A[],
+ int64_t lda,
+ cuDoubleComplex* const B[],
+ int64_t ldb,
+ int64_t batchCount);
+
+/* DGMM */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSdgmm(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int m,
+ int n,
+ const float* A,
+ int lda,
+ const float* x,
+ int incx,
+ float* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSdgmm_64(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int64_t m,
+ int64_t n,
+ const float* A,
+ int64_t lda,
+ const float* x,
+ int64_t incx,
+ float* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDdgmm(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int m,
+ int n,
+ const double* A,
+ int lda,
+ const double* x,
+ int incx,
+ double* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDdgmm_64(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int64_t m,
+ int64_t n,
+ const double* A,
+ int64_t lda,
+ const double* x,
+ int64_t incx,
+ double* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdgmm(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int m,
+ int n,
+ const cuComplex* A,
+ int lda,
+ const cuComplex* x,
+ int incx,
+ cuComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCdgmm_64(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int64_t m,
+ int64_t n,
+ const cuComplex* A,
+ int64_t lda,
+ const cuComplex* x,
+ int64_t incx,
+ cuComplex* C,
+ int64_t ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdgmm(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int m,
+ int n,
+ const cuDoubleComplex* A,
+ int lda,
+ const cuDoubleComplex* x,
+ int incx,
+ cuDoubleComplex* C,
+ int ldc);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZdgmm_64(cublasHandle_t handle,
+ cublasSideMode_t mode,
+ int64_t m,
+ int64_t n,
+ const cuDoubleComplex* A,
+ int64_t lda,
+ const cuDoubleComplex* x,
+ int64_t incx,
+ cuDoubleComplex* C,
+ int64_t ldc);
+
+/* Batched - MATINV*/
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSmatinvBatched(cublasHandle_t handle,
+ int n,
+ const float* const A[],
+ int lda,
+ float* const Ainv[],
+ int lda_inv,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDmatinvBatched(cublasHandle_t handle,
+ int n,
+ const double* const A[],
+ int lda,
+ double* const Ainv[],
+ int lda_inv,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCmatinvBatched(cublasHandle_t handle,
+ int n,
+ const cuComplex* const A[],
+ int lda,
+ cuComplex* const Ainv[],
+ int lda_inv,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZmatinvBatched(cublasHandle_t handle,
+ int n,
+ const cuDoubleComplex* const A[],
+ int lda,
+ cuDoubleComplex* const Ainv[],
+ int lda_inv,
+ int* info,
+ int batchSize);
+
+/* Batch QR Factorization */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgeqrfBatched(cublasHandle_t handle,
+ int m,
+ int n,
+ float* const Aarray[],
+ int lda,
+ float* const TauArray[],
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgeqrfBatched(cublasHandle_t handle,
+ int m,
+ int n,
+ double* const Aarray[],
+ int lda,
+ double* const TauArray[],
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgeqrfBatched(cublasHandle_t handle,
+ int m,
+ int n,
+ cuComplex* const Aarray[],
+ int lda,
+ cuComplex* const TauArray[],
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgeqrfBatched(cublasHandle_t handle,
+ int m,
+ int n,
+ cuDoubleComplex* const Aarray[],
+ int lda,
+ cuDoubleComplex* const TauArray[],
+ int* info,
+ int batchSize);
+
+/* Least Square Min only m >= n and Non-transpose supported */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgelsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int nrhs,
+ float* const Aarray[],
+ int lda,
+ float* const Carray[],
+ int ldc,
+ int* info,
+ int* devInfoArray,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgelsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int nrhs,
+ double* const Aarray[],
+ int lda,
+ double* const Carray[],
+ int ldc,
+ int* info,
+ int* devInfoArray,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgelsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int nrhs,
+ cuComplex* const Aarray[],
+ int lda,
+ cuComplex* const Carray[],
+ int ldc,
+ int* info,
+ int* devInfoArray,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgelsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int m,
+ int n,
+ int nrhs,
+ cuDoubleComplex* const Aarray[],
+ int lda,
+ cuDoubleComplex* const Carray[],
+ int ldc,
+ int* info,
+ int* devInfoArray,
+ int batchSize);
+
+/* TPTTR : Triangular Pack format to Triangular format */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasStpttr(cublasHandle_t handle, cublasFillMode_t uplo, int n, const float* AP, float* A, int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDtpttr(cublasHandle_t handle, cublasFillMode_t uplo, int n, const double* AP, double* A, int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCtpttr(cublasHandle_t handle, cublasFillMode_t uplo, int n, const cuComplex* AP, cuComplex* A, int lda);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtpttr(
+ cublasHandle_t handle, cublasFillMode_t uplo, int n, const cuDoubleComplex* AP, cuDoubleComplex* A, int lda);
+
+/* TRTTP : Triangular format to Triangular Pack format */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasStrttp(cublasHandle_t handle, cublasFillMode_t uplo, int n, const float* A, int lda, float* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDtrttp(cublasHandle_t handle, cublasFillMode_t uplo, int n, const double* A, int lda, double* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCtrttp(cublasHandle_t handle, cublasFillMode_t uplo, int n, const cuComplex* A, int lda, cuComplex* AP);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZtrttp(
+ cublasHandle_t handle, cublasFillMode_t uplo, int n, const cuDoubleComplex* A, int lda, cuDoubleComplex* AP);
+
+/* Batched LU - GETRF*/
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasSgetrfBatched(cublasHandle_t handle, int n, float* const A[], int lda, int* P, int* info, int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasDgetrfBatched(cublasHandle_t handle, int n, double* const A[], int lda, int* P, int* info, int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI
+cublasCgetrfBatched(cublasHandle_t handle, int n, cuComplex* const A[], int lda, int* P, int* info, int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgetrfBatched(
+ cublasHandle_t handle, int n, cuDoubleComplex* const A[], int lda, int* P, int* info, int batchSize);
+
+/* Batched inversion based on LU factorization from getrf */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgetriBatched(cublasHandle_t handle,
+ int n,
+ const float* const A[],
+ int lda,
+ const int* P,
+ float* const C[],
+ int ldc,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgetriBatched(cublasHandle_t handle,
+ int n,
+ const double* const A[],
+ int lda,
+ const int* P,
+ double* const C[],
+ int ldc,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgetriBatched(cublasHandle_t handle,
+ int n,
+ const cuComplex* const A[],
+ int lda,
+ const int* P,
+ cuComplex* const C[],
+ int ldc,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgetriBatched(cublasHandle_t handle,
+ int n,
+ const cuDoubleComplex* const A[],
+ int lda,
+ const int* P,
+ cuDoubleComplex* const C[],
+ int ldc,
+ int* info,
+ int batchSize);
+
+/* Batched solver based on LU factorization from getrf */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasSgetrsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int n,
+ int nrhs,
+ const float* const Aarray[],
+ int lda,
+ const int* devIpiv,
+ float* const Barray[],
+ int ldb,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasDgetrsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int n,
+ int nrhs,
+ const double* const Aarray[],
+ int lda,
+ const int* devIpiv,
+ double* const Barray[],
+ int ldb,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasCgetrsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int n,
+ int nrhs,
+ const cuComplex* const Aarray[],
+ int lda,
+ const int* devIpiv,
+ cuComplex* const Barray[],
+ int ldb,
+ int* info,
+ int batchSize);
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasZgetrsBatched(cublasHandle_t handle,
+ cublasOperation_t trans,
+ int n,
+ int nrhs,
+ const cuDoubleComplex* const Aarray[],
+ int lda,
+ const int* devIpiv,
+ cuDoubleComplex* const Barray[],
+ int ldb,
+ int* info,
+ int batchSize);
+
+/* Deprecated */
+
+CUBLASAPI cublasStatus_t CUBLASWINAPI cublasUint8gemmBias(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ cublasOperation_t transc,
+ int m,
+ int n,
+ int k,
+ const unsigned char* A,
+ int A_bias,
+ int lda,
+ const unsigned char* B,
+ int B_bias,
+ int ldb,
+ unsigned char* C,
+ int C_bias,
+ int ldc,
+ int C_mult,
+ int C_shift);
+
+/* }}} cuBLAS Exported API */
+
+#if defined(__cplusplus)
+}
+
+static inline cublasStatus_t cublasMigrateComputeType(cublasHandle_t handle,
+ cudaDataType_t dataType,
+ cublasComputeType_t* computeType) {
+ cublasMath_t mathMode = CUBLAS_DEFAULT_MATH;
+ cublasStatus_t status = CUBLAS_STATUS_SUCCESS;
+
+ status = cublasGetMathMode(handle, &mathMode);
+ if (status != CUBLAS_STATUS_SUCCESS) {
+ return status;
+ }
+
+ bool isPedantic = ((mathMode & 0xf) == CUBLAS_PEDANTIC_MATH);
+
+ switch (dataType) {
+ case CUDA_R_32F:
+ case CUDA_C_32F:
+ *computeType = isPedantic ? CUBLAS_COMPUTE_32F_PEDANTIC : CUBLAS_COMPUTE_32F;
+ return CUBLAS_STATUS_SUCCESS;
+ case CUDA_R_64F:
+ case CUDA_C_64F:
+ *computeType = isPedantic ? CUBLAS_COMPUTE_64F_PEDANTIC : CUBLAS_COMPUTE_64F;
+ return CUBLAS_STATUS_SUCCESS;
+ case CUDA_R_16F:
+ *computeType = isPedantic ? CUBLAS_COMPUTE_16F_PEDANTIC : CUBLAS_COMPUTE_16F;
+ return CUBLAS_STATUS_SUCCESS;
+ case CUDA_R_32I:
+ *computeType = isPedantic ? CUBLAS_COMPUTE_32I_PEDANTIC : CUBLAS_COMPUTE_32I;
+ return CUBLAS_STATUS_SUCCESS;
+ default:
+ return CUBLAS_STATUS_NOT_SUPPORTED;
+ }
+}
+/* wrappers to accept old code with cudaDataType computeType when referenced from c++ code */
+static inline cublasStatus_t cublasGemmEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha, /* host or device pointer */
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ const void* beta, /* host or device pointer */
+ void* C,
+ cudaDataType Ctype,
+ int ldc,
+ cudaDataType computeType,
+ cublasGemmAlgo_t algo) {
+ cublasComputeType_t migratedComputeType = CUBLAS_COMPUTE_32F;
+ cublasStatus_t status = CUBLAS_STATUS_SUCCESS;
+ status = cublasMigrateComputeType(handle, computeType, &migratedComputeType);
+ if (status != CUBLAS_STATUS_SUCCESS) {
+ return status;
+ }
+
+ return cublasGemmEx(handle,
+ transa,
+ transb,
+ m,
+ n,
+ k,
+ alpha,
+ A,
+ Atype,
+ lda,
+ B,
+ Btype,
+ ldb,
+ beta,
+ C,
+ Ctype,
+ ldc,
+ migratedComputeType,
+ algo);
+}
+
+static inline cublasStatus_t cublasGemmBatchedEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha, /* host or device pointer */
+ const void* const Aarray[],
+ cudaDataType Atype,
+ int lda,
+ const void* const Barray[],
+ cudaDataType Btype,
+ int ldb,
+ const void* beta, /* host or device pointer */
+ void* const Carray[],
+ cudaDataType Ctype,
+ int ldc,
+ int batchCount,
+ cudaDataType computeType,
+ cublasGemmAlgo_t algo) {
+ cublasComputeType_t migratedComputeType;
+ cublasStatus_t status;
+ status = cublasMigrateComputeType(handle, computeType, &migratedComputeType);
+ if (status != CUBLAS_STATUS_SUCCESS) {
+ return status;
+ }
+
+ return cublasGemmBatchedEx(handle,
+ transa,
+ transb,
+ m,
+ n,
+ k,
+ alpha,
+ Aarray,
+ Atype,
+ lda,
+ Barray,
+ Btype,
+ ldb,
+ beta,
+ Carray,
+ Ctype,
+ ldc,
+ batchCount,
+ migratedComputeType,
+ algo);
+}
+
+static inline cublasStatus_t cublasGemmStridedBatchedEx(cublasHandle_t handle,
+ cublasOperation_t transa,
+ cublasOperation_t transb,
+ int m,
+ int n,
+ int k,
+ const void* alpha, /* host or device pointer */
+ const void* A,
+ cudaDataType Atype,
+ int lda,
+ long long int strideA, /* purposely signed */
+ const void* B,
+ cudaDataType Btype,
+ int ldb,
+ long long int strideB,
+ const void* beta, /* host or device pointer */
+ void* C,
+ cudaDataType Ctype,
+ int ldc,
+ long long int strideC,
+ int batchCount,
+ cudaDataType computeType,
+ cublasGemmAlgo_t algo) {
+ cublasComputeType_t migratedComputeType;
+ cublasStatus_t status;
+ status = cublasMigrateComputeType(handle, computeType, &migratedComputeType);
+ if (status != CUBLAS_STATUS_SUCCESS) {
+ return status;
+ }
+
+ return cublasGemmStridedBatchedEx(handle,
+ transa,
+ transb,
+ m,
+ n,
+ k,
+ alpha,
+ A,
+ Atype,
+ lda,
+ strideA,
+ B,
+ Btype,
+ ldb,
+ strideB,
+ beta,
+ C,
+ Ctype,
+ ldc,
+ strideC,
+ batchCount,
+ migratedComputeType,
+ algo);
+}
+#endif /* __cplusplus */
+
+#endif /* !defined(CUBLAS_API_H_) */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_v2.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_v2.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd81a3b1d8e7e3d04d6c54f4c0640af7d8893eab
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/cublas_v2.h
@@ -0,0 +1,478 @@
+/*
+ * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+/*
+ * This is the public header file for the new CUBLAS library API, it mapped the generic
+ * Cublas name functions to the actual _v2 implementations.
+ */
+
+#if !defined(CUBLAS_V2_H_)
+#define CUBLAS_V2_H_
+
+#if defined(CUBLAS_H_)
+#error "It is an error to include both cublas.h and cublas_v2.h"
+#endif
+
+#undef CUBLASAPI
+#ifdef __CUDACC__
+#define CUBLASAPI __host__ __device__
+#else
+#define CUBLASAPI
+#endif
+
+#include "cublas_api.h"
+
+#define cublasCreate cublasCreate_v2
+#define cublasDestroy cublasDestroy_v2
+#define cublasGetVersion cublasGetVersion_v2
+#define cublasSetWorkspace cublasSetWorkspace_v2
+#define cublasSetStream cublasSetStream_v2
+#define cublasGetStream cublasGetStream_v2
+#define cublasGetPointerMode cublasGetPointerMode_v2
+#define cublasSetPointerMode cublasSetPointerMode_v2
+
+/* 32-bit integer */
+
+/* Blas1 Routines */
+
+#define cublasSnrm2 cublasSnrm2_v2
+#define cublasDnrm2 cublasDnrm2_v2
+#define cublasScnrm2 cublasScnrm2_v2
+#define cublasDznrm2 cublasDznrm2_v2
+
+#define cublasSdot cublasSdot_v2
+#define cublasDdot cublasDdot_v2
+#define cublasCdotu cublasCdotu_v2
+#define cublasCdotc cublasCdotc_v2
+#define cublasZdotu cublasZdotu_v2
+#define cublasZdotc cublasZdotc_v2
+
+#define cublasSscal cublasSscal_v2
+#define cublasDscal cublasDscal_v2
+#define cublasCscal cublasCscal_v2
+#define cublasCsscal cublasCsscal_v2
+#define cublasZscal cublasZscal_v2
+#define cublasZdscal cublasZdscal_v2
+
+#define cublasSaxpy cublasSaxpy_v2
+#define cublasDaxpy cublasDaxpy_v2
+#define cublasCaxpy cublasCaxpy_v2
+#define cublasZaxpy cublasZaxpy_v2
+
+#define cublasScopy cublasScopy_v2
+#define cublasDcopy cublasDcopy_v2
+#define cublasCcopy cublasCcopy_v2
+#define cublasZcopy cublasZcopy_v2
+
+#define cublasSswap cublasSswap_v2
+#define cublasDswap cublasDswap_v2
+#define cublasCswap cublasCswap_v2
+#define cublasZswap cublasZswap_v2
+
+#define cublasIsamax cublasIsamax_v2
+#define cublasIdamax cublasIdamax_v2
+#define cublasIcamax cublasIcamax_v2
+#define cublasIzamax cublasIzamax_v2
+
+#define cublasIsamin cublasIsamin_v2
+#define cublasIdamin cublasIdamin_v2
+#define cublasIcamin cublasIcamin_v2
+#define cublasIzamin cublasIzamin_v2
+
+#define cublasSasum cublasSasum_v2
+#define cublasDasum cublasDasum_v2
+#define cublasScasum cublasScasum_v2
+#define cublasDzasum cublasDzasum_v2
+
+#define cublasSrot cublasSrot_v2
+#define cublasDrot cublasDrot_v2
+#define cublasCrot cublasCrot_v2
+#define cublasCsrot cublasCsrot_v2
+#define cublasZrot cublasZrot_v2
+#define cublasZdrot cublasZdrot_v2
+
+#define cublasSrotg cublasSrotg_v2
+#define cublasDrotg cublasDrotg_v2
+#define cublasCrotg cublasCrotg_v2
+#define cublasZrotg cublasZrotg_v2
+
+#define cublasSrotm cublasSrotm_v2
+#define cublasDrotm cublasDrotm_v2
+
+#define cublasSrotmg cublasSrotmg_v2
+#define cublasDrotmg cublasDrotmg_v2
+
+/* Blas2 Routines */
+
+#define cublasSgemv cublasSgemv_v2
+#define cublasDgemv cublasDgemv_v2
+#define cublasCgemv cublasCgemv_v2
+#define cublasZgemv cublasZgemv_v2
+
+#define cublasSgbmv cublasSgbmv_v2
+#define cublasDgbmv cublasDgbmv_v2
+#define cublasCgbmv cublasCgbmv_v2
+#define cublasZgbmv cublasZgbmv_v2
+
+#define cublasStrmv cublasStrmv_v2
+#define cublasDtrmv cublasDtrmv_v2
+#define cublasCtrmv cublasCtrmv_v2
+#define cublasZtrmv cublasZtrmv_v2
+
+#define cublasStbmv cublasStbmv_v2
+#define cublasDtbmv cublasDtbmv_v2
+#define cublasCtbmv cublasCtbmv_v2
+#define cublasZtbmv cublasZtbmv_v2
+
+#define cublasStpmv cublasStpmv_v2
+#define cublasDtpmv cublasDtpmv_v2
+#define cublasCtpmv cublasCtpmv_v2
+#define cublasZtpmv cublasZtpmv_v2
+
+#define cublasStrsv cublasStrsv_v2
+#define cublasDtrsv cublasDtrsv_v2
+#define cublasCtrsv cublasCtrsv_v2
+#define cublasZtrsv cublasZtrsv_v2
+
+#define cublasStpsv cublasStpsv_v2
+#define cublasDtpsv cublasDtpsv_v2
+#define cublasCtpsv cublasCtpsv_v2
+#define cublasZtpsv cublasZtpsv_v2
+
+#define cublasStbsv cublasStbsv_v2
+#define cublasDtbsv cublasDtbsv_v2
+#define cublasCtbsv cublasCtbsv_v2
+#define cublasZtbsv cublasZtbsv_v2
+
+#define cublasSsymv cublasSsymv_v2
+#define cublasDsymv cublasDsymv_v2
+#define cublasCsymv cublasCsymv_v2
+#define cublasZsymv cublasZsymv_v2
+#define cublasChemv cublasChemv_v2
+#define cublasZhemv cublasZhemv_v2
+
+#define cublasSsbmv cublasSsbmv_v2
+#define cublasDsbmv cublasDsbmv_v2
+#define cublasChbmv cublasChbmv_v2
+#define cublasZhbmv cublasZhbmv_v2
+
+#define cublasSspmv cublasSspmv_v2
+#define cublasDspmv cublasDspmv_v2
+#define cublasChpmv cublasChpmv_v2
+#define cublasZhpmv cublasZhpmv_v2
+
+#define cublasSger cublasSger_v2
+#define cublasDger cublasDger_v2
+#define cublasCgeru cublasCgeru_v2
+#define cublasCgerc cublasCgerc_v2
+#define cublasZgeru cublasZgeru_v2
+#define cublasZgerc cublasZgerc_v2
+
+#define cublasSsyr cublasSsyr_v2
+#define cublasDsyr cublasDsyr_v2
+#define cublasCsyr cublasCsyr_v2
+#define cublasZsyr cublasZsyr_v2
+#define cublasCher cublasCher_v2
+#define cublasZher cublasZher_v2
+
+#define cublasSspr cublasSspr_v2
+#define cublasDspr cublasDspr_v2
+#define cublasChpr cublasChpr_v2
+#define cublasZhpr cublasZhpr_v2
+
+#define cublasSsyr2 cublasSsyr2_v2
+#define cublasDsyr2 cublasDsyr2_v2
+#define cublasCsyr2 cublasCsyr2_v2
+#define cublasZsyr2 cublasZsyr2_v2
+#define cublasCher2 cublasCher2_v2
+#define cublasZher2 cublasZher2_v2
+
+#define cublasSspr2 cublasSspr2_v2
+#define cublasDspr2 cublasDspr2_v2
+#define cublasChpr2 cublasChpr2_v2
+#define cublasZhpr2 cublasZhpr2_v2
+
+/* Blas3 Routines */
+
+#define cublasSgemm cublasSgemm_v2
+#define cublasDgemm cublasDgemm_v2
+#define cublasCgemm cublasCgemm_v2
+#define cublasZgemm cublasZgemm_v2
+
+#define cublasSsyrk cublasSsyrk_v2
+#define cublasDsyrk cublasDsyrk_v2
+#define cublasCsyrk cublasCsyrk_v2
+#define cublasZsyrk cublasZsyrk_v2
+#define cublasCherk cublasCherk_v2
+#define cublasZherk cublasZherk_v2
+
+#define cublasSsyr2k cublasSsyr2k_v2
+#define cublasDsyr2k cublasDsyr2k_v2
+#define cublasCsyr2k cublasCsyr2k_v2
+#define cublasZsyr2k cublasZsyr2k_v2
+#define cublasCher2k cublasCher2k_v2
+#define cublasZher2k cublasZher2k_v2
+
+#define cublasSsymm cublasSsymm_v2
+#define cublasDsymm cublasDsymm_v2
+#define cublasCsymm cublasCsymm_v2
+#define cublasZsymm cublasZsymm_v2
+#define cublasChemm cublasChemm_v2
+#define cublasZhemm cublasZhemm_v2
+
+#define cublasStrsm cublasStrsm_v2
+#define cublasDtrsm cublasDtrsm_v2
+#define cublasCtrsm cublasCtrsm_v2
+#define cublasZtrsm cublasZtrsm_v2
+
+#define cublasStrmm cublasStrmm_v2
+#define cublasDtrmm cublasDtrmm_v2
+#define cublasCtrmm cublasCtrmm_v2
+#define cublasZtrmm cublasZtrmm_v2
+
+/* 64-bit integer */
+
+/* Blas1 Routines */
+
+#define cublasSnrm2_64 cublasSnrm2_v2_64
+#define cublasDnrm2_64 cublasDnrm2_v2_64
+#define cublasScnrm2_64 cublasScnrm2_v2_64
+#define cublasDznrm2_64 cublasDznrm2_v2_64
+
+#define cublasSdot_64 cublasSdot_v2_64
+#define cublasDdot_64 cublasDdot_v2_64
+#define cublasCdotu_64 cublasCdotu_v2_64
+#define cublasCdotc_64 cublasCdotc_v2_64
+#define cublasZdotu_64 cublasZdotu_v2_64
+#define cublasZdotc_64 cublasZdotc_v2_64
+
+#define cublasSscal_64 cublasSscal_v2_64
+#define cublasDscal_64 cublasDscal_v2_64
+#define cublasCscal_64 cublasCscal_v2_64
+#define cublasCsscal_64 cublasCsscal_v2_64
+#define cublasZscal_64 cublasZscal_v2_64
+#define cublasZdscal_64 cublasZdscal_v2_64
+
+#define cublasSaxpy_64 cublasSaxpy_v2_64
+#define cublasDaxpy_64 cublasDaxpy_v2_64
+#define cublasCaxpy_64 cublasCaxpy_v2_64
+#define cublasZaxpy_64 cublasZaxpy_v2_64
+
+#define cublasScopy_64 cublasScopy_v2_64
+#define cublasDcopy_64 cublasDcopy_v2_64
+#define cublasCcopy_64 cublasCcopy_v2_64
+#define cublasZcopy_64 cublasZcopy_v2_64
+
+#define cublasSswap_64 cublasSswap_v2_64
+#define cublasDswap_64 cublasDswap_v2_64
+#define cublasCswap_64 cublasCswap_v2_64
+#define cublasZswap_64 cublasZswap_v2_64
+
+#define cublasIsamax_64 cublasIsamax_v2_64
+#define cublasIdamax_64 cublasIdamax_v2_64
+#define cublasIcamax_64 cublasIcamax_v2_64
+#define cublasIzamax_64 cublasIzamax_v2_64
+
+#define cublasIsamin_64 cublasIsamin_v2_64
+#define cublasIdamin_64 cublasIdamin_v2_64
+#define cublasIcamin_64 cublasIcamin_v2_64
+#define cublasIzamin_64 cublasIzamin_v2_64
+
+#define cublasSasum_64 cublasSasum_v2_64
+#define cublasDasum_64 cublasDasum_v2_64
+#define cublasScasum_64 cublasScasum_v2_64
+#define cublasDzasum_64 cublasDzasum_v2_64
+
+#define cublasSrot_64 cublasSrot_v2_64
+#define cublasDrot_64 cublasDrot_v2_64
+#define cublasCrot_64 cublasCrot_v2_64
+#define cublasCsrot_64 cublasCsrot_v2_64
+#define cublasZrot_64 cublasZrot_v2_64
+#define cublasZdrot_64 cublasZdrot_v2_64
+
+#define cublasSrotg_64 cublasSrotg_v2_64
+#define cublasDrotg_64 cublasDrotg_v2_64
+#define cublasCrotg_64 cublasCrotg_v2_64
+#define cublasZrotg_64 cublasZrotg_v2_64
+
+#define cublasSrotm_64 cublasSrotm_v2_64
+#define cublasDrotm_64 cublasDrotm_v2_64
+
+#define cublasSrotmg_64 cublasSrotmg_v2_64
+#define cublasDrotmg_64 cublasDrotmg_v2_64
+
+/* Blas2 Routines */
+
+#define cublasSgemv_64 cublasSgemv_v2_64
+#define cublasDgemv_64 cublasDgemv_v2_64
+#define cublasCgemv_64 cublasCgemv_v2_64
+#define cublasZgemv_64 cublasZgemv_v2_64
+
+#define cublasSgbmv_64 cublasSgbmv_v2_64
+#define cublasDgbmv_64 cublasDgbmv_v2_64
+#define cublasCgbmv_64 cublasCgbmv_v2_64
+#define cublasZgbmv_64 cublasZgbmv_v2_64
+
+#define cublasStrmv_64 cublasStrmv_v2_64
+#define cublasDtrmv_64 cublasDtrmv_v2_64
+#define cublasCtrmv_64 cublasCtrmv_v2_64
+#define cublasZtrmv_64 cublasZtrmv_v2_64
+
+#define cublasStbmv_64 cublasStbmv_v2_64
+#define cublasDtbmv_64 cublasDtbmv_v2_64
+#define cublasCtbmv_64 cublasCtbmv_v2_64
+#define cublasZtbmv_64 cublasZtbmv_v2_64
+
+#define cublasStpmv_64 cublasStpmv_v2_64
+#define cublasDtpmv_64 cublasDtpmv_v2_64
+#define cublasCtpmv_64 cublasCtpmv_v2_64
+#define cublasZtpmv_64 cublasZtpmv_v2_64
+
+#define cublasStrsv_64 cublasStrsv_v2_64
+#define cublasDtrsv_64 cublasDtrsv_v2_64
+#define cublasCtrsv_64 cublasCtrsv_v2_64
+#define cublasZtrsv_64 cublasZtrsv_v2_64
+
+#define cublasStpsv_64 cublasStpsv_v2_64
+#define cublasDtpsv_64 cublasDtpsv_v2_64
+#define cublasCtpsv_64 cublasCtpsv_v2_64
+#define cublasZtpsv_64 cublasZtpsv_v2_64
+
+#define cublasStbsv_64 cublasStbsv_v2_64
+#define cublasDtbsv_64 cublasDtbsv_v2_64
+#define cublasCtbsv_64 cublasCtbsv_v2_64
+#define cublasZtbsv_64 cublasZtbsv_v2_64
+
+#define cublasSsymv_64 cublasSsymv_v2_64
+#define cublasDsymv_64 cublasDsymv_v2_64
+#define cublasCsymv_64 cublasCsymv_v2_64
+#define cublasZsymv_64 cublasZsymv_v2_64
+#define cublasChemv_64 cublasChemv_v2_64
+#define cublasZhemv_64 cublasZhemv_v2_64
+
+#define cublasSsbmv_64 cublasSsbmv_v2_64
+#define cublasDsbmv_64 cublasDsbmv_v2_64
+#define cublasChbmv_64 cublasChbmv_v2_64
+#define cublasZhbmv_64 cublasZhbmv_v2_64
+
+#define cublasSspmv_64 cublasSspmv_v2_64
+#define cublasDspmv_64 cublasDspmv_v2_64
+#define cublasChpmv_64 cublasChpmv_v2_64
+#define cublasZhpmv_64 cublasZhpmv_v2_64
+
+#define cublasSger_64 cublasSger_v2_64
+#define cublasDger_64 cublasDger_v2_64
+#define cublasCgeru_64 cublasCgeru_v2_64
+#define cublasCgerc_64 cublasCgerc_v2_64
+#define cublasZgeru_64 cublasZgeru_v2_64
+#define cublasZgerc_64 cublasZgerc_v2_64
+
+#define cublasSsyr_64 cublasSsyr_v2_64
+#define cublasDsyr_64 cublasDsyr_v2_64
+#define cublasCsyr_64 cublasCsyr_v2_64
+#define cublasZsyr_64 cublasZsyr_v2_64
+#define cublasCher_64 cublasCher_v2_64
+#define cublasZher_64 cublasZher_v2_64
+
+#define cublasSspr_64 cublasSspr_v2_64
+#define cublasDspr_64 cublasDspr_v2_64
+#define cublasChpr_64 cublasChpr_v2_64
+#define cublasZhpr_64 cublasZhpr_v2_64
+
+#define cublasSsyr2_64 cublasSsyr2_v2_64
+#define cublasDsyr2_64 cublasDsyr2_v2_64
+#define cublasCsyr2_64 cublasCsyr2_v2_64
+#define cublasZsyr2_64 cublasZsyr2_v2_64
+#define cublasCher2_64 cublasCher2_v2_64
+#define cublasZher2_64 cublasZher2_v2_64
+
+#define cublasSspr2_64 cublasSspr2_v2_64
+#define cublasDspr2_64 cublasDspr2_v2_64
+#define cublasChpr2_64 cublasChpr2_v2_64
+#define cublasZhpr2_64 cublasZhpr2_v2_64
+
+/* Blas3 Routines */
+
+#define cublasSgemm_64 cublasSgemm_v2_64
+#define cublasDgemm_64 cublasDgemm_v2_64
+#define cublasCgemm_64 cublasCgemm_v2_64
+#define cublasZgemm_64 cublasZgemm_v2_64
+
+#define cublasSsyrk_64 cublasSsyrk_v2_64
+#define cublasDsyrk_64 cublasDsyrk_v2_64
+#define cublasCsyrk_64 cublasCsyrk_v2_64
+#define cublasZsyrk_64 cublasZsyrk_v2_64
+#define cublasCherk_64 cublasCherk_v2_64
+#define cublasZherk_64 cublasZherk_v2_64
+
+#define cublasSsyr2k_64 cublasSsyr2k_v2_64
+#define cublasDsyr2k_64 cublasDsyr2k_v2_64
+#define cublasCsyr2k_64 cublasCsyr2k_v2_64
+#define cublasZsyr2k_64 cublasZsyr2k_v2_64
+#define cublasCher2k_64 cublasCher2k_v2_64
+#define cublasZher2k_64 cublasZher2k_v2_64
+
+#define cublasSsymm_64 cublasSsymm_v2_64
+#define cublasDsymm_64 cublasDsymm_v2_64
+#define cublasCsymm_64 cublasCsymm_v2_64
+#define cublasZsymm_64 cublasZsymm_v2_64
+#define cublasChemm_64 cublasChemm_v2_64
+#define cublasZhemm_64 cublasZhemm_v2_64
+
+#define cublasStrsm_64 cublasStrsm_v2_64
+#define cublasDtrsm_64 cublasDtrsm_v2_64
+#define cublasCtrsm_64 cublasCtrsm_v2_64
+#define cublasZtrsm_64 cublasZtrsm_v2_64
+
+#define cublasStrmm_64 cublasStrmm_v2_64
+#define cublasDtrmm_64 cublasDtrmm_v2_64
+#define cublasCtrmm_64 cublasCtrmm_v2_64
+#define cublasZtrmm_64 cublasZtrmm_v2_64
+
+#endif /* !defined(CUBLAS_V2_H_) */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/nvblas.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/nvblas.h
new file mode 100644
index 0000000000000000000000000000000000000000..29ea9153faf7b3e62a6d53c0be1980ae79c49f51
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/include/nvblas.h
@@ -0,0 +1,824 @@
+/*
+ * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(NVBLAS_H_)
+#define NVBLAS_H_
+
+#include "driver_types.h"
+#include "cuComplex.h" /* import complex data type */
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* GEMM */
+void sgemm_(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dgemm_(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void cgemm_(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zgemm_(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+void sgemm(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dgemm(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void cgemm(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zgemm(const char* transa,
+ const char* transb,
+ const int* m,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* SYRK */
+void ssyrk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsyrk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csyrk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsyrk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+void ssyrk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsyrk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csyrk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsyrk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* HERK */
+void cherk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const float* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zherk_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const double* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+void cherk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const float* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zherk(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const double* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* TRSM */
+void strsm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ float* b,
+ const int* ldb);
+
+void dtrsm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ double* b,
+ const int* ldb);
+
+void ctrsm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ cuComplex* b,
+ const int* ldb);
+
+void ztrsm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ cuDoubleComplex* b,
+ const int* ldb);
+
+void strsm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ float* b,
+ const int* ldb);
+
+void dtrsm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ double* b,
+ const int* ldb);
+
+void ctrsm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ cuComplex* b,
+ const int* ldb);
+
+void ztrsm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ cuDoubleComplex* b,
+ const int* ldb);
+
+/* SYMM */
+void ssymm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsymm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csymm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsymm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+void ssymm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsymm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csymm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsymm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* HEMM */
+void chemm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zhemm_(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* HEMM with no underscore*/
+void chemm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zhemm(const char* side,
+ const char* uplo,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* SYR2K */
+void ssyr2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsyr2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csyr2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsyr2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* SYR2K no_underscore*/
+void ssyr2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ const float* b,
+ const int* ldb,
+ const float* beta,
+ float* c,
+ const int* ldc);
+
+void dsyr2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ const double* b,
+ const int* ldb,
+ const double* beta,
+ double* c,
+ const int* ldc);
+
+void csyr2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const cuComplex* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zsyr2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const cuDoubleComplex* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* HERK */
+void cher2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const float* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zher2k_(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const double* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* HER2K with no underscore */
+void cher2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ const cuComplex* b,
+ const int* ldb,
+ const float* beta,
+ cuComplex* c,
+ const int* ldc);
+
+void zher2k(const char* uplo,
+ const char* trans,
+ const int* n,
+ const int* k,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ const cuDoubleComplex* b,
+ const int* ldb,
+ const double* beta,
+ cuDoubleComplex* c,
+ const int* ldc);
+
+/* TRMM */
+void strmm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ float* b,
+ const int* ldb);
+
+void dtrmm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ double* b,
+ const int* ldb);
+
+void ctrmm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ cuComplex* b,
+ const int* ldb);
+
+void ztrmm_(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ cuDoubleComplex* b,
+ const int* ldb);
+
+void strmm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const float* alpha,
+ const float* a,
+ const int* lda,
+ float* b,
+ const int* ldb);
+
+void dtrmm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const double* alpha,
+ const double* a,
+ const int* lda,
+ double* b,
+ const int* ldb);
+
+void ctrmm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuComplex* alpha,
+ const cuComplex* a,
+ const int* lda,
+ cuComplex* b,
+ const int* ldb);
+
+void ztrmm(const char* side,
+ const char* uplo,
+ const char* transa,
+ const char* diag,
+ const int* m,
+ const int* n,
+ const cuDoubleComplex* alpha,
+ const cuDoubleComplex* a,
+ const int* lda,
+ cuDoubleComplex* b,
+ const int* ldb);
+
+#if defined(__cplusplus)
+}
+#endif /* __cplusplus */
+
+#endif /* !defined(NVBLAS_H_) */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublas.so.12 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublas.so.12
new file mode 100644
index 0000000000000000000000000000000000000000..bb58b05fe4679649023c94850f174af45c2880f7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublas.so.12
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:031ce6c2cbfbb9468f040527cab5c599069ce5609e73e28f87503881063eac21
+size 116388640
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublasLt.so.12 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublasLt.so.12
new file mode 100644
index 0000000000000000000000000000000000000000..405f7eb4c733aaf80004f97cee38147fd998d52a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libcublasLt.so.12
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:10b5e6631cf8115c661eb895ed1533826308b58f7956466f53d236a40c9b622c
+size 751771728
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12
new file mode 100644
index 0000000000000000000000000000000000000000..c57b5c5f6ed2ccd520590ab4f3f2b56db62ef325
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9d244820d32966f0af47afe6c9ee6f34b230fafe87ea0141dc71241a5d2b340c
+size 753824
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openacc/cupti_openacc.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openacc/cupti_openacc.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7ea50da7beb2187e77f7606dd70faed0e4b4add
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openacc/cupti_openacc.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2017 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#include
+
+#if !defined(_CUPTI_OPENACC_H_)
+#define _CUPTI_OPENACC_H_
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__LP64__)
+#define CUPTILP64 1
+#elif defined(_WIN64)
+#define CUPTILP64 1
+#else
+#undef CUPTILP64
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \brief Initialize OpenACC support
+ *
+ * \param profRegister function of type acc_prof_reg as obtained from acc_register_library
+ * \param profUnregister function of type acc_prof_reg as obtained from acc_register_library
+ * \param profLookup function of type acc_prof_lookup as obtained from acc_register_library
+ */
+CUptiResult CUPTIAPI
+cuptiOpenACCInitialize(void *profRegister, void *profUnregister, void *profLookup);
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_OPENACC_H_*/
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/cupti_openmp.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/cupti_openmp.h
new file mode 100644
index 0000000000000000000000000000000000000000..303dd42878fb02774d872c197ccc27b17f2af69e
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/cupti_openmp.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2018 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#include
+#include "Openmp/omp-tools.h"
+
+#if !defined(_CUPTI_OPENMP_H_)
+#define _CUPTI_OPENMP_H_
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__LP64__)
+#define CUPTILP64 1
+#elif defined(_WIN64)
+#define CUPTILP64 1
+#else
+#undef CUPTILP64
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \brief Initialize OPENMP support (deprecated, used before OpenMP 5.0)
+ *
+ */
+int CUPTIAPI cuptiOpenMpInitialize(ompt_function_lookup_t ompt_fn_lookup, const char *runtime_version, unsigned int ompt_version);
+
+/**
+ * \brief Initialize OPENMP support
+ *
+ */
+int CUPTIAPI cuptiOpenMpInitialize_v2(ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *tool_data);
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_OPENMP_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/omp-tools.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/omp-tools.h
new file mode 100644
index 0000000000000000000000000000000000000000..276967d07e8f8c0f7686e5b3b15151edf2415ae7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/Openmp/omp-tools.h
@@ -0,0 +1,1083 @@
+/*
+ * include/50/omp-tools.h.var
+ */
+
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.txt for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __OMPT__
+#define __OMPT__
+
+/*****************************************************************************
+ * system include files
+ *****************************************************************************/
+
+#include
+#include
+
+/*****************************************************************************
+ * iteration macros
+ *****************************************************************************/
+
+#define FOREACH_OMPT_INQUIRY_FN(macro) \
+ macro (ompt_enumerate_states) \
+ macro (ompt_enumerate_mutex_impls) \
+ \
+ macro (ompt_set_callback) \
+ macro (ompt_get_callback) \
+ \
+ macro (ompt_get_state) \
+ \
+ macro (ompt_get_parallel_info) \
+ macro (ompt_get_task_info) \
+ macro (ompt_get_task_memory) \
+ macro (ompt_get_thread_data) \
+ macro (ompt_get_unique_id) \
+ macro (ompt_finalize_tool) \
+ \
+ macro(ompt_get_num_procs) \
+ macro(ompt_get_num_places) \
+ macro(ompt_get_place_proc_ids) \
+ macro(ompt_get_place_num) \
+ macro(ompt_get_partition_place_nums) \
+ macro(ompt_get_proc_id) \
+ \
+ macro(ompt_get_target_info) \
+ macro(ompt_get_num_devices)
+
+#define FOREACH_OMPT_STATE(macro) \
+ \
+ /* first available state */ \
+ macro (ompt_state_undefined, 0x102) /* undefined thread state */ \
+ \
+ /* work states (0..15) */ \
+ macro (ompt_state_work_serial, 0x000) /* working outside parallel */ \
+ macro (ompt_state_work_parallel, 0x001) /* working within parallel */ \
+ macro (ompt_state_work_reduction, 0x002) /* performing a reduction */ \
+ \
+ /* barrier wait states (16..31) */ \
+ macro (ompt_state_wait_barrier, 0x010) /* waiting at a barrier */ \
+ macro (ompt_state_wait_barrier_implicit_parallel, 0x011) \
+ /* implicit barrier at the end of parallel region */\
+ macro (ompt_state_wait_barrier_implicit_workshare, 0x012) \
+ /* implicit barrier at the end of worksharing */ \
+ macro (ompt_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \
+ macro (ompt_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \
+ \
+ /* task wait states (32..63) */ \
+ macro (ompt_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \
+ macro (ompt_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \
+ \
+ /* mutex wait states (64..127) */ \
+ macro (ompt_state_wait_mutex, 0x040) \
+ macro (ompt_state_wait_lock, 0x041) /* waiting for lock */ \
+ macro (ompt_state_wait_critical, 0x042) /* waiting for critical */ \
+ macro (ompt_state_wait_atomic, 0x043) /* waiting for atomic */ \
+ macro (ompt_state_wait_ordered, 0x044) /* waiting for ordered */ \
+ \
+ /* target wait states (128..255) */ \
+ macro (ompt_state_wait_target, 0x080) /* waiting for target region */ \
+ macro (ompt_state_wait_target_map, 0x081) /* waiting for target data mapping operation */ \
+ macro (ompt_state_wait_target_update, 0x082) /* waiting for target update operation */ \
+ \
+ /* misc (256..511) */ \
+ macro (ompt_state_idle, 0x100) /* waiting for work */ \
+ macro (ompt_state_overhead, 0x101) /* overhead excluding wait states */ \
+ \
+ /* implementation-specific states (512..) */
+
+
+#define FOREACH_KMP_MUTEX_IMPL(macro) \
+ macro (kmp_mutex_impl_none, 0) /* unknown implementation */ \
+ macro (kmp_mutex_impl_spin, 1) /* based on spin */ \
+ macro (kmp_mutex_impl_queuing, 2) /* based on some fair policy */ \
+ macro (kmp_mutex_impl_speculative, 3) /* based on HW-supported speculation */
+
+#define FOREACH_OMPT_EVENT(macro) \
+ \
+ /*--- Mandatory Events ---*/ \
+ macro (ompt_callback_thread_begin, ompt_callback_thread_begin_t, 1) /* thread begin */ \
+ macro (ompt_callback_thread_end, ompt_callback_thread_end_t, 2) /* thread end */ \
+ \
+ macro (ompt_callback_parallel_begin, ompt_callback_parallel_begin_t, 3) /* parallel begin */ \
+ macro (ompt_callback_parallel_end, ompt_callback_parallel_end_t, 4) /* parallel end */ \
+ \
+ macro (ompt_callback_task_create, ompt_callback_task_create_t, 5) /* task begin */ \
+ macro (ompt_callback_task_schedule, ompt_callback_task_schedule_t, 6) /* task schedule */ \
+ macro (ompt_callback_implicit_task, ompt_callback_implicit_task_t, 7) /* implicit task */ \
+ \
+ macro (ompt_callback_target, ompt_callback_target_t, 8) /* target */ \
+ macro (ompt_callback_target_data_op, ompt_callback_target_data_op_t, 9) /* target data op */ \
+ macro (ompt_callback_target_submit, ompt_callback_target_submit_t, 10) /* target submit */ \
+ \
+ macro (ompt_callback_control_tool, ompt_callback_control_tool_t, 11) /* control tool */ \
+ \
+ macro (ompt_callback_device_initialize, ompt_callback_device_initialize_t, 12) /* device initialize */ \
+ macro (ompt_callback_device_finalize, ompt_callback_device_finalize_t, 13) /* device finalize */ \
+ \
+ macro (ompt_callback_device_load, ompt_callback_device_load_t, 14) /* device load */ \
+ macro (ompt_callback_device_unload, ompt_callback_device_unload_t, 15) /* device unload */ \
+ \
+ /* Optional Events */ \
+ macro (ompt_callback_sync_region_wait, ompt_callback_sync_region_t, 16) /* sync region wait begin or end */ \
+ \
+ macro (ompt_callback_mutex_released, ompt_callback_mutex_t, 17) /* mutex released */ \
+ \
+ macro (ompt_callback_dependences, ompt_callback_dependences_t, 18) /* report task dependences */ \
+ macro (ompt_callback_task_dependence, ompt_callback_task_dependence_t, 19) /* report task dependence */ \
+ \
+ macro (ompt_callback_work, ompt_callback_work_t, 20) /* task at work begin or end */ \
+ \
+ macro (ompt_callback_master, ompt_callback_master_t, 21) /* task at master begin or end */ \
+ \
+ macro (ompt_callback_target_map, ompt_callback_target_map_t, 22) /* target map */ \
+ \
+ macro (ompt_callback_sync_region, ompt_callback_sync_region_t, 23) /* sync region begin or end */ \
+ \
+ macro (ompt_callback_lock_init, ompt_callback_mutex_acquire_t, 24) /* lock init */ \
+ macro (ompt_callback_lock_destroy, ompt_callback_mutex_t, 25) /* lock destroy */ \
+ \
+ macro (ompt_callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26) /* mutex acquire */ \
+ macro (ompt_callback_mutex_acquired, ompt_callback_mutex_t, 27) /* mutex acquired */ \
+ \
+ macro (ompt_callback_nest_lock, ompt_callback_nest_lock_t, 28) /* nest lock */ \
+ \
+ macro (ompt_callback_flush, ompt_callback_flush_t, 29) /* after executing flush */ \
+ \
+ macro (ompt_callback_cancel, ompt_callback_cancel_t, 30) /* cancel innermost binding region */ \
+ \
+ macro (ompt_callback_reduction, ompt_callback_sync_region_t, 31) /* reduction */ \
+ \
+ macro (ompt_callback_dispatch, ompt_callback_dispatch_t, 32) /* dispatch of work */
+
+/*****************************************************************************
+ * implementation specific types
+ *****************************************************************************/
+
+typedef enum kmp_mutex_impl_t {
+#define kmp_mutex_impl_macro(impl, code) impl = code,
+ FOREACH_KMP_MUTEX_IMPL(kmp_mutex_impl_macro)
+#undef kmp_mutex_impl_macro
+} kmp_mutex_impl_t;
+
+/*****************************************************************************
+ * definitions generated from spec
+ *****************************************************************************/
+
+typedef enum ompt_callbacks_t {
+ ompt_callback_thread_begin = 1,
+ ompt_callback_thread_end = 2,
+ ompt_callback_parallel_begin = 3,
+ ompt_callback_parallel_end = 4,
+ ompt_callback_task_create = 5,
+ ompt_callback_task_schedule = 6,
+ ompt_callback_implicit_task = 7,
+ ompt_callback_target = 8,
+ ompt_callback_target_data_op = 9,
+ ompt_callback_target_submit = 10,
+ ompt_callback_control_tool = 11,
+ ompt_callback_device_initialize = 12,
+ ompt_callback_device_finalize = 13,
+ ompt_callback_device_load = 14,
+ ompt_callback_device_unload = 15,
+ ompt_callback_sync_region_wait = 16,
+ ompt_callback_mutex_released = 17,
+ ompt_callback_dependences = 18,
+ ompt_callback_task_dependence = 19,
+ ompt_callback_work = 20,
+ ompt_callback_master = 21,
+ ompt_callback_target_map = 22,
+ ompt_callback_sync_region = 23,
+ ompt_callback_lock_init = 24,
+ ompt_callback_lock_destroy = 25,
+ ompt_callback_mutex_acquire = 26,
+ ompt_callback_mutex_acquired = 27,
+ ompt_callback_nest_lock = 28,
+ ompt_callback_flush = 29,
+ ompt_callback_cancel = 30,
+ ompt_callback_reduction = 31,
+ ompt_callback_dispatch = 32
+} ompt_callbacks_t;
+
+typedef enum ompt_record_t {
+ ompt_record_ompt = 1,
+ ompt_record_native = 2,
+ ompt_record_invalid = 3
+} ompt_record_t;
+
+typedef enum ompt_record_native_t {
+ ompt_record_native_info = 1,
+ ompt_record_native_event = 2
+} ompt_record_native_t;
+
+typedef enum ompt_set_result_t {
+ ompt_set_error = 0,
+ ompt_set_never = 1,
+ ompt_set_impossible = 2,
+ ompt_set_sometimes = 3,
+ ompt_set_sometimes_paired = 4,
+ ompt_set_always = 5
+} ompt_set_result_t;
+
+typedef uint64_t ompt_id_t;
+
+typedef uint64_t ompt_device_time_t;
+
+typedef uint64_t ompt_buffer_cursor_t;
+
+typedef enum ompt_thread_t {
+ ompt_thread_initial = 1,
+ ompt_thread_worker = 2,
+ ompt_thread_other = 3,
+ ompt_thread_unknown = 4
+} ompt_thread_t;
+
+typedef enum ompt_scope_endpoint_t {
+ ompt_scope_begin = 1,
+ ompt_scope_end = 2
+} ompt_scope_endpoint_t;
+
+typedef enum ompt_dispatch_t {
+ ompt_dispatch_iteration = 1,
+ ompt_dispatch_section = 2
+} ompt_dispatch_t;
+
+typedef enum ompt_sync_region_t {
+ ompt_sync_region_barrier = 1,
+ ompt_sync_region_barrier_implicit = 2,
+ ompt_sync_region_barrier_explicit = 3,
+ ompt_sync_region_barrier_implementation = 4,
+ ompt_sync_region_taskwait = 5,
+ ompt_sync_region_taskgroup = 6,
+ ompt_sync_region_reduction = 7
+} ompt_sync_region_t;
+
+typedef enum ompt_target_data_op_t {
+ ompt_target_data_alloc = 1,
+ ompt_target_data_transfer_to_device = 2,
+ ompt_target_data_transfer_from_device = 3,
+ ompt_target_data_delete = 4,
+ ompt_target_data_associate = 5,
+ ompt_target_data_disassociate = 6
+} ompt_target_data_op_t;
+
+typedef enum ompt_work_t {
+ ompt_work_loop = 1,
+ ompt_work_sections = 2,
+ ompt_work_single_executor = 3,
+ ompt_work_single_other = 4,
+ ompt_work_workshare = 5,
+ ompt_work_distribute = 6,
+ ompt_work_taskloop = 7
+} ompt_work_t;
+
+typedef enum ompt_mutex_t {
+ ompt_mutex_lock = 1,
+ ompt_mutex_test_lock = 2,
+ ompt_mutex_nest_lock = 3,
+ ompt_mutex_test_nest_lock = 4,
+ ompt_mutex_critical = 5,
+ ompt_mutex_atomic = 6,
+ ompt_mutex_ordered = 7
+} ompt_mutex_t;
+
+typedef enum ompt_native_mon_flag_t {
+ ompt_native_data_motion_explicit = 0x01,
+ ompt_native_data_motion_implicit = 0x02,
+ ompt_native_kernel_invocation = 0x04,
+ ompt_native_kernel_execution = 0x08,
+ ompt_native_driver = 0x10,
+ ompt_native_runtime = 0x20,
+ ompt_native_overhead = 0x40,
+ ompt_native_idleness = 0x80
+} ompt_native_mon_flag_t;
+
+typedef enum ompt_task_flag_t {
+ ompt_task_initial = 0x00000001,
+ ompt_task_implicit = 0x00000002,
+ ompt_task_explicit = 0x00000004,
+ ompt_task_target = 0x00000008,
+ ompt_task_undeferred = 0x08000000,
+ ompt_task_untied = 0x10000000,
+ ompt_task_final = 0x20000000,
+ ompt_task_mergeable = 0x40000000,
+ ompt_task_merged = 0x80000000
+} ompt_task_flag_t;
+
+typedef enum ompt_task_status_t {
+ ompt_task_complete = 1,
+ ompt_task_yield = 2,
+ ompt_task_cancel = 3,
+ ompt_task_detach = 4,
+ ompt_task_early_fulfill = 5,
+ ompt_task_late_fulfill = 6,
+ ompt_task_switch = 7
+} ompt_task_status_t;
+
+typedef enum ompt_target_t {
+ ompt_target = 1,
+ ompt_target_enter_data = 2,
+ ompt_target_exit_data = 3,
+ ompt_target_update = 4
+} ompt_target_t;
+
+typedef enum ompt_parallel_flag_t {
+ ompt_parallel_invoker_program = 0x00000001,
+ ompt_parallel_invoker_runtime = 0x00000002,
+ ompt_parallel_league = 0x40000000,
+ ompt_parallel_team = 0x80000000
+} ompt_parallel_flag_t;
+
+typedef enum ompt_target_map_flag_t {
+ ompt_target_map_flag_to = 0x01,
+ ompt_target_map_flag_from = 0x02,
+ ompt_target_map_flag_alloc = 0x04,
+ ompt_target_map_flag_release = 0x08,
+ ompt_target_map_flag_delete = 0x10,
+ ompt_target_map_flag_implicit = 0x20
+} ompt_target_map_flag_t;
+
+typedef enum ompt_dependence_type_t {
+ ompt_dependence_type_in = 1,
+ ompt_dependence_type_out = 2,
+ ompt_dependence_type_inout = 3,
+ ompt_dependence_type_mutexinoutset = 4,
+ ompt_dependence_type_source = 5,
+ ompt_dependence_type_sink = 6
+} ompt_dependence_type_t;
+
+typedef enum ompt_cancel_flag_t {
+ ompt_cancel_parallel = 0x01,
+ ompt_cancel_sections = 0x02,
+ ompt_cancel_loop = 0x04,
+ ompt_cancel_taskgroup = 0x08,
+ ompt_cancel_activated = 0x10,
+ ompt_cancel_detected = 0x20,
+ ompt_cancel_discarded_task = 0x40
+} ompt_cancel_flag_t;
+
+typedef uint64_t ompt_hwid_t;
+
+typedef uint64_t ompt_wait_id_t;
+
+typedef enum ompt_frame_flag_t {
+ ompt_frame_runtime = 0x00,
+ ompt_frame_application = 0x01,
+ ompt_frame_cfa = 0x10,
+ ompt_frame_framepointer = 0x20,
+ ompt_frame_stackaddress = 0x30
+} ompt_frame_flag_t;
+
+typedef enum ompt_state_t {
+ ompt_state_work_serial = 0x000,
+ ompt_state_work_parallel = 0x001,
+ ompt_state_work_reduction = 0x002,
+
+ ompt_state_wait_barrier = 0x010,
+ ompt_state_wait_barrier_implicit_parallel = 0x011,
+ ompt_state_wait_barrier_implicit_workshare = 0x012,
+ ompt_state_wait_barrier_implicit = 0x013,
+ ompt_state_wait_barrier_explicit = 0x014,
+
+ ompt_state_wait_taskwait = 0x020,
+ ompt_state_wait_taskgroup = 0x021,
+
+ ompt_state_wait_mutex = 0x040,
+ ompt_state_wait_lock = 0x041,
+ ompt_state_wait_critical = 0x042,
+ ompt_state_wait_atomic = 0x043,
+ ompt_state_wait_ordered = 0x044,
+
+ ompt_state_wait_target = 0x080,
+ ompt_state_wait_target_map = 0x081,
+ ompt_state_wait_target_update = 0x082,
+
+ ompt_state_idle = 0x100,
+ ompt_state_overhead = 0x101,
+ ompt_state_undefined = 0x102
+} ompt_state_t;
+
+typedef uint64_t (*ompt_get_unique_id_t) (void);
+
+typedef uint64_t ompd_size_t;
+
+typedef uint64_t ompd_wait_id_t;
+
+typedef uint64_t ompd_addr_t;
+typedef int64_t ompd_word_t;
+typedef uint64_t ompd_seg_t;
+
+typedef uint64_t ompd_device_t;
+
+typedef uint64_t ompd_thread_id_t;
+
+typedef enum ompd_scope_t {
+ ompd_scope_global = 1,
+ ompd_scope_address_space = 2,
+ ompd_scope_thread = 3,
+ ompd_scope_parallel = 4,
+ ompd_scope_implicit_task = 5,
+ ompd_scope_task = 6
+} ompd_scope_t;
+
+typedef uint64_t ompd_icv_id_t;
+
+typedef enum ompd_rc_t {
+ ompd_rc_ok = 0,
+ ompd_rc_unavailable = 1,
+ ompd_rc_stale_handle = 2,
+ ompd_rc_bad_input = 3,
+ ompd_rc_error = 4,
+ ompd_rc_unsupported = 5,
+ ompd_rc_needs_state_tracking = 6,
+ ompd_rc_incompatible = 7,
+ ompd_rc_device_read_error = 8,
+ ompd_rc_device_write_error = 9,
+ ompd_rc_nomem = 10,
+} ompd_rc_t;
+
+typedef void (*ompt_interface_fn_t) (void);
+
+typedef ompt_interface_fn_t (*ompt_function_lookup_t) (
+ const char *interface_function_name
+);
+
+typedef union ompt_data_t {
+ uint64_t value;
+ void *ptr;
+} ompt_data_t;
+
+typedef struct ompt_frame_t {
+ ompt_data_t exit_frame;
+ ompt_data_t enter_frame;
+ int exit_frame_flags;
+ int enter_frame_flags;
+} ompt_frame_t;
+
+typedef void (*ompt_callback_t) (void);
+
+typedef void ompt_device_t;
+
+typedef void ompt_buffer_t;
+
+typedef void (*ompt_callback_buffer_request_t) (
+ int device_num,
+ ompt_buffer_t **buffer,
+ size_t *bytes
+);
+
+typedef void (*ompt_callback_buffer_complete_t) (
+ int device_num,
+ ompt_buffer_t *buffer,
+ size_t bytes,
+ ompt_buffer_cursor_t begin,
+ int buffer_owned
+);
+
+typedef void (*ompt_finalize_t) (
+ ompt_data_t *tool_data
+);
+
+typedef int (*ompt_initialize_t) (
+ ompt_function_lookup_t lookup,
+ int initial_device_num,
+ ompt_data_t *tool_data
+);
+
+typedef struct ompt_start_tool_result_t {
+ ompt_initialize_t initialize;
+ ompt_finalize_t finalize;
+ ompt_data_t tool_data;
+} ompt_start_tool_result_t;
+
+typedef struct ompt_record_abstract_t {
+ ompt_record_native_t rclass;
+ const char *type;
+ ompt_device_time_t start_time;
+ ompt_device_time_t end_time;
+ ompt_hwid_t hwid;
+} ompt_record_abstract_t;
+
+typedef struct ompt_dependence_t {
+ ompt_data_t variable;
+ ompt_dependence_type_t dependence_type;
+} ompt_dependence_t;
+
+typedef int (*ompt_enumerate_states_t) (
+ int current_state,
+ int *next_state,
+ const char **next_state_name
+);
+
+typedef int (*ompt_enumerate_mutex_impls_t) (
+ int current_impl,
+ int *next_impl,
+ const char **next_impl_name
+);
+
+typedef ompt_set_result_t (*ompt_set_callback_t) (
+ ompt_callbacks_t event,
+ ompt_callback_t callback
+);
+
+typedef int (*ompt_get_callback_t) (
+ ompt_callbacks_t event,
+ ompt_callback_t *callback
+);
+
+typedef ompt_data_t *(*ompt_get_thread_data_t) (void);
+
+typedef int (*ompt_get_num_procs_t) (void);
+
+typedef int (*ompt_get_num_places_t) (void);
+
+typedef int (*ompt_get_place_proc_ids_t) (
+ int place_num,
+ int ids_size,
+ int *ids
+);
+
+typedef int (*ompt_get_place_num_t) (void);
+
+typedef int (*ompt_get_partition_place_nums_t) (
+ int place_nums_size,
+ int *place_nums
+);
+
+typedef int (*ompt_get_proc_id_t) (void);
+
+typedef int (*ompt_get_state_t) (
+ ompt_wait_id_t *wait_id
+);
+
+typedef int (*ompt_get_parallel_info_t) (
+ int ancestor_level,
+ ompt_data_t **parallel_data,
+ int *team_size
+);
+
+typedef int (*ompt_get_task_info_t) (
+ int ancestor_level,
+ int *flags,
+ ompt_data_t **task_data,
+ ompt_frame_t **task_frame,
+ ompt_data_t **parallel_data,
+ int *thread_num
+);
+
+typedef int (*ompt_get_task_memory_t)(
+ void **addr,
+ size_t *size,
+ int block
+);
+
+typedef int (*ompt_get_target_info_t) (
+ uint64_t *device_num,
+ ompt_id_t *target_id,
+ ompt_id_t *host_op_id
+);
+
+typedef int (*ompt_get_num_devices_t) (void);
+
+typedef void (*ompt_finalize_tool_t) (void);
+
+typedef int (*ompt_get_device_num_procs_t) (
+ ompt_device_t *device
+);
+
+typedef ompt_device_time_t (*ompt_get_device_time_t) (
+ ompt_device_t *device
+);
+
+typedef double (*ompt_translate_time_t) (
+ ompt_device_t *device,
+ ompt_device_time_t time
+);
+
+typedef ompt_set_result_t (*ompt_set_trace_ompt_t) (
+ ompt_device_t *device,
+ unsigned int enable,
+ unsigned int etype
+);
+
+typedef ompt_set_result_t (*ompt_set_trace_native_t) (
+ ompt_device_t *device,
+ int enable,
+ int flags
+);
+
+typedef int (*ompt_start_trace_t) (
+ ompt_device_t *device,
+ ompt_callback_buffer_request_t request,
+ ompt_callback_buffer_complete_t complete
+);
+
+typedef int (*ompt_pause_trace_t) (
+ ompt_device_t *device,
+ int begin_pause
+);
+
+typedef int (*ompt_flush_trace_t) (
+ ompt_device_t *device
+);
+
+typedef int (*ompt_stop_trace_t) (
+ ompt_device_t *device
+);
+
+typedef int (*ompt_advance_buffer_cursor_t) (
+ ompt_device_t *device,
+ ompt_buffer_t *buffer,
+ size_t size,
+ ompt_buffer_cursor_t current,
+ ompt_buffer_cursor_t *next
+);
+
+typedef ompt_record_t (*ompt_get_record_type_t) (
+ ompt_buffer_t *buffer,
+ ompt_buffer_cursor_t current
+);
+
+typedef void *(*ompt_get_record_native_t) (
+ ompt_buffer_t *buffer,
+ ompt_buffer_cursor_t current,
+ ompt_id_t *host_op_id
+);
+
+typedef ompt_record_abstract_t *
+(*ompt_get_record_abstract_t) (
+ void *native_record
+);
+
+typedef void (*ompt_callback_thread_begin_t) (
+ ompt_thread_t thread_type,
+ ompt_data_t *thread_data
+);
+
+typedef struct ompt_record_thread_begin_t {
+ ompt_thread_t thread_type;
+} ompt_record_thread_begin_t;
+
+typedef void (*ompt_callback_thread_end_t) (
+ ompt_data_t *thread_data
+);
+
+typedef void (*ompt_callback_parallel_begin_t) (
+ ompt_data_t *encountering_task_data,
+ const ompt_frame_t *encountering_task_frame,
+ ompt_data_t *parallel_data,
+ unsigned int requested_parallelism,
+ int flags,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_parallel_begin_t {
+ ompt_id_t encountering_task_id;
+ ompt_id_t parallel_id;
+ unsigned int requested_parallelism;
+ int flags;
+ const void *codeptr_ra;
+} ompt_record_parallel_begin_t;
+
+typedef void (*ompt_callback_parallel_end_t) (
+ ompt_data_t *parallel_data,
+ ompt_data_t *encountering_task_data,
+ int flags,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_parallel_end_t {
+ ompt_id_t parallel_id;
+ ompt_id_t encountering_task_id;
+ int flags;
+ const void *codeptr_ra;
+} ompt_record_parallel_end_t;
+
+typedef void (*ompt_callback_work_t) (
+ ompt_work_t wstype,
+ ompt_scope_endpoint_t endpoint,
+ ompt_data_t *parallel_data,
+ ompt_data_t *task_data,
+ uint64_t count,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_work_t {
+ ompt_work_t wstype;
+ ompt_scope_endpoint_t endpoint;
+ ompt_id_t parallel_id;
+ ompt_id_t task_id;
+ uint64_t count;
+ const void *codeptr_ra;
+} ompt_record_work_t;
+
+typedef void (*ompt_callback_dispatch_t) (
+ ompt_data_t *parallel_data,
+ ompt_data_t *task_data,
+ ompt_dispatch_t kind,
+ ompt_data_t instance
+);
+
+typedef struct ompt_record_dispatch_t {
+ ompt_id_t parallel_id;
+ ompt_id_t task_id;
+ ompt_dispatch_t kind;
+ ompt_data_t instance;
+} ompt_record_dispatch_t;
+
+typedef void (*ompt_callback_task_create_t) (
+ ompt_data_t *encountering_task_data,
+ const ompt_frame_t *encountering_task_frame,
+ ompt_data_t *new_task_data,
+ int flags,
+ int has_dependences,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_task_create_t {
+ ompt_id_t encountering_task_id;
+ ompt_id_t new_task_id;
+ int flags;
+ int has_dependences;
+ const void *codeptr_ra;
+} ompt_record_task_create_t;
+
+typedef void (*ompt_callback_dependences_t) (
+ ompt_data_t *task_data,
+ const ompt_dependence_t *deps,
+ int ndeps
+);
+
+typedef struct ompt_record_dependences_t {
+ ompt_id_t task_id;
+ ompt_dependence_t dep;
+ int ndeps;
+} ompt_record_dependences_t;
+
+typedef void (*ompt_callback_task_dependence_t) (
+ ompt_data_t *src_task_data,
+ ompt_data_t *sink_task_data
+);
+
+typedef struct ompt_record_task_dependence_t {
+ ompt_id_t src_task_id;
+ ompt_id_t sink_task_id;
+} ompt_record_task_dependence_t;
+
+typedef void (*ompt_callback_task_schedule_t) (
+ ompt_data_t *prior_task_data,
+ ompt_task_status_t prior_task_status,
+ ompt_data_t *next_task_data
+);
+
+typedef struct ompt_record_task_schedule_t {
+ ompt_id_t prior_task_id;
+ ompt_task_status_t prior_task_status;
+ ompt_id_t next_task_id;
+} ompt_record_task_schedule_t;
+
+typedef void (*ompt_callback_implicit_task_t) (
+ ompt_scope_endpoint_t endpoint,
+ ompt_data_t *parallel_data,
+ ompt_data_t *task_data,
+ unsigned int actual_parallelism,
+ unsigned int index,
+ int flags
+);
+
+typedef struct ompt_record_implicit_task_t {
+ ompt_scope_endpoint_t endpoint;
+ ompt_id_t parallel_id;
+ ompt_id_t task_id;
+ unsigned int actual_parallelism;
+ unsigned int index;
+ int flags;
+} ompt_record_implicit_task_t;
+
+typedef void (*ompt_callback_master_t) (
+ ompt_scope_endpoint_t endpoint,
+ ompt_data_t *parallel_data,
+ ompt_data_t *task_data,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_master_t {
+ ompt_scope_endpoint_t endpoint;
+ ompt_id_t parallel_id;
+ ompt_id_t task_id;
+ const void *codeptr_ra;
+} ompt_record_master_t;
+
+typedef void (*ompt_callback_sync_region_t) (
+ ompt_sync_region_t kind,
+ ompt_scope_endpoint_t endpoint,
+ ompt_data_t *parallel_data,
+ ompt_data_t *task_data,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_sync_region_t {
+ ompt_sync_region_t kind;
+ ompt_scope_endpoint_t endpoint;
+ ompt_id_t parallel_id;
+ ompt_id_t task_id;
+ const void *codeptr_ra;
+} ompt_record_sync_region_t;
+
+typedef void (*ompt_callback_mutex_acquire_t) (
+ ompt_mutex_t kind,
+ unsigned int hint,
+ unsigned int impl,
+ ompt_wait_id_t wait_id,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_mutex_acquire_t {
+ ompt_mutex_t kind;
+ unsigned int hint;
+ unsigned int impl;
+ ompt_wait_id_t wait_id;
+ const void *codeptr_ra;
+} ompt_record_mutex_acquire_t;
+
+typedef void (*ompt_callback_mutex_t) (
+ ompt_mutex_t kind,
+ ompt_wait_id_t wait_id,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_mutex_t {
+ ompt_mutex_t kind;
+ ompt_wait_id_t wait_id;
+ const void *codeptr_ra;
+} ompt_record_mutex_t;
+
+typedef void (*ompt_callback_nest_lock_t) (
+ ompt_scope_endpoint_t endpoint,
+ ompt_wait_id_t wait_id,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_nest_lock_t {
+ ompt_scope_endpoint_t endpoint;
+ ompt_wait_id_t wait_id;
+ const void *codeptr_ra;
+} ompt_record_nest_lock_t;
+
+typedef void (*ompt_callback_flush_t) (
+ ompt_data_t *thread_data,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_flush_t {
+ const void *codeptr_ra;
+} ompt_record_flush_t;
+
+typedef void (*ompt_callback_cancel_t) (
+ ompt_data_t *task_data,
+ int flags,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_cancel_t {
+ ompt_id_t task_id;
+ int flags;
+ const void *codeptr_ra;
+} ompt_record_cancel_t;
+
+typedef void (*ompt_callback_device_initialize_t) (
+ int device_num,
+ const char *type,
+ ompt_device_t *device,
+ ompt_function_lookup_t lookup,
+ const char *documentation
+);
+
+typedef void (*ompt_callback_device_finalize_t) (
+ int device_num
+);
+
+typedef void (*ompt_callback_device_load_t) (
+ int device_num,
+ const char *filename,
+ int64_t offset_in_file,
+ void *vma_in_file,
+ size_t bytes,
+ void *host_addr,
+ void *device_addr,
+ uint64_t module_id
+);
+
+typedef void (*ompt_callback_device_unload_t) (
+ int device_num,
+ uint64_t module_id
+);
+
+typedef void (*ompt_callback_target_data_op_t) (
+ ompt_id_t target_id,
+ ompt_id_t host_op_id,
+ ompt_target_data_op_t optype,
+ void *src_addr,
+ int src_device_num,
+ void *dest_addr,
+ int dest_device_num,
+ size_t bytes,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_target_data_op_t {
+ ompt_id_t host_op_id;
+ ompt_target_data_op_t optype;
+ void *src_addr;
+ int src_device_num;
+ void *dest_addr;
+ int dest_device_num;
+ size_t bytes;
+ ompt_device_time_t end_time;
+ const void *codeptr_ra;
+} ompt_record_target_data_op_t;
+
+typedef void (*ompt_callback_target_t) (
+ ompt_target_t kind,
+ ompt_scope_endpoint_t endpoint,
+ int device_num,
+ ompt_data_t *task_data,
+ ompt_id_t target_id,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_target_t {
+ ompt_target_t kind;
+ ompt_scope_endpoint_t endpoint;
+ int device_num;
+ ompt_id_t task_id;
+ ompt_id_t target_id;
+ const void *codeptr_ra;
+} ompt_record_target_t;
+
+typedef void (*ompt_callback_target_map_t) (
+ ompt_id_t target_id,
+ unsigned int nitems,
+ void **host_addr,
+ void **device_addr,
+ size_t *bytes,
+ unsigned int *mapping_flags,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_target_map_t {
+ ompt_id_t target_id;
+ unsigned int nitems;
+ void **host_addr;
+ void **device_addr;
+ size_t *bytes;
+ unsigned int *mapping_flags;
+ const void *codeptr_ra;
+} ompt_record_target_map_t;
+
+typedef void (*ompt_callback_target_submit_t) (
+ ompt_id_t target_id,
+ ompt_id_t host_op_id,
+ unsigned int requested_num_teams
+);
+
+typedef struct ompt_record_target_kernel_t {
+ ompt_id_t host_op_id;
+ unsigned int requested_num_teams;
+ unsigned int granted_num_teams;
+ ompt_device_time_t end_time;
+} ompt_record_target_kernel_t;
+
+typedef int (*ompt_callback_control_tool_t) (
+ uint64_t command,
+ uint64_t modifier,
+ void *arg,
+ const void *codeptr_ra
+);
+
+typedef struct ompt_record_control_tool_t {
+ uint64_t command;
+ uint64_t modifier;
+ const void *codeptr_ra;
+} ompt_record_control_tool_t;
+
+typedef struct ompd_address_t {
+ ompd_seg_t segment;
+ ompd_addr_t address;
+} ompd_address_t;
+
+typedef struct ompd_frame_info_t {
+ ompd_address_t frame_address;
+ ompd_word_t frame_flag;
+} ompd_frame_info_t;
+
+typedef struct _ompd_aspace_handle ompd_address_space_handle_t;
+typedef struct _ompd_thread_handle ompd_thread_handle_t;
+typedef struct _ompd_parallel_handle ompd_parallel_handle_t;
+typedef struct _ompd_task_handle ompd_task_handle_t;
+
+typedef struct _ompd_aspace_cont ompd_address_space_context_t;
+typedef struct _ompd_thread_cont ompd_thread_context_t;
+
+typedef struct ompd_device_type_sizes_t {
+ uint8_t sizeof_char;
+ uint8_t sizeof_short;
+ uint8_t sizeof_int;
+ uint8_t sizeof_long;
+ uint8_t sizeof_long_long;
+ uint8_t sizeof_pointer;
+} ompd_device_type_sizes_t;
+
+typedef struct ompt_record_ompt_t {
+ ompt_callbacks_t type;
+ ompt_device_time_t time;
+ ompt_id_t thread_id;
+ ompt_id_t target_id;
+ union {
+ ompt_record_thread_begin_t thread_begin;
+ ompt_record_parallel_begin_t parallel_begin;
+ ompt_record_parallel_end_t parallel_end;
+ ompt_record_work_t work;
+ ompt_record_dispatch_t dispatch;
+ ompt_record_task_create_t task_create;
+ ompt_record_dependences_t dependences;
+ ompt_record_task_dependence_t task_dependence;
+ ompt_record_task_schedule_t task_schedule;
+ ompt_record_implicit_task_t implicit_task;
+ ompt_record_master_t master;
+ ompt_record_sync_region_t sync_region;
+ ompt_record_mutex_acquire_t mutex_acquire;
+ ompt_record_mutex_t mutex;
+ ompt_record_nest_lock_t nest_lock;
+ ompt_record_flush_t flush;
+ ompt_record_cancel_t cancel;
+ ompt_record_target_t target;
+ ompt_record_target_data_op_t target_data_op;
+ ompt_record_target_map_t target_map;
+ ompt_record_target_kernel_t target_kernel;
+ ompt_record_control_tool_t control_tool;
+ } record;
+} ompt_record_ompt_t;
+
+typedef ompt_record_ompt_t *(*ompt_get_record_ompt_t) (
+ ompt_buffer_t *buffer,
+ ompt_buffer_cursor_t current
+);
+
+#define ompt_id_none 0
+#define ompt_data_none {0}
+#define ompt_time_none 0
+#define ompt_hwid_none 0
+#define ompt_addr_none ~0
+#define ompt_mutex_impl_none 0
+#define ompt_wait_id_none 0
+
+#define ompd_segment_none 0
+
+#endif /* __OMPT__ */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cuda_stdint.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cuda_stdint.h
new file mode 100644
index 0000000000000000000000000000000000000000..8a9814410e4b6fb4f07ad9edc8394e956b77dbcd
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cuda_stdint.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2009-2017 NVIDIA Corporation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __cuda_stdint_h__
+#define __cuda_stdint_h__
+
+// Compiler-specific treatment for C99's stdint.h
+//
+// By default, this header will use the standard headers (so it
+// is your responsibility to make sure they are available), except
+// on MSVC before Visual Studio 2010, when they were not provided.
+// To support old MSVC, a few of the commonly-used definitions are
+// provided here. If more definitions are needed, add them here,
+// or replace these definitions with a complete implementation,
+// such as the ones available from Google, Boost, or MSVC10. You
+// can prevent the definition of any of these types (in order to
+// use your own) by #defining CU_STDINT_TYPES_ALREADY_DEFINED.
+
+#if !defined(CU_STDINT_TYPES_ALREADY_DEFINED)
+
+// In VS including stdint.h forces the C++ runtime dep - provide an opt-out
+// (CU_STDINT_VS_FORCE_NO_STDINT_H) for users that care (notably static
+// cudart).
+#if defined(_MSC_VER) && ((_MSC_VER < 1600) || defined(CU_STDINT_VS_FORCE_NO_STDINT_H))
+
+// These definitions can be used with MSVC 8 and 9,
+// which don't ship with stdint.h:
+
+typedef unsigned char uint8_t;
+
+typedef short int16_t;
+typedef unsigned short uint16_t;
+
+// To keep it consistent with all MSVC build. define those types
+// in the exact same way they are defined with the MSVC headers
+#if defined(_MSC_VER)
+typedef signed char int8_t;
+
+typedef int int32_t;
+typedef unsigned int uint32_t;
+
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#else
+typedef char int8_t;
+
+typedef long int32_t;
+typedef unsigned long uint32_t;
+
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#endif
+
+#elif defined(__DJGPP__)
+
+// These definitions can be used when compiling
+// C code with DJGPP, which only provides stdint.h
+// when compiling C++ code with TR1 enabled.
+
+typedef char int8_t;
+typedef unsigned char uint8_t;
+
+typedef short int16_t;
+typedef unsigned short uint16_t;
+
+typedef long int32_t;
+typedef unsigned long uint32_t;
+
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+#else
+
+// Use standard headers, as specified by C99 and C++ TR1.
+// Known to be provided by:
+// - gcc/glibc, supported by all versions of glibc
+// - djgpp, supported since 2001
+// - MSVC, supported by Visual Studio 2010 and later
+
+#include
+
+#endif
+
+#endif // !defined(CU_STDINT_TYPES_ALREADY_DEFINED)
+
+
+#endif // file guard
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti.h
new file mode 100644
index 0000000000000000000000000000000000000000..be316531dcfd846bcea8feadf3604437ce2447a1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2010-2017 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_H_)
+#define _CUPTI_H_
+
+#ifdef _WIN32
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifdef NOMINMAX
+#include
+#else
+#define NOMINMAX
+#include
+#undef NOMINMAX
+#endif
+#endif
+
+#include
+#include
+#include
+
+/* Activity, callback, event and metric APIs */
+#include
+#include
+#include
+#include
+
+/* Runtime, driver, and nvtx function identifiers */
+#include
+#include
+#include
+
+/* To support function parameter structures for obsoleted API. See
+ cuda.h for the actual definition of these structures. */
+typedef unsigned int CUdeviceptr_v1;
+typedef struct CUDA_MEMCPY2D_v1_st { int dummy; } CUDA_MEMCPY2D_v1;
+typedef struct CUDA_MEMCPY3D_v1_st { int dummy; } CUDA_MEMCPY3D_v1;
+typedef struct CUDA_ARRAY_DESCRIPTOR_v1_st { int dummy; } CUDA_ARRAY_DESCRIPTOR_v1;
+typedef struct CUDA_ARRAY3D_DESCRIPTOR_v1_st { int dummy; } CUDA_ARRAY3D_DESCRIPTOR_v1;
+
+/* Function parameter structures */
+#include
+#include
+
+/* The following parameter structures cannot be included unless a
+ header that defines GL_VERSION is included before including them.
+ If these are needed then make sure such a header is included
+ already. */
+#ifdef GL_VERSION
+#include
+#include
+#endif
+
+//#include
+
+/* The following parameter structures cannot be included by default as
+ they are not guaranteed to be available on all systems. Uncomment
+ the includes that are available, or use the include explicitly. */
+#if defined(__linux__)
+//#include
+//#include
+#endif
+
+#ifdef _WIN32
+//#include
+//#include
+//#include
+//#include
+//#include
+//#include
+#endif
+
+#endif /*_CUPTI_H_*/
+
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity.h
new file mode 100644
index 0000000000000000000000000000000000000000..cdb6b76f8d66e986b20bd481fbeb0a12a791e5a5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity.h
@@ -0,0 +1,8065 @@
+/*
+ * Copyright 2011-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_ACTIVITY_H_)
+#define _CUPTI_ACTIVITY_H_
+
+/**
+ * Deprecated APIs and structures have been moved to the
+ * header :doc: `cupti_activity_deprecated.h`, which is included at
+ * the bottom of this file. Header cupti_activity.h contains
+ * only the latest version of APIs and structures.
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#if defined(CUPTI_DIRECTIVE_SUPPORT)
+#include
+#include
+#endif
+
+#include
+
+#define CUPTI_UNIFIED_MEMORY_CPU_DEVICE_ID ((uint32_t) 0xFFFFFFFFU)
+#define CUPTI_INVALID_CONTEXT_ID ((uint32_t) 0xFFFFFFFFU)
+#define CUPTI_INVALID_STREAM_ID ((uint32_t) 0xFFFFFFFFU)
+#define CUPTI_INVALID_CHANNEL_ID ((uint32_t) 0xFFFFFFFFU)
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+#define invalidNumaId ((uint32_t) 0xFFFFFFFF)
+
+/**
+ * \defgroup CUPTI_ACTIVITY_API CUPTI Activity API
+ * Functions, types, and enums that implement the CUPTI Activity API.
+ * @{
+ */
+
+/**
+ * \brief The kinds of activity records.
+ *
+ * Each activity record kind represents information about a GPU or an
+ * activity occurring on a CPU or GPU. Each kind is associated with a
+ * activity record structure that holds the information associated
+ * with the kind.
+ * \see CUpti_Activity
+ * \see CUpti_ActivityAPI
+ * \see CUpti_ActivityContext
+ * \see CUpti_ActivityContext2
+ * \see CUpti_ActivityContext3
+ * \see CUpti_ActivityDevice
+ * \see CUpti_ActivityDevice2
+ * \see CUpti_ActivityDevice3
+ * \see CUpti_ActivityDevice4
+ * \see CUpti_ActivityDeviceAttribute
+ * \see CUpti_ActivityEvent
+ * \see CUpti_ActivityEventInstance
+ * \see CUpti_ActivityKernel
+ * \see CUpti_ActivityKernel2
+ * \see CUpti_ActivityKernel3
+ * \see CUpti_ActivityKernel4
+ * \see CUpti_ActivityKernel5
+ * \see CUpti_ActivityKernel6
+ * \see CUpti_ActivityKernel7
+ * \see CUpti_ActivityKernel8
+ * \see CUpti_ActivityKernel9
+ * \see CUpti_ActivityCdpKernel
+ * \see CUpti_ActivityPreemption
+ * \see CUpti_ActivityMemcpy
+ * \see CUpti_ActivityMemcpy3
+ * \see CUpti_ActivityMemcpy4
+ * \see CUpti_ActivityMemcpy5
+ * \see CUpti_ActivityMemcpy6
+ * \see CUpti_ActivityMemcpyPtoP
+ * \see CUpti_ActivityMemcpyPtoP2
+ * \see CUpti_ActivityMemcpyPtoP3
+ * \see CUpti_ActivityMemcpyPtoP4
+ * \see CUpti_ActivityMemset
+ * \see CUpti_ActivityMemset2
+ * \see CUpti_ActivityMemset3
+ * \see CUpti_ActivityMemset4
+ * \see CUpti_ActivityMemory
+ * \see CUpti_ActivityMemory2
+ * \see CUpti_ActivityMemory3
+ * \see CUpti_ActivityMemory4
+ * \see CUpti_ActivityMemoryPool
+ * \see CUpti_ActivityMemoryPool2
+ * \see CUpti_ActivityMetric
+ * \see CUpti_ActivityMetricInstance
+ * \see CUpti_ActivityName
+ * \see CUpti_ActivityMarker
+ * \see CUpti_ActivityMarker2
+ * \see CUpti_ActivityMarkerData
+ * \see CUpti_ActivitySourceLocator
+ * \see CUpti_ActivityGlobalAccess
+ * \see CUpti_ActivityGlobalAccess2
+ * \see CUpti_ActivityGlobalAccess3
+ * \see CUpti_ActivityBranch
+ * \see CUpti_ActivityBranch2
+ * \see CUpti_ActivityOverhead3
+ * \see CUpti_ActivityEnvironment
+ * \see CUpti_ActivityInstructionExecution
+ * \see CUpti_ActivityUnifiedMemoryCounter
+ * \see CUpti_ActivityFunction
+ * \see CUpti_ActivityModule
+ * \see CUpti_ActivitySharedAccess
+ * \see CUpti_ActivityPCSampling
+ * \see CUpti_ActivityPCSampling2
+ * \see CUpti_ActivityPCSampling3
+ * \see CUpti_ActivityPCSamplingRecordInfo
+ * \see CUpti_ActivityCudaEvent2
+ * \see CUpti_ActivityStream
+ * \see CUpti_ActivitySynchronization2
+ * \see CUpti_ActivityInstructionCorrelation
+ * \see CUpti_ActivityExternalCorrelation
+ * \see CUpti_ActivityUnifiedMemoryCounter3
+ * \see CUpti_ActivityOpenAccData
+ * \see CUpti_ActivityOpenAccLaunch
+ * \see CUpti_ActivityOpenAccOther
+ * \see CUpti_ActivityOpenMp
+ * \see CUpti_ActivityNvLink
+ * \see CUpti_ActivityNvLink2
+ * \see CUpti_ActivityNvLink3
+ * \see CUpti_ActivityNvLink4
+ * \see CUpti_ActivityPcie
+ * \see CUpti_ActivityConfidentialComputeRotation
+ */
+
+typedef enum {
+ /**
+ * The activity record is invalid.
+ */
+ CUPTI_ACTIVITY_KIND_INVALID = 0,
+
+ /**
+ * A host<->host, host<->device, or device<->device memory copy.
+ * For peer to peer memory copy, use the kind CUPTI_ACTIVITY_KIND_MEMCPY2.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityMemcpy6.
+ */
+ CUPTI_ACTIVITY_KIND_MEMCPY = 1,
+
+ /**
+ * A memory set executing on the GPU. The corresponding activity
+ * record structure is \ref CUpti_ActivityMemset4.
+ */
+ CUPTI_ACTIVITY_KIND_MEMSET = 2,
+
+ /**
+ * A kernel executing on the GPU. This activity kind may significantly change
+ * the overall performance characteristics of the application because all
+ * kernel executions are serialized on the GPU. Other activity kind for kernel
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL doesn't break kernel concurrency.
+ * The corresponding activity record structure is \ref CUpti_ActivityKernel9.
+ */
+ CUPTI_ACTIVITY_KIND_KERNEL = 3,
+
+ /**
+ * A CUDA driver API function execution. The corresponding activity
+ * record structure is \ref CUpti_ActivityAPI.
+ */
+ CUPTI_ACTIVITY_KIND_DRIVER = 4,
+
+ /**
+ * A CUDA runtime API function execution. The corresponding activity
+ * record structure is \ref CUpti_ActivityAPI.
+ */
+ CUPTI_ACTIVITY_KIND_RUNTIME = 5,
+
+ /**
+ * A performance counter (aka event) value. The corresponding activity record
+ * structure is \ref CUpti_ActivityEvent. This activity cannot be directly
+ * enabled or disabled. Information collected using the Event API.
+ * can be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_EVENT = 6,
+
+ /**
+ * A performance metric value. The corresponding activity record structure is
+ * \ref CUpti_ActivityMetric. This activity cannot be directly
+ * enabled or disabled. Information collected using the Metric API.
+ * can be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_METRIC = 7,
+
+ /**
+ * Information about a CUDA device. The corresponding activity record
+ * structure is \ref CUpti_ActivityDevice5.
+ */
+ CUPTI_ACTIVITY_KIND_DEVICE = 8,
+
+ /**
+ * Information about a CUDA context. The corresponding activity record
+ * structure is \ref CUpti_ActivityContext3.
+ */
+ CUPTI_ACTIVITY_KIND_CONTEXT = 9,
+
+ /**
+ * A kernel executing on the GPU. This activity kind doesn't break
+ * kernel concurrency. The corresponding activity record structure
+ * is \ref CUpti_ActivityKernel9.
+ */
+ CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL = 10,
+
+ /**
+ * Resource naming done via NVTX APIs for thread, device, context, etc.
+ * The corresponding activity record structure is \ref CUpti_ActivityName.
+ */
+ CUPTI_ACTIVITY_KIND_NAME = 11,
+
+ /**
+ * Instantaneous, start, or end NVTX marker. The corresponding activity
+ * record structure is \ref CUpti_ActivityMarker2.
+ */
+ CUPTI_ACTIVITY_KIND_MARKER = 12,
+
+ /**
+ * Extended, optional, data about a NVTX marker. User must enable
+ * CUPTI_ACTIVITY_KIND_MARKER as well to get records for marker data.
+ * The corresponding activity record structure is \ref CUpti_ActivityMarkerData.
+ */
+ CUPTI_ACTIVITY_KIND_MARKER_DATA = 13,
+
+ /**
+ * Source information about source level result. The corresponding
+ * activity record structure is \ref CUpti_ActivitySourceLocator.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_SOURCE_LOCATOR = 14,
+
+ /**
+ * Results for source-level global access. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivityGlobalAccess3.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS = 15,
+
+ /**
+ * Results for source-level branch. The corresponding
+ * activity record structure is \ref CUpti_ActivityBranch2.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_BRANCH = 16,
+
+ /**
+ * Overhead added by CUPTI, Compiler, CUDA driver etc. The
+ * corresponding activity record structure is
+ * \ref CUpti_ActivityOverhead3.
+ */
+ CUPTI_ACTIVITY_KIND_OVERHEAD = 17,
+
+ /**
+ * A CDP (CUDA Dynamic Parallel) kernel executing on the GPU. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivityCdpKernel. This activity cannot be directly
+ * enabled or disabled. It is enabled and disabled through
+ * concurrent kernel activity i.e. _CONCURRENT_KERNEL.
+ */
+ CUPTI_ACTIVITY_KIND_CDP_KERNEL = 18,
+ /**
+ * Preemption activity record indicating a preemption of a CDP (CUDA
+ * Dynamic Parallel) kernel executing on the GPU. The corresponding
+ * activity record structure is \ref CUpti_ActivityPreemption.
+ */
+ CUPTI_ACTIVITY_KIND_PREEMPTION = 19,
+
+ /**
+ * Environment activity records indicating power, clock, thermal,
+ * etc. levels of the GPU. The corresponding activity record
+ * structure is \ref CUpti_ActivityEnvironment.
+ */
+ CUPTI_ACTIVITY_KIND_ENVIRONMENT = 20,
+
+ /**
+ * An performance counter value associated with a specific event domain
+ * instance. The corresponding activity record structure is \ref
+ * CUpti_ActivityEventInstance. This activity cannot be directly
+ * enabled or disabled. Information collected using the Event API.
+ * can be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_EVENT_INSTANCE = 21,
+
+ /**
+ * A peer to peer memory copy. The corresponding activity record
+ * structure is \ref CUpti_ActivityMemcpyPtoP4.
+ */
+ CUPTI_ACTIVITY_KIND_MEMCPY2 = 22,
+
+ /**
+ * A performance metric value associated with a specific metric domain
+ * instance. The corresponding activity record structure is \ref
+ * CUpti_ActivityMetricInstance. This activity cannot be directly
+ * enabled or disabled. Information collected using the Metric API.
+ * can be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_METRIC_INSTANCE = 23,
+
+ /**
+ * Results for source-level instruction execution.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstructionExecution.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION = 24,
+
+ /**
+ * Unified Memory counter record. The corresponding activity
+ * record structure is \ref CUpti_ActivityUnifiedMemoryCounter3.
+ */
+ CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER = 25,
+
+ /**
+ * Device global/function record. The corresponding activity
+ * record structure is \ref CUpti_ActivityFunction.
+ */
+ CUPTI_ACTIVITY_KIND_FUNCTION = 26,
+
+ /**
+ * CUDA Module record. The corresponding activity
+ * record structure is \ref CUpti_ActivityModule.
+ * This activity cannot be directly enabled or disabled.
+ * Information collected using the module callback can be
+ * be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_MODULE = 27,
+
+ /**
+ * A device attribute value. The corresponding activity record
+ * structure is \ref CUpti_ActivityDeviceAttribute.
+ * This activity cannot be directly enabled or disabled.
+ * Information collected using attributes CUpti_DeviceAttribute
+ * or CUdevice_attribute can be stored in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE = 28,
+
+ /**
+ * Results for source-level shared access. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivitySharedAccess.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_SHARED_ACCESS = 29,
+
+ /**
+ * PC sampling information for kernels. This will serialize
+ * kernels. The corresponding activity record structure
+ * is \ref CUpti_ActivityPCSampling3. In CUDA 12.5, this kind
+ * is deprecated for Volta and later GPU architectures in favor
+ * of PC Sampling APIs from the header cupti_pcsampling.h which
+ * allows concurrent kernel execution.
+ */
+ CUPTI_ACTIVITY_KIND_PC_SAMPLING = 30,
+
+ /**
+ * Summary information about PC sampling records. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivityPCSamplingRecordInfo. In CUDA 12.5, this kind
+ * is deprecated for Volta and later GPU architectures in favor
+ * of PC Sampling APIs from the header cupti_pcsampling.h.
+ */
+ CUPTI_ACTIVITY_KIND_PC_SAMPLING_RECORD_INFO = 31,
+
+ /**
+ * SASS/Source line-by-line correlation record.
+ * This will generate sass/source correlation for functions that have source
+ * level analysis or pc sampling results. The records will be generated only
+ * when either of source level analysis or pc sampling activity is enabled.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstructionCorrelation.
+ * In CUDA 12.6, this kind is deprecated for Volta and later GPU architectures
+ * in favor of SASS Metric APIs from the header cupti_sass_metrics.h.
+ */
+ CUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION = 32,
+
+ /**
+ * OpenACC data events.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityOpenAccData.
+ */
+ CUPTI_ACTIVITY_KIND_OPENACC_DATA = 33,
+
+ /**
+ * OpenACC launch events.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityOpenAccLaunch.
+ */
+ CUPTI_ACTIVITY_KIND_OPENACC_LAUNCH = 34,
+
+ /**
+ * OpenACC other events.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityOpenAccOther.
+ */
+ CUPTI_ACTIVITY_KIND_OPENACC_OTHER = 35,
+
+ /**
+ * Information about a CUDA event (cudaEvent). This activity cannot be
+ * directly enabled or disabled. It is enabled and disabled through
+ * the activity CUPTI_ACTIVITY_KIND_SYNCHRONIZATION.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityCudaEvent2.
+ */
+ CUPTI_ACTIVITY_KIND_CUDA_EVENT = 36,
+
+ /**
+ * Information about a CUDA stream. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivityStream.
+ */
+ CUPTI_ACTIVITY_KIND_STREAM = 37,
+
+ /**
+ * Records for CUDA synchronization primitives. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivitySynchronization2.
+ */
+ CUPTI_ACTIVITY_KIND_SYNCHRONIZATION = 38,
+
+ /**
+ * Records for correlation of different programming APIs. The
+ * corresponding activity record structure is \ref
+ * CUpti_ActivityExternalCorrelation.
+ */
+ CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION = 39,
+
+ /**
+ * NVLink topology information.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityNvLink4.
+ */
+ CUPTI_ACTIVITY_KIND_NVLINK = 40,
+
+ /**
+ * Instantaneous Event information.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstantaneousEvent.
+ * This activity can not be directly enabled or disabled.
+ * Information collected using the Event API can be stored
+ * in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT = 41,
+
+ /**
+ * Instantaneous Event information for a specific event
+ * domain instance.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstantaneousEventInstance.
+ * This activity can not be directly enabled or disabled.
+ * Information collected using the Event API can be stored
+ * in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT_INSTANCE = 42,
+
+ /**
+ * Instantaneous Metric information
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstantaneousMetric.
+ * This activity cannot be directly enabled or disabled.
+ * Information collected using the Metric API can be stored
+ * in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC = 43,
+
+ /**
+ * Instantaneous Metric information for a specific metric
+ * domain instance.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityInstantaneousMetricInstance.
+ * This activity cannot be directly enabled or disabled.
+ * Information collected using the Metric API can be stored
+ * in the corresponding activity record.
+ */
+ CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC_INSTANCE = 44,
+
+ /**
+ * Memory activity tracking allocation and freeing of the memory
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityMemory.
+ */
+ CUPTI_ACTIVITY_KIND_MEMORY = 45,
+
+ /**
+ * PCI devices information used for PCI topology.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityPcie.
+ */
+ CUPTI_ACTIVITY_KIND_PCIE = 46,
+
+ /**
+ * OpenMP parallel events.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityOpenMp.
+ */
+ CUPTI_ACTIVITY_KIND_OPENMP = 47,
+
+ /**
+ * A CUDA driver kernel launch occurring outside of any
+ * public API function execution. Tools can handle these
+ * like records for driver API launch functions, although
+ * the cbid field is not used here.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityAPI.
+ */
+ CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API = 48,
+
+ /**
+ * Memory activity tracking allocation and freeing of the memory
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityMemory4.
+ */
+ CUPTI_ACTIVITY_KIND_MEMORY2 = 49,
+
+ /**
+ * Memory pool activity tracking creation, destruction and
+ * trimming of the memory pool.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityMemoryPool2.
+ */
+ CUPTI_ACTIVITY_KIND_MEMORY_POOL = 50,
+
+ /**
+ * Activity record for graph-level information.
+ * The corresponding activity record structure is
+ * \ref CUpti_ActivityGraphTrace2.
+ */
+ CUPTI_ACTIVITY_KIND_GRAPH_TRACE = 51,
+
+ /**
+ * JIT (Just-in-time) operation tracking.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityJit.
+ */
+ CUPTI_ACTIVITY_KIND_JIT = 52,
+
+ /**
+ * This activity can not be directly enabled or disabled.
+ * It is enabled when CUPTI_ACTIVITY_KIND_GRAPH_TRACE is enabled
+ * and device graph trace is enabled through API cuptiActivityEnableDeviceGraph().
+ * The corresponding activity record structure is
+ * \ref CUpti_ActivityDeviceGraphTrace.
+ */
+ CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE = 53,
+
+ /**
+ * Tracing batches of copies that are to be decompressed.
+ * The corresponding activity record structure is \ref
+ * CUpti_ActivityMemDecompress.
+ */
+ CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS = 54,
+
+
+
+ /**
+ * Count of supported activity kinds.
+ */
+ CUPTI_ACTIVITY_KIND_COUNT,
+
+ CUPTI_ACTIVITY_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityKind;
+
+/**
+ * \brief The kinds of activity objects.
+ * \see CUpti_ActivityObjectKindId
+ */
+typedef enum {
+ /**
+ * The object kind is not known.
+ */
+ CUPTI_ACTIVITY_OBJECT_UNKNOWN = 0,
+
+ /**
+ * A process.
+ */
+ CUPTI_ACTIVITY_OBJECT_PROCESS = 1,
+
+ /**
+ * A thread.
+ */
+ CUPTI_ACTIVITY_OBJECT_THREAD = 2,
+
+ /**
+ * A device.
+ */
+ CUPTI_ACTIVITY_OBJECT_DEVICE = 3,
+
+ /**
+ * A context.
+ */
+ CUPTI_ACTIVITY_OBJECT_CONTEXT = 4,
+
+ /**
+ * A stream.
+ */
+ CUPTI_ACTIVITY_OBJECT_STREAM = 5,
+
+ CUPTI_ACTIVITY_OBJECT_FORCE_INT = 0x7fffffff
+} CUpti_ActivityObjectKind;
+
+/**
+ * \brief Identifiers for object kinds as specified by
+ * CUpti_ActivityObjectKind.
+ * \see CUpti_ActivityObjectKind
+ */
+typedef union {
+ /**
+ * A process object requires that we identify the process ID. A
+ * thread object requires that we identify both the process and
+ * thread ID.
+ */
+ struct {
+ uint32_t processId;
+ uint32_t threadId;
+ } pt;
+
+ /**
+ * A device object requires that we identify the device ID. A
+ * context object requires that we identify both the device and
+ * context ID. A stream object requires that we identify device,
+ * context, and stream ID.
+ */
+ struct {
+ uint32_t deviceId;
+ uint32_t contextId;
+ uint32_t streamId;
+ } dcs;
+} CUpti_ActivityObjectKindId;
+
+/**
+ * \brief The structure to provide additional data for CUPTI_ACTIVITY_OVERHEAD_COMMAND_BUFFER_FULL.
+ */
+typedef struct {
+ /**
+ * The remaining space in the command buffer. This field will always be zero
+ * when the command buffer is full, making it not useful in such cases.
+ *
+ */
+ uint32_t commandBufferLength;
+ /**
+ * The channel ID of the command buffer.
+ *
+ */
+ uint32_t channelID;
+ /**
+ * The channel type of the command buffer.
+ *
+ */
+ uint32_t channelType;
+} CUpti_ActivityOverheadCommandBufferFullData;
+
+/**
+ * \brief The kinds of activity overhead.
+ */
+typedef enum {
+ /**
+ * The overhead kind is not known.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_UNKNOWN = 0,
+
+ /**
+ * Compiler overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_DRIVER_COMPILER = 1,
+
+ /**
+ * Activity buffer flush overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_CUPTI_BUFFER_FLUSH = 1<<16,
+
+ /**
+ * CUPTI instrumentation overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_CUPTI_INSTRUMENTATION = 2<<16,
+
+ /**
+ * CUPTI resource creation and destruction overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_CUPTI_RESOURCE = 3<<16,
+
+ /**
+ * CUDA Runtime triggered module loading overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_RUNTIME_TRIGGERED_MODULE_LOADING = 4<<16,
+
+ /**
+ * Lazy function loading overhead.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_LAZY_FUNCTION_LOADING = 5<<16,
+
+ /**
+ * Overhead due to lack of command buffer space.
+ * Refer CUpti_ActivityOverheadCommandBufferFullData for more details.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_COMMAND_BUFFER_FULL = 6<<16,
+
+ /**
+ * Overhead due to activity buffer request.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_ACTIVITY_BUFFER_REQUEST = 7<<16,
+
+ /**
+ * Overhead due to UVM activity initialization.
+ */
+ CUPTI_ACTIVITY_OVERHEAD_UVM_ACTIVITY_INIT = 8<<16,
+
+ CUPTI_ACTIVITY_OVERHEAD_FORCE_INT = 0x7fffffff
+} CUpti_ActivityOverheadKind;
+
+/**
+ * \brief The kind of a compute API.
+ */
+typedef enum {
+ /**
+ * The compute API is not known.
+ */
+ CUPTI_ACTIVITY_COMPUTE_API_UNKNOWN = 0,
+
+ /**
+ * The compute APIs are for CUDA.
+ */
+ CUPTI_ACTIVITY_COMPUTE_API_CUDA = 1,
+
+ /**
+ * The compute APIs are for CUDA running
+ * in MPS (Multi-Process Service) environment.
+ */
+ CUPTI_ACTIVITY_COMPUTE_API_CUDA_MPS = 2,
+
+ CUPTI_ACTIVITY_COMPUTE_API_FORCE_INT = 0x7fffffff
+} CUpti_ActivityComputeApiKind;
+
+/**
+ * \brief Flags associated with activity records.
+ *
+ * Activity record flags. Flags can be combined by bitwise OR to
+ * associated multiple flags with an activity record. Each flag is
+ * specific to a certain activity kind, as noted below.
+ */
+typedef enum {
+ /**
+ * Indicates the activity record has no flags.
+ */
+ CUPTI_ACTIVITY_FLAG_NONE = 0,
+
+ /**
+ * Indicates the activity represents a device that supports
+ * concurrent kernel execution. Valid for
+ * CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUPTI_ACTIVITY_FLAG_DEVICE_CONCURRENT_KERNELS = 1 << 0,
+
+ /**
+ * Indicates if the activity represents a CUdevice_attribute value
+ * or a CUpti_DeviceAttribute value. Valid for
+ * CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE.
+ */
+ CUPTI_ACTIVITY_FLAG_DEVICE_ATTRIBUTE_CUDEVICE = 1 << 0,
+
+ /**
+ * Indicates the activity represents an asynchronous memcpy
+ * operation. Valid for CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUPTI_ACTIVITY_FLAG_MEMCPY_ASYNC = 1 << 0,
+
+ /**
+ * Indicates the activity represents an instantaneous marker. Valid
+ * for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_INSTANTANEOUS = 1 << 0,
+
+ /**
+ * Indicates the activity represents a region start marker. Valid
+ * for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_START = 1 << 1,
+
+ /**
+ * Indicates the activity represents a region end marker. Valid for
+ * CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_END = 1 << 2,
+
+ /**
+ * Indicates the activity represents an attempt to acquire a user
+ * defined synchronization object.
+ * Valid for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_SYNC_ACQUIRE = 1 << 3,
+
+ /**
+ * Indicates the activity represents success in acquiring the
+ * user defined synchronization object.
+ * Valid for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_SYNC_ACQUIRE_SUCCESS = 1 << 4,
+
+ /**
+ * Indicates the activity represents failure in acquiring the
+ * user defined synchronization object.
+ * Valid for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_SYNC_ACQUIRE_FAILED = 1 << 5,
+
+ /**
+ * Indicates the activity represents releasing a reservation on
+ * user defined synchronization object.
+ * Valid for CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_SYNC_RELEASE = 1 << 6,
+
+ /**
+ * Indicates the activity represents a marker that does not specify
+ * a color. Valid for CUPTI_ACTIVITY_KIND_MARKER_DATA.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_COLOR_NONE = 1 << 0,
+
+ /**
+ * Indicates the activity represents a marker that specifies a color
+ * in alpha-red-green-blue format. Valid for
+ * CUPTI_ACTIVITY_KIND_MARKER_DATA.
+ */
+ CUPTI_ACTIVITY_FLAG_MARKER_COLOR_ARGB = 1 << 1,
+
+ /**
+ * The number of bytes requested by each thread
+ * Valid for CUpti_ActivityGlobalAccess3.
+ */
+ CUPTI_ACTIVITY_FLAG_GLOBAL_ACCESS_KIND_SIZE_MASK = 0xFF << 0,
+
+ /**
+ * If bit in this flag is set, the access was load, else it is a
+ * store access. Valid for CUpti_ActivityGlobalAccess3.
+ */
+ CUPTI_ACTIVITY_FLAG_GLOBAL_ACCESS_KIND_LOAD = 1 << 8,
+
+ /**
+ * If this bit in flag is set, the load access was cached else it is
+ * uncached. Valid for CUpti_ActivityGlobalAccess3.
+ */
+ CUPTI_ACTIVITY_FLAG_GLOBAL_ACCESS_KIND_CACHED = 1 << 9,
+
+ /**
+ * If this bit in flag is set, the metric value overflowed. Valid
+ * for CUpti_ActivityMetric and CUpti_ActivityMetricInstance.
+ */
+ CUPTI_ACTIVITY_FLAG_METRIC_OVERFLOWED = 1 << 0,
+
+ /**
+ * If this bit in flag is set, the metric value couldn't be
+ * calculated. This occurs when a value(s) required to calculate the
+ * metric is missing. Valid for CUpti_ActivityMetric and
+ * CUpti_ActivityMetricInstance.
+ */
+ CUPTI_ACTIVITY_FLAG_METRIC_VALUE_INVALID = 1 << 1,
+
+ /**
+ * If this bit in flag is set, the source level metric value couldn't be
+ * calculated. This occurs when a value(s) required to calculate the
+ * source level metric cannot be evaluated.
+ * Valid for CUpti_ActivityInstructionExecution.
+ */
+ CUPTI_ACTIVITY_FLAG_INSTRUCTION_VALUE_INVALID = 1 << 0,
+
+ /**
+ * The mask for the instruction class, \ref CUpti_ActivityInstructionClass
+ * Valid for CUpti_ActivityInstructionExecution and
+ * CUpti_ActivityInstructionCorrelation
+ */
+ CUPTI_ACTIVITY_FLAG_INSTRUCTION_CLASS_MASK = 0xFF << 1,
+
+ /**
+ * When calling cuptiActivityFlushAll, this flag
+ * can be set to force CUPTI to flush all records in the buffer, whether
+ * finished or not
+ */
+ CUPTI_ACTIVITY_FLAG_FLUSH_FORCED = 1 << 0,
+
+ /**
+ * The number of bytes requested by each thread
+ * Valid for CUpti_ActivitySharedAccess.
+ */
+ CUPTI_ACTIVITY_FLAG_SHARED_ACCESS_KIND_SIZE_MASK = 0xFF << 0,
+
+ /**
+ * If bit in this flag is set, the access was load, else it is a
+ * store access. Valid for CUpti_ActivitySharedAccess.
+ */
+ CUPTI_ACTIVITY_FLAG_SHARED_ACCESS_KIND_LOAD = 1 << 8,
+
+ /**
+ * Indicates the activity represents an asynchronous memset
+ * operation. Valid for CUPTI_ACTIVITY_KIND_MEMSET.
+ */
+ CUPTI_ACTIVITY_FLAG_MEMSET_ASYNC = 1 << 0,
+
+ /**
+ * Indicates the activity represents thrashing in CPU.
+ * Valid for counter of kind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING in
+ * CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER
+ */
+ CUPTI_ACTIVITY_FLAG_THRASHING_IN_CPU = 1 << 0,
+
+ /**
+ * Indicates the activity represents page throttling in CPU.
+ * Valid for counter of kind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING in
+ * CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER
+ */
+ CUPTI_ACTIVITY_FLAG_THROTTLING_IN_CPU = 1 << 0,
+
+ CUPTI_ACTIVITY_FLAG_FORCE_INT = 0x7fffffff
+} CUpti_ActivityFlag;
+
+/**
+ * \brief The stall reason for PC sampling activity.
+ */
+typedef enum {
+ /**
+ * Invalid reason
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_INVALID = 0,
+
+ /**
+ * No stall, instruction is selected for issue
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_NONE = 1,
+
+ /**
+ * Warp is blocked because next instruction is not yet available,
+ * because of instruction cache miss, or because of branching effects
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_INST_FETCH = 2,
+
+ /**
+ * Instruction is waiting on an arithmetic dependency
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_EXEC_DEPENDENCY = 3,
+
+ /**
+ * Warp is blocked because it is waiting for a memory access to complete.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_MEMORY_DEPENDENCY = 4,
+
+ /**
+ * Texture sub-system is fully utilized or has too many outstanding requests.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_TEXTURE = 5,
+
+ /**
+ * Warp is blocked as it is waiting at __syncthreads() or at memory barrier.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_SYNC = 6,
+
+ /**
+ * Warp is blocked waiting for __constant__ memory and immediate memory access to complete.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_CONSTANT_MEMORY_DEPENDENCY = 7,
+
+ /**
+ * Compute operation cannot be performed due to the required resources not
+ * being available.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_PIPE_BUSY = 8,
+
+ /**
+ * Warp is blocked because there are too many pending memory operations.
+ * In Kepler architecture it often indicates high number of memory replays.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_MEMORY_THROTTLE = 9,
+
+ /**
+ * Warp was ready to issue, but some other warp issued instead.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_NOT_SELECTED = 10,
+
+ /**
+ * Miscellaneous reasons
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_OTHER = 11,
+
+ /**
+ * Sleeping.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_SLEEPING = 12,
+
+ CUPTI_ACTIVITY_PC_SAMPLING_STALL_FORCE_INT = 0x7fffffff
+} CUpti_ActivityPCSamplingStallReason;
+
+/**
+ * \brief Sampling period for PC sampling method
+ *
+ * Sampling period can be set using \ref cuptiActivityConfigurePCSampling
+ */
+typedef enum {
+ /**
+ * The PC sampling period is not set.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_INVALID = 0,
+
+ /**
+ * Minimum sampling period available on the device.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MIN = 1,
+
+ /**
+ * Sampling period in lower range.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_LOW = 2,
+
+ /**
+ * Medium sampling period.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MID = 3,
+
+ /**
+ * Sampling period in higher range.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_HIGH = 4,
+
+ /**
+ * Maximum sampling period available on the device.
+ */
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_MAX = 5,
+
+ CUPTI_ACTIVITY_PC_SAMPLING_PERIOD_FORCE_INT = 0x7fffffff
+} CUpti_ActivityPCSamplingPeriod;
+
+/**
+ * \brief The kind of a memory copy, indicating the source and
+ * destination targets of the copy.
+ *
+ * Each kind represents the source and destination targets of a memory
+ * copy. Targets are host, device, and array.
+ */
+typedef enum {
+ /**
+ * The memory copy kind is not known.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_UNKNOWN = 0,
+
+ /**
+ * A host to device memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_HTOD = 1,
+
+ /**
+ * A device to host memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_DTOH = 2,
+
+ /**
+ * A host to device array memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_HTOA = 3,
+
+ /**
+ * A device array to host memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_ATOH = 4,
+
+ /**
+ * A device array to device array memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_ATOA = 5,
+
+ /**
+ * A device array to device memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_ATOD = 6,
+
+ /**
+ * A device to device array memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_DTOA = 7,
+
+ /**
+ * A device to device memory copy on the same device.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_DTOD = 8,
+
+ /**
+ * A host to host memory copy.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_HTOH = 9,
+
+ /**
+ * A peer to peer memory copy across different devices.
+ */
+ CUPTI_ACTIVITY_MEMCPY_KIND_PTOP = 10,
+
+ CUPTI_ACTIVITY_MEMCPY_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityMemcpyKind;
+
+/**
+ * \brief The kinds of memory accessed by a memory operation/copy.
+ *
+ * Each kind represents the type of the memory
+ * accessed by a memory operation/copy.
+ */
+typedef enum {
+ /**
+ * The memory kind is unknown.
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_UNKNOWN = 0,
+
+ /**
+ * The memory is pageable.
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_PAGEABLE = 1,
+
+ /**
+ * The memory is pinned.
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_PINNED = 2,
+
+ /**
+ * The memory is on the device.
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_DEVICE = 3,
+
+ /**
+ * The memory is an array.
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_ARRAY = 4,
+
+ /**
+ * The memory is managed
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_MANAGED = 5,
+
+ /**
+ * The memory is device static
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_DEVICE_STATIC = 6,
+
+ /**
+ * The memory is managed static
+ */
+ CUPTI_ACTIVITY_MEMORY_KIND_MANAGED_STATIC = 7,
+
+ CUPTI_ACTIVITY_MEMORY_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityMemoryKind;
+
+/**
+ * \brief The kind of a preemption activity.
+ */
+typedef enum {
+ /**
+ * The preemption kind is not known.
+ */
+ CUPTI_ACTIVITY_PREEMPTION_KIND_UNKNOWN = 0,
+
+ /**
+ * Preemption to save CDP block.
+ */
+ CUPTI_ACTIVITY_PREEMPTION_KIND_SAVE = 1,
+
+ /**
+ * Preemption to restore CDP block.
+ */
+ CUPTI_ACTIVITY_PREEMPTION_KIND_RESTORE = 2,
+
+ CUPTI_ACTIVITY_PREEMPTION_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityPreemptionKind;
+
+/**
+ * \brief The kind of environment data. Used to indicate what type of
+ * data is being reported by an environment activity record.
+ */
+typedef enum {
+ /**
+ * Unknown data.
+ */
+ CUPTI_ACTIVITY_ENVIRONMENT_UNKNOWN = 0,
+
+ /**
+ * The environment data is related to speed.
+ */
+ CUPTI_ACTIVITY_ENVIRONMENT_SPEED = 1,
+
+ /**
+ * The environment data is related to temperature.
+ */
+ CUPTI_ACTIVITY_ENVIRONMENT_TEMPERATURE = 2,
+
+ /**
+ * The environment data is related to power.
+ */
+ CUPTI_ACTIVITY_ENVIRONMENT_POWER = 3,
+
+ /**
+ * The environment data is related to cooling.
+ */
+ CUPTI_ACTIVITY_ENVIRONMENT_COOLING = 4,
+
+ CUPTI_ACTIVITY_ENVIRONMENT_COUNT,
+
+ CUPTI_ACTIVITY_ENVIRONMENT_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityEnvironmentKind;
+
+/**
+ * \brief Reasons for clock throttling.
+ *
+ * The possible reasons that a clock can be throttled. There can be
+ * more than one reason that a clock is being throttled so these types
+ * can be combined by bitwise OR. These are used in the
+ * clocksThrottleReason field in the Environment Activity Record.
+ */
+typedef enum {
+ /**
+ * Nothing is running on the GPU and the clocks are dropping to idle
+ * state.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_GPU_IDLE = 0x00000001,
+
+ /**
+ * The GPU clocks are limited by a user specified limit.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_USER_DEFINED_CLOCKS = 0x00000002,
+
+ /**
+ * A software power scaling algorithm is reducing the clocks below
+ * requested clocks.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_SW_POWER_CAP = 0x00000004,
+
+ /**
+ * Hardware slowdown to reduce the clock by a factor of two or more
+ * is engaged. This is an indicator of one of the following: 1)
+ * Temperature is too high, 2) External power brake assertion is
+ * being triggered (e.g. by the system power supply), 3) Change in
+ * power state.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_HW_SLOWDOWN = 0x00000008,
+
+ /**
+ * Some unspecified factor is reducing the clocks.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_UNKNOWN = 0x80000000,
+
+ /**
+ * Throttle reason is not supported for this GPU.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_UNSUPPORTED = 0x40000000,
+
+ /**
+ * No clock throttling.
+ */
+ CUPTI_CLOCKS_THROTTLE_REASON_NONE = 0x00000000,
+
+ CUPTI_CLOCKS_THROTTLE_REASON_FORCE_INT = 0x7fffffff
+} CUpti_EnvironmentClocksThrottleReason;
+
+/**
+ * \brief Scope of the unified memory counter (deprecated in CUDA 7.0)
+ */
+typedef enum {
+ /**
+ * The unified memory counter scope is not known.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_UNKNOWN = 0,
+
+ /**
+ * Collect unified memory counter for single process on one device
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_PROCESS_SINGLE_DEVICE = 1,
+
+ /**
+ * Collect unified memory counter for single process across all devices
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_PROCESS_ALL_DEVICES = 2,
+
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_COUNT,
+
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_SCOPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityUnifiedMemoryCounterScope;
+
+/**
+ * \brief Kind of the Unified Memory counter
+ *
+ * Many activities are associated with Unified Memory mechanism; among them
+ * are transfers from host to device, device to host, page fault at
+ * host side.
+ */
+typedef enum {
+ /**
+ * The unified memory counter kind is not known.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_UNKNOWN = 0,
+
+ /**
+ * Number of bytes transferred from host to device
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD = 1,
+
+ /**
+ * Number of bytes transferred from device to host
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH = 2,
+
+ /**
+ * Number of CPU page faults, this is only supported on 64 bit
+ * Linux and Mac platforms
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT = 3,
+
+ /**
+ * Number of GPU page faults, this is only supported on devices with
+ * compute capability 6.0 and higher and 64 bit Linux platforms
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT = 4,
+
+ /**
+ * Thrashing occurs when data is frequently accessed by
+ * multiple processors and has to be constantly migrated around
+ * to achieve data locality. In this case the overhead of migration
+ * may exceed the benefits of locality.
+ * This is only supported on 64 bit Linux platforms.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING = 5,
+
+ /**
+ * Throttling is a prevention technique used by the driver to avoid
+ * further thrashing. Here, the driver doesn't service the fault for
+ * one of the contending processors for a specific period of time,
+ * so that the other processor can run at full-speed.
+ * This is only supported on 64 bit Linux platforms.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING = 6,
+
+ /**
+ * In case throttling does not help, the driver tries to pin the memory
+ * to a processor for a specific period of time. One of the contending
+ * processors will have slow access to the memory, while the other will
+ * have fast access.
+ * This is only supported on 64 bit Linux platforms.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP = 7,
+
+ /**
+ * Number of bytes transferred from one device to another device.
+ * This is only supported on 64 bit Linux platforms.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOD = 8,
+
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_COUNT,
+
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityUnifiedMemoryCounterKind;
+
+/**
+ * \brief Memory access type for unified memory page faults
+ *
+ * This is valid for \ref CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT
+ * and \ref CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT
+ */
+typedef enum {
+ /**
+ * The unified memory access type is not known
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_UNKNOWN = 0,
+
+ /**
+ * The page fault was triggered by read memory instruction
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_READ = 1,
+
+ /**
+ * The page fault was triggered by write memory instruction
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_WRITE = 2,
+
+ /**
+ * The page fault was triggered by atomic memory instruction
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_ATOMIC = 3,
+
+ /**
+ * The page fault was triggered by memory prefetch operation
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_ACCESS_TYPE_PREFETCH = 4
+} CUpti_ActivityUnifiedMemoryAccessType;
+
+/**
+ * \brief Migration cause of the Unified Memory counter
+ *
+ * This is valid for \ref CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD and
+ * \ref CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH
+ */
+typedef enum {
+ /**
+ * The unified memory migration cause is not known
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_UNKNOWN = 0,
+
+ /**
+ * The unified memory migrated due to an explicit call from
+ * the user e.g. cudaMemPrefetchAsync
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_USER = 1,
+
+ /**
+ * The unified memory migrated to guarantee data coherence
+ * e.g. CPU/GPU faults on Pascal+ and kernel launch on pre-Pascal GPUs
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_COHERENCE = 2,
+
+ /**
+ * The unified memory was speculatively migrated by the UVM driver
+ * before being accessed by the destination processor to improve
+ * performance
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_PREFETCH = 3,
+
+ /**
+ * The unified memory migrated to the CPU because it was evicted to make
+ * room for another block of memory on the GPU
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_EVICTION = 4,
+
+ /**
+ * The unified memory migrated to another processor because of access counter
+ * notifications. Only frequently accessed pages are migrated between CPU and GPU, or
+ * between peer GPUs.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_MIGRATION_CAUSE_ACCESS_COUNTERS = 5,
+} CUpti_ActivityUnifiedMemoryMigrationCause;
+
+/**
+ * \brief Remote memory map cause of the Unified Memory counter
+ *
+ * This is valid for \ref CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP
+ */
+typedef enum {
+ /**
+ * The cause of mapping to remote memory was unknown
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_UNKNOWN = 0,
+
+ /**
+ * Mapping to remote memory was added to maintain data coherence.
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_COHERENCE = 1,
+
+ /**
+ * Mapping to remote memory was added to prevent further thrashing
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_THRASHING = 2,
+
+ /**
+ * Mapping to remote memory was added to enforce the hints
+ * specified by the programmer or by performance heuristics of the
+ * UVM driver
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_POLICY = 3,
+
+ /**
+ * Mapping to remote memory was added because there is no more
+ * memory available on the processor and eviction was not
+ * possible
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_OUT_OF_MEMORY = 4,
+
+ /**
+ * Mapping to remote memory was added after the memory was
+ * evicted to make room for another block of memory on the GPU
+ */
+ CUPTI_ACTIVITY_UNIFIED_MEMORY_REMOTE_MAP_CAUSE_EVICTION = 5,
+} CUpti_ActivityUnifiedMemoryRemoteMapCause;
+
+/**
+ * \brief SASS instruction classification.
+ *
+ * The sass instruction are broadly divided into different class. Each enum represents a classification.
+ */
+typedef enum {
+ /**
+ * The instruction class is not known.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_UNKNOWN = 0,
+
+ /**
+ * Represents a 32 bit floating point operation.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_32 = 1,
+
+ /**
+ * Represents a 64 bit floating point operation.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_64 = 2,
+
+ /**
+ * Represents an integer operation.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_INTEGER = 3,
+
+ /**
+ * Represents a bit conversion operation.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_BIT_CONVERSION = 4,
+
+ /**
+ * Represents a control flow instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_CONTROL_FLOW = 5,
+
+ /**
+ * Represents a global load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_GLOBAL = 6,
+
+ /**
+ * Represents a shared load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_SHARED = 7,
+
+ /**
+ * Represents a local load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_LOCAL = 8,
+
+ /**
+ * Represents a generic load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_GENERIC = 9,
+
+ /**
+ * Represents a surface load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_SURFACE = 10,
+
+ /**
+ * Represents a constant load instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_CONSTANT = 11,
+
+ /**
+ * Represents a texture load-store instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_TEXTURE = 12,
+
+ /**
+ * Represents a global atomic instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_GLOBAL_ATOMIC = 13,
+
+ /**
+ * Represents a shared atomic instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_SHARED_ATOMIC = 14,
+
+ /**
+ * Represents a surface atomic instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_SURFACE_ATOMIC = 15,
+
+ /**
+ * Represents a inter-thread communication instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_INTER_THREAD_COMMUNICATION = 16,
+
+ /**
+ * Represents a barrier instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_BARRIER = 17,
+
+ /**
+ * Represents some miscellaneous instructions which do not fit in the above classification.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_MISCELLANEOUS = 18,
+
+ /**
+ * Represents a 16 bit floating point operation.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_FP_16 = 19,
+
+ /**
+ * Represents uniform instruction.
+ */
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_UNIFORM = 20,
+
+ CUPTI_ACTIVITY_INSTRUCTION_CLASS_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ActivityInstructionClass;
+
+/**
+ * \brief Partitioned global caching option
+ */
+typedef enum {
+ /**
+ * Partitioned global cache config unknown.
+ */
+ CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_UNKNOWN = 0,
+
+ /**
+ * Partitioned global cache not supported.
+ */
+ CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_NOT_SUPPORTED = 1,
+
+ /**
+ * Partitioned global cache config off.
+ */
+ CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_OFF = 2,
+
+ /**
+ * Partitioned global cache config on.
+ */
+ CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_ON = 3,
+
+ CUPTI_ACTIVITY_PARTITIONED_GLOBAL_CACHE_CONFIG_FORCE_INT = 0x7fffffff
+} CUpti_ActivityPartitionedGlobalCacheConfig;
+
+/**
+ * \brief Synchronization type.
+ *
+ * The types of synchronization to be used with
+ * CUpti_ActivitySynchronization2.
+ */
+
+typedef enum {
+ /**
+ * Unknown data.
+ */
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_UNKNOWN = 0,
+
+ /**
+ * Event synchronize API.
+ */
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_EVENT_SYNCHRONIZE = 1,
+
+ /**
+ * Stream wait event API.
+ */
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_STREAM_WAIT_EVENT = 2,
+
+ /**
+ * Stream synchronize API.
+ */
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_STREAM_SYNCHRONIZE = 3,
+
+ /**
+ * Context synchronize API.
+ */
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_CONTEXT_SYNCHRONIZE = 4,
+
+ CUPTI_ACTIVITY_SYNCHRONIZATION_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivitySynchronizationType;
+
+/**
+ * \brief stream type.
+ *
+ * The types of stream to be used with CUpti_ActivityStream.
+ */
+
+typedef enum {
+ /**
+ * Unknown data.
+ */
+ CUPTI_ACTIVITY_STREAM_CREATE_FLAG_UNKNOWN = 0,
+
+ /**
+ * Default stream.
+ */
+ CUPTI_ACTIVITY_STREAM_CREATE_FLAG_DEFAULT = 1,
+
+ /**
+ * Non-blocking stream.
+ */
+ CUPTI_ACTIVITY_STREAM_CREATE_FLAG_NON_BLOCKING = 2,
+
+ /**
+ * Null stream.
+ */
+ CUPTI_ACTIVITY_STREAM_CREATE_FLAG_NULL = 3,
+
+ /**
+ * Stream create Mask
+ */
+ CUPTI_ACTIVITY_STREAM_CREATE_MASK = 0xFFFF,
+
+ CUPTI_ACTIVITY_STREAM_CREATE_FLAG_FORCE_INT = 0x7fffffff
+} CUpti_ActivityStreamFlag;
+
+/**
+* \brief Link flags.
+*
+* Describes link properties, to be used with CUpti_ActivityNvLink.
+*/
+
+typedef enum {
+ /**
+ * The flag is invalid.
+ */
+ CUPTI_LINK_FLAG_INVALID = 0,
+
+ /**
+ * Is peer to peer access supported by this link.
+ */
+ CUPTI_LINK_FLAG_PEER_ACCESS = (1 << 1),
+
+ /**
+ * Is system memory access supported by this link.
+ */
+ CUPTI_LINK_FLAG_SYSMEM_ACCESS = (1 << 2),
+
+ /**
+ * Is peer atomic access supported by this link.
+ */
+ CUPTI_LINK_FLAG_PEER_ATOMICS = (1 << 3),
+
+ /**
+ * Is system memory atomic access supported by this link.
+ */
+ CUPTI_LINK_FLAG_SYSMEM_ATOMICS = (1 << 4),
+
+ CUPTI_LINK_FLAG_FORCE_INT = 0x7fffffff
+} CUpti_LinkFlag;
+
+/**
+* \brief Memory operation types.
+*
+* Describes the type of memory operation, to be used with CUpti_ActivityMemory4.
+*/
+
+typedef enum {
+ /**
+ * The operation is invalid.
+ */
+ CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_INVALID = 0,
+
+ /**
+ * Memory is allocated.
+ */
+ CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_ALLOCATION = 1,
+
+ /**
+ * Memory is released.
+ */
+ CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_RELEASE = 2,
+
+ CUPTI_ACTIVITY_MEMORY_OPERATION_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityMemoryOperationType;
+
+/**
+* \brief Memory pool types.
+*
+* Describes the type of memory pool, to be used with CUpti_ActivityMemory4.
+*/
+
+typedef enum {
+ /**
+ * The operation is invalid.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_TYPE_INVALID = 0,
+
+ /**
+ * Memory pool is local to the process.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL = 1,
+
+ /**
+ * Memory pool is imported by the process.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED = 2,
+
+ CUPTI_ACTIVITY_MEMORY_POOL_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityMemoryPoolType;
+
+/**
+* \brief Memory pool operation types.
+*
+* Describes the type of memory pool operation, to be used with CUpti_ActivityMemoryPool2.
+*/
+
+typedef enum {
+ /**
+ * The operation is invalid.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_INVALID = 0,
+
+ /**
+ * Memory pool is created.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_CREATED = 1,
+
+ /**
+ * Memory pool is destroyed.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_DESTROYED = 2,
+
+ /**
+ * Memory pool is trimmed.
+ */
+ CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_TRIMMED = 3,
+
+ CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityMemoryPoolOperationType;
+
+typedef enum {
+ CUPTI_CHANNEL_TYPE_INVALID = 0,
+
+ /**
+ * Channel is used for standard work launch and tracking
+ */
+ CUPTI_CHANNEL_TYPE_COMPUTE = 1,
+
+ /**
+ * Channel is used by an asynchronous copy engine
+ * For confidential compute configurations, work launch and
+ * completion are done using the copy engines.
+ */
+ CUPTI_CHANNEL_TYPE_ASYNC_MEMCPY = 2,
+
+
+ /**
+ * Channel is used for memory decompression operations
+ */
+ CUPTI_CHANNEL_TYPE_DECOMP ,
+
+ CUPTI_CHANNEL_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ChannelType;
+
+/**
+* \brief CIG (CUDA in Graphics) Modes.
+*
+* Describes the CIG modes associated with the CUDA context.
+*/
+
+typedef enum
+{
+ /**
+ * Regular (non-CIG) mode
+ */
+ CUPTI_CONTEXT_CIG_MODE_NONE = 0,
+ /**
+ * CIG mode
+ */
+ CUPTI_CONTEXT_CIG_MODE_CIG = 1,
+ /**
+ * CIG fallback mode
+ */
+ CUPTI_CONTEXT_CIG_MODE_CIG_FALLBACK = 2,
+
+ CUPTI_CONTEXT_CIG_MODE_FORCE_INT = 0x7fffffff
+} CUpti_ContextCigMode;
+
+/**
+ * The source-locator ID that indicates an unknown source
+ * location. There is not an actual CUpti_ActivitySourceLocator object
+ * corresponding to this value.
+ */
+#define CUPTI_SOURCE_LOCATOR_ID_UNKNOWN 0
+
+/**
+ * An invalid function index ID.
+ */
+#define CUPTI_FUNCTION_INDEX_ID_INVALID 0
+
+/**
+ * An invalid/unknown correlation ID. A correlation ID of this value
+ * indicates that there is no correlation for the activity record.
+ */
+#define CUPTI_CORRELATION_ID_UNKNOWN 0
+
+/**
+ * An invalid/unknown grid ID.
+ */
+#define CUPTI_GRID_ID_UNKNOWN 0LL
+
+/**
+ * An invalid/unknown timestamp for a start, end, queued, submitted,
+ * or completed time.
+ */
+#define CUPTI_TIMESTAMP_UNKNOWN 0LL
+
+/**
+ * An invalid/unknown value.
+ */
+#define CUPTI_SYNCHRONIZATION_INVALID_VALUE ((uint32_t) 0xFFFFFFFFU)
+
+/**
+ * An invalid/unknown process id.
+ */
+#define CUPTI_AUTO_BOOST_INVALID_CLIENT_PID 0
+
+/**
+ * Invalid/unknown NVLink port number.
+*/
+#define CUPTI_NVLINK_INVALID_PORT -1
+
+/**
+ * Maximum NVLink port numbers.
+*/
+#define CUPTI_MAX_NVLINK_PORTS 32
+
+/**
+ * An invalid/unknown value for decompressed bytes.
+*/
+#define CUPTI_DECOMPRESSED_BYTES_UNKNOWN 0LL
+
+START_PACKED_ALIGNMENT
+/**
+ * \brief Unified Memory counters configuration structure
+ *
+ * This structure controls the enable/disable of the various
+ * Unified Memory counters consisting of scope, kind and other parameters.
+ * See function \ref cuptiActivityConfigureUnifiedMemoryCounter
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Unified Memory counter Counter scope. (deprecated in CUDA 7.0)
+ */
+ CUpti_ActivityUnifiedMemoryCounterScope scope;
+
+ /**
+ * Unified Memory counter Counter kind
+ */
+ CUpti_ActivityUnifiedMemoryCounterKind kind;
+
+ /**
+ * Device id of the target device. This is relevant only
+ * for single device scopes. (deprecated in CUDA 7.0)
+ */
+ uint32_t deviceId;
+
+ /**
+ * Control to enable/disable the counter. To enable the counter
+ * set it to non-zero value while disable is indicated by zero.
+ */
+ uint32_t enable;
+} CUpti_ActivityUnifiedMemoryCounterConfig;
+
+/**
+ * \brief Device auto boost state structure
+ *
+ * This structure defines auto boost state for a device.
+ * See function \ref cuptiGetAutoBoostState
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Returned auto boost state. 1 is returned in case auto boost is enabled, 0
+ * otherwise
+ */
+ uint32_t enabled;
+
+ /**
+ * Id of process that has set the current boost state. The value will be
+ * CUPTI_AUTO_BOOST_INVALID_CLIENT_PID if the user does not have the
+ * permission to query process ids or there is an error in querying the
+ * process id.
+ */
+ uint32_t pid;
+
+} CUpti_ActivityAutoBoostState;
+
+/**
+ * \brief PC sampling configuration structure
+ *
+ * This structure defines the pc sampling configuration.
+ *
+ * See function \ref cuptiActivityConfigurePCSampling
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Size of configuration structure.
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ uint32_t size;
+
+ /**
+ * There are 5 level provided for sampling period. The level
+ * internally maps to a period in terms of cycles. Same level can
+ * map to different number of cycles on different gpus. No of
+ * cycles will be chosen to minimize information loss. The period
+ * chosen will be given by samplingPeriodInCycles in
+ * \ref CUpti_ActivityPCSamplingRecordInfo for each kernel instance.
+ */
+ CUpti_ActivityPCSamplingPeriod samplingPeriod;
+
+ /**
+ * This will override the period set by samplingPeriod. Value 0 in samplingPeriod2 will be
+ * considered as samplingPeriod2 should not be used and samplingPeriod should be used.
+ * Valid values for samplingPeriod2 are between 5 to 31 both inclusive.
+ * This will set the sampling period to (2^samplingPeriod2) cycles.
+ */
+ uint32_t samplingPeriod2;
+} CUpti_ActivityPCSamplingConfig;
+
+/**
+ * \brief The base activity record.
+ *
+ * The activity API uses a CUpti_Activity as a generic representation
+ * for any activity. The 'kind' field is used to determine the
+ * specific activity kind, and from that the CUpti_Activity object can
+ * be cast to the specific activity record type appropriate for that kind.
+ *
+ * Note that all activity record types are padded and aligned to
+ * ensure that each member of the record is naturally aligned.
+ *
+ * \see CUpti_ActivityKind
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The kind of this activity.
+ */
+ CUpti_ActivityKind kind;
+} CUpti_Activity;
+
+/**
+ * \brief The activity record for memory copies.
+ *
+ * This activity record represents a memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the memory copy.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the memory copy. Each memory copy
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t runtimeCorrelationId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the HW channel on which the memory copy is occurring.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * Reserved for internal use.
+ */
+ uint32_t pad2;
+
+ /**
+ * The total number of memcopy operations traced in this record.
+ * This field is valid for memcpy operations happening using
+ * MemcpyBatchAsync APIs in CUDA.
+ * In MemcpyBatchAsync APIs, multiple memcpy operations are batched
+ * together for optimization purposes based on certain heuristics.
+ * For other memcpy operations, this field will be 1.
+ */
+ uint64_t copyCount;
+} CUpti_ActivityMemcpy6;
+
+/**
+ * \brief The activity record for peer-to-peer memory copies.
+ *
+ * This activity record represents a peer-to-peer memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY2).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY2.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see
+ * CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the device where memory is being copied from.
+ */
+ uint32_t srcDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied from.
+ */
+ uint32_t srcContextId;
+
+ /**
+ * The ID of the device where memory is being copied to.
+ */
+ uint32_t dstDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied to.
+ */
+ uint32_t dstContextId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t correlationId;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed the memcpy through graph launch.
+ * This field will be 0 if memcpy is not done using graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the HW channel on which the memory copy is occurring.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+} CUpti_ActivityMemcpyPtoP4;
+
+/**
+ * \brief The activity record for memset.
+ *
+ * This activity record represents a memory set operation
+ * (CUPTI_ACTIVITY_KIND_MEMSET).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMSET.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The value being assigned to memory by the memory set.
+ */
+ uint32_t value;
+
+ /**
+ * The number of bytes being set by the memory set.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory set is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory set is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory set is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory set. Each memory set is assigned
+ * a unique correlation ID that is identical to the correlation ID
+ * in the driver API activity record that launched the memory set.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The flags associated with the memset. \see CUpti_ActivityFlag
+ */
+ uint16_t flags;
+
+ /**
+ * The memory kind of the memory set \see CUpti_ActivityMemoryKind
+ */
+ uint16_t memoryKind;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memset through graph launch.
+ * This field will be 0 if the memset is not executed through graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memset through graph launch.
+ * This field will be 0 if the memset is not executed through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the HW channel on which the memory set is occurring.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * Undefined. Reserved for internal use
+ */
+ uint32_t pad2;
+} CUpti_ActivityMemset4;
+
+/**
+ * \brief The activity record for memory.
+ *
+ * This activity record represents a memory allocation and free operation
+ * (CUPTI_ACTIVITY_KIND_MEMORY).
+ * This activity record provides a single record for the memory
+ * allocation and memory release operations.
+ *
+ * Note: It is recommended to move to the new activity record \ref CUpti_ActivityMemory4
+ * enabled using the kind \ref CUPTI_ACTIVITY_KIND_MEMORY2.
+ * \ref CUpti_ActivityMemory4 provides separate records for memory
+ * allocation and memory release operations. This allows to correlate the
+ * corresponding driver and runtime API activity record with the memory operation.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory kind requested by the user
+ */
+ CUpti_ActivityMemoryKind memoryKind;
+
+ /**
+ * The virtual address of the allocation
+ */
+ uint64_t address;
+
+ /**
+ * The number of bytes of memory allocated.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory operation, i.e.
+ * the time when memory was allocated, in ns.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory operation, i.e.
+ * the time when memory was freed, in ns.
+ * This will be 0 if memory is not freed in the application
+ */
+ uint64_t end;
+
+ /**
+ * The program counter of the allocation of memory
+ */
+ uint64_t allocPC;
+
+ /**
+ * The program counter of the freeing of memory. This will
+ * be 0 if memory is not freed in the application
+ */
+ uint64_t freePC;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory allocation is taking place.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context. If context is NULL, \p contextId is set to CUPTI_INVALID_CONTEXT_ID.
+ */
+ uint32_t contextId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Variable name. This name is shared across all activity
+ * records representing the same symbol, and so should not be
+ * modified.
+ */
+ const char* name;
+} CUpti_ActivityMemory;
+
+/**
+ * \brief The activity record for memory.
+ *
+ * This activity record represents a memory allocation and free operation
+ * (CUPTI_ACTIVITY_KIND_MEMORY2).
+ * This activity record provides separate records for memory allocation and
+ * memory release operations.
+ * This allows to correlate the corresponding driver and runtime API
+ * activity record with the memory operation.
+ *
+ * Note: This activity record is an upgrade over \ref CUpti_ActivityMemory
+ * enabled using the kind \ref CUPTI_ACTIVITY_KIND_MEMORY.
+ * \ref CUpti_ActivityMemory provides a single record for the memory
+ * allocation and memory release operations.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY2
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory operation requested by the user, \ref CUpti_ActivityMemoryOperationType.
+ */
+ CUpti_ActivityMemoryOperationType memoryOperationType;
+
+ /**
+ * The memory kind requested by the user, \ref CUpti_ActivityMemoryKind.
+ */
+ CUpti_ActivityMemoryKind memoryKind;
+
+ /**
+ * The correlation ID of the memory operation. Each memory operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The virtual address of the allocation.
+ */
+ uint64_t address;
+
+ /**
+ * The number of bytes of memory allocated.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory operation, in ns.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The program counter of the memory operation.
+ */
+ uint64_t PC;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory operation is taking place.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context. If context is NULL, \p contextId is set to CUPTI_INVALID_CONTEXT_ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream. If memory operation is not async, \p streamId is set to CUPTI_INVALID_STREAM_ID.
+ */
+ uint32_t streamId;
+
+ /**
+ * Variable name. This name is shared across all activity
+ * records representing the same symbol, and so should not be
+ * modified.
+ */
+ const char* name;
+
+ /**
+ * \p isAsync is set if memory operation happens through async memory APIs.
+ */
+ uint32_t isAsync;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad1;
+#endif
+
+ /**
+ * The memory pool configuration used for the memory operations.
+ */
+ struct PACKED_ALIGNMENT {
+ /**
+ * The type of the memory pool, \ref CUpti_ActivityMemoryPoolType
+ */
+ CUpti_ActivityMemoryPoolType memoryPoolType;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad2;
+#endif
+
+ /**
+ * The base address of the memory pool.
+ */
+ uint64_t address;
+
+ /**
+ * The release threshold of the memory pool in bytes. \p releaseThreshold is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t releaseThreshold;
+
+ /**
+ * The size of memory pool in bytes and the processId of the memory pools
+ * \p size is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ * \p processId is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED, \ref CUpti_ActivityMemoryPoolType
+ */
+ union {
+ uint64_t size;
+ uint64_t processId;
+ } pool;
+
+ /**
+ * The utilized size of the memory pool. \p utilizedSize is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t utilizedSize;
+ } memoryPoolConfig;
+
+ /**
+ * The shared object or binary that the memory allocation request comes from.
+ */
+ const char* source;
+} CUpti_ActivityMemory4;
+
+/**
+ * \brief The activity record for memory pool.
+ *
+ * This activity record represents a memory pool creation, destruction and
+ * trimming (CUPTI_ACTIVITY_KIND_MEMORY_POOL).
+ * This activity record provides separate records for memory pool creation,
+ * destruction and trimming operations.
+ * This allows to correlate the corresponding driver and runtime API
+ * activity record with the memory pool operation.
+ *
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY_POOL
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory operation requested by the user, \ref CUpti_ActivityMemoryPoolOperationType.
+ */
+ CUpti_ActivityMemoryPoolOperationType memoryPoolOperationType;
+
+ /**
+ * The type of the memory pool, \ref CUpti_ActivityMemoryPoolType
+ */
+ CUpti_ActivityMemoryPoolType memoryPoolType;
+
+ /**
+ * The correlation ID of the memory pool operation. Each memory pool
+ * operation is assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory pool is created.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The minimum bytes to keep of the memory pool. \p minBytesToKeep is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_TRIMMED,
+ * \ref CUpti_ActivityMemoryPoolOperationType
+ */
+ size_t minBytesToKeep;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The virtual address of the allocation.
+ */
+ uint64_t address;
+
+ /**
+ * The size of the memory pool operation in bytes. \p size is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t size;
+
+ /**
+ * The release threshold of the memory pool. \p releaseThreshold is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t releaseThreshold;
+
+ /**
+ * The start timestamp for the memory operation, in ns.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The utilized size of the memory pool. \p utilizedSize is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t utilizedSize;
+} CUpti_ActivityMemoryPool2;
+
+/**
+ * \brief The type of the CUDA kernel launch.
+ */
+typedef enum {
+ /**
+ * The kernel was launched via a regular kernel call
+ */
+ CUPTI_ACTIVITY_LAUNCH_TYPE_REGULAR = 0,
+
+ /**
+ * The kernel was launched via API \ref cudaLaunchCooperativeKernel() or
+ * \ref cuLaunchCooperativeKernel()
+ */
+ CUPTI_ACTIVITY_LAUNCH_TYPE_COOPERATIVE_SINGLE_DEVICE = 1,
+
+ /**
+ * The kernel was launched via API \ref cudaLaunchCooperativeKernelMultiDevice() or
+ * \ref cuLaunchCooperativeKernelMultiDevice()
+ */
+ CUPTI_ACTIVITY_LAUNCH_TYPE_COOPERATIVE_MULTI_DEVICE = 2,
+
+ /**
+ * The kernel was launched as a CBL commandlist
+ */
+ CUPTI_ACTIVITY_LAUNCH_TYPE_CBL_COMMANDLIST = 3,
+} CUpti_ActivityLaunchType;
+
+/**
+ * \brief The shared memory limit per block config for a kernel
+ * This should be used to set 'cudaOccFuncShmemConfig' field in occupancy calculator API
+ */
+typedef enum {
+ /** The shared memory limit config is default
+ */
+ CUPTI_FUNC_SHMEM_LIMIT_DEFAULT = 0x00,
+
+ /** User has opted for a higher dynamic shared memory limit using function attribute
+ * 'cudaFuncAttributeMaxDynamicSharedMemorySize' for runtime API or
+ * CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES for driver API
+ */
+ CUPTI_FUNC_SHMEM_LIMIT_OPTIN = 0x01,
+
+ CUPTI_FUNC_SHMEM_LIMIT_FORCE_INT = 0x7fffffff
+} CUpti_FuncShmemLimitConfig;
+
+/**
+ * \brief The activity record for kernel.
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL)
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes (deprecated in CUDA 11.8).
+ * Refer field localMemoryTotal_v2
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+
+ /**
+ * The unique ID of the graph node that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The shared memory limit config for the kernel. This field shows whether user has opted for a
+ * higher per block limit of dynamic shared memory.
+ */
+ CUpti_FuncShmemLimitConfig shmemLimitConfig;
+
+ /**
+ * The unique ID of the graph that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint32_t graphId;
+
+ /**
+ * The pointer to the access policy window. The structure CUaccessPolicyWindow is
+ * defined in cuda.h.
+ */
+ CUaccessPolicyWindow *pAccessPolicyWindow;
+
+ /**
+ * The ID of the HW channel on which the kernel is launched.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * The X-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterX;
+
+ /**
+ * The Y-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterY;
+
+ /**
+ * The Z-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterZ;
+
+ /**
+ * The cluster scheduling policy for the kernel. Refer CUclusterSchedulingPolicy
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterSchedulingPolicy;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint64_t localMemoryTotal_v2;
+
+ /**
+ * The maximum cluster size for the kernel
+ */
+ uint32_t maxPotentialClusterSize;
+
+ /**
+ * The maximum clusters that could co-exist on the target device for the kernel
+ */
+ uint32_t maxActiveClusters;
+} CUpti_ActivityKernel9;
+
+/**
+ * \brief The activity record for CDP (CUDA Dynamic Parallelism)
+ * kernel.
+ *
+ * This activity record represents a CDP kernel execution.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CDP_KERNEL
+ */
+ CUpti_ActivityKind kind;
+
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel execution
+ * is assigned a unique grid ID.
+ */
+ int64_t gridId;
+
+ /**
+ * The grid ID of the parent kernel.
+ */
+ int64_t parentGridId;
+
+ /**
+ * The timestamp when kernel is queued up, in ns. A value of
+ * CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time is
+ * unknown.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when kernel is submitted to the gpu, in ns. A value
+ * of CUPTI_TIMESTAMP_UNKNOWN indicates that the submission time is
+ * unknown.
+ */
+ uint64_t submitted;
+
+ /**
+ * The timestamp when kernel is marked as completed, in ns. A value
+ * of CUPTI_TIMESTAMP_UNKNOWN indicates that the completion time is
+ * unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The X-dimension of the parent block.
+ */
+ uint32_t parentBlockX;
+
+ /**
+ * The Y-dimension of the parent block.
+ */
+ uint32_t parentBlockY;
+
+ /**
+ * The Z-dimension of the parent block.
+ */
+ uint32_t parentBlockZ;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+} CUpti_ActivityCdpKernel;
+
+/**
+ * \brief The activity record for a preemption of a CDP kernel.
+ *
+ * This activity record represents a preemption of a CDP kernel.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PREEMPTION
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * kind of the preemption
+ */
+ CUpti_ActivityPreemptionKind preemptionKind;
+
+ /**
+ * The timestamp of the preemption, in ns. A value of 0 indicates
+ * that timestamp information could not be collected for the
+ * preemption.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The grid-id of the block that is preempted
+ */
+ int64_t gridId;
+
+ /**
+ * The X-dimension of the block that is preempted
+ */
+ uint32_t blockX;
+
+ /**
+ * The Y-dimension of the block that is preempted
+ */
+ uint32_t blockY;
+
+ /**
+ * The Z-dimension of the block that is preempted
+ */
+ uint32_t blockZ;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityPreemption;
+
+/**
+ * \brief The activity record for a driver or runtime API invocation.
+ *
+ * This activity record represents an invocation of a driver or
+ * runtime API (CUPTI_ACTIVITY_KIND_DRIVER and
+ * CUPTI_ACTIVITY_KIND_RUNTIME).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DRIVER,
+ * CUPTI_ACTIVITY_KIND_RUNTIME, or CUPTI_ACTIVITY_KIND_INTERNAL_LAUNCH_API.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID of the driver or runtime function.
+ */
+ CUpti_CallbackId cbid;
+
+ /**
+ * The start timestamp for the function, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the function.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the function, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the function.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the process where the driver or runtime CUDA function
+ * is executing.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the thread where the driver or runtime CUDA function is
+ * executing.
+ */
+ uint32_t threadId;
+
+ /**
+ * The correlation ID of the driver or runtime CUDA function. Each
+ * function invocation is assigned a unique correlation ID that is
+ * identical to the correlation ID in the memcpy, memset, or kernel
+ * activity record that is associated with this function.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The return value for the function. For a CUDA driver function
+ * with will be a CUresult value, and for a CUDA runtime function
+ * this will be a cudaError_t value.
+ */
+ uint32_t returnValue;
+} CUpti_ActivityAPI;
+
+/**
+ * \brief The activity record for a CUPTI event.
+ *
+ * This activity record represents a CUPTI event value
+ * (CUPTI_ACTIVITY_KIND_EVENT). This activity record kind is not
+ * produced by the activity API but is included for completeness and
+ * ease-of-use. Profile frameworks built on top of CUPTI that collect
+ * event data may choose to use this type to store the collected event
+ * data.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_EVENT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The event ID.
+ */
+ CUpti_EventID id;
+
+ /**
+ * The event value.
+ */
+ uint64_t value;
+
+ /**
+ * The event domain ID.
+ */
+ CUpti_EventDomainID domain;
+
+ /**
+ * The correlation ID of the event. Use of this ID is user-defined,
+ * but typically this ID value will equal the correlation ID of the
+ * kernel for which the event was gathered.
+ */
+ uint32_t correlationId;
+} CUpti_ActivityEvent;
+
+/**
+ * \brief The activity record for a CUPTI event with instance
+ * information.
+ *
+ * This activity record represents the a CUPTI event value for a
+ * specific event domain instance
+ * (CUPTI_ACTIVITY_KIND_EVENT_INSTANCE). This activity record kind is
+ * not produced by the activity API but is included for completeness
+ * and ease-of-use. Profile frameworks built on top of CUPTI that
+ * collect event data may choose to use this type to store the
+ * collected event data. This activity record should be used when
+ * event domain instance information needs to be associated with the
+ * event.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be
+ * CUPTI_ACTIVITY_KIND_EVENT_INSTANCE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The event ID.
+ */
+ CUpti_EventID id;
+
+ /**
+ * The event domain ID.
+ */
+ CUpti_EventDomainID domain;
+
+ /**
+ * The event domain instance.
+ */
+ uint32_t instance;
+
+ /**
+ * The event value.
+ */
+ uint64_t value;
+
+ /**
+ * The correlation ID of the event. Use of this ID is user-defined,
+ * but typically this ID value will equal the correlation ID of the
+ * kernel for which the event was gathered.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityEventInstance;
+
+/**
+ * \brief The activity record for a CUPTI metric.
+ *
+ * This activity record represents the collection of a CUPTI metric
+ * value (CUPTI_ACTIVITY_KIND_METRIC). This activity record kind is not
+ * produced by the activity API but is included for completeness and
+ * ease-of-use. Profile frameworks built on top of CUPTI that collect
+ * metric data may choose to use this type to store the collected metric
+ * data.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_METRIC.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The metric ID.
+ */
+ CUpti_MetricID id;
+
+ /**
+ * The metric value.
+ */
+ CUpti_MetricValue value;
+
+ /**
+ * The correlation ID of the metric. Use of this ID is user-defined,
+ * but typically this ID value will equal the correlation ID of the
+ * kernel for which the metric was gathered.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The properties of this metric. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t pad[3];
+} CUpti_ActivityMetric;
+
+/**
+ * \brief The activity record for a CUPTI metric with instance
+ * information.
+ *
+ * This activity record represents a CUPTI metric value
+ * for a specific metric domain instance
+ * (CUPTI_ACTIVITY_KIND_METRIC_INSTANCE). This activity record kind
+ * is not produced by the activity API but is included for
+ * completeness and ease-of-use. Profile frameworks built on top of
+ * CUPTI that collect metric data may choose to use this type to store
+ * the collected metric data. This activity record should be used when
+ * metric domain instance information needs to be associated with the
+ * metric.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be
+ * CUPTI_ACTIVITY_KIND_METRIC_INSTANCE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The metric ID.
+ */
+ CUpti_MetricID id;
+
+ /**
+ * The metric value.
+ */
+ CUpti_MetricValue value;
+
+ /**
+ * The metric domain instance.
+ */
+ uint32_t instance;
+
+ /**
+ * The correlation ID of the metric. Use of this ID is user-defined,
+ * but typically this ID value will equal the correlation ID of the
+ * kernel for which the metric was gathered.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The properties of this metric. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t pad[7];
+} CUpti_ActivityMetricInstance;
+
+/**
+ * \brief The activity record for source locator.
+ *
+ * This activity record represents a source locator
+ * (CUPTI_ACTIVITY_KIND_SOURCE_LOCATOR).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_SOURCE_LOCATOR.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID for the source path, will be used in all the source level
+ * results.
+ */
+ uint32_t id;
+
+ /**
+ * The line number in the source .
+ */
+ uint32_t lineNumber;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The path for the file.
+ */
+ const char *fileName;
+} CUpti_ActivitySourceLocator;
+
+/**
+ * \brief The activity record for source-level global
+ * access.
+ *
+ * This activity records the locations of the global
+ * accesses in the source (CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this global access.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * when at least one of thread among warp is active with predicate and condition code
+ * evaluating to true.
+ */
+ uint32_t executed;
+
+ /**
+ * The pc offset for the access.
+ */
+ uint64_t pcOffset;
+
+ /**
+ * This increments each time when this instruction is executed by number of
+ * threads that executed this instruction with predicate and condition code
+ * evaluating to true.
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * The total number of 32 bytes transactions to L2 cache generated by this
+ access
+ */
+ uint64_t l2_transactions;
+
+ /**
+ * The minimum number of L2 transactions possible based on the access pattern.
+ */
+ uint64_t theoreticalL2Transactions;
+} CUpti_ActivityGlobalAccess3;
+
+/**
+ * \brief The activity record for source level result
+ * branch.
+ *
+ * This activity record the locations of the branches in the
+ * source (CUPTI_ACTIVITY_KIND_BRANCH).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_BRANCH.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the branch.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * Number of times this branch diverged
+ */
+ uint32_t diverged;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * regardless of predicate or condition code.
+ */
+ uint32_t executed;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityBranch2;
+
+/**
+ * \brief The activity record for a device. (CUDA 11.6 onwards)
+ *
+ * This activity record represents information about a GPU device
+ * (CUPTI_ACTIVITY_KIND_DEVICE).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The global memory bandwidth available on the device, in
+ * kBytes/sec.
+ */
+ uint64_t globalMemoryBandwidth;
+
+ /**
+ * The amount of global memory on the device, in bytes.
+ */
+ uint64_t globalMemorySize;
+
+ /**
+ * The amount of constant memory on the device, in bytes.
+ */
+ uint32_t constantMemorySize;
+
+ /**
+ * The size of the L2 cache on the device, in bytes.
+ */
+ uint32_t l2CacheSize;
+
+ /**
+ * The number of threads per warp on the device.
+ */
+ uint32_t numThreadsPerWarp;
+
+ /**
+ * The core clock rate of the device, in kHz.
+ */
+ uint32_t coreClockRate;
+
+ /**
+ * Number of memory copy engines on the device.
+ */
+ uint32_t numMemcpyEngines;
+
+ /**
+ * Number of multiprocessors on the device.
+ */
+ uint32_t numMultiprocessors;
+
+ /**
+ * The maximum "instructions per cycle" possible on each device
+ * multiprocessor.
+ */
+ uint32_t maxIPC;
+
+ /**
+ * Maximum number of warps that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxWarpsPerMultiprocessor;
+
+ /**
+ * Maximum number of blocks that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxBlocksPerMultiprocessor;
+
+ /**
+ * Maximum amount of shared memory available per multiprocessor, in bytes.
+ */
+ uint32_t maxSharedMemoryPerMultiprocessor;
+
+ /**
+ * Maximum number of 32-bit registers available per multiprocessor.
+ */
+ uint32_t maxRegistersPerMultiprocessor;
+
+ /**
+ * Maximum number of registers that can be allocated to a block.
+ */
+ uint32_t maxRegistersPerBlock;
+
+ /**
+ * Maximum amount of shared memory that can be assigned to a block,
+ * in bytes.
+ */
+ uint32_t maxSharedMemoryPerBlock;
+
+ /**
+ * Maximum number of threads allowed in a block.
+ */
+ uint32_t maxThreadsPerBlock;
+
+ /**
+ * Maximum allowed X dimension for a block.
+ */
+ uint32_t maxBlockDimX;
+
+ /**
+ * Maximum allowed Y dimension for a block.
+ */
+ uint32_t maxBlockDimY;
+
+ /**
+ * Maximum allowed Z dimension for a block.
+ */
+ uint32_t maxBlockDimZ;
+
+ /**
+ * Maximum allowed X dimension for a grid.
+ */
+ uint32_t maxGridDimX;
+
+ /**
+ * Maximum allowed Y dimension for a grid.
+ */
+ uint32_t maxGridDimY;
+
+ /**
+ * Maximum allowed Z dimension for a grid.
+ */
+ uint32_t maxGridDimZ;
+
+ /**
+ * Compute capability for the device, major number.
+ */
+ uint32_t computeCapabilityMajor;
+
+ /**
+ * Compute capability for the device, minor number.
+ */
+ uint32_t computeCapabilityMinor;
+
+ /**
+ * The device ID.
+ */
+ uint32_t id;
+
+ /**
+ * ECC enabled flag for device
+ */
+ uint32_t eccEnabled;
+
+ /**
+ * The device UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid uuid;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The device name. This name is shared across all activity records
+ * representing instances of the device, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Flag to indicate whether the device is visible to CUDA. Users can
+ * set the device visibility using CUDA_VISIBLE_DEVICES environment
+ */
+ uint8_t isCudaVisible;
+
+ /**
+ * MIG enabled flag for device
+ */
+ uint8_t isMigEnabled;
+
+ uint8_t reserved[6];
+
+ /**
+ * GPU Instance id for MIG enabled devices.
+ * If mig mode is disabled value is set to UINT32_MAX
+ */
+ uint32_t gpuInstanceId;
+
+ /**
+ * Compute Instance id for MIG enabled devices.
+ * If mig mode is disabled value is set to UINT32_MAX
+ */
+ uint32_t computeInstanceId;
+
+ /**
+ * The MIG UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid migUuid;
+
+ /**
+ * Numa (Non-uniform memory access) information for device
+ * GPU is a NUMA node or not
+ */
+ uint32_t isNumaNode;
+
+ /**
+ * Numa (Non-uniform memory access) information for device
+ * NUMA node ID of the GPU memory
+ * if GPU is not a NUMA node, it returns invalidNumaId
+ */
+ uint32_t numaId;
+} CUpti_ActivityDevice5;
+
+/**
+ * \brief The activity record for a device attribute.
+ *
+ * This activity record represents information about a GPU device:
+ * either a CUpti_DeviceAttribute or CUdevice_attribute value
+ * (CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be
+ * CUPTI_ACTIVITY_KIND_DEVICE_ATTRIBUTE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID of the device that this attribute applies to.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The attribute, either a CUpti_DeviceAttribute or
+ * CUdevice_attribute. Flag
+ * CUPTI_ACTIVITY_FLAG_DEVICE_ATTRIBUTE_CUDEVICE is used to indicate
+ * what kind of attribute this is. If
+ * CUPTI_ACTIVITY_FLAG_DEVICE_ATTRIBUTE_CUDEVICE is 1 then
+ * CUdevice_attribute field is value, otherwise
+ * CUpti_DeviceAttribute field is valid.
+ */
+ union {
+ CUdevice_attribute cu;
+ CUpti_DeviceAttribute cupti;
+ } attribute;
+
+ /**
+ * The value for the attribute. See CUpti_DeviceAttribute and
+ * CUdevice_attribute for the type of the value for a given
+ * attribute.
+ */
+ union {
+ double vDouble;
+ uint32_t vUint32;
+ uint64_t vUint64;
+ int32_t vInt32;
+ int64_t vInt64;
+ } value;
+} CUpti_ActivityDeviceAttribute;
+
+/**
+ * \brief The activity record for a context.
+ *
+ * This activity record represents information about a context
+ * (CUPTI_ACTIVITY_KIND_CONTEXT).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CONTEXT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The context ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The device ID.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The compute API kind. \see CUpti_ActivityComputeApiKind
+ */
+ uint16_t computeApiKind;
+
+ /**
+ * The ID for the NULL stream in this context
+ */
+ uint16_t nullStreamId;
+
+ /**
+ * The ID of the parent context. It would be 0 if
+ * context does not have parent
+ */
+ uint32_t parentContextId;
+
+ /**
+ * This field indicates whether the context is a green context
+ */
+ uint8_t isGreenContext;
+
+ uint8_t padding;
+
+ /**
+ * Number of multiprocessors assigned to the green context
+ * Invalid if the field 'isGreenContext' is 0
+ */
+ uint16_t numMultiprocessors;
+
+ /**
+ * This field indicates the CIG mode
+ */
+ CUpti_ContextCigMode cigMode;
+
+ uint32_t padding2;
+
+} CUpti_ActivityContext3;
+
+/**
+ * \brief The activity record providing a name.
+ *
+ * This activity record provides a name for a device, context, thread,
+ * etc. and other resource naming done via NVTX APIs
+ * (CUPTI_ACTIVITY_KIND_NAME).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_NAME.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of activity object being named.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object. 'objectKind' indicates
+ * which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The name.
+ */
+ const char *name;
+
+} CUpti_ActivityName;
+
+/**
+ * \brief The activity record providing a marker which is an
+ * instantaneous point in time.
+ *
+ * The marker is specified with a descriptive name and unique id
+ * (CUPTI_ACTIVITY_KIND_MARKER).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the marker. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The timestamp for the marker, in ns. A value of 0 indicates that
+ * timestamp information could not be collected for the marker.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The marker ID.
+ */
+ uint32_t id;
+
+ /**
+ * The kind of activity object associated with this marker.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object associated with this
+ * marker. 'objectKind' indicates which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+
+
+ /**
+ * The marker name for an instantaneous or start marker. This will
+ * be NULL for an end marker.
+ */
+ const char *name;
+
+ /**
+ * The name of the domain to which this marker belongs to.
+ * This will be NULL for default domain.
+ */
+ const char *domain;
+
+} CUpti_ActivityMarker2;
+
+/**
+ * \brief The activity record providing detailed information for a marker.
+ *
+ * User must enable CUPTI_ACTIVITY_KIND_MARKER as well
+ * to get records for marker data.
+ * The marker data contains color, payload, and category.
+ * (CUPTI_ACTIVITY_KIND_MARKER_DATA).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be
+ * CUPTI_ACTIVITY_KIND_MARKER_DATA.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the marker. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The marker ID.
+ */
+ uint32_t id;
+
+ /**
+ * Defines the payload format for the value associated with the marker.
+ */
+ CUpti_MetricValueKind payloadKind;
+
+ /**
+ * The payload value.
+ */
+ CUpti_MetricValue payload;
+
+ /**
+ * The color for the marker.
+ */
+ uint32_t color;
+
+ /**
+ * The category for the marker.
+ */
+ uint32_t category;
+
+} CUpti_ActivityMarkerData;
+
+/**
+ * \brief The activity record for CUPTI and driver overheads.
+ *
+ * This activity record provides CUPTI and driver overhead information
+ * (CUPTI_ACTIVITY_KIND_OVERHEAD).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_OVERHEAD.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of overhead, CUPTI, DRIVER, COMPILER etc.
+ */
+ CUpti_ActivityOverheadKind overheadKind;
+
+ /**
+ * The kind of activity object that the overhead is associated with.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object. 'objectKind' indicates
+ * which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+ /**
+ * The start timestamp for the overhead, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the overhead.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the overhead, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the overhead.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the overhead operation to which
+ * records belong to. This ID is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the overhead operation.
+ * In some cases, it can be zero, such as for CUPTI_ACTIVITY_OVERHEAD_CUPTI_BUFFER_FLUSH records.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Reserved for internal use.
+ */
+ uint32_t reserved0;
+
+ /**
+ * Pointer to the struct with additional details about the overhead.
+ * Refer CUpti_ActivityOverheadKind enum and the corresponding structure to typecast and access additional overhead data.
+ * Client is responsible for freeing this memory using the free function when done.
+ */
+ void *overheadData;
+
+} CUpti_ActivityOverhead3;
+
+/**
+ * \brief The activity record for CUPTI environmental data.
+ *
+ * This activity record provides CUPTI environmental data, include
+ * power, clocks, and thermals. This information is sampled at
+ * various rates and returned in this activity record. The consumer
+ * of the record needs to check the environmentKind field to figure
+ * out what kind of environmental record this is.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_ENVIRONMENT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID of the device
+ */
+ uint32_t deviceId;
+
+ /**
+ * The timestamp when this sample was retrieved, in ns. A value of 0
+ * indicates that timestamp information could not be collected for
+ * the marker.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The kind of data reported in this record.
+ */
+ CUpti_ActivityEnvironmentKind environmentKind;
+
+ union {
+ /**
+ * Data returned for CUPTI_ACTIVITY_ENVIRONMENT_SPEED environment
+ * kind.
+ */
+ struct {
+ /**
+ * The SM frequency in MHz
+ */
+ uint32_t smClock;
+
+ /**
+ * The memory frequency in MHz
+ */
+ uint32_t memoryClock;
+
+ /**
+ * The PCIe link generation.
+ */
+ uint32_t pcieLinkGen;
+
+ /**
+ * The PCIe link width.
+ */
+ uint32_t pcieLinkWidth;
+
+ /**
+ * The clocks throttle reasons.
+ */
+ CUpti_EnvironmentClocksThrottleReason clocksThrottleReasons;
+ } speed;
+
+ /**
+ * Data returned for CUPTI_ACTIVITY_ENVIRONMENT_TEMPERATURE
+ * environment kind.
+ */
+ struct {
+ /**
+ * The GPU temperature in degrees C.
+ */
+ uint32_t gpuTemperature;
+ } temperature;
+
+ /**
+ * Data returned for CUPTI_ACTIVITY_ENVIRONMENT_POWER environment kind.
+ * The power in milliwatts consumed by GPU and associated circuitry.
+ * The power in milliwatts that will trigger power management algorithm.
+ */
+ struct {
+
+ uint32_t power;
+ uint32_t powerLimit;
+ } power;
+
+ /**
+ * Data returned for CUPTI_ACTIVITY_ENVIRONMENT_COOLING
+ * environment kind.
+ */
+ struct {
+ /**
+ * The fan speed as percentage of maximum.
+ */
+ uint32_t fanSpeed;
+ } cooling;
+ } data;
+} CUpti_ActivityEnvironment;
+
+/**
+ * \brief The activity record for source-level instruction execution.
+ *
+ * This activity records result for source level instruction execution.
+ * (CUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTRUCTION_EXECUTION.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this instruction execution.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the instruction.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction, regardless of predicate or condition code.
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction with predicate and condition code evaluating to true.
+ */
+ uint64_t notPredOffThreadsExecuted;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * regardless of predicate or condition code.
+ */
+ uint32_t executed;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityInstructionExecution;
+
+/**
+ * \brief The activity record for PC sampling.
+ *
+ * This activity records information obtained by sampling PC
+ * (CUPTI_ACTIVITY_KIND_PC_SAMPLING).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PC_SAMPLING.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this instruction.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * Number of times the PC was sampled with the stallReason in the record.
+ * These samples indicate that no instruction was issued in that cycle from
+ * the warp scheduler from where the warp was sampled.
+ * Field is valid for devices with compute capability 6.0 and higher
+ */
+ uint32_t latencySamples;
+
+ /**
+ * Number of times the PC was sampled with the stallReason in the record.
+ * The same PC can be sampled with different stall reasons. The count includes
+ * latencySamples.
+ */
+ uint32_t samples;
+
+ /**
+ * Current stall reason. Includes one of the reasons from
+ * \ref CUpti_ActivityPCSamplingStallReason
+ */
+ CUpti_ActivityPCSamplingStallReason stallReason;
+
+ /**
+ * The pc offset for the instruction.
+ */
+ uint64_t pcOffset;
+} CUpti_ActivityPCSampling3;
+
+/**
+ * \brief The activity record for record status for PC sampling.
+ *
+ * This activity records information obtained by sampling PC
+ * (CUPTI_ACTIVITY_KIND_PC_SAMPLING_RECORD_INFO).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PC_SAMPLING_RECORD_INFO.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Number of times the PC was sampled for this kernel instance including all
+ * dropped samples.
+ */
+ uint64_t totalSamples;
+
+ /**
+ * Number of samples that were dropped by hardware due to backpressure/overflow.
+ */
+ uint64_t droppedSamples;
+ /**
+ * Sampling period in terms of number of cycles .
+ */
+ uint64_t samplingPeriodInCycles;
+} CUpti_ActivityPCSamplingRecordInfo;
+
+/**
+ * \brief The activity record for Unified Memory counters (CUDA 7.0 and beyond)
+ *
+ * This activity record represents a Unified Memory counter
+ * (CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The Unified Memory counter kind
+ */
+ CUpti_ActivityUnifiedMemoryCounterKind counterKind;
+
+ /**
+ * Value of the counter
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD,
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH,
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THREASHING and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP, it is the size of the
+ * memory region in bytes.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT, it
+ * is the number of page fault groups for the same page.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT,
+ * it is the program counter for the instruction that caused fault.
+ */
+ uint64_t value;
+
+ /**
+ * The start timestamp of the counter, in ns.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH, timestamp is
+ * captured when activity starts on GPU.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT, timestamp is
+ * captured when CUDA driver started processing the fault.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING, timestamp
+ * is captured when CUDA driver detected thrashing of memory region.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING,
+ * timestamp is captured when throttling operation was started by CUDA driver.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP,
+ * timestamp is captured when CUDA driver has pushed all required operations
+ * to the processor specified by dstId.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp of the counter, in ns.
+ * Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH, timestamp is
+ * captured when activity finishes on GPU.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT, timestamp is
+ * captured when CUDA driver queues the replay of faulting memory accesses on the GPU
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING, timestamp
+ * is captured when throttling operation was finished by CUDA driver
+ */
+ uint64_t end;
+
+ /**
+ * This is the virtual base address of the page/s being transferred. For cpu and
+ * gpu faults, the virtual address for the page that faulted.
+ */
+ uint64_t address;
+
+ /**
+ * The ID of the source CPU/device involved in the memory transfer, page fault, thrashing,
+ * throttling or remote map operation. For counterKind
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING, it is a bitwise ORing of the
+ * device IDs fighting for the memory region, ONLY if there are less than 32 devices. Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT
+ */
+ uint32_t srcId;
+
+ /**
+ * The ID of the destination CPU/device involved in the memory transfer or remote map
+ * operation. Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING
+ */
+ uint32_t dstId;
+
+ /**
+ * The ID of the stream causing the transfer.
+ * This value of this field is invalid.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The flags associated with this record. See enums \ref CUpti_ActivityUnifiedMemoryAccessType
+ * if counterKind is CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT
+ * and \ref CUpti_ActivityUnifiedMemoryMigrationCause if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD
+ * and \ref CUpti_ActivityUnifiedMemoryRemoteMapCause if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP and \ref CUpti_ActivityFlag
+ * if counterKind is CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING
+ */
+ uint32_t flags;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+
+ /**
+ * \brief The bitmask of devices involved in the operation.
+ *
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING, it is a bitwise ORing of the
+ * device IDs fighting for the memory region. processors[0] represents the device ID of the device 0 to device 63,
+ * processors[1] represents device ID of device 64 to device 127 and so on.
+ * Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_DTOD or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_FAULT_REPLAY
+ */
+ uint64_t processors[5];
+} CUpti_ActivityUnifiedMemoryCounter3;
+
+/**
+ * \brief The activity record for global/device functions.
+ *
+ * This activity records function name and corresponding module
+ * information.
+ * (CUPTI_ACTIVITY_KIND_FUNCTION).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_FUNCTION.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * ID to uniquely identify the record
+ */
+ uint32_t id;
+
+ /**
+ * The ID of the context where the function is launched.
+ */
+ uint32_t contextId;
+
+ /**
+ * The module ID in which this global/device function is present.
+ */
+ uint32_t moduleId;
+
+ /**
+ * The function's unique symbol index in the module.
+ */
+ uint32_t functionIndex;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The name of the function. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+} CUpti_ActivityFunction;
+
+/**
+ * \brief The activity record for a CUDA module.
+ *
+ * This activity record represents a CUDA module
+ * (CUPTI_ACTIVITY_KIND_MODULE). This activity record kind is not
+ * produced by the activity API but is included for completeness and
+ * ease-of-use. Profile frameworks built on top of CUPTI that collect
+ * module data from the module callback may choose to use this type to
+ * store the collected module data.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MODULE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID of the context where the module is loaded.
+ */
+ uint32_t contextId;
+
+ /**
+ * The module ID.
+ */
+ uint32_t id;
+
+ /**
+ * The cubin size.
+ */
+ uint32_t cubinSize;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The pointer to cubin.
+ */
+ const void *cubin;
+} CUpti_ActivityModule;
+
+/**
+ * \brief The activity record for source-level shared
+ * access.
+ *
+ * This activity records the locations of the shared
+ * accesses in the source
+ * (CUPTI_ACTIVITY_KIND_SHARED_ACCESS).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_SHARED_ACCESS.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this shared access.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the access.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction with predicate and condition code evaluating to true.
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * The total number of shared memory transactions generated by this access
+ */
+ uint64_t sharedTransactions;
+
+ /**
+ * The minimum number of shared memory transactions possible based on the access pattern.
+ */
+ uint64_t theoreticalSharedTransactions;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * when at least one of thread among warp is active with predicate and condition code
+ * evaluating to true.
+ */
+ uint32_t executed;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivitySharedAccess;
+
+/**
+ * \brief The activity record for CUDA event.
+ *
+ * This activity is used to track recorded events.
+ * (CUPTI_ACTIVITY_KIND_CUDA_EVENT).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CUDA_EVENT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The correlation ID of the API to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the context where the event was recorded.
+ */
+ uint32_t contextId;
+
+ /**
+ * The compute stream where the event was recorded.
+ */
+ uint32_t streamId;
+
+ /**
+ * A unique event ID to identify the event record.
+ */
+ uint32_t eventId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+
+ /**
+ * The ID of the device where the event was recorded.
+ */
+ uint32_t deviceId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad2;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The device-side timestamp on CUDA event record.
+ * Timestamp is in nanoseconds.
+ */
+ uint64_t deviceTimestamp;
+ /**
+ * A unique ID to associate event synchronization records
+ * with the latest CUDA Event record. Similar field is added
+ * in CUpti_ActivitySynchronization2 to associate CUDA Event
+ * record to the synchronization record.
+ *
+ * The same CUDA event can be used multiple times, so the
+ * event id will not be unique to correlate the synchronization
+ * record with the latest CUDA Event record.
+ * This field will be unique and can be used to do the required
+ * correlation.
+ */
+ uint64_t cudaEventSyncId;
+} CUpti_ActivityCudaEvent2;
+
+/**
+ * \brief The activity record for CUDA stream.
+ *
+ * This activity is used to track created streams.
+ * (CUPTI_ACTIVITY_KIND_STREAM).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_STREAM.
+ */
+ CUpti_ActivityKind kind;
+ /**
+ * The ID of the context where the stream was created.
+ */
+ uint32_t contextId;
+
+ /**
+ * A unique stream ID to identify the stream.
+ */
+ uint32_t streamId;
+
+ /**
+ * The clamped priority for the stream.
+ */
+ uint32_t priority;
+
+ /**
+ * Flags associated with the stream.
+ */
+ CUpti_ActivityStreamFlag flag;
+
+ /**
+ * The correlation ID of the API to which this result is associated.
+ */
+ uint32_t correlationId;
+} CUpti_ActivityStream;
+
+/**
+ * \brief The activity record for synchronization management.
+ *
+ * This activity is used to track various CUDA synchronization APIs.
+ * (CUPTI_ACTIVITY_KIND_SYNCHRONIZATION).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_SYNCHRONIZATION.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The type of record.
+ */
+ CUpti_ActivitySynchronizationType type;
+
+ /**
+ * The start timestamp for the function, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the function.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the function, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the function.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the API to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the context for which the synchronization API is called.
+ * In case of context synchronization API it is the context id for which the API is called.
+ * In case of stream/event synchronization it is the ID of the context where the stream/event was created.
+ */
+ uint32_t contextId;
+
+ /**
+ * The compute stream for which the synchronization API is called.
+ * A CUPTI_SYNCHRONIZATION_INVALID_VALUE value indicate the field is not applicable for this record.
+ * Not valid for cuCtxSynchronize, cuEventSynchronize.
+ */
+ uint32_t streamId;
+
+ /**
+ * The event ID for which the synchronization API is called.
+ * A CUPTI_SYNCHRONIZATION_INVALID_VALUE value indicate the field is not applicable for this record.
+ * Not valid for cuCtxSynchronize, cuStreamSynchronize.
+ */
+ uint32_t cudaEventId;
+
+ /**
+ * A unique ID to associate event synchronization records
+ * with the latest CUDA Event record. Similar field is added
+ * in CUpti_ActivityCudaEvent2 to associate synchronization
+ * record to the CUDA Event record.
+ *
+ * The same CUDA event can be used multiple times, so the
+ * event id will not be unique to correlate the synchronization
+ * record with the latest CUDA Event record.
+ * This field will be unique and can be used to do the required
+ * correlation.
+ *
+ * A CUPTI_SYNCHRONIZATION_INVALID_VALUE value indicates that
+ * the field is not applicable for this record.
+ * Valid only for synchronization records related to CUDA Events.
+ */
+ uint64_t cudaEventSyncId;
+
+ /**
+ * The return value for the synchronization record.
+ * Use cuptiActivityEnableAllSyncRecords API to enable/disable
+ * collection of synchronization records with return value being
+ * non-zero. This will be a CUresult value.
+ */
+ uint32_t returnValue;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivitySynchronization2;
+
+/**
+ * \brief The activity record for source-level sass/source
+ * line-by-line correlation.
+ *
+ * This activity records source level sass/source correlation
+ * information.
+ * (CUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTRUCTION_CORRELATION.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this instruction.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the instruction.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityInstructionCorrelation;
+
+/**
+ * \brief The OpenAcc event kind for OpenAcc activity records.
+ *
+ * \see CUpti_ActivityKindOpenAcc
+ */
+typedef enum {
+ CUPTI_OPENACC_EVENT_KIND_INVALID = 0,
+ CUPTI_OPENACC_EVENT_KIND_DEVICE_INIT = 1,
+ CUPTI_OPENACC_EVENT_KIND_DEVICE_SHUTDOWN = 2,
+ CUPTI_OPENACC_EVENT_KIND_RUNTIME_SHUTDOWN = 3,
+ CUPTI_OPENACC_EVENT_KIND_ENQUEUE_LAUNCH = 4,
+ CUPTI_OPENACC_EVENT_KIND_ENQUEUE_UPLOAD = 5,
+ CUPTI_OPENACC_EVENT_KIND_ENQUEUE_DOWNLOAD = 6,
+ CUPTI_OPENACC_EVENT_KIND_WAIT = 7,
+ CUPTI_OPENACC_EVENT_KIND_IMPLICIT_WAIT = 8,
+ CUPTI_OPENACC_EVENT_KIND_COMPUTE_CONSTRUCT = 9,
+ CUPTI_OPENACC_EVENT_KIND_UPDATE = 10,
+ CUPTI_OPENACC_EVENT_KIND_ENTER_DATA = 11,
+ CUPTI_OPENACC_EVENT_KIND_EXIT_DATA = 12,
+ CUPTI_OPENACC_EVENT_KIND_CREATE = 13,
+ CUPTI_OPENACC_EVENT_KIND_DELETE = 14,
+ CUPTI_OPENACC_EVENT_KIND_ALLOC = 15,
+ CUPTI_OPENACC_EVENT_KIND_FREE = 16,
+ CUPTI_OPENACC_EVENT_KIND_FORCE_INT = 0x7fffffff
+} CUpti_OpenAccEventKind;
+
+/**
+ * \brief The OpenAcc parent construct kind for OpenAcc activity records.
+ */
+typedef enum {
+ CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN = 0,
+ CUPTI_OPENACC_CONSTRUCT_KIND_PARALLEL = 1,
+ CUPTI_OPENACC_CONSTRUCT_KIND_KERNELS = 2,
+ CUPTI_OPENACC_CONSTRUCT_KIND_LOOP = 3,
+ CUPTI_OPENACC_CONSTRUCT_KIND_DATA = 4,
+ CUPTI_OPENACC_CONSTRUCT_KIND_ENTER_DATA = 5,
+ CUPTI_OPENACC_CONSTRUCT_KIND_EXIT_DATA = 6,
+ CUPTI_OPENACC_CONSTRUCT_KIND_HOST_DATA = 7,
+ CUPTI_OPENACC_CONSTRUCT_KIND_ATOMIC = 8,
+ CUPTI_OPENACC_CONSTRUCT_KIND_DECLARE = 9,
+ CUPTI_OPENACC_CONSTRUCT_KIND_INIT = 10,
+ CUPTI_OPENACC_CONSTRUCT_KIND_SHUTDOWN = 11,
+ CUPTI_OPENACC_CONSTRUCT_KIND_SET = 12,
+ CUPTI_OPENACC_CONSTRUCT_KIND_UPDATE = 13,
+ CUPTI_OPENACC_CONSTRUCT_KIND_ROUTINE = 14,
+ CUPTI_OPENACC_CONSTRUCT_KIND_WAIT = 15,
+ CUPTI_OPENACC_CONSTRUCT_KIND_RUNTIME_API = 16,
+ CUPTI_OPENACC_CONSTRUCT_KIND_FORCE_INT = 0x7fffffff
+
+} CUpti_OpenAccConstructKind;
+
+typedef enum {
+ CUPTI_OPENMP_EVENT_KIND_INVALID = 0,
+ CUPTI_OPENMP_EVENT_KIND_PARALLEL = 1,
+ CUPTI_OPENMP_EVENT_KIND_TASK = 2,
+ CUPTI_OPENMP_EVENT_KIND_THREAD = 3,
+ CUPTI_OPENMP_EVENT_KIND_IDLE = 4,
+ CUPTI_OPENMP_EVENT_KIND_WAIT_BARRIER = 5,
+ CUPTI_OPENMP_EVENT_KIND_WAIT_TASKWAIT = 6,
+ CUPTI_OPENMP_EVENT_KIND_FORCE_INT = 0x7fffffff
+} CUpti_OpenMpEventKind;
+
+/**
+ * \brief The base activity record for OpenAcc records.
+ *
+ * The OpenACC activity API part uses a CUpti_ActivityOpenAcc as a generic
+ * representation for any OpenACC activity. The 'kind' field is used to determine the
+ * specific activity kind, and from that the CUpti_ActivityOpenAcc object can
+ * be cast to the specific OpenACC activity record type appropriate for that kind.
+ *
+ * Note that all OpenACC activity record types are padded and aligned to
+ * ensure that each member of the record is naturally aligned.
+ *
+ * \see CUpti_ActivityKind
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The kind of this activity.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * CUPTI OpenACC event kind (\see CUpti_OpenAccEventKind)
+ */
+ CUpti_OpenAccEventKind eventKind;
+
+ /**
+ * CUPTI OpenACC parent construct kind (\see CUpti_OpenAccConstructKind)
+ *
+ * Note that for applications using PGI OpenACC runtime < 16.1, this
+ * will always be CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN.
+ */
+ CUpti_OpenAccConstructKind parentConstruct;
+
+ /**
+ * Version number
+ */
+ uint32_t version;
+
+ /**
+ * 1 for any implicit event, such as an implicit wait at a synchronous data construct
+ * 0 otherwise
+ */
+ uint32_t implicit;
+
+ /**
+ * Device type
+ */
+ uint32_t deviceType;
+
+ /**
+ * Device number
+ */
+ uint32_t deviceNumber;
+
+ /**
+ * ThreadId
+ */
+ uint32_t threadId;
+
+ /**
+ * Value of async() clause of the corresponding directive
+ */
+ uint64_t async;
+
+ /**
+ * Internal asynchronous queue number used
+ */
+ uint64_t asyncMap;
+
+ /**
+ * The line number of the directive or program construct or the starting line
+ * number of the OpenACC construct corresponding to the event.
+ * A zero value means the line number is not known.
+ */
+ uint32_t lineNo;
+
+ /**
+ * For an OpenACC construct, this contains the line number of the end
+ * of the construct. A zero value means the line number is not known.
+ */
+ uint32_t endLineNo;
+
+ /**
+ * The line number of the first line of the function named in funcName.
+ * A zero value means the line number is not known.
+ */
+ uint32_t funcLineNo;
+
+ /**
+ * The last line number of the function named in funcName.
+ * A zero value means the line number is not known.
+ */
+ uint32_t funcEndLineNo;
+
+ /**
+ * CUPTI start timestamp
+ */
+ uint64_t start;
+
+ /**
+ * CUPTI end timestamp
+ */
+ uint64_t end;
+
+ /**
+ * CUDA device id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuDeviceId;
+
+ /**
+ * CUDA context id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuContextId;
+
+ /**
+ * CUDA stream id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuStreamId;
+
+ /**
+ * The ID of the process where the OpenACC activity is executing.
+ */
+ uint32_t cuProcessId;
+
+ /**
+ * The ID of the thread where the OpenACC activity is executing.
+ */
+ uint32_t cuThreadId;
+
+ /**
+ * The OpenACC correlation ID.
+ * Valid only if deviceType is acc_device_nvidia.
+ * If not 0, it uniquely identifies this record. It is identical to the
+ * externalId in the preceding external correlation record of type
+ * CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC.
+ */
+ uint32_t externalId;
+
+ /*
+ * A pointer to null-terminated string containing the name of or path to
+ * the source file, if known, or a null pointer if not.
+ */
+ const char *srcFile;
+
+ /*
+ * A pointer to a null-terminated string containing the name of the
+ * function in which the event occurred.
+ */
+ const char *funcName;
+} CUpti_ActivityOpenAcc;
+
+/**
+ * \brief The activity record for OpenACC data.
+ *
+ * (CUPTI_ACTIVITY_KIND_OPENACC_DATA).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_OPENACC_DATA.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * CUPTI OpenACC event kind (\see CUpti_OpenAccEventKind)
+ */
+ CUpti_OpenAccEventKind eventKind;
+
+ /*
+ * CUPTI OpenACC parent construct kind (\see CUpti_OpenAccConstructKind)
+ *
+ * Note that for applications using PGI OpenACC runtime < 16.1, this
+ * will always be CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN.
+ */
+ CUpti_OpenAccConstructKind parentConstruct;
+
+ /*
+ * Version number
+ */
+ uint32_t version;
+
+ /*
+ * 1 for any implicit event, such as an implicit wait at a synchronous data construct
+ * 0 otherwise
+ */
+ uint32_t implicit;
+
+ /*
+ * Device type
+ */
+ uint32_t deviceType;
+
+ /*
+ * Device number
+ */
+ uint32_t deviceNumber;
+
+ /**
+ * ThreadId
+ */
+ uint32_t threadId;
+
+ /*
+ * Value of async() clause of the corresponding directive
+ */
+ uint64_t async;
+
+ /*
+ * Internal asynchronous queue number used
+ */
+ uint64_t asyncMap;
+
+ /*
+ * The line number of the directive or program construct or the starting line
+ * number of the OpenACC construct corresponding to the event.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t lineNo;
+
+ /*
+ * For an OpenACC construct, this contains the line number of the end
+ * of the construct. A negative or zero value means the line number is not known.
+ */
+ uint32_t endLineNo;
+
+ /*
+ * The line number of the first line of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcLineNo;
+
+ /*
+ * The last line number of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcEndLineNo;
+
+ /**
+ * CUPTI start timestamp
+ */
+ uint64_t start;
+
+ /**
+ * CUPTI end timestamp
+ */
+ uint64_t end;
+
+ /**
+ * CUDA device id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuDeviceId;
+
+ /**
+ * CUDA context id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuContextId;
+
+ /**
+ * CUDA stream id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuStreamId;
+
+ /**
+ * The ID of the process where the OpenACC activity is executing.
+ */
+ uint32_t cuProcessId;
+
+ /**
+ * The ID of the thread where the OpenACC activity is executing.
+ */
+ uint32_t cuThreadId;
+
+ /**
+ * The OpenACC correlation ID.
+ * Valid only if deviceType is acc_device_nvidia.
+ * If not 0, it uniquely identifies this record. It is identical to the
+ * externalId in the preceding external correlation record of type
+ * CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC.
+ */
+ uint32_t externalId;
+
+ /*
+ * A pointer to null-terminated string containing the name of or path to
+ * the source file, if known, or a null pointer if not.
+ */
+ const char *srcFile;
+
+ /*
+ * A pointer to a null-terminated string containing the name of the
+ * function in which the event occurred.
+ */
+ const char *funcName;
+
+ /* --- end of common CUpti_ActivityOpenAcc part --- */
+
+ /**
+ * Number of bytes
+ */
+ uint64_t bytes;
+
+ /**
+ * Host pointer if available
+ */
+ uint64_t hostPtr;
+
+ /**
+ * Device pointer if available
+ */
+ uint64_t devicePtr;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad1;
+#endif
+
+ /*
+ * A pointer to null-terminated string containing the name of the variable
+ * for which this event is triggered, if known, or a null pointer if not.
+ */
+ const char *varName;
+
+} CUpti_ActivityOpenAccData;
+
+/**
+ * \brief The activity record for OpenACC launch.
+ *
+ * (CUPTI_ACTIVITY_KIND_OPENACC_LAUNCH).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_OPENACC_LAUNCH.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * CUPTI OpenACC event kind (\see CUpti_OpenAccEventKind)
+ */
+ CUpti_OpenAccEventKind eventKind;
+
+ /**
+ * CUPTI OpenACC parent construct kind (\see CUpti_OpenAccConstructKind)
+ *
+ * Note that for applications using PGI OpenACC runtime < 16.1, this
+ * will always be CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN.
+ */
+ CUpti_OpenAccConstructKind parentConstruct;
+
+ /**
+ * Version number
+ */
+ uint32_t version;
+
+ /**
+ * 1 for any implicit event, such as an implicit wait at a synchronous data construct
+ * 0 otherwise
+ */
+ uint32_t implicit;
+
+ /**
+ * Device type
+ */
+ uint32_t deviceType;
+
+ /**
+ * Device number
+ */
+ uint32_t deviceNumber;
+
+ /**
+ * ThreadId
+ */
+ uint32_t threadId;
+
+ /**
+ * Value of async() clause of the corresponding directive
+ */
+ uint64_t async;
+
+ /**
+ * Internal asynchronous queue number used
+ */
+ uint64_t asyncMap;
+
+ /**
+ * The line number of the directive or program construct or the starting line
+ * number of the OpenACC construct corresponding to the event.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t lineNo;
+
+ /**
+ * For an OpenACC construct, this contains the line number of the end
+ * of the construct. A negative or zero value means the line number is not known.
+ */
+ uint32_t endLineNo;
+
+ /**
+ * The line number of the first line of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcLineNo;
+
+ /**
+ * The last line number of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcEndLineNo;
+
+ /**
+ * CUPTI start timestamp
+ */
+ uint64_t start;
+
+ /**
+ * CUPTI end timestamp
+ */
+ uint64_t end;
+
+ /**
+ * CUDA device id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuDeviceId;
+
+ /**
+ * CUDA context id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuContextId;
+
+ /**
+ * CUDA stream id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuStreamId;
+
+ /**
+ * The ID of the process where the OpenACC activity is executing.
+ */
+ uint32_t cuProcessId;
+
+ /**
+ * The ID of the thread where the OpenACC activity is executing.
+ */
+ uint32_t cuThreadId;
+
+ /**
+ * The OpenACC correlation ID.
+ * Valid only if deviceType is acc_device_nvidia.
+ * If not 0, it uniquely identifies this record. It is identical to the
+ * externalId in the preceding external correlation record of type
+ * CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC.
+ */
+ uint32_t externalId;
+
+ /**
+ * A pointer to null-terminated string containing the name of or path to
+ * the source file, if known, or a null pointer if not.
+ */
+ const char *srcFile;
+
+ /**
+ * A pointer to a null-terminated string containing the name of the
+ * function in which the event occurred.
+ */
+ const char *funcName;
+
+ /* --- end of common CUpti_ActivityOpenAcc part --- */
+
+ /**
+ * The number of gangs created for this kernel launch
+ */
+ uint64_t numGangs;
+
+ /**
+ * The number of workers created for this kernel launch
+ */
+ uint64_t numWorkers;
+
+ /**
+ * The number of vector lanes created for this kernel launch
+ */
+ uint64_t vectorLength;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad1;
+#endif
+
+ /**
+ * A pointer to null-terminated string containing the name of the
+ * kernel being launched, if known, or a null pointer if not.
+ */
+ const char *kernelName;
+
+} CUpti_ActivityOpenAccLaunch;
+
+/**
+ * \brief The activity record for OpenACC other.
+ *
+ * (CUPTI_ACTIVITY_KIND_OPENACC_OTHER).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_OPENACC_OTHER.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * CUPTI OpenACC event kind (\see CUpti_OpenAccEventKind)
+ */
+ CUpti_OpenAccEventKind eventKind;
+
+ /**
+ * CUPTI OpenACC parent construct kind (\see CUpti_OpenAccConstructKind)
+ *
+ * Note that for applications using PGI OpenACC runtime < 16.1, this
+ * will always be CUPTI_OPENACC_CONSTRUCT_KIND_UNKNOWN.
+ */
+ CUpti_OpenAccConstructKind parentConstruct;
+
+ /**
+ * Version number
+ */
+ uint32_t version;
+
+ /**
+ * 1 for any implicit event, such as an implicit wait at a synchronous data construct
+ * 0 otherwise
+ */
+ uint32_t implicit;
+
+ /**
+ * Device type
+ */
+ uint32_t deviceType;
+
+ /**
+ * Device number
+ */
+ uint32_t deviceNumber;
+
+ /**
+ * ThreadId
+ */
+ uint32_t threadId;
+
+ /**
+ * Value of async() clause of the corresponding directive
+ */
+ uint64_t async;
+
+ /**
+ * Internal asynchronous queue number used
+ */
+ uint64_t asyncMap;
+
+ /**
+ * The line number of the directive or program construct or the starting line
+ * number of the OpenACC construct corresponding to the event.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t lineNo;
+
+ /**
+ * For an OpenACC construct, this contains the line number of the end
+ * of the construct. A negative or zero value means the line number is not known.
+ */
+ uint32_t endLineNo;
+
+ /**
+ * The line number of the first line of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcLineNo;
+
+ /**
+ * The last line number of the function named in func_name.
+ * A negative or zero value means the line number is not known.
+ */
+ uint32_t funcEndLineNo;
+
+ /**
+ * CUPTI start timestamp
+ */
+ uint64_t start;
+
+ /**
+ * CUPTI end timestamp
+ */
+ uint64_t end;
+
+ /**
+ * CUDA device id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuDeviceId;
+
+ /**
+ * CUDA context id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuContextId;
+
+ /**
+ * CUDA stream id
+ * Valid only if deviceType is acc_device_nvidia.
+ */
+ uint32_t cuStreamId;
+
+ /**
+ * The ID of the process where the OpenACC activity is executing.
+ */
+ uint32_t cuProcessId;
+
+ /**
+ * The ID of the thread where the OpenACC activity is executing.
+ */
+ uint32_t cuThreadId;
+
+ /**
+ * The OpenACC correlation ID.
+ * Valid only if deviceType is acc_device_nvidia.
+ * If not 0, it uniquely identifies this record. It is identical to the
+ * externalId in the preceding external correlation record of type
+ * CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC.
+ */
+ uint32_t externalId;
+
+ /**
+ * A pointer to null-terminated string containing the name of or path to
+ * the source file, if known, or a null pointer if not.
+ */
+ const char *srcFile;
+
+ /**
+ * A pointer to a null-terminated string containing the name of the
+ * function in which the event occurred.
+ */
+ const char *funcName;
+
+ /* --- end of common CUpti_ActivityOpenAcc part --- */
+} CUpti_ActivityOpenAccOther;
+
+/**
+ * \brief The base activity record for OpenMp records.
+ *
+ * \see CUpti_ActivityKind
+ */
+typedef struct PACKED_ALIGNMENT {
+
+ /**
+ * The kind of this activity.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * CUPTI OpenMP event kind (\see CUpti_OpenMpEventKind)
+ */
+ CUpti_OpenMpEventKind eventKind;
+
+ /**
+ * Version number
+ */
+ uint32_t version;
+
+ /**
+ * ThreadId
+ */
+ uint32_t threadId;
+
+ /**
+ * CUPTI start timestamp
+ */
+ uint64_t start;
+
+ /**
+ * CUPTI end timestamp
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the process where the OpenMP activity is executing.
+ */
+ uint32_t cuProcessId;
+
+ /**
+ * The ID of the thread where the OpenMP activity is executing.
+ */
+ uint32_t cuThreadId;
+} CUpti_ActivityOpenMp;
+
+/**
+ * \brief The kind of external APIs supported for correlation.
+ *
+ * Custom correlation kinds are reserved for usage in external tools.
+ *
+ * \see CUpti_ActivityExternalCorrelation
+ */
+typedef enum {
+ CUPTI_EXTERNAL_CORRELATION_KIND_INVALID = 0,
+
+ /**
+ * The external API is unknown to CUPTI
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_UNKNOWN = 1,
+
+ /**
+ * The external API is OpenACC
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_OPENACC = 2,
+
+ /**
+ * The external API is custom0
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM0 = 3,
+
+ /**
+ * The external API is custom1
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM1 = 4,
+
+ /**
+ * The external API is custom2
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_CUSTOM2 = 5,
+
+ /**
+ * Add new kinds before this line
+ */
+ CUPTI_EXTERNAL_CORRELATION_KIND_SIZE,
+
+ CUPTI_EXTERNAL_CORRELATION_KIND_FORCE_INT = 0x7fffffff
+} CUpti_ExternalCorrelationKind;
+
+/**
+ * \brief The activity record for correlation with external records
+ *
+ * This activity record correlates native CUDA records (e.g. CUDA Driver API,
+ * kernels, memcpys, ...) with records from external APIs such as OpenACC.
+ * (CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION).
+ *
+ * \see CUpti_ActivityKind
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The kind of this activity.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of external API this record correlated to.
+ */
+ CUpti_ExternalCorrelationKind externalKind;
+
+ /**
+ * The correlation ID of the associated non-CUDA API record.
+ * The exact field in the associated external record depends
+ * on that record's activity kind (\see externalKind).
+ */
+ uint64_t externalId;
+
+ /**
+ * The correlation ID of the associated CUDA driver or runtime API record.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t reserved;
+} CUpti_ActivityExternalCorrelation;
+
+/**
+* \brief The device type for device connected to NVLink.
+*/
+typedef enum {
+ CUPTI_DEV_TYPE_INVALID = 0,
+
+ /**
+ * The device type is GPU.
+ */
+ CUPTI_DEV_TYPE_GPU = 1,
+
+ /**
+ * The device type is NVLink processing unit in CPU.
+ */
+ CUPTI_DEV_TYPE_NPU = 2,
+
+ CUPTI_DEV_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_DevType;
+
+/**
+* \brief NVLink information.
+*
+* This structure gives capabilities of each logical NVLink connection between two devices,
+* gpu<->gpu or gpu<->CPU which can be used to understand the topology.
+*/
+
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_NVLINK.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * NvLink version.
+ */
+ uint32_t nvlinkVersion;
+
+ /**
+ * Type of device 0 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev0;
+
+ /**
+ * Type of device 1 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev1;
+
+ /**
+ * If typeDev0 is CUPTI_DEV_TYPE_GPU, UUID for device 0. \ref CUpti_ActivityDevice5.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev0;
+
+ /**
+ * If typeDev1 is CUPTI_DEV_TYPE_GPU, UUID for device 1. \ref CUpti_ActivityDevice5.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev1;
+
+ /**
+ * Flag gives capabilities of the link \see CUpti_LinkFlag
+ */
+ uint32_t flag;
+
+ /**
+ * Number of physical NVLinks present between two devices.
+ */
+ uint32_t physicalNvLinkCount;
+
+ /**
+ * Port numbers for maximum 32 NVLinks connected to device 0.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev0[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Port numbers for maximum 32 NVLinks connected to device 1.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev1[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Bandwidth of NVLink in kbytes/sec
+ */
+ uint64_t bandwidth;
+
+ /**
+ * NVSwitch is connected as an intermediate node.
+ */
+ uint8_t nvswitchConnected;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint8_t pad[7];
+} CUpti_ActivityNvLink4;
+
+#define CUPTI_MAX_GPUS 32
+/**
+ * Field to differentiate whether PCIE Activity record
+ * is of a GPU or a PCI Bridge
+ */
+typedef enum {
+ /**
+ * PCIE GPU record
+ */
+ CUPTI_PCIE_DEVICE_TYPE_GPU = 0,
+
+ /**
+ * PCIE Bridge record
+ */
+ CUPTI_PCIE_DEVICE_TYPE_BRIDGE = 1,
+
+ CUPTI_PCIE_DEVICE_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_PcieDeviceType;
+
+/**
+ * \brief PCI devices information required to construct topology
+ *
+ * This structure gives capabilities of GPU and PCI bridge connected to the PCIE bus
+ * which can be used to understand the topology.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PCIE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * Type of device in topology, \ref CUpti_PcieDeviceType. If type is
+ * CUPTI_PCIE_DEVICE_TYPE_GPU use devId for id and gpuAttr and if type is
+ * CUPTI_PCIE_DEVICE_TYPE_BRIDGE use bridgeId for id and bridgeAttr.
+ */
+ CUpti_PcieDeviceType type;
+
+ /**
+ * A unique identifier for GPU or Bridge in Topology
+ */
+ union {
+ /**
+ * GPU device ID
+ */
+ CUdevice devId;
+
+ /**
+ * A unique identifier for Bridge in the Topology
+ */
+ uint32_t bridgeId;
+ } id;
+
+ /**
+ * Domain for the GPU or Bridge, required to identify which PCIE bus it belongs to in
+ * multiple NUMA systems.
+ */
+ uint32_t domain;
+
+ /**
+ * PCIE Generation of GPU or Bridge.
+ */
+ uint16_t pcieGeneration;
+
+ /**
+ * Link rate of the GPU or bridge in gigatransfers per second (GT/s)
+ */
+ uint16_t linkRate;
+
+ /**
+ * Link width of the GPU or bridge
+ */
+ uint16_t linkWidth;
+
+ /**
+ * Upstream bus ID for the GPU or PCI bridge. Required to identify which bus it is
+ * connected to in the topology.
+ */
+ uint16_t upstreamBus;
+
+ /**
+ * Attributes for more information about GPU (gpuAttr) or PCI Bridge (bridgeAttr)
+ */
+ union {
+ struct {
+ /**
+ * UUID for the device. \ref CUpti_ActivityDevice5.
+ */
+ CUuuid uuidDev;
+
+ /**
+ * CUdevice with which this device has P2P capability.
+ * This can also be obtained by querying cuDeviceCanAccessPeer or
+ * cudaDeviceCanAccessPeer APIs
+ */
+ CUdevice peerDev[CUPTI_MAX_GPUS];
+ } gpuAttr;
+
+ struct {
+ /**
+ * The downstream bus number, used to search downstream devices/bridges connected
+ * to this bridge.
+ */
+ uint16_t secondaryBus;
+
+ /**
+ * Device ID of the bridge
+ */
+ uint16_t deviceId;
+
+ /**
+ * Vendor ID of the bridge
+ */
+ uint16_t vendorId;
+
+ /**
+ * Padding for alignment
+ */
+ uint16_t pad0;
+ } bridgeAttr;
+ } attr;
+} CUpti_ActivityPcie;
+
+/**
+ * \brief PCIE Generation.
+ *
+ * Enumeration of PCIE Generation for
+ * pcie activity attribute pcieGeneration
+ */
+typedef enum {
+ /**
+ * PCIE Generation 1
+ */
+ CUPTI_PCIE_GEN_GEN1 = 1,
+
+ /**
+ * PCIE Generation 2
+ */
+ CUPTI_PCIE_GEN_GEN2 = 2,
+
+ /**
+ * PCIE Generation 3
+ */
+ CUPTI_PCIE_GEN_GEN3 = 3,
+
+ /**
+ * PCIE Generation 4
+ */
+ CUPTI_PCIE_GEN_GEN4 = 4,
+
+ /**
+ * PCIE Generation 5
+ */
+ CUPTI_PCIE_GEN_GEN5 = 5,
+
+ /**
+ * PCIE Generation 6
+ */
+ CUPTI_PCIE_GEN_GEN6 = 6,
+
+ CUPTI_PCIE_GEN_FORCE_INT = 0x7fffffff
+} CUpti_PcieGen;
+
+
+/**
+ * \brief The activity record for an instantaneous CUPTI event.
+ *
+ * This activity record represents a CUPTI event value
+ * (CUPTI_ACTIVITY_KIND_EVENT) sampled at a particular instant.
+ * This activity record kind is not produced by the activity API but is
+ * included for completeness and ease-of-use. Profiler frameworks built on
+ * top of CUPTI that collect event data at a particular time may choose to
+ * use this type to store the collected event data.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The event ID.
+ */
+ CUpti_EventID id;
+
+ /**
+ * The event value.
+ */
+ uint64_t value;
+
+ /**
+ * The timestamp at which event is sampled
+ */
+ uint64_t timestamp;
+
+ /**
+ * The device id
+ */
+ uint32_t deviceId;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint32_t reserved;
+} CUpti_ActivityInstantaneousEvent;
+
+/**
+ * \brief The activity record for an instantaneous CUPTI event
+ * with event domain instance information.
+ *
+ * This activity record represents the a CUPTI event value for a
+ * specific event domain instance
+ * (CUPTI_ACTIVITY_KIND_EVENT_INSTANCE) sampled at a particular instant.
+ * This activity record kind is not produced by the activity API but is
+ * included for completeness and ease-of-use. Profiler frameworks built on
+ * top of CUPTI that collect event data may choose to use this type to store the
+ * collected event data. This activity record should be used when
+ * event domain instance information needs to be associated with the
+ * event.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTANTANEOUS_EVENT_INSTANCE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The event ID.
+ */
+ CUpti_EventID id;
+
+ /**
+ * The event value.
+ */
+ uint64_t value;
+
+ /**
+ * The timestamp at which event is sampled
+ */
+ uint64_t timestamp;
+
+ /**
+ * The device id
+ */
+ uint32_t deviceId;
+
+ /**
+ * The event domain instance
+ */
+ uint8_t instance;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint8_t pad[3];
+} CUpti_ActivityInstantaneousEventInstance;
+
+/**
+ * \brief The activity record for an instantaneous CUPTI metric.
+ *
+ * This activity record represents the collection of a CUPTI metric
+ * value (CUPTI_ACTIVITY_KIND_METRIC) at a particular instance.
+ * This activity record kind is not produced by the activity API but
+ * is included for completeness and ease-of-use. Profiler frameworks built
+ * on top of CUPTI that collect metric data may choose to use this type to
+ * store the collected metric data.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The metric ID.
+ */
+ CUpti_MetricID id;
+
+ /**
+ * The metric value.
+ */
+ CUpti_MetricValue value;
+
+ /**
+ * The timestamp at which metric is sampled
+ */
+ uint64_t timestamp;
+
+ /**
+ * The device id
+ */
+ uint32_t deviceId;
+
+ /**
+ * The properties of this metric. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint8_t pad[3];
+} CUpti_ActivityInstantaneousMetric;
+
+/**
+ * \brief The instantaneous activity record for a CUPTI metric with instance
+ * information.
+
+ * This activity record represents a CUPTI metric value
+ * for a specific metric domain instance
+ * (CUPTI_ACTIVITY_KIND_METRIC_INSTANCE) sampled at a particular time. This
+ * activity record kind is not produced by the activity API but is included for
+ * completeness and ease-of-use. Profiler frameworks built on top of
+ * CUPTI that collect metric data may choose to use this type to store
+ * the collected metric data. This activity record should be used when
+ * metric domain instance information needs to be associated with the
+ * metric.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_INSTANTANEOUS_METRIC_INSTANCE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The metric ID.
+ */
+ CUpti_MetricID id;
+
+ /**
+ * The metric value.
+ */
+ CUpti_MetricValue value;
+
+ /**
+ * The timestamp at which metric is sampled
+ */
+ uint64_t timestamp;
+
+ /**
+ * The device id
+ */
+ uint32_t deviceId;
+
+ /**
+ * The properties of this metric. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The metric domain instance
+ */
+ uint8_t instance;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint8_t pad[2];
+} CUpti_ActivityInstantaneousMetricInstance;
+
+/**
+ * \brief The types of JIT entry.
+ *
+ * To be used in CUpti_ActivityJit.
+ */
+typedef enum {
+ CUPTI_ACTIVITY_JIT_ENTRY_INVALID= 0,
+
+ /**
+ * PTX to CUBIN.
+ */
+ CUPTI_ACTIVITY_JIT_ENTRY_PTX_TO_CUBIN = 1,
+
+ /**
+ * NVVM-IR to PTX
+ */
+ CUPTI_ACTIVITY_JIT_ENTRY_NVVM_IR_TO_PTX = 2,
+
+ CUPTI_ACTIVITY_JIT_ENTRY_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityJitEntryType;
+
+/**
+ * \brief The types of JIT compilation operations.
+ *
+ * To be used in CUpti_ActivityJit.
+ */
+
+typedef enum {
+ CUPTI_ACTIVITY_JIT_OPERATION_INVALID = 0,
+ /**
+ * Loaded from the compute cache.
+ */
+ CUPTI_ACTIVITY_JIT_OPERATION_CACHE_LOAD = 1,
+
+ /**
+ * Stored in the compute cache.
+ */
+ CUPTI_ACTIVITY_JIT_OPERATION_CACHE_STORE = 2,
+
+ /**
+ * JIT compilation.
+ */
+ CUPTI_ACTIVITY_JIT_OPERATION_COMPILE = 3,
+
+ CUPTI_ACTIVITY_JIT_OPERATION_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityJitOperationType;
+
+/**
+ * \brief The activity record for JIT operations.
+ * This activity represents the JIT operations (compile, load, store) of a CUmodule
+ * from the Compute Cache.
+ * Gives the exact hashed path of where the cached module is loaded from,
+ * or where the module will be stored after Just-In-Time (JIT) compilation.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind must be CUPTI_ACTIVITY_KIND_JIT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The JIT entry type.
+ */
+ CUpti_ActivityJitEntryType jitEntryType;
+
+ /**
+ * The JIT operation type.
+ */
+ CUpti_ActivityJitOperationType jitOperationType;
+
+ /**
+ * The device ID.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The start timestamp for the JIT operation, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the JIT operation.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the JIT operation, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the JIT operation.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the JIT operation to which
+ * records belong to. Each JIT operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the JIT operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Internal use.
+ */
+ uint32_t padding;
+
+ /**
+ * The correlation ID to correlate JIT compilation, load and store operations.
+ * Each JIT compilation unit is assigned a unique correlation ID
+ * at the time of the JIT compilation. This correlation id can be used
+ * to find the matching JIT cache load/store records.
+ */
+ uint64_t jitOperationCorrelationId;
+
+ /**
+ * The size of compute cache.
+ */
+ uint64_t cacheSize;
+
+ /**
+ * The path where the fat binary is cached.
+ */
+ const char* cachePath;
+
+ /**
+ * The ID of the process where the JIT operation is executing.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the thread where the JIT operation is executing.
+ */
+ uint32_t threadId;
+} CUpti_ActivityJit2;
+
+
+/**
+ * \brief The activity record for trace of graph execution.
+ *
+ * This activity record represents execution for a graph without giving visibility
+ * about the execution of its nodes. This is intended to reduce overheads in tracing
+ * each node. The activity kind is CUPTI_ACTIVITY_KIND_GRAPH_TRACE
+ */
+typedef struct {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_GRAPH_TRACE
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The correlation ID of the graph launch. Each graph launch is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the graph.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The start timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the first node of the graph is executed.
+ * If this is INT_MAX, then the start is on the host.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The unique ID of the graph that is launched.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the context where the first node of the graph is executed.
+ * If this is INT_MAX, then the start is on the host.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the graph is being launched.
+ */
+ uint32_t streamId;
+
+ /**
+ * This field is reserved for internal use
+ */
+ void *reserved;
+
+ /**
+ * The ID of the device where last node of the graph is executed
+ */
+ uint32_t endDeviceId;
+
+ /**
+ * The ID of the context where the last node of the graph is executed.
+ */
+ uint32_t endContextId;
+} CUpti_ActivityGraphTrace2;
+
+/**
+ * \brief The launch mode for device graph execution.
+ */
+typedef enum {
+ CUPTI_DEVICE_GRAPH_LAUNCH_MODE_INVALID = 0,
+ CUPTI_DEVICE_GRAPH_LAUNCH_MODE_FIRE_AND_FORGET = 1,
+ CUPTI_DEVICE_GRAPH_LAUNCH_MODE_TAIL = 2,
+ CUPTI_DEVICE_GRAPH_LAUNCH_MODE_FIRE_AND_FORGET_AS_SIBLING = 3,
+} CUpti_DeviceGraphLaunchMode;
+
+/**
+ * \brief The activity record for trace of device graph execution.
+ *
+ * This activity record represents execution for a device launched graph without giving visibility
+ * about the execution of its nodes. This is intended to reduce overheads in tracing
+ * each node. The activity kind is CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE
+ */
+typedef struct {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE_GRAPH_TRACE
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID of the device where the first node of the graph is executed.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The start timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t end;
+
+ /**
+ * The unique ID of the graph that is launched.
+ */
+ uint32_t graphId;
+
+ /**
+ * The unique ID of the graph that has launched this graph.
+ */
+ uint32_t launcherGraphId;
+
+ /**
+ * The type of launch. See \ref CUpti_DeviceGraphLaunchMode
+ */
+ uint32_t deviceLaunchMode;
+
+ /**
+ * The ID of the context where the first node of the graph is executed.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the graph is being launched.
+ */
+ uint64_t streamId;
+
+ /**
+ * This field is reserved for internal use
+ */
+ void *reserved;
+
+} CUpti_ActivityDeviceGraphTrace;
+
+/**
+ * \brief The activity record for trace of decompression operations.
+ *
+ * This activity record represents execution for a batch of decompression operatios.
+ * The activity kind is CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS
+ */
+typedef struct {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEM_DECOMPRESS
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID of the device.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the HW channel on which the memory copy is occurring.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * The correlation ID of the decompression operations. Each operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The number of operations in the batch.
+ */
+ uint32_t numberOfOperations;
+
+ /**
+ * The number of bytes to be read and decompressed in the
+ * batch operation.
+ */
+ uint64_t sourceBytes;
+
+ /**
+ * This field is reserved for internal use
+ */
+ void *reserved0;
+
+ /**
+ * The start timestamp.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the start time is unknown.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the start time is unknown.
+ */
+ uint64_t end;
+} CUpti_ActivityMemDecompress;
+
+END_PACKED_ALIGNMENT
+
+/**
+ * \brief Activity attributes.
+ *
+ * These attributes are used to control the behavior of the activity
+ * API.
+ */
+typedef enum {
+ /**
+ * The device memory size (in bytes) reserved for storing profiling data for concurrent
+ * kernels (activity kind \ref CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL), memcopies and memsets
+ * for each buffer on a context. The value is a size_t.
+ *
+ * There is a limit on how many device buffers can be allocated per context. User
+ * can query and set this limit using the attribute
+ * \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_POOL_LIMIT.
+ * CUPTI doesn't pre-allocate all the buffers, it pre-allocates only those many
+ * buffers as set by the attribute \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_PRE_ALLOCATE_VALUE.
+ * When all of the data in a buffer is consumed, it is added in the reuse pool, and
+ * CUPTI picks a buffer from this pool when a new buffer is needed. Thus memory
+ * footprint does not scale with the kernel count. Applications with the high density
+ * of kernels, memcopies and memsets might result in having CUPTI to allocate more device buffers.
+ * CUPTI allocates another buffer only when it runs out of the buffers in the
+ * reuse pool.
+ *
+ * Since buffer allocation happens in the main application thread, this might result
+ * in stalls in the critical path. CUPTI pre-allocates 3 buffers of the same size to
+ * mitigate this issue. User can query and set the pre-allocation limit using the
+ * attribute \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_PRE_ALLOCATE_VALUE.
+ *
+ * Having larger buffer size leaves less device memory for the application.
+ * Having smaller buffer size increases the risk of dropping timestamps for
+ * records if too many kernels or memcopies or memsets are launched at one time.
+ *
+ * This value only applies to new buffer allocations. Set this value before initializing
+ * CUDA or before creating a context to ensure it is considered for the following allocations.
+ *
+ * The default value is 3200000 (~3MB) which can accommodate profiling data
+ * up to 100,000 kernels, memcopies and memsets combined.
+ *
+ * Note: Starting with the CUDA 12.0 Update 1 release, CUPTI allocates profiling buffer in the
+ * device memory by default as this might help in improving the performance of the
+ * tracing run. Refer to the description of the attribute
+ * \ref CUPTI_ACTIVITY_ATTR_MEM_ALLOCATION_TYPE_HOST_PINNED for more details.
+ * Size of the memory and maximum number of pools are still controlled by the attributes
+ * \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE and \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_POOL_LIMIT.
+ *
+ * Note: The actual amount of device memory per buffer reserved by CUPTI might be larger.
+ */
+ CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE = 0,
+
+ /**
+ * The device memory size (in bytes) reserved for storing profiling
+ * data for CDP operations for each buffer on a context. The
+ * value is a size_t.
+ *
+ * Having larger buffer size means less flush operations but
+ * consumes more device memory. This value only applies to new
+ * allocations.
+ *
+ * Set this value before initializing CUDA or before creating a
+ * context to ensure it is considered for the following allocations.
+ *
+ * The default value is 8388608 (8MB).
+ *
+ * Note: The actual amount of device memory per context reserved by
+ * CUPTI might be larger.
+ */
+ CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE_CDP = 1,
+
+ /**
+ * The maximum number of device memory buffers per context. The value is a size_t.
+ *
+ * For an application with high rate of kernel launches, memcopies and memsets having a bigger pool
+ * limit helps in timestamp collection for all these activities at the expense of a larger memory footprint.
+ * Refer to the description of the attribute \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE
+ * for more details.
+ *
+ * Setting this value will not modify the number of memory buffers
+ * currently stored.
+ *
+ * Set this value before initializing CUDA to ensure the limit is
+ * not exceeded.
+ *
+ * The default value is 250.
+ */
+ CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_POOL_LIMIT = 2,
+
+ /**
+ * This attribute is not supported starting with CUDA 12.3
+ * CUPTI no longer uses profiling semaphore pool to store profiling data.
+ *
+ * There is a limit on how many semaphore pools can be allocated per context. User
+ * can query and set this limit using the attribute
+ * \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_LIMIT.
+ * CUPTI doesn't pre-allocate all the semaphore pools, it pre-allocates only those many
+ * semaphore pools as set by the attribute \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE.
+ * When all of the data in a semaphore pool is consumed, it is added in the reuse pool, and
+ * CUPTI picks a semaphore pool from the reuse pool when a new semaphore pool is needed. Thus memory
+ * footprint does not scale with the kernel count. Applications with the high density
+ * of kernels might result in having CUPTI to allocate more semaphore pools.
+ * CUPTI allocates another semaphore pool only when it runs out of the semaphore pools in the
+ * reuse pool.
+ *
+ * Since semaphore pool allocation happens in the main application thread, this might result
+ * in stalls in the critical path. CUPTI pre-allocates 3 semaphore pools of the same size to
+ * mitigate this issue. User can query and set the pre-allocation limit using the
+ * attribute \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE.
+ *
+ * Having larger semaphore pool size leaves less device memory for the application.
+ * Having smaller semaphore pool size increases the risk of dropping timestamps for
+ * kernel records if too many kernels are issued/launched at one time.
+ *
+ * This value only applies to new semaphore pool allocations. Set this value before initializing
+ * CUDA or before creating a context to ensure it is considered for the following allocations.
+ *
+ * The default value is 25000 which can accommodate profiling data for upto 25,000 kernels.
+ *
+ */
+ CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_SIZE = 3,
+
+ /**
+ * This attribute is not supported starting with CUDA 12.3
+ * CUPTI no longer uses profiling semaphore pool to store profiling data.
+ *
+ * The maximum number of profiling semaphore pools per context. The value is a size_t.
+ *
+ * Refer to the description of the attribute \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_SIZE
+ * for more details.
+ *
+ * Set this value before initializing CUDA to ensure the limit is not exceeded.
+ *
+ * The default value is 250.
+ */
+ CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_LIMIT = 4,
+
+ /**
+ * The flag to indicate whether user should provide activity buffer of zero value.
+ * The value is a uint8_t.
+ *
+ * If the value of this attribute is non-zero, user should provide
+ * a zero value buffer in the \ref CUpti_BuffersCallbackRequestFunc.
+ * If the user does not provide a zero value buffer after setting this to non-zero,
+ * the activity buffer may contain some uninitialized values when CUPTI returns it in
+ * \ref CUpti_BuffersCallbackCompleteFunc
+ *
+ * If the value of this attribute is zero, CUPTI will initialize the user buffer
+ * received in the \ref CUpti_BuffersCallbackRequestFunc to zero before filling it.
+ * If the user sets this to zero, a few stalls may appear in critical path because CUPTI
+ * will zero out the buffer in the main thread.
+ * Set this value before returning from \ref CUpti_BuffersCallbackRequestFunc to
+ * ensure it is considered for all the subsequent user buffers.
+ *
+ * The default value is 0.
+ */
+ CUPTI_ACTIVITY_ATTR_ZEROED_OUT_ACTIVITY_BUFFER = 5,
+
+ /**
+ * Number of device buffers to pre-allocate for a context during the initialization phase.
+ * The value is a size_t.
+ *
+ * Refer to the description of the attribute \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE
+ * for details.
+ *
+ * This value must be less than the maximum number of device buffers set using
+ * the attribute \ref CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_POOL_LIMIT
+ *
+ * Set this value before initializing CUDA or before creating a context to ensure it
+ * is considered by the CUPTI.
+ *
+ * The default value is set to 3 to ping pong between these buffers (if possible).
+ */
+ CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_PRE_ALLOCATE_VALUE = 6,
+
+ /**
+ * This attribute is not supported starting with CUDA 12.3
+ * CUPTI no longer uses profiling semaphore pool to store profiling data.
+ *
+ * Number of profiling semaphore pools to pre-allocate for a context during the
+ * initialization phase. The value is a size_t.
+ *
+ * Refer to the description of the attribute \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_SIZE
+ * for details.
+ *
+ * This value must be less than the maximum number of profiling semaphore pools set
+ * using the attribute \ref CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_POOL_LIMIT
+ *
+ * Set this value before initializing CUDA or before creating a context to ensure it
+ * is considered by the CUPTI.
+ *
+ * The default value is set to 3 to ping pong between these pools (if possible).
+ */
+ CUPTI_ACTIVITY_ATTR_PROFILING_SEMAPHORE_PRE_ALLOCATE_VALUE = 7,
+
+ /**
+ * Allocate page-locked (pinned) host memory for storing profiling data for concurrent
+ * kernels, memcopies and memsets for each buffer on a context. The value is a uint8_t.
+ *
+ * Starting with the CUDA 11.2 release, CUPTI allocates profiling buffer in the pinned host
+ * memory by default as this might help in improving the performance of the tracing run.
+ * Allocating excessive amounts of pinned memory may degrade system performance, since it
+ * reduces the amount of memory available to the system for paging. For this reason user
+ * might want to change the location from pinned host memory to device memory by setting
+ * value of this attribute to 0.
+ *
+ * Using page-locked (pinned) host memory buffers is not supported on confidential computing
+ * devices. On setting this attribute to 1, CUPTI will return CUPTI_ERROR_NOT_SUPPORTED.
+ *
+ * The default value is 1.
+ */
+ CUPTI_ACTIVITY_ATTR_MEM_ALLOCATION_TYPE_HOST_PINNED = 8,
+
+ /**
+ * Request activity buffers per-thread to store CUPTI activity records
+ * in the activity buffer on per-thread basis. The value is a uint8_t.
+ *
+ * The attribute should be set before registering the buffer callbacks using
+ * cuptiActivityRegisterCallbacks API and before any of the CUPTI activity kinds are enabled.
+ * This makes sure that all the records are stored in activity buffers allocated per-thread.
+ * Changing this attribute in the middle of the profiling session will result in undefined behavior.
+ *
+ * The default value is 0.
+ */
+ CUPTI_ACTIVITY_ATTR_PER_THREAD_ACTIVITY_BUFFER,
+
+
+
+ CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_FORCE_INT = 0x7fffffff
+} CUpti_ActivityAttribute;
+
+/**
+ * \brief Thread-Id types.
+ *
+ * CUPTI uses different methods to obtain the thread-id depending on the
+ * support and the underlying platform. This enum documents these methods
+ * for each type. APIs \ref cuptiSetThreadIdType and \ref cuptiGetThreadIdType
+ * can be used to set and get the thread-id type.
+ */
+typedef enum {
+ /**
+ * Default type
+ * Windows uses API GetCurrentThreadId()
+ * Linux/Mac/Android/QNX use POSIX pthread API pthread_self()
+ */
+ CUPTI_ACTIVITY_THREAD_ID_TYPE_DEFAULT = 0,
+
+ /**
+ * This type is based on the system API available on the underlying platform
+ * and thread-id obtained is supposed to be unique for the process lifetime.
+ * Windows uses API GetCurrentThreadId()
+ * Linux uses syscall SYS_gettid
+ * Mac uses syscall SYS_thread_selfid
+ * Android/QNX use gettid()
+ */
+ CUPTI_ACTIVITY_THREAD_ID_TYPE_SYSTEM = 1,
+
+ /**
+ * Add new enums before this field.
+ */
+ CUPTI_ACTIVITY_THREAD_ID_TYPE_SIZE = 2,
+
+ CUPTI_ACTIVITY_THREAD_ID_TYPE_FORCE_INT = 0x7fffffff
+} CUpti_ActivityThreadIdType;
+
+/**
+ * \brief Get the CUPTI timestamp.
+ *
+ * Returns a timestamp normalized to correspond with the start and end
+ * timestamps reported in the CUPTI activity records. The timestamp is
+ * reported in nanoseconds.
+ *
+ * \param timestamp Returns the CUPTI timestamp
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p timestamp is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetTimestamp(uint64_t *timestamp);
+
+/**
+ * \brief Get the ID of a context.
+ *
+ * Get the ID of a context.
+ *
+ * \param context The context
+ * \param contextId Returns a process-unique ID for the context
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_CONTEXT The context is NULL or not valid.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p contextId is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetContextId(CUcontext context, uint32_t *contextId);
+
+/**
+ * \brief Get the ID of a stream.
+ *
+ * Get the ID of a stream. The stream ID is unique within a context
+ * (i.e. all streams within a context will have unique stream
+ * IDs).
+ *
+ * \param context If non-NULL then the stream is checked to ensure
+ * that it belongs to this context. Typically this parameter should be
+ * null.
+ * \param stream The stream
+ * \param streamId Returns a context-unique ID for the stream
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_STREAM if unable to get stream ID, or
+ * if \p context is non-NULL and \p stream does not belong to the
+ * context
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p streamId is NULL
+ *
+ * **DEPRECATED** This method is deprecated as of CUDA 8.0.
+ * Use method cuptiGetStreamIdEx instead.
+ */
+CUptiResult CUPTIAPI cuptiGetStreamId(CUcontext context, CUstream stream, uint32_t *streamId);
+
+/**
+* \brief Get the ID of a stream.
+*
+* Get the ID of a stream. The stream ID is unique within a context
+* (i.e. all streams within a context will have unique stream
+* IDs).
+*
+* \param context If non-NULL then the stream is checked to ensure
+* that it belongs to this context. Typically this parameter should be
+* null.
+* \param stream The stream
+* \param perThreadStream Flag to indicate if program is compiled for per-thread streams
+* \param streamId Returns a context-unique ID for the stream
+*
+* \retval CUPTI_SUCCESS
+* \retval CUPTI_ERROR_NOT_INITIALIZED
+* \retval CUPTI_ERROR_INVALID_STREAM if unable to get stream ID, or
+* if \p context is non-NULL and \p stream does not belong to the
+* context
+* \retval CUPTI_ERROR_INVALID_PARAMETER if \p streamId is NULL
+*/
+CUptiResult CUPTIAPI cuptiGetStreamIdEx(CUcontext context, CUstream stream, uint8_t perThreadStream, uint32_t *streamId);
+
+/**
+ * \brief Get the ID of a device
+ *
+ * If \p context is NULL, returns the ID of the device that contains
+ * the currently active context. If \p context is non-NULL, returns
+ * the ID of the device which contains that context. Operates in a
+ * similar manner to cudaGetDevice() or cuCtxGetDevice() but may be
+ * called from within callback functions.
+ *
+ * \param context The context, or NULL to indicate the current context.
+ * \param deviceId Returns the ID of the device that is current for
+ * the calling thread.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE if unable to get device ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p deviceId is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetDeviceId(CUcontext context, uint32_t *deviceId);
+
+/**
+ * \brief Get the unique ID of a graph node
+ *
+ * Returns the unique ID of the CUDA graph node.
+ *
+ * \param node The graph node.
+ * \param nodeId Returns the unique ID of the node
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p node is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetGraphNodeId(CUgraphNode node, uint64_t *nodeId);
+
+/**
+ * \brief Get the unique ID of graph
+ *
+ * Returns the unique ID of CUDA graph.
+ *
+ * \param graph The graph.
+ * \param pId Returns the unique ID of the graph
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p graph is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetGraphId(CUgraph graph, uint32_t *pId);
+
+/**
+ * \brief Get the unique ID of executable graph
+ *
+ * Returns the unique ID of executable CUDA graph.
+ *
+ * \param graphExec The executable graph.
+ * \param pId Returns the unique ID of the executable graph
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p graph is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetGraphExecId(CUgraphExec graphExec, uint32_t *pId);
+
+/**
+ * \brief Enable collection of a specific kind of activity record.
+ *
+ * Enable collection of a specific kind of activity record. Multiple
+ * kinds can be enabled by calling this function multiple times. By
+ * default all activity kinds are disabled for collection.
+ *
+ * \param kind The kind of activity record to collect
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the activity kind cannot be enabled
+ * \retval CUPTI_ERROR_INVALID_KIND if the activity kind is not supported
+ */
+CUptiResult CUPTIAPI cuptiActivityEnable(CUpti_ActivityKind kind);
+
+/**
+ * \brief Enable collection of a specific kind of activity record. For certain activity kinds
+ * it dumps existing records.
+ *
+ * In general, the behavior of this API is similar to the API \ref cuptiActivityEnable i.e. it
+ * enables the collection of a specific kind of activity record.
+ * Additionally, this API can help in dumping the records for activities which happened in
+ * the past before enabling the corresponding activity kind.
+ * The API allows to get records for the current resource allocations done in CUDA
+ * For CUPTI_ACTIVITY_KIND_DEVICE, existing device records are dumped
+ * For CUPTI_ACTIVITY_KIND_CONTEXT, existing context records are dumped
+ * For CUPTI_ACTIVITY_KIND_STREAM, existing stream records are dumped
+ * For CUPTI_ACTIVITY_KIND_ NVLINK, existing NVLINK records are dumped
+ * For CUPTI_ACTIVITY_KIND_PCIE, existing PCIE records are dumped
+ * For other activities, the behavior is similar to the API \ref cuptiActivityEnable
+ *
+ * Device records are emitted in CUPTI on CUDA driver initialization. Those records
+ * can only be retrieved by the user if CUPTI is attached before CUDA initialization.
+ * Context and stream records are emitted on context and stream creation.
+ * The use case of the API is to provide the records for CUDA resources
+ * (contexts/streams/devices) that are currently active if user late attaches CUPTI.
+ *
+ * Before calling this function, the user must register buffer callbacks
+ * to get the activity records by calling \ref cuptiActivityRegisterCallbacks.
+ * If the user does not register the buffers and calls API \ref cuptiActivityEnableAndDump,
+ * then CUPTI will enable the activity kind but not provide any records for that
+ * activity kind.
+ *
+ * \param kind The kind of activity record to collect
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_UNKNOWN if buffer is not initialized.
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the activity kind cannot be enabled
+ * \retval CUPTI_ERROR_INVALID_KIND if the activity kind is not supported
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableAndDump(CUpti_ActivityKind kind);
+
+/**
+ * \brief Disable collection of a specific kind of activity record.
+ *
+ * Disable collection of a specific kind of activity record. Multiple
+ * kinds can be disabled by calling this function multiple times. By
+ * default all activity kinds are disabled for collection.
+ *
+ * \param kind The kind of activity record to stop collecting
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_KIND if the activity kind is not supported
+ */
+CUptiResult CUPTIAPI cuptiActivityDisable(CUpti_ActivityKind kind);
+
+/**
+ * \brief Enable collection of a specific kind of activity record for
+ * a context.
+ *
+ * Enable collection of a specific kind of activity record for a
+ * context. This setting done by this API will supersede the global
+ * settings for activity records enabled by \ref cuptiActivityEnable.
+ * Multiple kinds can be enabled by calling this function multiple
+ * times.
+ *
+ * \param context The context for which activity is to be enabled
+ * \param kind The kind of activity record to collect
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the activity kind cannot be enabled
+ * \retval CUPTI_ERROR_INVALID_KIND if the activity kind is not supported
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableContext(CUcontext context, CUpti_ActivityKind kind);
+
+/**
+ * \brief Disable collection of a specific kind of activity record for
+ * a context.
+ *
+ * Disable collection of a specific kind of activity record for a context.
+ * This setting done by this API will supersede the global settings
+ * for activity records.
+ * Multiple kinds can be enabled by calling this function multiple times.
+ *
+ * \param context The context for which activity is to be disabled
+ * \param kind The kind of activity record to stop collecting
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_KIND if the activity kind is not supported
+ */
+CUptiResult CUPTIAPI cuptiActivityDisableContext(CUcontext context, CUpti_ActivityKind kind);
+
+/**
+ * \brief Get the number of activity records that were dropped of
+ * insufficient buffer space.
+ *
+ * Get the number of records that were dropped because of insufficient
+ * buffer space. The dropped count includes records that could not be
+ * recorded because CUPTI did not have activity buffer space available
+ * for the record (because the CUpti_BuffersCallbackRequestFunc
+ * callback did not return an empty buffer of sufficient size) and
+ * also CDP records that could not be record because the device-size
+ * buffer was full (size is controlled by the
+ * CUPTI_ACTIVITY_ATTR_DEVICE_BUFFER_SIZE_CDP attribute). The dropped
+ * count maintained for the queue is reset to zero when this function
+ * is called.
+ *
+ * \param context The context, or NULL to get dropped count from global queue
+ * \param streamId The stream ID
+ * \param dropped The number of records that were dropped since the last call
+ * to this function.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p dropped is NULL
+ */
+CUptiResult CUPTIAPI cuptiActivityGetNumDroppedRecords(CUcontext context, uint32_t streamId,
+ size_t *dropped);
+
+/**
+ * \brief Iterate over the activity records in a buffer.
+ *
+ * This is a helper function to iterate over the activity records in a
+ * buffer. A buffer of activity records is typically obtained by
+ * receiving a CUpti_BuffersCallbackCompleteFunc callback. Stop iterating
+ * the buffer when an error occurs.
+ *
+ * An example of typical usage:
+ * \code
+ * CUpti_Activity *record = NULL;
+ * CUptiResult status = CUPTI_SUCCESS;
+ * do {
+ * status = cuptiActivityGetNextRecord(buffer, validSize, &record);
+ * if(status == CUPTI_SUCCESS) {
+ * // Use record here...
+ * }
+ * else if (status == CUPTI_ERROR_MAX_LIMIT_REACHED)
+ * break;
+ * else if (status == CUPTI_ERROR_INVALID_KIND)
+ * break;
+ * else {
+ * goto Error;
+ * }
+ * } while (1);
+ * \endcode
+ *
+ * \param buffer The buffer containing activity records
+ * \param record Inputs the previous record returned by
+ * cuptiActivityGetNextRecord and returns the next activity record
+ * from the buffer. If input value is NULL, returns the first activity
+ * record in the buffer. Records of certain kinds like CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL
+ * may contain invalid (0) timestamps, indicating that no timing information could
+ * be collected for lack of device memory.
+ * \param validBufferSizeBytes The number of valid bytes in the buffer.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_MAX_LIMIT_REACHED if no more records in the buffer
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p buffer is NULL.
+ * \retval CUPTI_ERROR_INVALID_KIND if activity record is either incomplete or invalid
+ */
+CUptiResult CUPTIAPI cuptiActivityGetNextRecord(uint8_t* buffer, size_t validBufferSizeBytes,
+ CUpti_Activity **record);
+
+/**
+ * \brief Function type for callback used by CUPTI to request an empty
+ * buffer for storing activity records.
+ *
+ * This callback function signals the CUPTI client that an activity
+ * buffer is needed by CUPTI. The activity buffer is used by CUPTI to
+ * store activity records. The callback function can decline the
+ * request by setting \p *buffer to NULL. In this case CUPTI may drop
+ * activity records.
+ *
+ * \param buffer Returns the new buffer. If set to NULL then no buffer
+ * is returned.
+ * \param size Returns the size of the returned buffer.
+ * \param maxNumRecords Returns the maximum number of records that
+ * should be placed in the buffer. If 0 then the buffer is filled with
+ * as many records as possible. If > 0 the buffer is filled with at
+ * most that many records before it is returned.
+ */
+typedef void (CUPTIAPI *CUpti_BuffersCallbackRequestFunc)(
+ uint8_t **buffer,
+ size_t *size,
+ size_t *maxNumRecords);
+
+/**
+ * \brief Function type for callback used by CUPTI to return a buffer
+ * of activity records.
+ *
+ * This callback function returns to the CUPTI client a buffer
+ * containing activity records. The buffer contains \p validSize
+ * bytes of activity records which should be read using
+ * cuptiActivityGetNextRecord. The number of dropped records can be
+ * read using cuptiActivityGetNumDroppedRecords. After this call CUPTI
+ * relinquished ownership of the buffer and will not use it
+ * anymore. The client may return the buffer to CUPTI using the
+ * CUpti_BuffersCallbackRequestFunc callback.
+ * Note: CUDA 6.0 onwards, all buffers returned by this callback are
+ * global buffers i.e. there is no context/stream specific buffer.
+ * User needs to parse the global buffer to extract the context/stream
+ * specific activity records.
+ *
+ * \param context The context this buffer is associated with. If NULL, the
+ * buffer is associated with the global activities. This field is deprecated
+ * as of CUDA 6.0 and will always be NULL.
+ * \param streamId The stream id this buffer is associated with.
+ * This field is deprecated as of CUDA 6.0 and will always be NULL.
+ * \param buffer The activity record buffer.
+ * \param size The total size of the buffer in bytes as set in
+ * CUpti_BuffersCallbackRequestFunc.
+ * \param validSize The number of valid bytes in the buffer.
+ */
+typedef void (CUPTIAPI *CUpti_BuffersCallbackCompleteFunc)(
+ CUcontext context,
+ uint32_t streamId,
+ uint8_t *buffer,
+ size_t size,
+ size_t validSize);
+
+/**
+ * \brief Registers callback functions with CUPTI for activity buffer
+ * handling.
+ *
+ * This function registers two callback functions to be used in asynchronous
+ * buffer handling. If registered, activity record buffers are handled using
+ * asynchronous requested/completed callbacks from CUPTI.
+ *
+ * Registering these callbacks prevents the client from using CUPTI's
+ * blocking enqueue/dequeue functions.
+ *
+ * \param funcBufferRequested callback which is invoked when an empty
+ * buffer is requested by CUPTI
+ * \param funcBufferCompleted callback which is invoked when a buffer
+ * containing activity records is available from CUPTI
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if either \p
+ * funcBufferRequested or \p funcBufferCompleted is NULL
+ */
+CUptiResult CUPTIAPI cuptiActivityRegisterCallbacks(CUpti_BuffersCallbackRequestFunc funcBufferRequested,
+ CUpti_BuffersCallbackCompleteFunc funcBufferCompleted);
+
+/**
+ * \brief Wait for all activity records to be delivered via the
+ * completion callback.
+ *
+ * This function does not return until all activity records associated
+ * with the specified context/stream are returned to the CUPTI client
+ * using the callback registered in cuptiActivityRegisterCallbacks. To
+ * ensure that all activity records are complete, the requested
+ * stream(s), if any, are synchronized.
+ *
+ * If \p context is NULL, the global activity records (i.e. those not
+ * associated with a particular stream) are flushed (in this case no
+ * streams are synchronized). If \p context is a valid CUcontext and
+ * \p streamId is 0, the buffers of all streams of this context are
+ * flushed. Otherwise, the buffers of the specified stream in this
+ * context is flushed.
+ *
+ * Before calling this function, the buffer handling callback api
+ * must be activated by calling cuptiActivityRegisterCallbacks.
+ *
+ * \param context A valid CUcontext or NULL.
+ * \param streamId The stream ID.
+ * \param flag The flag can be set to indicate a forced flush. See CUpti_ActivityFlag
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_CUPTI_ERROR_INVALID_OPERATION if not preceded
+ * by a successful call to cuptiActivityRegisterCallbacks
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred
+ *
+ * **DEPRECATED** This method is deprecated
+ * CONTEXT and STREAMID will be ignored. Use cuptiActivityFlushAll
+ * to flush all data.
+ */
+CUptiResult CUPTIAPI cuptiActivityFlush(CUcontext context, uint32_t streamId, uint32_t flag);
+
+/**
+ * \brief Request to deliver activity records via the buffer completion callback.
+ *
+ * This function returns the activity records associated with all contexts/streams
+ * (and the global buffers not associated with any stream) to the CUPTI client
+ * using the callback registered in cuptiActivityRegisterCallbacks.
+ *
+ * This is a blocking call but it doesn't issue any CUDA synchronization calls
+ * implicitly thus it's not guaranteed that all activities are completed on the
+ * underlying devices. Activity record is considered as completed if it has all
+ * the information filled up including the timestamps if any. It is the client's
+ * responsibility to issue necessary CUDA synchronization calls before calling
+ * this function if all activity records with complete information are expected
+ * to be delivered.
+ *
+ * Behavior of the function based on the input flag:
+ * (-) ::For default flush i.e. when flag is set as 0, it returns all the
+ * activity buffers which have all the activity records completed, buffers need not
+ * to be full though. It doesn't return buffers which have one or more incomplete
+ * records. Default flush can be done at a regular interval in a separate thread.
+ * (-) ::For forced flush i.e. when flag CUPTI_ACTIVITY_FLAG_FLUSH_FORCED is passed
+ * to the function, it returns all the activity buffers including the ones which have
+ * one or more incomplete activity records. It's suggested for clients to do the
+ * force flush before the termination of the profiling session to allow remaining
+ * buffers to be delivered. In general, it can be done in the at-exit handler.
+ *
+ * Before calling this function, the buffer handling callback api must be activated
+ * by calling cuptiActivityRegisterCallbacks.
+ *
+ * \param flag The flag can be set to indicate a forced flush. See CUpti_ActivityFlag
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_OPERATION if not preceded by a
+ * successful call to cuptiActivityRegisterCallbacks
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred
+ *
+ * \see cuptiActivityFlushPeriod
+ */
+CUptiResult CUPTIAPI cuptiActivityFlushAll(uint32_t flag);
+
+/**
+ * \brief Read an activity API attribute.
+ *
+ * Read an activity API attribute and return it in \p *value.
+ *
+ * \param attr The attribute to read
+ * \param valueSize Size of buffer pointed by the value, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the value of the attribute
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value is NULL, or
+ * if \p attr is not an activity attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
+ * the \p value buffer is too small to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiActivityGetAttribute(CUpti_ActivityAttribute attr,
+ size_t *valueSize, void* value);
+
+/**
+ * \brief Write an activity API attribute.
+ *
+ * Write an activity API attribute.
+ *
+ * \param attr The attribute to write
+ * \param valueSize The size, in bytes, of the value
+ * \param value The attribute value to write
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value is NULL, or
+ * if \p attr is not an activity attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
+ * the \p value buffer is too small to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiActivitySetAttribute(CUpti_ActivityAttribute attr,
+ size_t *valueSize, void* value);
+
+
+/**
+ * \brief Set Unified Memory Counter configuration.
+ *
+ * Set the configuration before enabling the corresponding activity kind
+ * CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER.
+ * The API should be called after CUDA driver initialization.
+ *
+ * \param config A pointer to \ref CUpti_ActivityUnifiedMemoryCounterConfig structures
+ * containing Unified Memory counter configuration.
+ * \param count Number of Unified Memory counter configuration structures
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p config is NULL or
+ * any parameter in the \p config structures is not a valid value
+ * \retval CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED One potential reason is that
+ * platform (OS/arch) does not support the unified memory counters
+ * \retval CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_DEVICE Indicates that the device
+ * does not support the unified memory counters
+ * \retval CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_NON_P2P_DEVICES Indicates that
+ * multi-GPU configuration without P2P support between any pair of devices
+ * does not support the unified memory counters
+ */
+CUptiResult CUPTIAPI cuptiActivityConfigureUnifiedMemoryCounter(CUpti_ActivityUnifiedMemoryCounterConfig *config, uint32_t count);
+
+/**
+ * \brief Get auto boost state
+ *
+ * The profiling results can be inconsistent in case auto boost is enabled.
+ * CUPTI tries to disable auto boost while profiling. It can fail to disable in
+ * cases where user does not have the permissions or CUDA_AUTO_BOOST env
+ * variable is set. The function can be used to query whether auto boost is
+ * enabled.
+ *
+ * \param context A valid CUcontext.
+ * \param state A pointer to \ref CUpti_ActivityAutoBoostState structure which
+ * contains the current state and the id of the process that has requested the
+ * current state
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p CUcontext or \p state is NULL
+ * \retval CUPTI_ERROR_NOT_SUPPORTED Indicates that the device does not support auto boost
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred
+ */
+CUptiResult CUPTIAPI cuptiGetAutoBoostState(CUcontext context, CUpti_ActivityAutoBoostState *state);
+
+/**
+ * \brief Set PC sampling configuration.
+ *
+ * For Pascal and older GPU architectures this API must be called before enabling
+ * activity kind CUPTI_ACTIVITY_KIND_PC_SAMPLING. There is no such requirement
+ * for Volta and newer GPU architectures.
+ *
+ * For Volta and newer GPU architectures if this API is called in the middle of
+ * execution, PC sampling configuration will be updated for subsequent kernel launches.
+ *
+ * \param ctx The context
+ * \param config A pointer to \ref CUpti_ActivityPCSamplingConfig structure
+ * containing PC sampling configuration.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this api is called while
+ * some valid event collection method is set.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p config is NULL or
+ * any parameter in the \p config structures is not a valid value
+ * \retval CUPTI_ERROR_NOT_SUPPORTED Indicates that the system/device
+ * does not support the unified memory counters
+ */
+CUptiResult CUPTIAPI cuptiActivityConfigurePCSampling(CUcontext ctx, CUpti_ActivityPCSamplingConfig *config);
+
+/**
+ * \brief Returns the last error from a cupti call or callback
+ *
+ * Returns the last error that has been produced by any of the cupti api calls
+ * or the callback in the same host thread and resets it to CUPTI_SUCCESS.
+ */
+CUptiResult CUPTIAPI cuptiGetLastError(void);
+
+/**
+ * \brief Set the thread-id type
+ *
+ * CUPTI uses the method corresponding to set type to generate the thread-id.
+ * See enum \ref CUpti_ActivityThreadIdType for the list of methods.
+ * Activity records having thread-id field contain the same value.
+ * Thread id type must not be changed during the profiling session to
+ * avoid thread-id value mismatch across activity records.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_SUPPORTED if \p type is not supported on the platform
+ */
+CUptiResult CUPTIAPI cuptiSetThreadIdType(CUpti_ActivityThreadIdType type);
+
+/**
+ * \brief Get the thread-id type
+ *
+ * Returns the thread-id type used in CUPTI
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p type is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetThreadIdType(CUpti_ActivityThreadIdType *type);
+
+/**
+* \brief Check support for a compute capability
+*
+* This function is used to check the support for a device based on
+* it's compute capability. It sets the \p support when the compute
+* capability is supported by the current version of CUPTI, and clears
+* it otherwise. This version of CUPTI might not support all GPUs sharing
+* the same compute capability. It is suggested to use API \ref
+* cuptiDeviceSupported which provides correct information.
+*
+* \param major The major revision number of the compute capability
+* \param minor The minor revision number of the compute capability
+* \param support Pointer to an integer to return the support status
+*
+* \retval CUPTI_SUCCESS
+* \retval CUPTI_ERROR_INVALID_PARAMETER if \p support is NULL
+*
+* \sa ::cuptiDeviceSupported
+*/
+CUptiResult CUPTIAPI cuptiComputeCapabilitySupported(int major, int minor, int *support);
+
+/**
+* \brief Check support for a compute device
+*
+* This function is used to check the support for a compute device.
+* It sets the \p support when the device is supported by the current
+* version of CUPTI, and clears it otherwise.
+*
+* \param dev The device handle returned by CUDA Driver API cuDeviceGet
+* \param support Pointer to an integer to return the support status
+*
+* \retval CUPTI_SUCCESS
+* \retval CUPTI_ERROR_INVALID_PARAMETER if \p support is NULL
+* \retval CUPTI_ERROR_INVALID_DEVICE if \p dev is not a valid device
+*
+* \sa ::cuptiComputeCapabilitySupported
+*/
+CUptiResult CUPTIAPI cuptiDeviceSupported(CUdevice dev, int *support);
+
+/**
+ * This indicates the virtualization mode in which CUDA device is running
+ */
+typedef enum {
+ /**
+ * No virtualization mode is associated with the device
+ * i.e. it's a baremetal GPU
+ */
+ CUPTI_DEVICE_VIRTUALIZATION_MODE_NONE = 0,
+ /**
+ * The device is associated with the pass-through GPU.
+ * In this mode, an entire physical GPU is directly assigned
+ * to one virtual machine (VM).
+ */
+ CUPTI_DEVICE_VIRTUALIZATION_MODE_PASS_THROUGH = 1,
+ /**
+ * The device is associated with the virtual GPU (vGPU).
+ * In this mode multiple virtual machines (VMs) have simultaneous,
+ * direct access to a single physical GPU.
+ */
+ CUPTI_DEVICE_VIRTUALIZATION_MODE_VIRTUAL_GPU = 2,
+
+ CUPTI_DEVICE_VIRTUALIZATION_MODE_FORCE_INT = 0x7fffffff
+} CUpti_DeviceVirtualizationMode;
+
+/**
+ * \brief Query the virtualization mode of the device
+ *
+ * This function is used to query the virtualization mode of the CUDA device.
+ *
+ * \param dev The device handle returned by CUDA Driver API cuDeviceGet
+ * \param mode Pointer to an CUpti_DeviceVirtualizationMode to return the virtualization mode
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_DEVICE if \p dev is not a valid device
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p mode is NULL
+ *
+ */
+CUptiResult CUPTIAPI cuptiDeviceVirtualizationMode(CUdevice dev, CUpti_DeviceVirtualizationMode *mode);
+
+/**
+ * \brief Detach CUPTI from the running process
+ *
+ * This API detaches the CUPTI from the running process. It destroys and cleans up all the
+ * resources associated with CUPTI in the current process. After CUPTI detaches from the process,
+ * the process will keep on running with no CUPTI attached to it.
+ * For safe operation of the API, it is recommended this API is invoked from the exit callsite
+ * of any of the CUDA Driver or Runtime API. Otherwise CUPTI client needs to make sure that
+ * required CUDA synchronization and CUPTI activity buffer flush is done before calling the API.
+ * Sample code showing the usage of the API in the cupti callback handler code:
+ * \code
+ void CUPTIAPI
+ cuptiCallbackHandler(void *userdata, CUpti_CallbackDomain domain,
+ CUpti_CallbackId cbid, void *cbdata)
+ {
+ const CUpti_CallbackData *cbInfo = (CUpti_CallbackData *)cbdata;
+
+ // Take this code path when CUPTI detach is requested
+ if (detachCupti) {
+ switch(domain)
+ {
+ case CUPTI_CB_DOMAIN_RUNTIME_API:
+ case CUPTI_CB_DOMAIN_DRIVER_API:
+ if (cbInfo->callbackSite == CUPTI_API_EXIT) {
+ // call the CUPTI detach API
+ cuptiFinalize();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ \endcode
+ */
+CUptiResult CUPTIAPI cuptiFinalize(void);
+
+/**
+ * \brief Push an external correlation id for the calling thread
+ *
+ * This function notifies CUPTI that the calling thread is entering an external API region.
+ * When a CUPTI activity API record is created while within an external API region and
+ * CUPTI_ACTIVITY_KIND_EXTERNAL_CORRELATION is enabled, the activity API record will
+ * be preceded by a CUpti_ActivityExternalCorrelation record for each \ref CUpti_ExternalCorrelationKind.
+ *
+ * \param kind The kind of external API activities should be correlated with.
+ * \param id External correlation id.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER The external API kind is invalid
+ */
+CUptiResult CUPTIAPI cuptiActivityPushExternalCorrelationId(CUpti_ExternalCorrelationKind kind, uint64_t id);
+
+/**
+ * \brief Pop an external correlation id for the calling thread
+ *
+ * This function notifies CUPTI that the calling thread is leaving an external API region.
+ *
+ * \param kind The kind of external API activities should be correlated with.
+ * \param lastId If the function returns successful, contains the last external correlation id for this \p kind, can be NULL.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER The external API kind is invalid.
+ * \retval CUPTI_ERROR_QUEUE_EMPTY No external id is currently associated with \p kind.
+ */
+CUptiResult CUPTIAPI cuptiActivityPopExternalCorrelationId(CUpti_ExternalCorrelationKind kind, uint64_t *lastId);
+
+/**
+ * \brief Controls the collection of queued and submitted timestamps for kernels.
+ *
+ * This API is used to control the collection of queued and submitted timestamps
+ * for kernels whose records are provided through the struct \ref CUpti_ActivityKernel9.
+ * Default value is 0, i.e. these timestamps are not collected. This API needs
+ * to be called before initialization of CUDA and this setting should not be
+ * changed during the profiling session.
+ *
+ * This API is not supported if the HW trace is enabled through the API \ref cuptiActivityEnableHWTrace.
+ * \param enable is a boolean, denoting whether these timestamps should be
+ * collected
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableLatencyTimestamps(uint8_t enable);
+
+/**
+ * \brief Sets the flush period for the worker thread
+ *
+ * CUPTI creates a worker thread to minimize the perturbance for the application created
+ * threads. CUPTI offloads certain operations from the application threads to the worker
+ * thread, this includes synchronization of profiling resources between host and device,
+ * delivery of the activity buffers to the client using the callback registered in
+ * cuptiActivityRegisterCallbacks. For performance reasons, CUPTI wakes up the worker
+ * thread based on certain heuristics.
+ *
+ * This API is used to control the flush period of the worker thread. This setting will
+ * override the CUPTI heuristics. Setting time to zero disables the periodic flush and
+ * restores the default behavior.
+ *
+ * Periodic flush can return only those activity buffers which are full and have all the
+ * activity records completed.
+ *
+ * It's allowed to use the API \ref cuptiActivityFlushAll to flush the data on-demand, even
+ * when client sets the periodic flush.
+ *
+ * \param time flush period in milliseconds (ms)
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ *
+ * \see cuptiActivityFlushAll
+ */
+CUptiResult CUPTIAPI cuptiActivityFlushPeriod(uint32_t time);
+
+/**
+ * \brief Controls the collection of launch attributes for kernels.
+ *
+ * This API is used to control the collection of launch attributes for kernels whose
+ * records are provided through the struct \ref CUpti_ActivityKernel9.
+ * Default value is 0, i.e. these attributes are not collected.
+ *
+ * \param enable is a boolean denoting whether these launch attributes should be collected
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableLaunchAttributes(uint8_t enable);
+
+/**
+ * \brief Function type for callback used by CUPTI to request a timestamp
+ * to be used in activity records.
+ *
+ * This callback function signals the CUPTI client that a timestamp needs
+ * to be returned. This timestamp would be treated as normalized timestamp
+ * to be used for various purposes in CUPTI. For example to store start and
+ * end timestamps reported in the CUPTI activity records.
+ * The returned timestamp must be in nanoseconds.
+ *
+ * \sa ::cuptiActivityRegisterTimestampCallback
+ */
+typedef uint64_t (CUPTIAPI *CUpti_TimestampCallbackFunc)(void);
+
+/**
+ * \brief Registers callback function with CUPTI for providing timestamp.
+ *
+ * This function registers a callback function to obtain timestamp of user's
+ * choice instead of using CUPTI provided timestamp.
+ * By default CUPTI uses different methods, based on the underlying platform,
+ * to retrieve the timestamp
+ * Linux and Android use clock_gettime(CLOCK_REALTIME, ..)
+ * Windows uses QueryPerformanceCounter()
+ * QNX uses ClockCycles()
+ * Timestamps retrieved using these methods are converted to nanosecond if needed
+ * before usage.
+ *
+ * Timestamps for GPU activities such as kernels, memory copies and memset operations are
+ * recorded directly on the GPU. To provide a unified and normalized view of these timestamps
+ * in relation to CPU time, CUPTI performs a linear interpolation to convert GPU timestamps
+ * into CPU timestamps during post-processing.
+ * For activities where timestamps are captured on the GPU, the timestamp callback is invoked
+ * during the post-processing phase, while converting GPU timestamps into CPU timestamps.
+ * For activities for which timestamps are captured directly on the CPU, the timestamp callback
+ * is invoked immediately at the time of the activity.
+ *
+ * The registration of timestamp callback should be done before any of the CUPTI
+ * activity kinds are enabled to make sure that all the records report the timestamp using
+ * the callback function registered through cuptiActivityRegisterTimestampCallback API.
+ *
+ * Changing the timestamp callback function in CUPTI through
+ * cuptiActivityRegisterTimestampCallback API in the middle of the profiling
+ * session can cause records generated prior to the change to report
+ * timestamps through previous timestamp method.
+ *
+ * \param funcTimestamp callback which is invoked when a timestamp is
+ * needed by CUPTI
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p funcTimestamp is NULL
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityRegisterTimestampCallback(CUpti_TimestampCallbackFunc funcTimestamp);
+
+/**
+ * \brief Controls the collection of records for device launched graphs.
+ *
+ * This API is used to control the collection of records for device launched graphs.
+ * Default value is 0, i.e. these records are not collected. This API needs
+ * to be called before initialization of CUDA and this setting should not be
+ * changed during the profiling session.
+ *
+ * \param enable is a boolean, denoting whether these records should be
+ * collected
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableDeviceGraph(uint8_t enable);
+
+/**
+ * \brief Controls the collection of activity records for specific CUDA Driver APIs.
+ *
+ * Activity kind CUPTI_ACTIVITY_KIND_DRIVER controls the collection of either all
+ * CUDA Driver APIs or none. API cuptiActivityEnableDriverApi can be used for fine-grained
+ * control, it allows enabling/disabling tracing of a specific set of CUDA Driver APIs.
+ * To disable collection of a small set of CUDA Driver APIs, user can
+ * first enable the collection of all Driver APIs using the activity kind
+ * CUPTI_ACTIVITY_KIND_DRIVER and call this API to disable specific Driver APIs.
+ * And to enable the collection of a small set of CUDA Driver APIs, user can
+ * call this API without using the activity kind CUPTI_ACTIVITY_KIND_DRIVER.
+ *
+ * Note: Activity kind CUPTI_ACTIVITY_KIND_DRIVER overrides the settings done by this API
+ * if it is called after the API.
+ *
+ * \param cbid callback id of the CUDA Driver API. This can be found in the header cupti_driver_cbid.h.
+ * \param enable is a boolean, denoting whether to enable or disable the collection
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableDriverApi(CUpti_CallbackId cbid, uint8_t enable);
+
+/**
+ * \brief Controls the collection of activity records for specific CUDA Runtime APIs.
+ *
+ * Activity kind CUPTI_ACTIVITY_KIND_RUNTIME controls the collection of either all
+ * CUDA Runtime APIs or none. API cuptiActivityEnableRuntimeApi can be used for fine-grained
+ * control, it allows enabling/disabling tracing of a specific set of CUDA Runtime APIs.
+ * To disable collection of a small set of CUDA Runtime APIs, user can
+ * first enable the collection of all Runtime APIs using the activity kind
+ * CUPTI_ACTIVITY_KIND_RUNTIME and call this API to disable specific Runtime APIs.
+ * And to enable the collection of a small set of CUDA Runtime APIs, user can
+ * call this API without using the activity kind CUPTI_ACTIVITY_KIND_RUNTIME.
+ *
+ * Note: Activity kind CUPTI_ACTIVITY_KIND_RUNTIME overrides the settings done by this API
+ * if it is called after the API.
+ *
+ * \param cbid callback id of the CUDA Runtime API. This can be found in the header cupti_runtime_cbid.h.
+ * \param enable is a boolean, denoting whether to enable or disable the collection
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableRuntimeApi(CUpti_CallbackId cbid, uint8_t enable);
+
+/**
+ * \brief Enables the collection of CUDA kernel timestamps through HW events.
+ *
+ * This API enables the collection of CUDA kernel timestamps through HW events instead
+ * of the traditional SW instrumentation and semaphore based approach.
+ * This option is only available on Blackwell architecture.
+ * This API should be called after driver is initialized.
+ *
+ * \param enable is a boolean, denoting whether to enable or disable the collection through HW events
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if CUPTI is not initialized or the CUDA driver is not initialized
+ * \retval CUPTI_ERROR_NOT_SUPPORTED if HW trace cannot be enabled on the current platform
+ * \retval CUPTI_ERROR_VIRTUALIZED_DEVICE_NOT_SUPPORTED
+ * \retval CUPTI_ERROR_CONFIDENTIAL_COMPUTING_NOT_SUPPORTED
+ * \retval CUPTI_ERROR_CMP_DEVICE_NOT_SUPPORTED
+ * \retval CUPTI_ERROR_MIG_DEVICE_NOT_SUPPORTED
+ * \retval CUPTI_ERROR_SLI_DEVICE_NOT_SUPPORTED
+ * \retval CUPTI_ERROR_WSL_DEVICE_NOT_SUPPORTED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableHWTrace(uint8_t enable);
+
+
+/**
+ * \brief Enables tracking the source library for memory allocation requests.
+ *
+ * This API is used to control whether or not we track the source library of
+ * memory allocation requests. Default value is 0, i.e. it is not tracked. The
+ * activity kind CUPTI_ACTIVITY_KIND_MEMORY2 needs to be enabled, and if this flag is
+ * set, we get the full path of the shared object responsible for the GPU memory allocation
+ * request in the member source in the CUpti_ActivityMemory4 records. Also note that this feature
+ * adds runtime overhead.
+ *
+ * \param enable is a boolean, denoting whether the source library of the memory allocation
+ * request needs to be tracked
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+*/
+CUptiResult CUPTIAPI cuptiActivityEnableAllocationSource (uint8_t enable);
+
+/**
+ * \brief Enables collecting records for all synchronization operations.
+ *
+ * CUPTI provides CUDA event query and stream query records via CUPTI_ACTIVTIY_KIND_SYNCHRONIZATION.
+ * Using this API, CUPTI client can enable to record all CUDA event query and stream query records
+ * even if the event has not yet been completed and all operations on stream have not yet been completed
+ * respectively.
+ *
+ * By default, the record is only generated if all captured work has been completed for the CUDA event.
+ * By default, the record is only generated if all operations have been completed on the stream.
+ *
+ * \param enable is a boolean, denoting whether to enable or disable the collection of all CUDA event query
+ * and stream query records
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ */
+CUptiResult CUPTIAPI cuptiActivityEnableAllSyncRecords(uint8_t enable);
+
+/** @} */ /* END CUPTI_ACTIVITY_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+// Including deprecated structures of CUPTI_ACTIVITY_API
+#include "cupti_activity_deprecated.h"
+
+#endif /*_CUPTI_ACTIVITY_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity_deprecated.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity_deprecated.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9d725499ffa13ac7de864719abee2baa88d6c13
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_activity_deprecated.h
@@ -0,0 +1,5335 @@
+/*
+ * Copyright 2011-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_ACTIVITY_DEPRECATED_H_)
+#define _CUPTI_ACTIVITY_DEPRECATED_H_
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \brief The kinds of activity records.
+ *
+ * Each activity record kind represents information about a GPU or an
+ * activity occurring on a CPU or GPU. Each kind is associated with a
+ * activity record structure that holds the information associated
+ * with the kind.
+ * \see CUpti_ActivityOverhead
+ * \see CUpti_ActivityOverhead2
+ * \see CUpti_ActivityDevice
+ * \see CUpti_ActivityDevice2
+ * \see CUpti_ActivityDevice3
+ * \see CUpti_ActivityDevice4
+ * \see CUpti_ActivityKernel
+ * \see CUpti_ActivityKernel2
+ * \see CUpti_ActivityKernel3
+ * \see CUpti_ActivityKernel4
+ * \see CUpti_ActivityKernel5
+ * \see CUpti_ActivityKernel6
+ * \see CUpti_ActivityKernel7
+ * \see CUpti_ActivityKernel8
+ * \see CUpti_ActivityMemcpy
+ * \see CUpti_ActivityMemcpy3
+ * \see CUpti_ActivityMemcpy4
+ * \see CUpti_ActivityMemcpyPtoP
+ * \see CUpti_ActivityMemcpyPtoP2
+ * \see CUpti_ActivityMemcpyPtoP3
+ * \see CUpti_ActivityMemset
+ * \see CUpti_ActivityMemset2
+ * \see CUpti_ActivityMemset3
+ * \see CUpti_ActivityMemory2
+ * \see CUpti_ActivityMemory3
+ * \see CUpti_ActivityMemoryPool
+ * \see CUpti_ActivityMarker
+ * \see CUpti_ActivityGlobalAccess
+ * \see CUpti_ActivityGlobalAccess2
+ * \see CUpti_ActivityBranch
+ * \see CUpti_ActivityPCSampling
+ * \see CUpti_ActivityPCSampling2
+ * \see CUpti_ActivityUnifiedMemoryCounter
+ * \see CUpti_ActivityUnifiedMemoryCounter2
+ * \see CUpti_ActivityNvLink
+ * \see CUpti_ActivityNvLink2
+ * \see CUpti_ActivityNvLink3
+ */
+
+/**
+ * \brief The activity record for CUPTI and driver overheads.
+ * (Deprecated in CUDA 12.2)
+ *
+ * This activity record provides CUPTI and driver overhead information
+ * (CUPTI_ACTIVITY_OVERHEAD). These records are now reported using
+ * CUpti_ActivityOverhead3
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_OVERHEAD.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of overhead, CUPTI, DRIVER, COMPILER etc.
+ */
+ CUpti_ActivityOverheadKind overheadKind;
+
+ /**
+ * The kind of activity object that the overhead is associated with.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object. 'objectKind' indicates
+ * which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+ /**
+ * The start timestamp for the overhead, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the overhead.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the overhead, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the overhead.
+ */
+ uint64_t end;
+} CUpti_ActivityOverhead;
+
+/**
+ * \brief The activity record for CUPTI and driver overheads.
+ *
+ * This activity record provides CUPTI and driver overhead information
+ * (CUPTI_ACTIVITY_OVERHEAD).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_OVERHEAD.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of overhead, CUPTI, DRIVER, COMPILER etc.
+ */
+ CUpti_ActivityOverheadKind overheadKind;
+
+ /**
+ * The kind of activity object that the overhead is associated with.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object. 'objectKind' indicates
+ * which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+ /**
+ * The start timestamp for the overhead, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the overhead.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the overhead, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the overhead.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the overhead operation to which
+ * records belong to. This ID is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the overhead operation.
+ * In some cases, it can be zero, such as for CUPTI_ACTIVITY_OVERHEAD_CUPTI_BUFFER_FLUSH records.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Reserved for internal use.
+ */
+ uint32_t reserved0;
+} CUpti_ActivityOverhead2;
+
+/**
+ * \brief The activity record for a device. (deprecated)
+ *
+ * This activity record represents information about a GPU device
+ * (CUPTI_ACTIVITY_KIND_DEVICE).
+ * Device activity is now reported using the
+ * CUpti_ActivityDevice5 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The global memory bandwidth available on the device, in
+ * kBytes/sec.
+ */
+ uint64_t globalMemoryBandwidth;
+
+ /**
+ * The amount of global memory on the device, in bytes.
+ */
+ uint64_t globalMemorySize;
+
+ /**
+ * The amount of constant memory on the device, in bytes.
+ */
+ uint32_t constantMemorySize;
+
+ /**
+ * The size of the L2 cache on the device, in bytes.
+ */
+ uint32_t l2CacheSize;
+
+ /**
+ * The number of threads per warp on the device.
+ */
+ uint32_t numThreadsPerWarp;
+
+ /**
+ * The core clock rate of the device, in kHz.
+ */
+ uint32_t coreClockRate;
+
+ /**
+ * Number of memory copy engines on the device.
+ */
+ uint32_t numMemcpyEngines;
+
+ /**
+ * Number of multiprocessors on the device.
+ */
+ uint32_t numMultiprocessors;
+
+ /**
+ * The maximum "instructions per cycle" possible on each device
+ * multiprocessor.
+ */
+ uint32_t maxIPC;
+
+ /**
+ * Maximum number of warps that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxWarpsPerMultiprocessor;
+
+ /**
+ * Maximum number of blocks that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxBlocksPerMultiprocessor;
+
+ /**
+ * Maximum number of registers that can be allocated to a block.
+ */
+ uint32_t maxRegistersPerBlock;
+
+ /**
+ * Maximum amount of shared memory that can be assigned to a block,
+ * in bytes.
+ */
+ uint32_t maxSharedMemoryPerBlock;
+
+ /**
+ * Maximum number of threads allowed in a block.
+ */
+ uint32_t maxThreadsPerBlock;
+
+ /**
+ * Maximum allowed X dimension for a block.
+ */
+ uint32_t maxBlockDimX;
+
+ /**
+ * Maximum allowed Y dimension for a block.
+ */
+ uint32_t maxBlockDimY;
+
+ /**
+ * Maximum allowed Z dimension for a block.
+ */
+ uint32_t maxBlockDimZ;
+
+ /**
+ * Maximum allowed X dimension for a grid.
+ */
+ uint32_t maxGridDimX;
+
+ /**
+ * Maximum allowed Y dimension for a grid.
+ */
+ uint32_t maxGridDimY;
+
+ /**
+ * Maximum allowed Z dimension for a grid.
+ */
+ uint32_t maxGridDimZ;
+
+ /**
+ * Compute capability for the device, major number.
+ */
+ uint32_t computeCapabilityMajor;
+
+ /**
+ * Compute capability for the device, minor number.
+ */
+ uint32_t computeCapabilityMinor;
+
+ /**
+ * The device ID.
+ */
+ uint32_t id;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The device name. This name is shared across all activity records
+ * representing instances of the device, and so should not be
+ * modified.
+ */
+ const char *name;
+} CUpti_ActivityDevice;
+
+/**
+ * \brief The activity record for a device. (deprecated)
+ *
+ * This activity record represents information about a GPU device
+ * (CUPTI_ACTIVITY_KIND_DEVICE).
+ * Device activity is now reported using the
+ * CUpti_ActivityDevice5 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The global memory bandwidth available on the device, in
+ * kBytes/sec.
+ */
+ uint64_t globalMemoryBandwidth;
+
+ /**
+ * The amount of global memory on the device, in bytes.
+ */
+ uint64_t globalMemorySize;
+
+ /**
+ * The amount of constant memory on the device, in bytes.
+ */
+ uint32_t constantMemorySize;
+
+ /**
+ * The size of the L2 cache on the device, in bytes.
+ */
+ uint32_t l2CacheSize;
+
+ /**
+ * The number of threads per warp on the device.
+ */
+ uint32_t numThreadsPerWarp;
+
+ /**
+ * The core clock rate of the device, in kHz.
+ */
+ uint32_t coreClockRate;
+
+ /**
+ * Number of memory copy engines on the device.
+ */
+ uint32_t numMemcpyEngines;
+
+ /**
+ * Number of multiprocessors on the device.
+ */
+ uint32_t numMultiprocessors;
+
+ /**
+ * The maximum "instructions per cycle" possible on each device
+ * multiprocessor.
+ */
+ uint32_t maxIPC;
+
+ /**
+ * Maximum number of warps that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxWarpsPerMultiprocessor;
+
+ /**
+ * Maximum number of blocks that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxBlocksPerMultiprocessor;
+
+ /**
+ * Maximum amount of shared memory available per multiprocessor, in bytes.
+ */
+ uint32_t maxSharedMemoryPerMultiprocessor;
+
+ /**
+ * Maximum number of 32-bit registers available per multiprocessor.
+ */
+ uint32_t maxRegistersPerMultiprocessor;
+
+ /**
+ * Maximum number of registers that can be allocated to a block.
+ */
+ uint32_t maxRegistersPerBlock;
+
+ /**
+ * Maximum amount of shared memory that can be assigned to a block,
+ * in bytes.
+ */
+ uint32_t maxSharedMemoryPerBlock;
+
+ /**
+ * Maximum number of threads allowed in a block.
+ */
+ uint32_t maxThreadsPerBlock;
+
+ /**
+ * Maximum allowed X dimension for a block.
+ */
+ uint32_t maxBlockDimX;
+
+ /**
+ * Maximum allowed Y dimension for a block.
+ */
+ uint32_t maxBlockDimY;
+
+ /**
+ * Maximum allowed Z dimension for a block.
+ */
+ uint32_t maxBlockDimZ;
+
+ /**
+ * Maximum allowed X dimension for a grid.
+ */
+ uint32_t maxGridDimX;
+
+ /**
+ * Maximum allowed Y dimension for a grid.
+ */
+ uint32_t maxGridDimY;
+
+ /**
+ * Maximum allowed Z dimension for a grid.
+ */
+ uint32_t maxGridDimZ;
+
+ /**
+ * Compute capability for the device, major number.
+ */
+ uint32_t computeCapabilityMajor;
+
+ /**
+ * Compute capability for the device, minor number.
+ */
+ uint32_t computeCapabilityMinor;
+
+ /**
+ * The device ID.
+ */
+ uint32_t id;
+
+ /**
+ * ECC enabled flag for device
+ */
+ uint32_t eccEnabled;
+
+ /**
+ * The device UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid uuid;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The device name. This name is shared across all activity records
+ * representing instances of the device, and so should not be
+ * modified.
+ */
+ const char *name;
+} CUpti_ActivityDevice2;
+
+/**
+ * \brief The activity record for a device. (CUDA 7.0 onwards)
+ *
+ * This activity record represents information about a GPU device
+ * (CUPTI_ACTIVITY_KIND_DEVICE).
+ * Device activity is now reported using the
+ * CUpti_ActivityDevice5 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The global memory bandwidth available on the device, in
+ * kBytes/sec.
+ */
+ uint64_t globalMemoryBandwidth;
+
+ /**
+ * The amount of global memory on the device, in bytes.
+ */
+ uint64_t globalMemorySize;
+
+ /**
+ * The amount of constant memory on the device, in bytes.
+ */
+ uint32_t constantMemorySize;
+
+ /**
+ * The size of the L2 cache on the device, in bytes.
+ */
+ uint32_t l2CacheSize;
+
+ /**
+ * The number of threads per warp on the device.
+ */
+ uint32_t numThreadsPerWarp;
+
+ /**
+ * The core clock rate of the device, in kHz.
+ */
+ uint32_t coreClockRate;
+
+ /**
+ * Number of memory copy engines on the device.
+ */
+ uint32_t numMemcpyEngines;
+
+ /**
+ * Number of multiprocessors on the device.
+ */
+ uint32_t numMultiprocessors;
+
+ /**
+ * The maximum "instructions per cycle" possible on each device
+ * multiprocessor.
+ */
+ uint32_t maxIPC;
+
+ /**
+ * Maximum number of warps that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxWarpsPerMultiprocessor;
+
+ /**
+ * Maximum number of blocks that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxBlocksPerMultiprocessor;
+
+ /**
+ * Maximum amount of shared memory available per multiprocessor, in bytes.
+ */
+ uint32_t maxSharedMemoryPerMultiprocessor;
+
+ /**
+ * Maximum number of 32-bit registers available per multiprocessor.
+ */
+ uint32_t maxRegistersPerMultiprocessor;
+
+ /**
+ * Maximum number of registers that can be allocated to a block.
+ */
+ uint32_t maxRegistersPerBlock;
+
+ /**
+ * Maximum amount of shared memory that can be assigned to a block,
+ * in bytes.
+ */
+ uint32_t maxSharedMemoryPerBlock;
+
+ /**
+ * Maximum number of threads allowed in a block.
+ */
+ uint32_t maxThreadsPerBlock;
+
+ /**
+ * Maximum allowed X dimension for a block.
+ */
+ uint32_t maxBlockDimX;
+
+ /**
+ * Maximum allowed Y dimension for a block.
+ */
+ uint32_t maxBlockDimY;
+
+ /**
+ * Maximum allowed Z dimension for a block.
+ */
+ uint32_t maxBlockDimZ;
+
+ /**
+ * Maximum allowed X dimension for a grid.
+ */
+ uint32_t maxGridDimX;
+
+ /**
+ * Maximum allowed Y dimension for a grid.
+ */
+ uint32_t maxGridDimY;
+
+ /**
+ * Maximum allowed Z dimension for a grid.
+ */
+ uint32_t maxGridDimZ;
+
+ /**
+ * Compute capability for the device, major number.
+ */
+ uint32_t computeCapabilityMajor;
+
+ /**
+ * Compute capability for the device, minor number.
+ */
+ uint32_t computeCapabilityMinor;
+
+ /**
+ * The device ID.
+ */
+ uint32_t id;
+
+ /**
+ * ECC enabled flag for device
+ */
+ uint32_t eccEnabled;
+
+ /**
+ * The device UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid uuid;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The device name. This name is shared across all activity records
+ * representing instances of the device, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Flag to indicate whether the device is visible to CUDA. Users can
+ * set the device visibility using CUDA_VISIBLE_DEVICES environment
+ */
+ uint8_t isCudaVisible;
+
+ uint8_t reserved[7];
+} CUpti_ActivityDevice3;
+
+/**
+ * \brief The activity record for a device. (CUDA 11.6 onwards)
+ *
+ * This activity record represents information about a GPU device
+ * (CUPTI_ACTIVITY_KIND_DEVICE).
+ * Device activity is now reported using the
+ * CUpti_ActivityDevice5 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_DEVICE.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the device. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The global memory bandwidth available on the device, in
+ * kBytes/sec.
+ */
+ uint64_t globalMemoryBandwidth;
+
+ /**
+ * The amount of global memory on the device, in bytes.
+ */
+ uint64_t globalMemorySize;
+
+ /**
+ * The amount of constant memory on the device, in bytes.
+ */
+ uint32_t constantMemorySize;
+
+ /**
+ * The size of the L2 cache on the device, in bytes.
+ */
+ uint32_t l2CacheSize;
+
+ /**
+ * The number of threads per warp on the device.
+ */
+ uint32_t numThreadsPerWarp;
+
+ /**
+ * The core clock rate of the device, in kHz.
+ */
+ uint32_t coreClockRate;
+
+ /**
+ * Number of memory copy engines on the device.
+ */
+ uint32_t numMemcpyEngines;
+
+ /**
+ * Number of multiprocessors on the device.
+ */
+ uint32_t numMultiprocessors;
+
+ /**
+ * The maximum "instructions per cycle" possible on each device
+ * multiprocessor.
+ */
+ uint32_t maxIPC;
+
+ /**
+ * Maximum number of warps that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxWarpsPerMultiprocessor;
+
+ /**
+ * Maximum number of blocks that can be present on a multiprocessor
+ * at any given time.
+ */
+ uint32_t maxBlocksPerMultiprocessor;
+
+ /**
+ * Maximum amount of shared memory available per multiprocessor, in bytes.
+ */
+ uint32_t maxSharedMemoryPerMultiprocessor;
+
+ /**
+ * Maximum number of 32-bit registers available per multiprocessor.
+ */
+ uint32_t maxRegistersPerMultiprocessor;
+
+ /**
+ * Maximum number of registers that can be allocated to a block.
+ */
+ uint32_t maxRegistersPerBlock;
+
+ /**
+ * Maximum amount of shared memory that can be assigned to a block,
+ * in bytes.
+ */
+ uint32_t maxSharedMemoryPerBlock;
+
+ /**
+ * Maximum number of threads allowed in a block.
+ */
+ uint32_t maxThreadsPerBlock;
+
+ /**
+ * Maximum allowed X dimension for a block.
+ */
+ uint32_t maxBlockDimX;
+
+ /**
+ * Maximum allowed Y dimension for a block.
+ */
+ uint32_t maxBlockDimY;
+
+ /**
+ * Maximum allowed Z dimension for a block.
+ */
+ uint32_t maxBlockDimZ;
+
+ /**
+ * Maximum allowed X dimension for a grid.
+ */
+ uint32_t maxGridDimX;
+
+ /**
+ * Maximum allowed Y dimension for a grid.
+ */
+ uint32_t maxGridDimY;
+
+ /**
+ * Maximum allowed Z dimension for a grid.
+ */
+ uint32_t maxGridDimZ;
+
+ /**
+ * Compute capability for the device, major number.
+ */
+ uint32_t computeCapabilityMajor;
+
+ /**
+ * Compute capability for the device, minor number.
+ */
+ uint32_t computeCapabilityMinor;
+
+ /**
+ * The device ID.
+ */
+ uint32_t id;
+
+ /**
+ * ECC enabled flag for device
+ */
+ uint32_t eccEnabled;
+
+ /**
+ * The device UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid uuid;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The device name. This name is shared across all activity records
+ * representing instances of the device, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Flag to indicate whether the device is visible to CUDA. Users can
+ * set the device visibility using CUDA_VISIBLE_DEVICES environment
+ */
+ uint8_t isCudaVisible;
+
+ /**
+ * MIG enabled flag for device
+ */
+ uint8_t isMigEnabled;
+
+ uint8_t reserved[6];
+
+ /**
+ * GPU Instance id for MIG enabled devices.
+ * If mig mode is disabled value is set to UINT32_MAX
+ */
+ uint32_t gpuInstanceId;
+
+ /**
+ * Compute Instance id for MIG enabled devices.
+ * If mig mode is disabled value is set to UINT32_MAX
+ */
+ uint32_t computeInstanceId;
+
+ /**
+ * The MIG UUID. This value is the globally unique immutable
+ * alphanumeric identifier of the device.
+ */
+ CUuuid migUuid;
+
+} CUpti_ActivityDevice4;
+
+/**
+ * \brief The activity record for kernel. (deprecated)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL) but is no longer generated
+ * by CUPTI. Kernel activities are now reported using the
+ * CUpti_ActivityKernel9 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL
+ * or CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t cacheConfigRequested;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t cacheConfigExecuted;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the kernel. Each kernel execution
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t runtimeCorrelationId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityKernel;
+
+/**
+ * \brief The activity record for kernel. (deprecated)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL) but is no longer generated
+ * by CUPTI. Kernel activities are now reported using the
+ * CUpti_ActivityKernel9 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityKernel2;
+
+/**
+ * \brief The activity record for a kernel (CUDA 6.5(with sm_52 support) onwards).
+ * (deprecated in CUDA 9.0)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL).
+ * Kernel activities are now reported using the CUpti_ActivityKernel9 activity
+ * record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityKernel3;
+
+/**
+ * \brief The activity record for a kernel (CUDA 9.0(with sm_70 support) onwards).
+ * (deprecated in CUDA 11.0)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL).
+ * Kernel activities are now reported using the CUpti_ActivityKernel9 activity
+ * record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+} CUpti_ActivityKernel4;
+
+/**
+ * \brief The activity record for a kernel (CUDA 11.0(with sm_80 support) onwards).
+ * (deprecated in CUDA 11.2)
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL) but is no longer generated
+ * by CUPTI. Kernel activities are now reported using the
+ * CUpti_ActivityKernel9 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+
+ /**
+ * The unique ID of the graph node that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The shared memory limit config for the kernel. This field shows whether user has opted for a
+ * higher per block limit of dynamic shared memory.
+ */
+ CUpti_FuncShmemLimitConfig shmemLimitConfig;
+
+ /**
+ * The unique ID of the graph that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint32_t graphId;
+} CUpti_ActivityKernel5;
+
+/**
+ * \brief The activity record for kernel. (deprecated in CUDA 11.6)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL) but is no longer generated
+ * by CUPTI. Kernel activities are now reported using the
+ * CUpti_ActivityKernel9 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+
+ /**
+ * The unique ID of the graph node that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The shared memory limit config for the kernel. This field shows whether user has opted for a
+ * higher per block limit of dynamic shared memory.
+ */
+ CUpti_FuncShmemLimitConfig shmemLimitConfig;
+
+ /**
+ * The unique ID of the graph that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint32_t graphId;
+
+ /**
+ * The pointer to the access policy window. The structure CUaccessPolicyWindow is
+ * defined in cuda.h.
+ */
+ CUaccessPolicyWindow *pAccessPolicyWindow;
+} CUpti_ActivityKernel6;
+
+/**
+ * \brief The activity record for kernel. (deprecated in CUDA 11.8)
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL) but is no longer generated
+ * by CUPTI. Kernel activities are now reported using the
+ * CUpti_ActivityKernel9 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+
+ /**
+ * The unique ID of the graph node that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The shared memory limit config for the kernel. This field shows whether user has opted for a
+ * higher per block limit of dynamic shared memory.
+ */
+ CUpti_FuncShmemLimitConfig shmemLimitConfig;
+
+ /**
+ * The unique ID of the graph that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint32_t graphId;
+
+ /**
+ * The pointer to the access policy window. The structure CUaccessPolicyWindow is
+ * defined in cuda.h.
+ */
+ CUaccessPolicyWindow *pAccessPolicyWindow;
+
+ /**
+ * The ID of the HW channel on which the kernel is launched.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+} CUpti_ActivityKernel7;
+
+/**
+ * \brief The activity record for kernel.
+ *
+ * This activity record represents a kernel execution
+ * (CUPTI_ACTIVITY_KIND_KERNEL and
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL)
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_KERNEL or
+ * CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * For devices with compute capability 7.0+ cacheConfig values are not updated
+ * in case field isSharedMemoryCarveoutRequested is set
+ */
+ union {
+ uint8_t both;
+ struct {
+ /**
+ * The cache configuration requested by the kernel. The value is one
+ * of the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t requested:4;
+
+ /**
+ * The cache configuration used for the kernel. The value is one of
+ * the CUfunc_cache enumeration values from cuda.h.
+ */
+ uint8_t executed:4;
+ } config;
+ } cacheConfig;
+
+ /**
+ * The shared memory configuration used for the kernel. The value is one of
+ * the CUsharedconfig enumeration values from cuda.h.
+ */
+ uint8_t sharedMemoryConfig;
+
+ /**
+ * The number of registers required for each thread executing the
+ * kernel.
+ */
+ uint16_t registersPerThread;
+
+ /**
+ * The partitioned global caching requested for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheRequested;
+
+ /**
+ * The partitioned global caching executed for the kernel. Partitioned
+ * global caching is required to enable caching on certain chips, such as
+ * devices with compute capability 5.2. Partitioned global caching can be
+ * automatically disabled if the occupancy requirement of the launch cannot
+ * support caching.
+ */
+ CUpti_ActivityPartitionedGlobalCacheConfig partitionedGlobalCacheExecuted;
+
+ /**
+ * The start timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the kernel execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the kernel.
+ */
+ uint64_t end;
+
+ /**
+ * The completed timestamp for the kernel execution, in ns. It
+ * represents the completion of all it's child kernels and the
+ * kernel itself. A value of CUPTI_TIMESTAMP_UNKNOWN indicates that
+ * the completion time is unknown.
+ */
+ uint64_t completed;
+
+ /**
+ * The ID of the device where the kernel is executing.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the kernel is executing.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the kernel is executing.
+ */
+ uint32_t streamId;
+
+ /**
+ * The X-dimension grid size for the kernel.
+ */
+ int32_t gridX;
+
+ /**
+ * The Y-dimension grid size for the kernel.
+ */
+ int32_t gridY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t gridZ;
+
+ /**
+ * The X-dimension block size for the kernel.
+ */
+ int32_t blockX;
+
+ /**
+ * The Y-dimension block size for the kernel.
+ */
+ int32_t blockY;
+
+ /**
+ * The Z-dimension grid size for the kernel.
+ */
+ int32_t blockZ;
+
+ /**
+ * The static shared memory allocated for the kernel, in bytes.
+ */
+ int32_t staticSharedMemory;
+
+ /**
+ * The dynamic shared memory reserved for the kernel, in bytes.
+ */
+ int32_t dynamicSharedMemory;
+
+ /**
+ * The amount of local memory reserved for each thread, in bytes.
+ */
+ uint32_t localMemoryPerThread;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes (deprecated in CUDA 11.8).
+ * Refer field localMemoryTotal_v2
+ */
+ uint32_t localMemoryTotal;
+
+ /**
+ * The correlation ID of the kernel. Each kernel execution is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the kernel.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The grid ID of the kernel. Each kernel is assigned a unique
+ * grid ID at runtime.
+ */
+ int64_t gridId;
+
+ /**
+ * The name of the kernel. This name is shared across all activity
+ * records representing the same kernel, and so should not be
+ * modified.
+ */
+ const char *name;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The timestamp when the kernel is queued up in the command buffer, in ns.
+ * A value of CUPTI_TIMESTAMP_UNKNOWN indicates that the queued time
+ * could not be collected for the kernel. This timestamp is not collected
+ * by default. Use API \ref cuptiActivityEnableLatencyTimestamps() to
+ * enable collection.
+ *
+ * Command buffer is a buffer written by CUDA driver to send commands
+ * like kernel launch, memory copy etc to the GPU. All launches of CUDA
+ * kernels are asynchronous with respect to the host, the host requests
+ * the launch by writing commands into the command buffer, then returns
+ * without checking the GPU's progress.
+ */
+ uint64_t queued;
+
+ /**
+ * The timestamp when the command buffer containing the kernel launch
+ * is submitted to the GPU, in ns. A value of CUPTI_TIMESTAMP_UNKNOWN
+ * indicates that the submitted time could not be collected for the kernel.
+ * This timestamp is not collected by default. Use API \ref
+ * cuptiActivityEnableLatencyTimestamps() to enable collection.
+ */
+ uint64_t submitted;
+
+ /**
+ * The indicates if the kernel was executed via a regular launch or via a
+ * single/multi device cooperative launch. \see CUpti_ActivityLaunchType
+ */
+ uint8_t launchType;
+
+ /**
+ * This indicates if CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT was
+ * updated for the kernel launch
+ */
+ uint8_t isSharedMemoryCarveoutRequested;
+
+ /**
+ * Shared memory carveout value requested for the function in percentage of
+ * the total resource. The value will be updated only if field
+ * isSharedMemoryCarveoutRequested is set.
+ */
+ uint8_t sharedMemoryCarveoutRequested;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint8_t padding;
+
+ /**
+ * Shared memory size set by the driver.
+ */
+ uint32_t sharedMemoryExecuted;
+
+ /**
+ * The unique ID of the graph node that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The shared memory limit config for the kernel. This field shows whether user has opted for a
+ * higher per block limit of dynamic shared memory.
+ */
+ CUpti_FuncShmemLimitConfig shmemLimitConfig;
+
+ /**
+ * The unique ID of the graph that launched this kernel through graph launch APIs.
+ * This field will be 0 if the kernel is not launched through graph launch APIs.
+ */
+ uint32_t graphId;
+
+ /**
+ * The pointer to the access policy window. The structure CUaccessPolicyWindow is
+ * defined in cuda.h.
+ */
+ CUaccessPolicyWindow *pAccessPolicyWindow;
+
+ /**
+ * The ID of the HW channel on which the kernel is launched.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * The X-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterX;
+
+ /**
+ * The Y-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterY;
+
+ /**
+ * The Z-dimension cluster size for the kernel.
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterZ;
+
+ /**
+ * The cluster scheduling policy for the kernel. Refer CUclusterSchedulingPolicy
+ * Field is valid for devices with compute capability 9.0 and higher
+ */
+ uint32_t clusterSchedulingPolicy;
+
+ /**
+ * The total amount of local memory reserved for the kernel, in
+ * bytes.
+ */
+ uint64_t localMemoryTotal_v2;
+} CUpti_ActivityKernel8;
+
+/**
+ * \brief The activity record for memory copies. (deprecated)
+ *
+ * This activity record represents a memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the memory copy.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the memory copy. Each memory copy
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t runtimeCorrelationId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityMemcpy;
+
+/**
+ * \brief The activity record for memory copies. (deprecated in CUDA 11.1)
+ *
+ * This activity record represents a memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the memory copy.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the memory copy. Each memory copy
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t runtimeCorrelationId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint64_t graphNodeId;
+} CUpti_ActivityMemcpy3;
+
+/**
+ * \brief The activity record for memory copies. (deprecated in CUDA 11.6)
+ *
+ * This activity record represents a memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the memory copy.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the memory copy. Each memory copy
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t runtimeCorrelationId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t padding;
+} CUpti_ActivityMemcpy4;
+
+/**
+ * \brief The activity record for peer-to-peer memory copies.
+ *
+ * This activity record represents a peer-to-peer memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY2) but is no longer generated
+ * by CUPTI. Peer-to-peer memory copy activities are now reported using the
+ * CUpti_ActivityMemcpyPtoP2 activity record..
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY2.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see
+ * CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the device where memory is being copied from.
+ */
+ uint32_t srcDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied from.
+ */
+ uint32_t srcContextId;
+
+ /**
+ * The ID of the device where memory is being copied to.
+ */
+ uint32_t dstDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied to.
+ */
+ uint32_t dstContextId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t correlationId;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityMemcpyPtoP;
+
+typedef CUpti_ActivityMemcpyPtoP CUpti_ActivityMemcpy2;
+
+/**
+ * \brief The activity record for peer-to-peer memory copies.
+ * (deprecated in CUDA 11.1)
+ *
+ * This activity record represents a peer-to-peer memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY2).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY2.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see
+ * CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the device where memory is being copied from.
+ */
+ uint32_t srcDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied from.
+ */
+ uint32_t srcContextId;
+
+ /**
+ * The ID of the device where memory is being copied to.
+ */
+ uint32_t dstDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied to.
+ */
+ uint32_t dstContextId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t correlationId;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed the memcpy through graph launch.
+ * This field will be 0 if memcpy is not done using graph launch.
+ */
+ uint64_t graphNodeId;
+} CUpti_ActivityMemcpyPtoP2;
+
+/**
+ * \brief The activity record for peer-to-peer memory copies.
+ * (deprecated in CUDA 11.6)
+ *
+ * This activity record represents a peer-to-peer memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY2).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY2.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see
+ * CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the device where memory is being copied from.
+ */
+ uint32_t srcDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied from.
+ */
+ uint32_t srcContextId;
+
+ /**
+ * The ID of the device where memory is being copied to.
+ */
+ uint32_t dstDeviceId;
+
+ /**
+ * The ID of the context owning the memory being copied to.
+ */
+ uint32_t dstContextId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t correlationId;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed the memcpy through graph launch.
+ * This field will be 0 if memcpy is not done using graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t padding;
+} CUpti_ActivityMemcpyPtoP3;
+
+/**
+ * \brief The activity record for memset. (deprecated)
+ *
+ * This activity record represents a memory set operation
+ * (CUPTI_ACTIVITY_KIND_MEMSET).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMSET.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The value being assigned to memory by the memory set.
+ */
+ uint32_t value;
+
+ /**
+ * The number of bytes being set by the memory set.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory set is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory set is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory set is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory set. Each memory set is assigned
+ * a unique correlation ID that is identical to the correlation ID
+ * in the driver API activity record that launched the memory set.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The flags associated with the memset. \see CUpti_ActivityFlag
+ */
+ uint16_t flags;
+
+ /**
+ * The memory kind of the memory set \see CUpti_ActivityMemoryKind
+ */
+ uint16_t memoryKind;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+} CUpti_ActivityMemset;
+
+/**
+ * \brief The activity record for memset. (deprecated in CUDA 11.1)
+ *
+ * This activity record represents a memory set operation
+ * (CUPTI_ACTIVITY_KIND_MEMSET).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMSET.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The value being assigned to memory by the memory set.
+ */
+ uint32_t value;
+
+ /**
+ * The number of bytes being set by the memory set.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory set is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory set is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory set is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory set. Each memory set is assigned
+ * a unique correlation ID that is identical to the correlation ID
+ * in the driver API activity record that launched the memory set.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The flags associated with the memset. \see CUpti_ActivityFlag
+ */
+ uint16_t flags;
+
+ /**
+ * The memory kind of the memory set \see CUpti_ActivityMemoryKind
+ */
+ uint16_t memoryKind;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memset through graph launch.
+ * This field will be 0 if the memset is not executed through graph launch.
+ */
+ uint64_t graphNodeId;
+} CUpti_ActivityMemset2;
+
+/**
+ * \brief The activity record for memset. (deprecated in CUDA 11.6)
+ *
+ * This activity record represents a memory set operation
+ * (CUPTI_ACTIVITY_KIND_MEMSET).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMSET.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The value being assigned to memory by the memory set.
+ */
+ uint32_t value;
+
+ /**
+ * The number of bytes being set by the memory set.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory set, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory set.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory set is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory set is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory set is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory set. Each memory set is assigned
+ * a unique correlation ID that is identical to the correlation ID
+ * in the driver API activity record that launched the memory set.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The flags associated with the memset. \see CUpti_ActivityFlag
+ */
+ uint16_t flags;
+
+ /**
+ * The memory kind of the memory set \see CUpti_ActivityMemoryKind
+ */
+ uint16_t memoryKind;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memset through graph launch.
+ * This field will be 0 if the memset is not executed through graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memset through graph launch.
+ * This field will be 0 if the memset is not executed through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t padding;
+} CUpti_ActivityMemset3;
+
+/**
+ * \brief The activity record for memory.
+ *
+ * This activity record represents a memory allocation and free operation
+ * (CUPTI_ACTIVITY_KIND_MEMORY2).
+ * This activity record provides separate records for memory allocation and
+ * memory release operations.
+ * This allows to correlate the corresponding driver and runtime API
+ * activity record with the memory operation.
+ *
+ * Note: This activity record is an upgrade over \ref CUpti_ActivityMemory
+ * enabled using the kind \ref CUPTI_ACTIVITY_KIND_MEMORY.
+ * \ref CUpti_ActivityMemory provides a single record for the memory
+ * allocation and memory release operations.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY2
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory operation requested by the user, \ref CUpti_ActivityMemoryOperationType.
+ */
+ CUpti_ActivityMemoryOperationType memoryOperationType;
+
+ /**
+ * The memory kind requested by the user, \ref CUpti_ActivityMemoryKind.
+ */
+ CUpti_ActivityMemoryKind memoryKind;
+
+ /**
+ * The correlation ID of the memory operation. Each memory operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The virtual address of the allocation.
+ */
+ uint64_t address;
+
+ /**
+ * The number of bytes of memory allocated.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory operation, in ns.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The program counter of the memory operation.
+ */
+ uint64_t PC;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory operation is taking place.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context. If context is NULL, \p contextId is set to CUPTI_INVALID_CONTEXT_ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream. If memory operation is not async, \p streamId is set to CUPTI_INVALID_STREAM_ID.
+ */
+ uint32_t streamId;
+
+ /**
+ * Variable name. This name is shared across all activity
+ * records representing the same symbol, and so should not be
+ * modified.
+ */
+ const char* name;
+
+ /**
+ * \p isAsync is set if memory operation happens through async memory APIs.
+ */
+ uint32_t isAsync;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad1;
+#endif
+
+ /**
+ * The memory pool configuration used for the memory operations.
+ */
+ struct {
+ /**
+ * The type of the memory pool, \ref CUpti_ActivityMemoryPoolType
+ */
+ CUpti_ActivityMemoryPoolType memoryPoolType;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad2;
+#endif
+
+ /**
+ * The base address of the memory pool.
+ */
+ uint64_t address;
+
+ /**
+ * The release threshold of the memory pool in bytes. \p releaseThreshold is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t releaseThreshold;
+
+ /**
+ * The size of the memory pool in bytes and the processID of the memory pool.
+ * \p size is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ * \p processId is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED, \ref CUpti_ActivityMemoryPoolType.
+ */
+ union {
+ uint64_t size;
+ uint64_t processId;
+ } pool;
+ } memoryPoolConfig;
+
+} CUpti_ActivityMemory2;
+
+/**
+ * \brief The activity record for memory.
+ *
+ * This activity record represents a memory allocation and free operation
+ * (CUPTI_ACTIVITY_KIND_MEMORY2).
+ * This activity record provides separate records for memory allocation and
+ * memory release operations.
+ * This allows to correlate the corresponding driver and runtime API
+ * activity record with the memory operation.
+ *
+ * Note: This activity record is an upgrade over \ref CUpti_ActivityMemory2
+ * enabled using the kind \ref CUPTI_ACTIVITY_KIND_MEMORY.
+ * \ref CUpti_ActivityMemory provides a single record for the memory
+ * allocation and memory release operations.
+ */
+
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY2
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory operation requested by the user, \ref CUpti_ActivityMemoryOperationType.
+ */
+ CUpti_ActivityMemoryOperationType memoryOperationType;
+
+ /**
+ * The memory kind requested by the user, \ref CUpti_ActivityMemoryKind.
+ */
+ CUpti_ActivityMemoryKind memoryKind;
+
+ /**
+ * The correlation ID of the memory operation. Each memory operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The virtual address of the allocation.
+ */
+ uint64_t address;
+
+ /**
+ * The number of bytes of memory allocated.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory operation, in ns.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The program counter of the memory operation.
+ */
+ uint64_t PC;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory operation is taking place.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context. If context is NULL, \p contextId is set to CUPTI_INVALID_CONTEXT_ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream. If memory operation is not async, \p streamId is set to CUPTI_INVALID_STREAM_ID.
+ */
+ uint32_t streamId;
+
+ /**
+ * Variable name. This name is shared across all activity
+ * records representing the same symbol, and so should not be
+ * modified.
+ */
+ const char* name;
+
+ /**
+ * \p isAsync is set if memory operation happens through async memory APIs.
+ */
+ uint32_t isAsync;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad1;
+#endif
+
+ /**
+ * The memory pool configuration used for the memory operations.
+ */
+ struct PACKED_ALIGNMENT {
+ /**
+ * The type of the memory pool, \ref CUpti_ActivityMemoryPoolType
+ */
+ CUpti_ActivityMemoryPoolType memoryPoolType;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad2;
+#endif
+
+ /**
+ * The base address of the memory pool.
+ */
+ uint64_t address;
+
+ /**
+ * The release threshold of the memory pool in bytes. \p releaseThreshold is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t releaseThreshold;
+
+ /**
+ * The size of memory pool in bytes and the processId of the memory pools
+ * \p size is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ * \p processId is valid if \p memoryPoolType is
+ * CUPTI_ACTIVITY_MEMORY_POOL_TYPE_IMPORTED, \ref CUpti_ActivityMemoryPoolType
+ */
+ union {
+ uint64_t size;
+ uint64_t processId;
+ } pool;
+
+ /**
+ * The utilized size of the memory pool. \p utilizedSize is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t utilizedSize;
+ } memoryPoolConfig;
+
+} CUpti_ActivityMemory3;
+
+/**
+ * \brief The activity record for memory pool.
+ *
+ * This activity record represents a memory pool creation, destruction and
+ * trimming (CUPTI_ACTIVITY_KIND_MEMORY_POOL).
+ * This activity record provides separate records for memory pool creation,
+ * destruction and trimming operations.
+ * This allows to correlate the corresponding driver and runtime API
+ * activity record with the memory pool operation.
+ *
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMORY_POOL
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The memory operation requested by the user, \ref CUpti_ActivityMemoryPoolOperationType.
+ */
+ CUpti_ActivityMemoryPoolOperationType memoryPoolOperationType;
+
+ /**
+ * The type of the memory pool, \ref CUpti_ActivityMemoryPoolType
+ */
+ CUpti_ActivityMemoryPoolType memoryPoolType;
+
+ /**
+ * The correlation ID of the memory pool operation. Each memory pool
+ * operation is assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver and runtime API activity record that
+ * launched the memory operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The ID of the device where the memory pool is created.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The minimum bytes to keep of the memory pool. \p minBytesToKeep is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_OPERATION_TYPE_TRIMMED,
+ * \ref CUpti_ActivityMemoryPoolOperationType
+ */
+ size_t minBytesToKeep;
+
+#ifndef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The virtual address of the allocation.
+ */
+ uint64_t address;
+
+ /**
+ * The size of the memory pool operation in bytes. \p size is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t size;
+
+ /**
+ * The release threshold of the memory pool. \p releaseThreshold is
+ * valid for CUPTI_ACTIVITY_MEMORY_POOL_TYPE_LOCAL, \ref CUpti_ActivityMemoryPoolType.
+ */
+ uint64_t releaseThreshold;
+
+ /**
+ * The start timestamp for the memory operation, in ns.
+ */
+ uint64_t timestamp;
+} CUpti_ActivityMemoryPool;
+
+/**
+ * \brief The activity record providing a marker which is an
+ * instantaneous point in time. (deprecated in CUDA 8.0)
+ *
+ * The marker is specified with a descriptive name and unique id
+ * (CUPTI_ACTIVITY_KIND_MARKER).
+ * Marker activity is now reported using the
+ * CUpti_ActivityMarker2 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MARKER.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The flags associated with the marker. \see CUpti_ActivityFlag
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The timestamp for the marker, in ns. A value of 0 indicates that
+ * timestamp information could not be collected for the marker.
+ */
+ uint64_t timestamp;
+
+ /**
+ * The marker ID.
+ */
+ uint32_t id;
+
+ /**
+ * The kind of activity object associated with this marker.
+ */
+ CUpti_ActivityObjectKind objectKind;
+
+ /**
+ * The identifier for the activity object associated with this
+ * marker. 'objectKind' indicates which ID is valid for this record.
+ */
+ CUpti_ActivityObjectKindId objectId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * The marker name for an instantaneous or start marker. This will
+ * be NULL for an end marker.
+ */
+ const char *name;
+
+} CUpti_ActivityMarker;
+
+/**
+ * \brief The activity record for source-level global
+ * access. (deprecated)
+ *
+ * This activity records the locations of the global
+ * accesses in the source (CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS).
+ * Global access activities are now reported using the
+ * CUpti_ActivityGlobalAccess3 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this global access.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The pc offset for the access.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * when at least one of thread among warp is active with predicate and condition code
+ * evaluating to true.
+ */
+ uint32_t executed;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction with predicate and condition code evaluating to true.
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * The total number of 32 bytes transactions to L2 cache generated by this access
+ */
+ uint64_t l2_transactions;
+} CUpti_ActivityGlobalAccess;
+
+/**
+ * \brief The activity record for source-level global
+ * access. (deprecated in CUDA 9.0)
+ *
+ * This activity records the locations of the global
+ * accesses in the source (CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS).
+ * Global access activities are now reported using the
+ * CUpti_ActivityGlobalAccess3 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_GLOBAL_ACCESS.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this global access.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the access.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction with predicate and condition code evaluating to true.
+ */
+ uint64_t threadsExecuted;
+
+ /**
+ * The total number of 32 bytes transactions to L2 cache generated by this access
+ */
+ uint64_t l2_transactions;
+
+ /**
+ * The minimum number of L2 transactions possible based on the access pattern.
+ */
+ uint64_t theoreticalL2Transactions;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * when at least one of thread among warp is active with predicate and condition code
+ * evaluating to true.
+ */
+ uint32_t executed;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityGlobalAccess2;
+
+/**
+ * \brief The activity record for source level result
+ * branch. (deprecated)
+ *
+ * This activity record the locations of the branches in the
+ * source (CUPTI_ACTIVITY_KIND_BRANCH).
+ * Branch activities are now reported using the
+ * CUpti_ActivityBranch2 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_BRANCH.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The pc offset for the branch.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * The number of times this instruction was executed per warp. It will be incremented
+ * regardless of predicate or condition code.
+ */
+ uint32_t executed;
+
+ /**
+ * Number of times this branch diverged
+ */
+ uint32_t diverged;
+
+ /**
+ * This increments each time when this instruction is executed by number
+ * of threads that executed this instruction
+ */
+ uint64_t threadsExecuted;
+} CUpti_ActivityBranch;
+
+/**
+ * \brief The activity record for PC sampling. (deprecated in CUDA 8.0)
+ *
+ * This activity records information obtained by sampling PC
+ * (CUPTI_ACTIVITY_KIND_PC_SAMPLING).
+ * PC sampling activities are now reported using the
+ * CUpti_ActivityPCSampling2 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PC_SAMPLING.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this instruction.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the instruction.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * Number of times the PC was sampled with the stallReason in the record.
+ * The same PC can be sampled with different stall reasons.
+ */
+ uint32_t samples;
+
+ /**
+ * Current stall reason. Includes one of the reasons from
+ * \ref CUpti_ActivityPCSamplingStallReason
+ */
+ CUpti_ActivityPCSamplingStallReason stallReason;
+} CUpti_ActivityPCSampling;
+
+/**
+ * \brief The activity record for PC sampling. (deprecated in CUDA 9.0)
+ *
+ * This activity records information obtained by sampling PC
+ * (CUPTI_ACTIVITY_KIND_PC_SAMPLING).
+ * PC sampling activities are now reported using the
+ * CUpti_ActivityPCSampling3 activity record.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_PC_SAMPLING.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The properties of this instruction.
+ */
+ CUpti_ActivityFlag flags;
+
+ /**
+ * The ID for source locator.
+ */
+ uint32_t sourceLocatorId;
+
+ /**
+ * The correlation ID of the kernel to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Correlation ID with global/device function name
+ */
+ uint32_t functionId;
+
+ /**
+ * The pc offset for the instruction.
+ */
+ uint32_t pcOffset;
+
+ /**
+ * Number of times the PC was sampled with the stallReason in the record.
+ * These samples indicate that no instruction was issued in that cycle from
+ * the warp scheduler from where the warp was sampled.
+ * Field is valid for devices with compute capability 6.0 and higher
+ */
+ uint32_t latencySamples;
+
+ /**
+ * Number of times the PC was sampled with the stallReason in the record.
+ * The same PC can be sampled with different stall reasons. The count includes
+ * latencySamples.
+ */
+ uint32_t samples;
+
+ /**
+ * Current stall reason. Includes one of the reasons from
+ * \ref CUpti_ActivityPCSamplingStallReason
+ */
+ CUpti_ActivityPCSamplingStallReason stallReason;
+
+ uint32_t pad;
+} CUpti_ActivityPCSampling2;
+
+/**
+ * \brief The activity record for Unified Memory counters (deprecated in CUDA 7.0)
+ *
+ * This activity record represents a Unified Memory counter
+ * (CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The Unified Memory counter kind. See \ref CUpti_ActivityUnifiedMemoryCounterKind
+ */
+ CUpti_ActivityUnifiedMemoryCounterKind counterKind;
+
+ /**
+ * Scope of the Unified Memory counter. See \ref CUpti_ActivityUnifiedMemoryCounterScope
+ */
+ CUpti_ActivityUnifiedMemoryCounterScope scope;
+
+ /**
+ * The ID of the device involved in the memory transfer operation.
+ * It is not relevant if the scope of the counter is global (all devices).
+ */
+ uint32_t deviceId;
+
+ /**
+ * Value of the counter
+ *
+ */
+ uint64_t value;
+
+ /**
+ * The timestamp when this sample was retrieved, in ns. A value of 0
+ * indicates that timestamp information could not be collected
+ */
+ uint64_t timestamp;
+
+ /**
+ * The ID of the process to which this record belongs to. In case of
+ * global scope, processId is undefined.
+ */
+ uint32_t processId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityUnifiedMemoryCounter;
+
+/**
+ * \brief The activity record for Unified Memory counters (deprecated in 12.8)
+ *
+ * This activity record represents a Unified Memory counter
+ * (CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER).
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The Unified Memory counter kind
+ */
+ CUpti_ActivityUnifiedMemoryCounterKind counterKind;
+
+ /**
+ * Value of the counter
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD,
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH,
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THREASHING and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP, it is the size of the
+ * memory region in bytes.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT, it
+ * is the number of page fault groups for the same page.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT,
+ * it is the program counter for the instruction that caused fault.
+ */
+ uint64_t value;
+
+ /**
+ * The start timestamp of the counter, in ns.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH, timestamp is
+ * captured when activity starts on GPU.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT, timestamp is
+ * captured when CUDA driver started processing the fault.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING, timestamp
+ * is captured when CUDA driver detected thrashing of memory region.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING,
+ * timestamp is captured when throttling operation was started by CUDA driver.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP,
+ * timestamp is captured when CUDA driver has pushed all required operations
+ * to the processor specified by dstId.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp of the counter, in ns.
+ * Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD and
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH, timestamp is
+ * captured when activity finishes on GPU.
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT, timestamp is
+ * captured when CUDA driver queues the replay of faulting memory accesses on the GPU
+ * For counterKind CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING, timestamp
+ * is captured when throttling operation was finished by CUDA driver
+ */
+ uint64_t end;
+
+ /**
+ * This is the virtual base address of the page/s being transferred. For cpu and
+ * gpu faults, the virtual address for the page that faulted.
+ */
+ uint64_t address;
+
+ /**
+ * The ID of the source CPU/device involved in the memory transfer, page fault, thrashing,
+ * throttling or remote map operation. For counterKind
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING, it is a bitwise ORing of the
+ * device IDs fighting for the memory region. Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT
+ */
+ uint32_t srcId;
+
+ /**
+ * The ID of the destination CPU/device involved in the memory transfer or remote map
+ * operation. Ignore this field if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING
+ */
+ uint32_t dstId;
+
+ /**
+ * The ID of the stream causing the transfer.
+ * This value of this field is invalid.
+ */
+ uint32_t streamId;
+
+ /**
+ * The ID of the process to which this record belongs to.
+ */
+ uint32_t processId;
+
+ /**
+ * The flags associated with this record. See enums \ref CUpti_ActivityUnifiedMemoryAccessType
+ * if counterKind is CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT
+ * and \ref CUpti_ActivityUnifiedMemoryMigrationCause if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD
+ * and \ref CUpti_ActivityUnifiedMemoryRemoteMapCause if counterKind is
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP and \ref CUpti_ActivityFlag
+ * if counterKind is CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING or
+ * CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING
+ */
+ uint32_t flags;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityUnifiedMemoryCounter2;
+
+/**
+* \brief NVLink information. (deprecated in CUDA 9.0)
+*
+* This structure gives capabilities of each logical NVLink connection between two devices,
+* gpu<->gpu or gpu<->CPU which can be used to understand the topology.
+* NVLink information are now reported using the
+* CUpti_ActivityNvLink2 activity record.
+*/
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_NVLINK.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * NVLink version.
+ */
+ uint32_t nvlinkVersion;
+
+ /**
+ * Type of device 0 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev0;
+
+ /**
+ * Type of device 1 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev1;
+
+ /**
+ * If typeDev0 is CUPTI_DEV_TYPE_GPU, UUID for device 0. \ref CUpti_ActivityDevice5.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev0;
+
+ /**
+ * If typeDev1 is CUPTI_DEV_TYPE_GPU, UUID for device 1. \ref CUpti_ActivityDevice5.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev1;
+
+ /**
+ * Flag gives capabilities of the link \see CUpti_LinkFlag
+ */
+ uint32_t flag;
+
+ /**
+ * Number of physical NVLinks present between two devices.
+ */
+ uint32_t physicalNvLinkCount;
+
+ /**
+ * Port numbers for maximum 4 NVLinks connected to device 0.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev0[4];
+
+ /**
+ * Port numbers for maximum 4 NVLinks connected to device 1.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev1[4];
+
+ /**
+ * Bandwidth of NVLink in kbytes/sec
+ */
+ uint64_t bandwidth;
+} CUpti_ActivityNvLink;
+
+/**
+* \brief NVLink information. (deprecated in CUDA 10.0)
+*
+* This structure gives capabilities of each logical NVLink connection between two devices,
+* gpu<->gpu or gpu<->CPU which can be used to understand the topology.
+* NvLink information are now reported using the
+* CUpti_ActivityNvLink4 activity record.
+*/
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_NVLINK.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * NvLink version.
+ */
+ uint32_t nvlinkVersion;
+
+ /**
+ * Type of device 0 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev0;
+
+ /**
+ * Type of device 1 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev1;
+
+ /**
+ * If typeDev0 is CUPTI_DEV_TYPE_GPU, UUID for device 0. \ref CUpti_ActivityDevice5.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev0;
+
+ /**
+ * If typeDev1 is CUPTI_DEV_TYPE_GPU, UUID for device 1. \ref CUpti_ActivityDevice5.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev1;
+
+ /**
+ * Flag gives capabilities of the link \see CUpti_LinkFlag
+ */
+ uint32_t flag;
+
+ /**
+ * Number of physical NVLinks present between two devices.
+ */
+ uint32_t physicalNvLinkCount;
+
+ /**
+ * Port numbers for maximum 16 NVLinks connected to device 0.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev0[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Port numbers for maximum 16 NVLinks connected to device 1.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev1[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Bandwidth of NVLink in kbytes/sec
+ */
+ uint64_t bandwidth;
+} CUpti_ActivityNvLink2;
+
+/**
+* \brief NVLink information.
+*
+* This structure gives capabilities of each logical NVLink connection between two devices,
+* gpu<->gpu or gpu<->CPU which can be used to understand the topology.
+* NvLink information are now reported using the
+* CUpti_ActivityNvLink4 activity record.
+*/
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_NVLINK.
+ */
+ CUpti_ActivityKind kind;
+ /**
+ * NvLink version.
+ */
+ uint32_t nvlinkVersion;
+
+ /**
+ * Type of device 0 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev0;
+
+ /**
+ * Type of device 1 \ref CUpti_DevType
+ */
+ CUpti_DevType typeDev1;
+
+ /**
+ * If typeDev0 is CUPTI_DEV_TYPE_GPU, UUID for device 0. \ref CUpti_ActivityDevice5.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev0;
+
+ /**
+ * If typeDev1 is CUPTI_DEV_TYPE_GPU, UUID for device 1. \ref CUpti_ActivityDevice5.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, struct npu for NPU.
+ */
+ union {
+ CUuuid uuidDev;
+ struct {
+ /**
+ * Index of the NPU. First index will always be zero.
+ */
+ uint32_t index;
+
+ /**
+ * Domain ID of NPU. On Linux, this can be queried using lspci.
+ */
+ uint32_t domainId;
+ } npu;
+ } idDev1;
+
+ /**
+ * Flag gives capabilities of the link \see CUpti_LinkFlag
+ */
+ uint32_t flag;
+
+ /**
+ * Number of physical NVLinks present between two devices.
+ */
+ uint32_t physicalNvLinkCount;
+
+ /**
+ * Port numbers for maximum 16 NVLinks connected to device 0.
+ * If typeDev0 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev0[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Port numbers for maximum 16 NVLinks connected to device 1.
+ * If typeDev1 is CUPTI_DEV_TYPE_NPU, ignore this field.
+ * In case of invalid/unknown port number, this field will be set
+ * to value CUPTI_NVLINK_INVALID_PORT.
+ * This will be used to correlate the metric values to individual
+ * physical link and attribute traffic to the logical NVLink in
+ * the topology.
+ */
+ int8_t portDev1[CUPTI_MAX_NVLINK_PORTS];
+
+ /**
+ * Bandwidth of NVLink in kbytes/sec
+ */
+ uint64_t bandwidth;
+
+ /**
+ * NVSwitch is connected as an intermediate node.
+ */
+ uint8_t nvswitchConnected;
+
+ /**
+ * Undefined. reserved for internal use
+ */
+ uint8_t pad[7];
+} CUpti_ActivityNvLink3;
+
+/**
+ * \brief The activity record for trace of graph execution.
+ *
+ * This activity record represents execution for a graph without giving visibility
+ * about the execution of its nodes. This is intended to reduce overheads in tracing
+ * each node. The activity kind is CUPTI_ACTIVITY_KIND_GRAPH_TRACE
+ * Graph trace activity is now reported using CUpti_ActivityGraphTrace2 record.
+ */
+typedef struct {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_GRAPH_TRACE
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The correlation ID of the graph launch. Each graph launch is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the graph.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The start timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the graph execution, in ns. A value of 0
+ * for both the start and end timestamps indicates that timestamp
+ * information could not be collected for the graph.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the graph execution is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The unique ID of the graph that is launched.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the context where the graph is being launched.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the graph is being launched.
+ */
+ uint32_t streamId;
+
+ /**
+ * This field is reserved for internal use
+ */
+ void *reserved;
+} CUpti_ActivityGraphTrace;
+
+/**
+ * \brief The activity record for a context.
+ *
+ * This activity record represents information about a context
+ * (CUPTI_ACTIVITY_KIND_CONTEXT).
+ * Context activity is now reported using CUpti_ActivityContext3 record
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CONTEXT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The context ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The device ID.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The compute API kind. \see CUpti_ActivityComputeApiKind
+ */
+ uint16_t computeApiKind;
+
+ /**
+ * The ID for the NULL stream in this context
+ */
+ uint16_t nullStreamId;
+} CUpti_ActivityContext;
+
+/**
+ * \brief The activity record for a context.
+ *
+ * This activity record represents information about a context
+ * (CUPTI_ACTIVITY_KIND_CONTEXT).
+ * Context activity is now reported using CUpti_ActivityContext3 record
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CONTEXT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The context ID.
+ */
+ uint32_t contextId;
+
+ /**
+ * The device ID.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The compute API kind. \see CUpti_ActivityComputeApiKind
+ */
+ uint16_t computeApiKind;
+
+ /**
+ * The ID for the NULL stream in this context
+ */
+ uint16_t nullStreamId;
+
+ /**
+ * The ID of the parent context. It would be 0 if
+ * context does not have parent
+ */
+ uint32_t parentContextId;
+
+ /**
+ * This field indicates whether the context is a green context
+ */
+ uint8_t isGreenContext;
+
+ uint8_t padding;
+
+ /**
+ * Number of multiprocessors assigned to the green context
+ * Invalid if the field 'isGreenContext' is 0
+ */
+ uint16_t numMultiprocessors;
+} CUpti_ActivityContext2;
+
+/**
+ * \brief The activity record for JIT operations.
+ * This activity represents the JIT operations (compile, load, store) of a CUmodule
+ * from the Compute Cache.
+ * Gives the exact hashed path of where the cached module is loaded from,
+ * or where the module will be stored after Just-In-Time (JIT) compilation.
+ *
+ * JIT activity is now reported using CUpti_ActivityJit2 record
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind must be CUPTI_ACTIVITY_KIND_JIT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The JIT entry type.
+ */
+ CUpti_ActivityJitEntryType jitEntryType;
+
+ /**
+ * The JIT operation type.
+ */
+ CUpti_ActivityJitOperationType jitOperationType;
+
+ /**
+ * The device ID.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The start timestamp for the JIT operation, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the JIT operation.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the JIT operation, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the JIT operation.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the JIT operation to which
+ * records belong to. Each JIT operation is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver or runtime API activity record that
+ * launched the JIT operation.
+ */
+ uint32_t correlationId;
+
+ /**
+ * Internal use.
+ */
+ uint32_t padding;
+
+ /**
+ * The correlation ID to correlate JIT compilation, load and store operations.
+ * Each JIT compilation unit is assigned a unique correlation ID
+ * at the time of the JIT compilation. This correlation id can be used
+ * to find the matching JIT cache load/store records.
+ */
+ uint64_t jitOperationCorrelationId;
+
+ /**
+ * The size of compute cache.
+ */
+ uint64_t cacheSize;
+
+ /**
+ * The path where the fat binary is cached.
+ */
+ const char* cachePath;
+} CUpti_ActivityJit;
+
+/**
+ * \brief The activity record for CUDA event.
+ *
+ * This activity is used to track recorded events.
+ * (CUPTI_ACTIVITY_KIND_CUDA_EVENT).
+ *
+ * Structure deprecated in CUDA 12.8: Refer to CUpti_ActivityCudaEvent2
+ * for the latest structure.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_CUDA_EVENT.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The correlation ID of the API to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the context where the event was recorded.
+ */
+ uint32_t contextId;
+
+ /**
+ * The compute stream where the event was recorded.
+ */
+ uint32_t streamId;
+
+ /**
+ * A unique event ID to identify the event record.
+ */
+ uint32_t eventId;
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+} CUpti_ActivityCudaEvent;
+
+/**
+ * \brief The activity record for synchronization management.
+ *
+ * This activity is used to track various CUDA synchronization APIs.
+ * (CUPTI_ACTIVITY_KIND_SYNCHRONIZATION).
+ *
+ * Structure deprecated in CUDA 12.8: Refer to CUpti_ActivitySynchronization2
+ * for the latest structure.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_SYNCHRONIZATION.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The type of record.
+ */
+ CUpti_ActivitySynchronizationType type;
+
+ /**
+ * The start timestamp for the function, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the function.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the function, in ns. A value of 0 for both
+ * the start and end timestamps indicates that timestamp information
+ * could not be collected for the function.
+ */
+ uint64_t end;
+
+ /**
+ * The correlation ID of the API to which this result is associated.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The ID of the context for which the synchronization API is called.
+ * In case of context synchronization API it is the context id for which the API is called.
+ * In case of stream/event synchronization it is the ID of the context where the stream/event was created.
+ */
+ uint32_t contextId;
+
+ /**
+ * The compute stream for which the synchronization API is called.
+ * A CUPTI_SYNCHRONIZATION_INVALID_VALUE value indicate the field is not applicable for this record.
+ * Not valid for cuCtxSynchronize, cuEventSynchronize.
+ */
+ uint32_t streamId;
+
+ /**
+ * The event ID for which the synchronization API is called.
+ * A CUPTI_SYNCHRONIZATION_INVALID_VALUE value indicate the field is not applicable for this record.
+ * Not valid for cuCtxSynchronize, cuStreamSynchronize.
+ */
+ uint32_t cudaEventId;
+} CUpti_ActivitySynchronization;
+
+/**
+ * \brief The activity record for memory copies.
+ *
+ * This activity record represents a memory copy
+ * (CUPTI_ACTIVITY_KIND_MEMCPY).
+ *
+ * Structure deprecated in CUDA 12.8: Refer to CUpti_ActivityMemcpy6
+ * for the latest structure.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * The activity record kind, must be CUPTI_ACTIVITY_KIND_MEMCPY.
+ */
+ CUpti_ActivityKind kind;
+
+ /**
+ * The kind of the memory copy, stored as a byte to reduce record
+ * size. \see CUpti_ActivityMemcpyKind
+ */
+ uint8_t copyKind;
+
+ /**
+ * The source memory kind read by the memory copy, stored as a byte
+ * to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t srcKind;
+
+ /**
+ * The destination memory kind read by the memory copy, stored as a
+ * byte to reduce record size. \see CUpti_ActivityMemoryKind
+ */
+ uint8_t dstKind;
+
+ /**
+ * The flags associated with the memory copy. \see CUpti_ActivityFlag
+ */
+ uint8_t flags;
+
+ /**
+ * The number of bytes transferred by the memory copy.
+ */
+ uint64_t bytes;
+
+ /**
+ * The start timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t start;
+
+ /**
+ * The end timestamp for the memory copy, in ns. A value of 0 for
+ * both the start and end timestamps indicates that timestamp
+ * information could not be collected for the memory copy.
+ */
+ uint64_t end;
+
+ /**
+ * The ID of the device where the memory copy is occurring.
+ */
+ uint32_t deviceId;
+
+ /**
+ * The ID of the context where the memory copy is occurring.
+ */
+ uint32_t contextId;
+
+ /**
+ * The ID of the stream where the memory copy is occurring.
+ */
+ uint32_t streamId;
+
+ /**
+ * The correlation ID of the memory copy. Each memory copy is
+ * assigned a unique correlation ID that is identical to the
+ * correlation ID in the driver API activity record that launched
+ * the memory copy.
+ */
+ uint32_t correlationId;
+
+ /**
+ * The runtime correlation ID of the memory copy. Each memory copy
+ * is assigned a unique runtime correlation ID that is identical to
+ * the correlation ID in the runtime API activity record that
+ * launched the memory copy.
+ */
+ uint32_t runtimeCorrelationId;
+
+#ifdef CUPTILP64
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ uint32_t pad;
+#endif
+
+ /**
+ * Undefined. Reserved for internal use.
+ */
+ void *reserved0;
+
+ /**
+ * The unique ID of the graph node that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint64_t graphNodeId;
+
+ /**
+ * The unique ID of the graph that executed this memcpy through graph launch.
+ * This field will be 0 if the memcpy is not done through graph launch.
+ */
+ uint32_t graphId;
+
+ /**
+ * The ID of the HW channel on which the memory copy is occurring.
+ */
+ uint32_t channelID;
+
+ /**
+ * The type of the channel
+ */
+ CUpti_ChannelType channelType;
+
+ /**
+ * Reserved for internal use.
+ */
+ uint32_t pad2;
+} CUpti_ActivityMemcpy5;
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_ACTIVITY_DEPRECATED_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_callbacks.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_callbacks.h
new file mode 100644
index 0000000000000000000000000000000000000000..7dc1c94b2a6dc2cbab63af058ccec71f822cf63b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_callbacks.h
@@ -0,0 +1,863 @@
+/*
+ * Copyright 2010-2023 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(__CUPTI_CALLBACKS_H__)
+#define __CUPTI_CALLBACKS_H__
+
+#include
+#include
+#include
+#include
+#include
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_CALLBACK_API CUPTI Callback API
+ * Functions, types, and enums that implement the CUPTI Callback API.
+ * @{
+ */
+
+/**
+ * \brief Specifies the point in an API call that a callback is issued.
+ *
+ * Specifies the point in an API call that a callback is issued. This
+ * value is communicated to the callback function via \ref
+ * CUpti_CallbackData::callbackSite.
+ */
+typedef enum {
+ /**
+ * The callback is at the entry of the API call.
+ */
+ CUPTI_API_ENTER = 0,
+ /**
+ * The callback is at the exit of the API call.
+ */
+ CUPTI_API_EXIT = 1,
+ CUPTI_API_CBSITE_FORCE_INT = 0x7fffffff
+} CUpti_ApiCallbackSite;
+
+/**
+ * \brief Callback domains.
+ *
+ * Callback domains. Each domain represents callback points for a
+ * group of related API functions or CUDA driver activity.
+ */
+typedef enum {
+ /**
+ * Invalid domain.
+ */
+ CUPTI_CB_DOMAIN_INVALID = 0,
+ /**
+ * Domain containing callback points for all driver API functions.
+ */
+ CUPTI_CB_DOMAIN_DRIVER_API = 1,
+ /**
+ * Domain containing callback points for all runtime API
+ * functions.
+ */
+ CUPTI_CB_DOMAIN_RUNTIME_API = 2,
+ /**
+ * Domain containing callback points for CUDA resource tracking.
+ */
+ CUPTI_CB_DOMAIN_RESOURCE = 3,
+ /**
+ * Domain containing callback points for CUDA synchronization.
+ */
+ CUPTI_CB_DOMAIN_SYNCHRONIZE = 4,
+ /**
+ * Domain containing callback points for NVTX API functions.
+ */
+ CUPTI_CB_DOMAIN_NVTX = 5,
+ /**
+ * Domain containing callback points for various states.
+ */
+ CUPTI_CB_DOMAIN_STATE = 6,
+
+ CUPTI_CB_DOMAIN_SIZE,
+
+ CUPTI_CB_DOMAIN_FORCE_INT = 0x7fffffff
+} CUpti_CallbackDomain;
+
+/**
+ * \brief Callback IDs for resource domain.
+ *
+ * Callback IDs for resource domain, CUPTI_CB_DOMAIN_RESOURCE. This
+ * value is communicated to the callback function via the \p cbid
+ * parameter.
+ */
+typedef enum {
+ /**
+ * Invalid resource callback ID.
+ */
+ CUPTI_CBID_RESOURCE_INVALID = 0,
+ /**
+ * A new context has been created.
+ */
+ CUPTI_CBID_RESOURCE_CONTEXT_CREATED = 1,
+ /**
+ * A context is about to be destroyed.
+ */
+ CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING = 2,
+ /**
+ * A new stream has been created.
+ */
+ CUPTI_CBID_RESOURCE_STREAM_CREATED = 3,
+ /**
+ * A stream is about to be destroyed.
+ */
+ CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING = 4,
+ /**
+ * The driver has finished initializing.
+ */
+ CUPTI_CBID_RESOURCE_CU_INIT_FINISHED = 5,
+ /**
+ * A module has been loaded.
+ */
+ CUPTI_CBID_RESOURCE_MODULE_LOADED = 6,
+ /**
+ * A module is about to be unloaded.
+ */
+ CUPTI_CBID_RESOURCE_MODULE_UNLOAD_STARTING = 7,
+ /**
+ * The current module which is being profiled.
+ */
+ CUPTI_CBID_RESOURCE_MODULE_PROFILED = 8,
+ /**
+ * CUDA graph has been created.
+ */
+ CUPTI_CBID_RESOURCE_GRAPH_CREATED = 9,
+ /**
+ * CUDA graph is about to be destroyed.
+ */
+ CUPTI_CBID_RESOURCE_GRAPH_DESTROY_STARTING = 10,
+ /**
+ * CUDA graph is cloned.
+ */
+ CUPTI_CBID_RESOURCE_GRAPH_CLONED = 11,
+ /**
+ * CUDA graph node is about to be created
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATE_STARTING = 12,
+ /**
+ * CUDA graph node is created.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CREATED = 13,
+ /**
+ * CUDA graph node is about to be destroyed.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DESTROY_STARTING = 14,
+ /**
+ * Dependency on a CUDA graph node is created.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_CREATED = 15,
+ /**
+ * Dependency on a CUDA graph node is destroyed.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_DEPENDENCY_DESTROY_STARTING = 16,
+ /**
+ * An executable CUDA graph is about to be created.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATE_STARTING = 17,
+ /**
+ * An executable CUDA graph is created.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_CREATED = 18,
+ /**
+ * An executable CUDA graph is about to be destroyed.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHEXEC_DESTROY_STARTING = 19,
+ /**
+ * CUDA graph node is cloned.
+ */
+ CUPTI_CBID_RESOURCE_GRAPHNODE_CLONED = 20,
+ /**
+ * CUDA stream attribute is changed.
+ */
+ CUPTI_CBID_RESOURCE_STREAM_ATTRIBUTE_CHANGED = 21,
+
+ CUPTI_CBID_RESOURCE_SIZE,
+ CUPTI_CBID_RESOURCE_FORCE_INT = 0x7fffffff
+} CUpti_CallbackIdResource;
+
+/**
+ * \brief Callback IDs for synchronization domain.
+ *
+ * Callback IDs for synchronization domain,
+ * CUPTI_CB_DOMAIN_SYNCHRONIZE. This value is communicated to the
+ * callback function via the \p cbid parameter.
+ */
+typedef enum {
+ /**
+ * Invalid synchronize callback ID.
+ */
+ CUPTI_CBID_SYNCHRONIZE_INVALID = 0,
+ /**
+ * Stream synchronization has completed for the stream.
+ */
+ CUPTI_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED = 1,
+ /**
+ * Context synchronization has completed for the context.
+ */
+ CUPTI_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED = 2,
+ CUPTI_CBID_SYNCHRONIZE_SIZE,
+ CUPTI_CBID_SYNCHRONIZE_FORCE_INT = 0x7fffffff
+} CUpti_CallbackIdSync;
+
+
+/**
+ * \brief Callback IDs for state domain.
+ *
+ * Callback IDs for state domain,
+ * CUPTI_CB_DOMAIN_STATE. This value is communicated to the
+ * callback function via the \p cbid parameter.
+ */
+typedef enum {
+ /**
+ * Invalid state callback ID.
+ */
+ CUPTI_CBID_STATE_INVALID = 0,
+ /**
+ * Notification of fatal errors - high impact, non-recoverable
+ * When encountered, CUPTI automatically invokes cuptiFinalize()
+ * User can control behavior of the application in future from
+ * receiving this callback - such as continuing without profiling, or
+ * terminating the whole application.
+ */
+ CUPTI_CBID_STATE_FATAL_ERROR = 1,
+ /**
+ * Notification of non fatal errors - high impact, but recoverable
+ * This notification is not issued in the current release.
+ */
+ CUPTI_CBID_STATE_ERROR = 2,
+ /**
+ * Notification of warnings - low impact, recoverable.
+ */
+ CUPTI_CBID_STATE_WARNING = 3,
+
+ CUPTI_CBID_STATE_SIZE,
+ CUPTI_CBID_STATE_FORCE_INT = 0x7fffffff
+} CUpti_CallbackIdState;
+
+
+/**
+ * \brief Data passed into a runtime or driver API callback function.
+ *
+ * Data passed into a runtime or driver API callback function as the
+ * \p cbdata argument to \ref CUpti_CallbackFunc. The \p cbdata will
+ * be this type for \p domain equal to CUPTI_CB_DOMAIN_DRIVER_API or
+ * CUPTI_CB_DOMAIN_RUNTIME_API. The callback data is valid only within
+ * the invocation of the callback function that is passed the data. If
+ * you need to retain some data for use outside of the callback, you
+ * must make a copy of that data. For example, if you make a shallow
+ * copy of CUpti_CallbackData within a callback, you cannot
+ * dereference \p functionParams outside of that callback to access
+ * the function parameters. \p functionName is an exception: the
+ * string pointed to by \p functionName is a global constant and so
+ * may be accessed outside of the callback.
+ */
+typedef struct {
+ /**
+ * Point in the runtime or driver function from where the callback
+ * was issued.
+ */
+ CUpti_ApiCallbackSite callbackSite;
+
+ /**
+ * Name of the runtime or driver API function which issued the
+ * callback. This string is a global constant and so may be
+ * accessed outside of the callback.
+ */
+ const char *functionName;
+
+ /**
+ * Pointer to the arguments passed to the runtime or driver API
+ * call. See generated_cuda_runtime_api_meta.h and
+ * generated_cuda_meta.h for structure definitions for the
+ * parameters for each runtime and driver API function.
+ */
+ const void *functionParams;
+
+ /**
+ * Pointer to the return value of the runtime or driver API
+ * call. This field is only valid within the exit::CUPTI_API_EXIT
+ * callback. For a runtime API \p functionReturnValue points to a
+ * \p cudaError_t. For a driver API \p functionReturnValue points
+ * to a \p CUresult.
+ */
+ void *functionReturnValue;
+
+ /**
+ * Name of the symbol operated on by the runtime or driver API
+ * function which issued the callback. This entry is valid only for
+ * driver and runtime launch callbacks, where it returns the name of
+ * the kernel.
+ */
+ const char *symbolName;
+
+ /**
+ * Driver context current to the thread, or null if no context is
+ * current. This value can change from the entry to exit callback
+ * of a runtime API function if the runtime initializes a context.
+ */
+ CUcontext context;
+
+ /**
+ * Unique ID for the CUDA context associated with the thread. The
+ * UIDs are assigned sequentially as contexts are created and are
+ * unique within a process.
+ */
+ uint32_t contextUid;
+
+ /**
+ * Pointer to data shared between the entry and exit callbacks of
+ * a given runtime or drive API function invocation. This field
+ * can be used to pass 64-bit values from the entry callback to
+ * the corresponding exit callback.
+ */
+ uint64_t *correlationData;
+
+ /**
+ * The activity record correlation ID for this callback. For a
+ * driver domain callback (i.e. \p domain
+ * CUPTI_CB_DOMAIN_DRIVER_API) this ID will equal the correlation ID
+ * in the CUpti_ActivityAPI record corresponding to the CUDA driver
+ * function call. For a runtime domain callback (i.e. \p domain
+ * CUPTI_CB_DOMAIN_RUNTIME_API) this ID will equal the correlation
+ * ID in the CUpti_ActivityAPI record corresponding to the CUDA
+ * runtime function call. Within the callback, this ID can be
+ * recorded to correlate user data with the activity record. This
+ * field is new in 4.1.
+ */
+ uint32_t correlationId;
+
+} CUpti_CallbackData;
+
+/**
+ * \brief Data passed into a resource callback function.
+ *
+ * Data passed into a resource callback function as the \p cbdata
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The callback
+ * data is valid only within the invocation of the callback function
+ * that is passed the data. If you need to retain some data for use
+ * outside of the callback, you must make a copy of that data.
+ */
+typedef struct {
+ /**
+ * For CUPTI_CBID_RESOURCE_CONTEXT_CREATED and
+ * CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING, the context being
+ * created or destroyed. For CUPTI_CBID_RESOURCE_STREAM_CREATED and
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the context
+ * containing the stream being created or destroyed.
+ */
+ CUcontext context;
+
+ union {
+ /**
+ * For CUPTI_CBID_RESOURCE_STREAM_CREATED and
+ * CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the stream being
+ * created or destroyed.
+ */
+ CUstream stream;
+ } resourceHandle;
+
+ /**
+ * Reserved for future use.
+ */
+ void *resourceDescriptor;
+} CUpti_ResourceData;
+
+
+/**
+ * \brief Module data passed into a resource callback function.
+ *
+ * CUDA module data passed into a resource callback function as the \p cbdata
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The module
+ * data is valid only within the invocation of the callback function
+ * that is passed the data. If you need to retain some data for use
+ * outside of the callback, you must make a copy of that data.
+ */
+
+typedef struct {
+ /**
+ * Identifier to associate with the CUDA module.
+ */
+ uint32_t moduleId;
+
+ /**
+ * The size of the cubin.
+ */
+ size_t cubinSize;
+
+ /**
+ * Pointer to the associated cubin.
+ */
+ const char *pCubin;
+} CUpti_ModuleResourceData;
+
+/**
+ * \brief CUDA graphs data passed into a resource callback function.
+ *
+ * CUDA graphs data passed into a resource callback function as the \p cbdata
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The graph
+ * data is valid only within the invocation of the callback function
+ * that is passed the data. If you need to retain some data for use
+ * outside of the callback, you must make a copy of that data.
+ */
+
+typedef struct {
+ /**
+ * CUDA graph
+ */
+ CUgraph graph;
+ /**
+ * The original CUDA graph from which \param graph is cloned
+ */
+ CUgraph originalGraph;
+ /**
+ * CUDA graph node
+ */
+ CUgraphNode node;
+ /**
+ * The original CUDA graph node from which \param node is cloned
+ */
+ CUgraphNode originalNode;
+ /**
+ * Type of the \param node
+ */
+ CUgraphNodeType nodeType;
+ /**
+ * The dependent graph node
+ * The size of the array is \param numDependencies.
+ */
+ CUgraphNode dependency;
+ /**
+ * CUDA executable graph
+ */
+ CUgraphExec graphExec;
+} CUpti_GraphData;
+
+/**
+ * \brief Data passed into a synchronize callback function.
+ *
+ * Data passed into a synchronize callback function as the \p cbdata
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
+ * type for \p domain equal to CUPTI_CB_DOMAIN_SYNCHRONIZE. The
+ * callback data is valid only within the invocation of the callback
+ * function that is passed the data. If you need to retain some data
+ * for use outside of the callback, you must make a copy of that data.
+ */
+typedef struct {
+ /**
+ * The context of the stream being synchronized.
+ */
+ CUcontext context;
+ /**
+ * The stream being synchronized.
+ */
+ CUstream stream;
+} CUpti_SynchronizeData;
+
+/**
+ * \brief Data passed into a NVTX callback function.
+ *
+ * Data passed into a NVTX callback function as the \p cbdata argument
+ * to \ref CUpti_CallbackFunc. The \p cbdata will be this type for \p
+ * domain equal to CUPTI_CB_DOMAIN_NVTX. Unless otherwise notes, the
+ * callback data is valid only within the invocation of the callback
+ * function that is passed the data. If you need to retain some data
+ * for use outside of the callback, you must make a copy of that data.
+ */
+typedef struct {
+ /**
+ * Name of the NVTX API function which issued the callback. This
+ * string is a global constant and so may be accessed outside of the
+ * callback.
+ */
+ const char *functionName;
+
+ /**
+ * Pointer to the arguments passed to the NVTX API call. See
+ * generated_nvtx_meta.h for structure definitions for the
+ * parameters for each NVTX API function.
+ */
+ const void *functionParams;
+
+ /**
+ * Pointer to the return value of the NVTX API call. See
+ * nvToolsExt.h for each NVTX API function's return value.
+ */
+ const void *functionReturnValue;
+} CUpti_NvtxData;
+
+/**
+ * \brief Stream attribute data passed into a resource callback function
+ * for CUPTI_CBID_RESOURCE_STREAM_ATTRIBUTE_CHANGED callback
+
+ * Data passed into a resource callback function as the \p cbdata
+ * argument to \ref CUpti_CallbackFunc. The \p cbdata will be this
+ * type for \p domain equal to CUPTI_CB_DOMAIN_RESOURCE. The
+ * stream attribute data is valid only within the invocation of the callback
+ * function that is passed the data. If you need to retain some data
+ * for use outside of the callback, you must make a copy of that data.
+ */
+typedef struct {
+ /**
+ * The CUDA stream handle for the attribute
+ */
+ CUstream stream;
+
+ /**
+ * The type of the CUDA stream attribute
+ */
+ CUstreamAttrID attr;
+
+ /**
+ * The value of the CUDA stream attribute
+ */
+ const CUstreamAttrValue *value;
+} CUpti_StreamAttrData;
+
+/**
+ * \brief Data passed into a State callback function.
+ *
+ * Data passed into a State callback function as the \p cbdata argument
+ * to \ref CUpti_CallbackFunc. The \p cbdata will be this type for \p
+ * domain equal to CUPTI_CB_DOMAIN_STATE and callback Ids belonging to CUpti_CallbackIdState.
+ * Unless otherwise noted, the callback data is valid only within the invocation of the callback
+ * function that is passed the data. If you need to retain some data
+ * for use outside of the callback, you must make a copy of that data.
+ */
+typedef struct {
+ union {
+ /**
+ * Data passed along with the callback Ids
+ * Enum CUpti_CallbackIdState used to denote callback ids
+ */
+ struct {
+ /**
+ * Error code
+ */
+ CUptiResult result;
+ /**
+ * String containing more details. It can be NULL.
+ */
+ const char *message;
+ } notification;
+ };
+} CUpti_StateData;
+
+/**
+ * \brief An ID for a driver API, runtime API, resource or
+ * synchronization callback.
+ *
+ * An ID for a driver API, runtime API, resource or synchronization
+ * callback. Within a driver API callback this should be interpreted
+ * as a CUpti_driver_api_trace_cbid value (these values are defined in
+ * cupti_driver_cbid.h). Within a runtime API callback this should be
+ * interpreted as a CUpti_runtime_api_trace_cbid value (these values
+ * are defined in cupti_runtime_cbid.h). Within a resource API
+ * callback this should be interpreted as a \ref
+ * CUpti_CallbackIdResource value. Within a synchronize API callback
+ * this should be interpreted as a \ref CUpti_CallbackIdSync value.
+ */
+typedef uint32_t CUpti_CallbackId;
+
+/**
+ * \brief Function type for a callback.
+ *
+ * Function type for a callback. The type of the data passed to the
+ * callback in \p cbdata depends on the \p domain. If \p domain is
+ * CUPTI_CB_DOMAIN_DRIVER_API or CUPTI_CB_DOMAIN_RUNTIME_API the type
+ * of \p cbdata will be CUpti_CallbackData. If \p domain is
+ * CUPTI_CB_DOMAIN_RESOURCE the type of \p cbdata will be
+ * CUpti_ResourceData. If \p domain is CUPTI_CB_DOMAIN_SYNCHRONIZE the
+ * type of \p cbdata will be CUpti_SynchronizeData. If \p domain is
+ * CUPTI_CB_DOMAIN_NVTX the type of \p cbdata will be CUpti_NvtxData.
+ *
+ * \param userdata User data supplied at subscription of the callback
+ * \param domain The domain of the callback
+ * \param cbid The ID of the callback
+ * \param cbdata Data passed to the callback.
+ */
+typedef void (CUPTIAPI *CUpti_CallbackFunc)(
+ void *userdata,
+ CUpti_CallbackDomain domain,
+ CUpti_CallbackId cbid,
+ const void *cbdata);
+
+/**
+ * \brief A callback subscriber.
+ */
+typedef struct CUpti_Subscriber_st *CUpti_SubscriberHandle;
+
+/**
+ * \brief Pointer to an array of callback domains.
+ */
+typedef CUpti_CallbackDomain *CUpti_DomainTable;
+
+/**
+ * \brief Get the available callback domains.
+ *
+ * Returns in \p *domainTable an array of size \p *domainCount of all
+ * the available callback domains.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param domainCount Returns number of callback domains
+ * \param domainTable Returns pointer to array of available callback domains
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p domainCount or \p domainTable are NULL
+ */
+CUptiResult CUPTIAPI cuptiSupportedDomains(size_t *domainCount,
+ CUpti_DomainTable *domainTable);
+
+/**
+ * \brief Initialize a callback subscriber with a callback function
+ * and user data.
+ *
+ * Initializes a callback subscriber with a callback function and
+ * (optionally) a pointer to user data. The returned subscriber handle
+ * can be used to enable and disable the callback for specific domains
+ * and callback IDs.
+ * \note Only a single subscriber can be registered at a time. To ensure
+ * that no other CUPTI client interrupts the profiling session, it's the
+ * responsibility of all the CUPTI clients to call this function before
+ * starting the profling session. In case profiling session is already
+ * started by another CUPTI client, this function returns the error code
+ * CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED.
+ * Note that this function returns the same error when application is
+ * launched using NVIDIA tools like nvprof, Visual Profiler, Nsight Systems,
+ * Nsight Compute, cuda-gdb and cuda-memcheck.
+ * \note This function does not enable any callbacks.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param subscriber Returns handle to initialize subscriber
+ * \param callback The callback function
+ * \param userdata A pointer to user data. This data will be passed to
+ * the callback function via the \p userdata parameter.
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialize CUPTI
+ * \retval CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED if there is already a CUPTI subscriber
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL
+ */
+CUptiResult CUPTIAPI cuptiSubscribe(CUpti_SubscriberHandle *subscriber,
+ CUpti_CallbackFunc callback,
+ void *userdata);
+
+/**
+ * \brief Unregister a callback subscriber.
+ *
+ * Removes a callback subscriber so that no future callbacks will be
+ * issued to that subscriber.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param subscriber Handle to the initialize subscriber
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is NULL or not initialized
+ */
+CUptiResult CUPTIAPI cuptiUnsubscribe(CUpti_SubscriberHandle subscriber);
+
+/**
+ * \brief Get the current enabled/disabled state of a callback for a specific
+ * domain and function ID.
+ *
+ * Returns non-zero in \p *enable if the callback for a domain and
+ * callback ID is enabled, and zero if not enabled.
+ *
+ * \note \b Thread-safety: a subscriber must serialize access to
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
+ * the results are undefined.
+ *
+ * \param enable Returns non-zero if callback enabled, zero if not enabled
+ * \param subscriber Handle to the initialize subscriber
+ * \param domain The domain of the callback
+ * \param cbid The ID of the callback
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p enabled is NULL, or if \p
+ * subscriber, \p domain or \p cbid is invalid.
+ */
+CUptiResult CUPTIAPI cuptiGetCallbackState(uint32_t *enable,
+ CUpti_SubscriberHandle subscriber,
+ CUpti_CallbackDomain domain,
+ CUpti_CallbackId cbid);
+
+/**
+ * \brief Enable or disabled callbacks for a specific domain and
+ * callback ID.
+ *
+ * Enable or disabled callbacks for a subscriber for a specific domain
+ * and callback ID.
+ *
+ * \note \b Thread-safety: a subscriber must serialize access to
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
+ * d, c) and cuptiEnableCallback(sub, d, c) are called concurrently,
+ * the results are undefined.
+ *
+ * \param enable New enable state for the callback. Zero disables the
+ * callback, non-zero enables the callback.
+ * \param subscriber - Handle to callback subscription
+ * \param domain The domain of the callback
+ * \param cbid The ID of the callback
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber, \p domain or \p
+ * cbid is invalid.
+ */
+CUptiResult CUPTIAPI cuptiEnableCallback(uint32_t enable,
+ CUpti_SubscriberHandle subscriber,
+ CUpti_CallbackDomain domain,
+ CUpti_CallbackId cbid);
+
+/**
+ * \brief Enable or disabled all callbacks for a specific domain.
+ *
+ * Enable or disabled all callbacks for a specific domain.
+ *
+ * \note \b Thread-safety: a subscriber must serialize access to
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackEnabled(sub,
+ * d, *) and cuptiEnableDomain(sub, d) are called concurrently, the
+ * results are undefined.
+ *
+ * \param enable New enable state for all callbacks in the
+ * domain. Zero disables all callbacks, non-zero enables all
+ * callbacks.
+ * \param subscriber - Handle to callback subscription
+ * \param domain The domain of the callback
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber or \p domain is invalid
+ */
+CUptiResult CUPTIAPI cuptiEnableDomain(uint32_t enable,
+ CUpti_SubscriberHandle subscriber,
+ CUpti_CallbackDomain domain);
+
+/**
+ * \brief Enable or disable all callbacks in all domains.
+ *
+ * Enable or disable all callbacks in all domains.
+ *
+ * \note \b Thread-safety: a subscriber must serialize access to
+ * cuptiGetCallbackState, cuptiEnableCallback, cuptiEnableDomain, and
+ * cuptiEnableAllDomains. For example, if cuptiGetCallbackState(sub,
+ * d, *) and cuptiEnableAllDomains(sub) are called concurrently, the
+ * results are undefined.
+ *
+ * \param enable New enable state for all callbacks in all
+ * domain. Zero disables all callbacks, non-zero enables all
+ * callbacks.
+ * \param subscriber - Handle to callback subscription
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if unable to initialized CUPTI
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p subscriber is invalid
+ */
+CUptiResult CUPTIAPI cuptiEnableAllDomains(uint32_t enable,
+ CUpti_SubscriberHandle subscriber);
+
+/**
+ * \brief Get the name of a callback for a specific domain and callback ID.
+ *
+ * Returns a pointer to the name c_string in \p **name.
+ *
+ * \note \b Names are available only for the DRIVER and RUNTIME domains.
+ *
+ * \param domain The domain of the callback
+ * \param cbid The ID of the callback
+ * \param name Returns pointer to the name string on success, NULL otherwise
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p name is NULL, or if
+ * \p domain or \p cbid is invalid.
+ */
+CUptiResult CUPTIAPI cuptiGetCallbackName(CUpti_CallbackDomain domain,
+ uint32_t cbid,
+ const char **name);
+
+/** @} */ /* END CUPTI_CALLBACK_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // file guard
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_checkpoint.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_checkpoint.h
new file mode 100644
index 0000000000000000000000000000000000000000..36eeddc4e2b7bfd1902ce313d71f173db70beaef
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_checkpoint.h
@@ -0,0 +1,127 @@
+#pragma once
+
+#include
+#include
+
+#include
+#include
+
+namespace NV { namespace Cupti { namespace Checkpoint {
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * \defgroup CUPTI_CHECKPOINT_API CUPTI Checkpoint API
+ * Functions, types, and enums that implement the CUPTI Checkpoint API.
+ * @{
+ */
+
+/**
+ * \brief Specifies optimization options for a checkpoint, may be OR'd together to specify multiple options.
+ */
+typedef enum
+{
+ CUPTI_CHECKPOINT_OPT_NONE = 0, //!< Default behavior
+ CUPTI_CHECKPOINT_OPT_TRANSFER = 1, //!< Determine which mem blocks have changed, and only restore those. This optimization is cached, which means cuptiCheckpointRestore must always be called at the same point in the application when this option is enabled, or the result may be incorrect.
+} CUpti_CheckpointOptimizations;
+
+/**
+ * \brief Configuration and handle for a CUPTI Checkpoint
+ *
+ * A CUptiCheckpoint object should be initialized with desired options prior to passing into any
+ * CUPTI Checkpoint API function. The first call into a Checkpoint API function will initialize internal
+ * state based on these options. Subsequent changes to these options will not have any effect.
+ *
+ * Checkpoint data is saved in device, host, and filesystem space. There are options to reserve memory
+ * at each level (device, host, filesystem) which are intended to allow a guarantee that a certain amount
+ * of memory will remain free for use after the checkpoint is saved.
+ * Note, however, that falling back to slower levels of memory (host, and then filesystem) to save the checkpoint
+ * will result in performance degradation.
+ * Currently, the filesystem limitation is not implemented. Note that falling back to filesystem storage may
+ * significantly impact the performance for saving and restoring a checkpoint.
+ */
+typedef struct
+{
+ size_t structSize; //!< [in] Must be set to CUpti_Checkpoint_STRUCT_SIZE
+
+ CUcontext ctx; //!< [in] Set to context to save from, or will use current context if NULL
+
+ size_t reserveDeviceMB; //!< [in] Restrict checkpoint from using last N MB of device memory (-1 = use no device memory)
+ size_t reserveHostMB; //!< [in] Restrict checkpoint from using last N MB of host memory (-1 = use no host memory)
+ uint8_t allowOverwrite; //!< [in] Boolean, Allow checkpoint to save over existing checkpoint
+ uint8_t optimizations; //!< [in] Mask of CUpti_CheckpointOptimizations flags for this checkpoint
+
+ void * pPriv; //!< [in] Assign to NULL
+} CUpti_Checkpoint;
+
+#define CUpti_Checkpoint_STRUCT_SIZE \
+(offsetof(CUpti_Checkpoint, pPriv) + \
+sizeof(((CUpti_Checkpoint*)(nullptr))->pPriv))
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \brief Initialize and save a checkpoint of the device state associated with the handle context
+ *
+ * Uses the handle options to configure and save a checkpoint of the device state associated with the specified context.
+ *
+ * \param handle A pointer to a CUpti_Checkpoint object
+ *
+ * \retval CUPTI_SUCCESS if a checkpoint was successfully initialized and saved
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p handle does not appear to refer to a valid CUpti_Checkpoint
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_INVALID_DEVICE if device associated with context is not compatible with checkpoint API
+ * \retval CUPTI_ERROR_INVALID_OPERATION if Save is requested over an existing checkpoint, but \p allowOverwrite was not originally specified
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if as configured, not enough backing storage space to save the checkpoint
+ */
+CUptiResult cuptiCheckpointSave(CUpti_Checkpoint * const handle);
+
+/**
+ * \brief Restore a checkpoint to the device associated with its context
+ *
+ * Restores device, pinned, and allocated memory to the state when the checkpoint was saved
+ *
+ * \param handle A pointer to a previously saved CUpti_Checkpoint object
+ *
+ * \retval CUTPI_SUCCESS if the checkpoint was successfully restored
+ * \retval CUPTI_ERROR_NOT_INITIALIZED if the checkpoint was not previously initialized
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if the handle appears invalid
+ * \retval CUPTI_ERROR_UNKNOWN if the restore or optimization operation fails
+ */
+CUptiResult cuptiCheckpointRestore(CUpti_Checkpoint * const handle);
+
+/**
+ * \brief Free the backing data for a checkpoint
+ *
+ * Frees all associated device, host memory and filesystem storage used for this context.
+ * After freeing a handle, it may be re-used as if it was new - options may be re-configured and will
+ * take effect on the next call to \p cuptiCheckpointSave.
+ *
+ * \param handle A pointer to a previously saved CUpti_Checkpoint object
+ *
+ * \retval CUPTI_SUCCESS if the handle was successfully freed
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if the handle was already freed or appears invalid
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if the context is no longer valid
+ */
+CUptiResult cuptiCheckpointFree(CUpti_Checkpoint * const handle);
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+// Exit namespace NV::Cupti::Checkpoint
+}}}
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_common.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..96d228c4df3c1f090a4979bfe10132e080042fef
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_common.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2023 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(__CUPTI_COMMON_H__)
+#define __CUPTI_COMMON_H__
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#ifndef CUPTIUTILAPI
+#ifdef _WIN32
+#define CUPTIUTILAPI __stdcall
+#else
+#define CUPTIUTILAPI
+#endif
+#endif
+
+#if defined(__LP64__)
+#define CUPTILP64 1
+#elif defined(_WIN64)
+#define CUPTILP64 1
+#else
+#undef CUPTILP64
+#endif
+
+#define ACTIVITY_RECORD_ALIGNMENT 8
+#if defined(_WIN32) // Windows 32- and 64-bit
+#define START_PACKED_ALIGNMENT __pragma(pack(push,1)) // exact fit - no padding
+#define PACKED_ALIGNMENT __declspec(align(ACTIVITY_RECORD_ALIGNMENT))
+#define END_PACKED_ALIGNMENT __pragma(pack(pop))
+#elif defined(__GNUC__) // GCC
+#define START_PACKED_ALIGNMENT
+#define PACKED_ALIGNMENT __attribute__ ((__packed__)) __attribute__ ((aligned (ACTIVITY_RECORD_ALIGNMENT)))
+#define END_PACKED_ALIGNMENT
+#else // all other compilers
+#define START_PACKED_ALIGNMENT
+#define PACKED_ALIGNMENT
+#define END_PACKED_ALIGNMENT
+#endif
+
+#endif /*__CUPTI_COMMON_H__*/
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_driver_cbid.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_driver_cbid.h
new file mode 100644
index 0000000000000000000000000000000000000000..4b23832372a3a69c7bfbf0aa188b0417d9270be6
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_driver_cbid.h
@@ -0,0 +1,799 @@
+
+// *************************************************************************
+// Definitions of indices for API functions, unique across entire API
+// *************************************************************************
+
+// This file is generated. Any changes you make will be lost during the next clean build.
+// CUDA public interface, for type definitions and cu* function prototypes
+
+#if !defined(_CUPTI_DRIVER_CBID_H_)
+#define _CUPTI_DRIVER_CBID_H_
+
+typedef enum CUpti_driver_api_trace_cbid_enum {
+ CUPTI_DRIVER_TRACE_CBID_INVALID = 0,
+ CUPTI_DRIVER_TRACE_CBID_cuInit = 1,
+ CUPTI_DRIVER_TRACE_CBID_cuDriverGetVersion = 2,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGet = 3,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetCount = 4,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetName = 5,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceComputeCapability = 6,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem = 7,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetProperties = 8,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetAttribute = 9,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate = 10,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy = 11,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxAttach = 12,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDetach = 13,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent = 14,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent = 15,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetDevice = 16,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSynchronize = 17,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoad = 18,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadData = 19,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadDataEx = 20,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleLoadFatBinary = 21,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleUnload = 22,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetFunction = 23,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal = 24,
+ CUPTI_DRIVER_TRACE_CBID_cu64ModuleGetGlobal = 25,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetTexRef = 26,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo = 27,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetInfo = 28,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc = 29,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAlloc = 30,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch = 31,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemAllocPitch = 32,
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree = 33,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemFree = 34,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange = 35,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemGetAddressRange = 36,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost = 37,
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeHost = 38,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc = 39,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer = 40,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostGetDevicePointer = 41,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetFlags = 42,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD = 43,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoD = 44,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH = 45,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoH = 46,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD = 47,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoD = 48,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA = 49,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoA = 50,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD = 51,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyAtoD = 52,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA = 53,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH = 54,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA = 55,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D = 56,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned = 57,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D = 58,
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3D = 59,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync = 60,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyHtoDAsync = 61,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync = 62,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoHAsync = 63,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync = 64,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemcpyDtoDAsync = 65,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync = 66,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync = 67,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync = 68,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync = 69,
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy3DAsync = 70,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8 = 71,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8 = 72,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16 = 73,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16 = 74,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32 = 75,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32 = 76,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8 = 77,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8 = 78,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16 = 79,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16 = 80,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32 = 81,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32 = 82,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetBlockShape = 83,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedSize = 84,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetAttribute = 85,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetCacheConfig = 86,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate = 87,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor = 88,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayDestroy = 89,
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate = 90,
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor = 91,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefCreate = 92,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefDestroy = 93,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetArray = 94,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress = 95,
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress = 96,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D = 97,
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefSetAddress2D = 98,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFormat = 99,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddressMode = 100,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFilterMode = 101,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetFlags = 102,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress = 103,
+ CUPTI_DRIVER_TRACE_CBID_cu64TexRefGetAddress = 104,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetArray = 105,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddressMode = 106,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFilterMode = 107,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFormat = 108,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetFlags = 109,
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetSize = 110,
+ CUPTI_DRIVER_TRACE_CBID_cuParamSeti = 111,
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetf = 112,
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetv = 113,
+ CUPTI_DRIVER_TRACE_CBID_cuParamSetTexRef = 114,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunch = 115,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGrid = 116,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchGridAsync = 117,
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreate = 118,
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord = 119,
+ CUPTI_DRIVER_TRACE_CBID_cuEventQuery = 120,
+ CUPTI_DRIVER_TRACE_CBID_cuEventSynchronize = 121,
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy = 122,
+ CUPTI_DRIVER_TRACE_CBID_cuEventElapsedTime = 123,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreate = 124,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery = 125,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize = 126,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy = 127,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnregisterResource = 128,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsSubResourceGetMappedArray = 129,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer = 130,
+ CUPTI_DRIVER_TRACE_CBID_cu64GraphicsResourceGetMappedPointer = 131,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags = 132,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources = 133,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources = 134,
+ CUPTI_DRIVER_TRACE_CBID_cuGetExportTable = 135,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetLimit = 136,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetLimit = 137,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevice = 138,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate = 139,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D10RegisterResource = 140,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10RegisterResource = 141,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnregisterResource = 142,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10MapResources = 143,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10UnmapResources = 144,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceSetMapFlags = 145,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedArray = 146,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer = 147,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize = 148,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch = 149,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions = 150,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevice = 151,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate = 152,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D11RegisterResource = 153,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevice = 154,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate = 155,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsD3D9RegisterResource = 156,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDirect3DDevice = 157,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterResource = 158,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterResource = 159,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapResources = 160,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapResources = 161,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceSetMapFlags = 162,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions = 163,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedArray = 164,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer = 165,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize = 166,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch = 167,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9Begin = 168,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9End = 169,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9RegisterVertexBuffer = 170,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer = 171,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnmapVertexBuffer = 172,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9UnregisterVertexBuffer = 173,
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate = 174,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterBuffer = 175,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsGLRegisterImage = 176,
+ CUPTI_DRIVER_TRACE_CBID_cuWGLGetDevice = 177,
+ CUPTI_DRIVER_TRACE_CBID_cuGLInit = 178,
+ CUPTI_DRIVER_TRACE_CBID_cuGLRegisterBufferObject = 179,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject = 180,
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObject = 181,
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnregisterBufferObject = 182,
+ CUPTI_DRIVER_TRACE_CBID_cuGLSetBufferObjectMapFlags = 183,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync = 184,
+ CUPTI_DRIVER_TRACE_CBID_cuGLUnmapBufferObjectAsync = 185,
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUGetDevice = 186,
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate = 187,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterVideoSurface = 188,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsVDPAURegisterOutputSurface = 189,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetSurfRef = 190,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefCreate = 191,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefDestroy = 192,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetFormat = 193,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefSetArray = 194,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetFormat = 195,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfRefGetArray = 196,
+ CUPTI_DRIVER_TRACE_CBID_cu64DeviceTotalMem = 197,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPointer = 198,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedSize = 199,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetMappedPitch = 200,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D10ResourceGetSurfaceDimensions = 201,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetSurfaceDimensions = 202,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPointer = 203,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedSize = 204,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9ResourceGetMappedPitch = 205,
+ CUPTI_DRIVER_TRACE_CBID_cu64D3D9MapVertexBuffer = 206,
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObject = 207,
+ CUPTI_DRIVER_TRACE_CBID_cu64GLMapBufferObjectAsync = 208,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDevices = 209,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreateOnDevice = 210,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDevices = 211,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreateOnDevice = 212,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9GetDevices = 213,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreateOnDevice = 214,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemHostAlloc = 215,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async = 216,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD8Async = 217,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async = 218,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD16Async = 219,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async = 220,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD32Async = 221,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async = 222,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D8Async = 223,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async = 224,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D16Async = 225,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async = 226,
+ CUPTI_DRIVER_TRACE_CBID_cu64MemsetD2D32Async = 227,
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayCreate = 228,
+ CUPTI_DRIVER_TRACE_CBID_cu64ArrayGetDescriptor = 229,
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DCreate = 230,
+ CUPTI_DRIVER_TRACE_CBID_cu64Array3DGetDescriptor = 231,
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2D = 232,
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DUnaligned = 233,
+ CUPTI_DRIVER_TRACE_CBID_cu64Memcpy2DAsync = 234,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v2 = 235,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10CtxCreate_v2 = 236,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11CtxCreate_v2 = 237,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9CtxCreate_v2 = 238,
+ CUPTI_DRIVER_TRACE_CBID_cuGLCtxCreate_v2 = 239,
+ CUPTI_DRIVER_TRACE_CBID_cuVDPAUCtxCreate_v2 = 240,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetGlobal_v2 = 241,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetInfo_v2 = 242,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAlloc_v2 = 243,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocPitch_v2 = 244,
+ CUPTI_DRIVER_TRACE_CBID_cuMemFree_v2 = 245,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAddressRange_v2 = 246,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostGetDevicePointer_v2 = 247,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_v2 = 248,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2 = 249,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2 = 250,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2 = 251,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2 = 252,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2 = 253,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2 = 254,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress_v2 = 255,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v2 = 256,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetAddress_v2 = 257,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedPointer_v2 = 258,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceTotalMem_v2 = 259,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPointer_v2 = 260,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedSize_v2 = 261,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetMappedPitch_v2 = 262,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10ResourceGetSurfaceDimensions_v2 = 263,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetSurfaceDimensions_v2 = 264,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPointer_v2 = 265,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedSize_v2 = 266,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9ResourceGetMappedPitch_v2 = 267,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D9MapVertexBuffer_v2 = 268,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2 = 269,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2 = 270,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostAlloc_v2 = 271,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayCreate_v2 = 272,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetDescriptor_v2 = 273,
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DCreate_v2 = 274,
+ CUPTI_DRIVER_TRACE_CBID_cuArray3DGetDescriptor_v2 = 275,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2 = 276,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2 = 277,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2 = 278,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2 = 279,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2 = 280,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2 = 281,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2 = 282,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2 = 283,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2 = 284,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2 = 285,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2 = 286,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2 = 287,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2 = 288,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2 = 289,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2 = 290,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2 = 291,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2 = 292,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2 = 293,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocHost_v2 = 294,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent = 295,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetApiVersion = 296,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D10GetDirect3DDevice = 297,
+ CUPTI_DRIVER_TRACE_CBID_cuD3D11GetDirect3DDevice = 298,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCacheConfig = 299,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCacheConfig = 300,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister = 301,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostUnregister = 302,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetCurrent = 303,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetCurrent = 304,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy = 305,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync = 306,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel = 307,
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStart = 308,
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerStop = 309,
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttribute = 310,
+ CUPTI_DRIVER_TRACE_CBID_cuProfilerInitialize = 311,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceCanAccessPeer = 312,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxEnablePeerAccess = 313,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDisablePeerAccess = 314,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerRegister = 315,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerUnregister = 316,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPeerGetDevicePointer = 317,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer = 318,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync = 319,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer = 320,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync = 321,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxDestroy_v2 = 322,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPushCurrent_v2 = 323,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxPopCurrent_v2 = 324,
+ CUPTI_DRIVER_TRACE_CBID_cuEventDestroy_v2 = 325,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamDestroy_v2 = 326,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetAddress2D_v3 = 327,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetMemHandle = 328,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle = 329,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcCloseMemHandle = 330,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetByPCIBusId = 331,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetPCIBusId = 332,
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices = 333,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcGetEventHandle = 334,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenEventHandle = 335,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetSharedMemConfig = 336,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetSharedMemConfig = 337,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetSharedMemConfig = 338,
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectCreate = 339,
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectDestroy = 340,
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceDesc = 341,
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetTextureDesc = 342,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectCreate = 343,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectDestroy = 344,
+ CUPTI_DRIVER_TRACE_CBID_cuSurfObjectGetResourceDesc = 345,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback = 346,
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayCreate = 347,
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetLevel = 348,
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayDestroy = 349,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmappedArray = 350,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapFilterMode = 351,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelBias = 352,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMipmapLevelClamp = 353,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetMaxAnisotropy = 354,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmappedArray = 355,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapFilterMode = 356,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelBias = 357,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMipmapLevelClamp = 358,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetMaxAnisotropy = 359,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedMipmappedArray = 360,
+ CUPTI_DRIVER_TRACE_CBID_cuTexObjectGetResourceViewDesc = 361,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate = 362,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData = 363,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile = 364,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkComplete = 365,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkDestroy = 366,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCreateWithPriority = 367,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority = 368,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags = 369,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetStreamPriorityRange = 370,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocManaged = 371,
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorString = 372,
+ CUPTI_DRIVER_TRACE_CBID_cuGetErrorName = 373,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessor = 374,
+ CUPTI_DRIVER_TRACE_CBID_cuCompilePtx = 375,
+ CUPTI_DRIVER_TRACE_CBID_cuBinaryFree = 376,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync = 377,
+ CUPTI_DRIVER_TRACE_CBID_cuPointerSetAttribute = 378,
+ CUPTI_DRIVER_TRACE_CBID_cuMemHostRegister_v2 = 379,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceSetMapFlags_v2 = 380,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkCreate_v2 = 381,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddData_v2 = 382,
+ CUPTI_DRIVER_TRACE_CBID_cuLinkAddFile_v2 = 383,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSize = 384,
+ CUPTI_DRIVER_TRACE_CBID_cuGLGetDevices_v2 = 385,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRetain = 386,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease = 387,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags = 388,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset = 389,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsEGLRegisterImage = 390,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetFlags = 391,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxGetState = 392,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnect = 393,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerDisconnect = 394,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerAcquireFrame = 395,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerReleaseFrame = 396,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2_ptds = 397,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2_ptds = 398,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2_ptds = 399,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2_ptds = 400,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2_ptds = 401,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2_ptds = 402,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2_ptds = 403,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2_ptds = 404,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2_ptds = 405,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2_ptds = 406,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2_ptds = 407,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy_ptds = 408,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer_ptds = 409,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeer_ptds = 410,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8_v2_ptds = 411,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16_v2_ptds = 412,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32_v2_ptds = 413,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8_v2_ptds = 414,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16_v2_ptds = 415,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32_v2_ptds = 416,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObject_v2_ptds = 417,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync_ptsz = 418,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2_ptsz = 419,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2_ptsz = 420,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2_ptsz = 421,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2_ptsz = 422,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2_ptsz = 423,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2_ptsz = 424,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2_ptsz = 425,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync_ptsz = 426,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DPeerAsync_ptsz = 427,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD8Async_ptsz = 428,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD16Async_ptsz = 429,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD32Async_ptsz = 430,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D8Async_ptsz = 431,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D16Async_ptsz = 432,
+ CUPTI_DRIVER_TRACE_CBID_cuMemsetD2D32Async_ptsz = 433,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetPriority_ptsz = 434,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetFlags_ptsz = 435,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitEvent_ptsz = 436,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAddCallback_ptsz = 437,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamAttachMemAsync_ptsz = 438,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamQuery_ptsz = 439,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSynchronize_ptsz = 440,
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecord_ptsz = 441,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel_ptsz = 442,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsMapResources_ptsz = 443,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsUnmapResources_ptsz = 444,
+ CUPTI_DRIVER_TRACE_CBID_cuGLMapBufferObjectAsync_v2_ptsz = 445,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerConnect = 446,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerDisconnect = 447,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerPresentFrame = 448,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphicsResourceGetMappedEglFrame = 449,
+ CUPTI_DRIVER_TRACE_CBID_cuPointerGetAttributes = 450,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = 451,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialBlockSizeWithFlags = 452,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamProducerReturnFrame = 453,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetP2PAttribute = 454,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefSetBorderColor = 455,
+ CUPTI_DRIVER_TRACE_CBID_cuTexRefGetBorderColor = 456,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise = 457,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32 = 458,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_ptsz = 459,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32 = 460,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_ptsz = 461,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp = 462,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_ptsz = 463,
+ CUPTI_DRIVER_TRACE_CBID_cuNVNbufferGetPointer = 464,
+ CUPTI_DRIVER_TRACE_CBID_cuNVNtextureGetArray = 465,
+ CUPTI_DRIVER_TRACE_CBID_cuNNSetAllocator = 466,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync = 467,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_ptsz = 468,
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromNVNSync = 469,
+ CUPTI_DRIVER_TRACE_CBID_cuEGLStreamConsumerConnectWithFlags = 470,
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttribute = 471,
+ CUPTI_DRIVER_TRACE_CBID_cuMemRangeGetAttributes = 472,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64 = 473,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_ptsz = 474,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64 = 475,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_ptsz = 476,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel = 477,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernel_ptsz = 478,
+ CUPTI_DRIVER_TRACE_CBID_cuEventCreateFromEGLSync = 479,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchCooperativeKernelMultiDevice = 480,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncSetAttribute = 481,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid = 482,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx = 483,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_ptsz = 484,
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalMemory = 485,
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedBuffer = 486,
+ CUPTI_DRIVER_TRACE_CBID_cuExternalMemoryGetMappedMipmappedArray = 487,
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalMemory = 488,
+ CUPTI_DRIVER_TRACE_CBID_cuImportExternalSemaphore = 489,
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync = 490,
+ CUPTI_DRIVER_TRACE_CBID_cuSignalExternalSemaphoresAsync_ptsz = 491,
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync = 492,
+ CUPTI_DRIVER_TRACE_CBID_cuWaitExternalSemaphoresAsync_ptsz = 493,
+ CUPTI_DRIVER_TRACE_CBID_cuDestroyExternalSemaphore = 494,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture = 495,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_ptsz = 496,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture = 497,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamEndCapture_ptsz = 498,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing = 499,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamIsCapturing_ptsz = 500,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphCreate = 501,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode = 502,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams = 503,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemcpyNode = 504,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeGetParams = 505,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemsetNode = 506,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeGetParams = 507,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemsetNodeSetParams = 508,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetType = 509,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetRootNodes = 510,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies = 511,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes = 512,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate = 513,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch = 514,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphLaunch_ptsz = 515,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecDestroy = 516,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroy = 517,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies = 518,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies = 519,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemcpyNodeSetParams = 520,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams = 521,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDestroyNode = 522,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphClone = 523,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeFindInClone = 524,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddChildGraphNode = 525,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEmptyNode = 526,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc = 527,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchHostFunc_ptsz = 528,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphChildGraphNodeGetGraph = 529,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddHostNode = 530,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeGetParams = 531,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetLuid = 532,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphHostNodeSetParams = 533,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetNodes = 534,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges = 535,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo = 536,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_ptsz = 537,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams = 538,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2 = 539,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCapture_v2_ptsz = 540,
+ CUPTI_DRIVER_TRACE_CBID_cuThreadExchangeStreamCaptureMode = 541,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetNvSciSyncAttributes = 542,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyAvailableDynamicSMemPerBlock = 543,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxRelease_v2 = 544,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxReset_v2 = 545,
+ CUPTI_DRIVER_TRACE_CBID_cuDevicePrimaryCtxSetFlags_v2 = 546,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressReserve = 547,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAddressFree = 548,
+ CUPTI_DRIVER_TRACE_CBID_cuMemCreate = 549,
+ CUPTI_DRIVER_TRACE_CBID_cuMemRelease = 550,
+ CUPTI_DRIVER_TRACE_CBID_cuMemMap = 551,
+ CUPTI_DRIVER_TRACE_CBID_cuMemUnmap = 552,
+ CUPTI_DRIVER_TRACE_CBID_cuMemSetAccess = 553,
+ CUPTI_DRIVER_TRACE_CBID_cuMemExportToShareableHandle = 554,
+ CUPTI_DRIVER_TRACE_CBID_cuMemImportFromShareableHandle = 555,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationGranularity = 556,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAllocationPropertiesFromHandle = 557,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetAccess = 558,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags = 559,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetFlags_ptsz = 560,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate = 561,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemcpyNodeSetParams = 562,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecMemsetNodeSetParams = 563,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecHostNodeSetParams = 564,
+ CUPTI_DRIVER_TRACE_CBID_cuMemRetainAllocationHandle = 565,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetModule = 566,
+ CUPTI_DRIVER_TRACE_CBID_cuIpcOpenMemHandle_v2 = 567,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxResetPersistingL2Cache = 568,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeCopyAttributes = 569,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetAttribute = 570,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetAttribute = 571,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes = 572,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamCopyAttributes_ptsz = 573,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute = 574,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetAttribute_ptsz = 575,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute = 576,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamSetAttribute_ptsz = 577,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiate_v2 = 578,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetTexture1DLinearMaxWidth = 579,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload = 580,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphUpload_ptsz = 581,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetSparseProperties = 582,
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetSparseProperties = 583,
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync = 584,
+ CUPTI_DRIVER_TRACE_CBID_cuMemMapArrayAsync_ptsz = 585,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecChildGraphNodeSetParams = 586,
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags = 587,
+ CUPTI_DRIVER_TRACE_CBID_cuEventRecordWithFlags_ptsz = 588,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventRecordNode = 589,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddEventWaitNode = 590,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeGetEvent = 591,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeGetEvent = 592,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventRecordNodeSetEvent = 593,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphEventWaitNodeSetEvent = 594,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventRecordNodeSetEvent = 595,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecEventWaitNodeSetEvent = 596,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetPlane = 597,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync = 598,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocAsync_ptsz = 599,
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync = 600,
+ CUPTI_DRIVER_TRACE_CBID_cuMemFreeAsync_ptsz = 601,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolTrimTo = 602,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAttribute = 603,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAttribute = 604,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolSetAccess = 605,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetDefaultMemPool = 606,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolCreate = 607,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolDestroy = 608,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetMemPool = 609,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetMemPool = 610,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync = 611,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAllocFromPoolAsync_ptsz = 612,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportToShareableHandle = 613,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportFromShareableHandle = 614,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolExportPointer = 615,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolImportPointer = 616,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPoolGetAccess = 617,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresSignalNode = 618,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeGetParams = 619,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresSignalNodeSetParams = 620,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddExternalSemaphoresWaitNode = 621,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeGetParams = 622,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExternalSemaphoresWaitNodeSetParams = 623,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresSignalNodeSetParams = 624,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecExternalSemaphoresWaitNodeSetParams = 625,
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress = 626,
+ CUPTI_DRIVER_TRACE_CBID_cuFlushGPUDirectRDMAWrites = 627,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphDebugDotPrint = 628,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2 = 629,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v2_ptsz = 630,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies = 631,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_ptsz = 632,
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectCreate = 633,
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRetain = 634,
+ CUPTI_DRIVER_TRACE_CBID_cuUserObjectRelease = 635,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRetainUserObject = 636,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphReleaseUserObject = 637,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemAllocNode = 638,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddMemFreeNode = 639,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGraphMemTrim = 640,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetGraphMemAttribute = 641,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceSetGraphMemAttribute = 642,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithFlags = 643,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetExecAffinitySupport = 644,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v3 = 645,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetExecAffinity = 646,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetUuid_v2 = 647,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemAllocNodeGetParams = 648,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphMemFreeNodeGetParams = 649,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetEnabled = 650,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetEnabled = 651,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx = 652,
+ CUPTI_DRIVER_TRACE_CBID_cuLaunchKernelEx_ptsz = 653,
+ CUPTI_DRIVER_TRACE_CBID_cuArrayGetMemoryRequirements = 654,
+ CUPTI_DRIVER_TRACE_CBID_cuMipmappedArrayGetMemoryRequirements = 655,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams = 656,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphInstantiateWithParams_ptsz = 657,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecGetFlags = 658,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2 = 659,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue32_v2_ptsz = 660,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2 = 661,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWaitValue64_v2_ptsz = 662,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2 = 663,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue32_v2_ptsz = 664,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2 = 665,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamWriteValue64_v2_ptsz = 666,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2 = 667,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBatchMemOp_v2_ptsz = 668,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddBatchMemOpNode = 669,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeGetParams = 670,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphBatchMemOpNodeSetParams = 671,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecBatchMemOpNodeSetParams = 672,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetLoadingMode = 673,
+ CUPTI_DRIVER_TRACE_CBID_cuMemGetHandleForAddressRange = 674,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxPotentialClusterSize = 675,
+ CUPTI_DRIVER_TRACE_CBID_cuOccupancyMaxActiveClusters = 676,
+ CUPTI_DRIVER_TRACE_CBID_cuGetProcAddress_v2 = 677,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadData = 678,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryLoadFromFile = 679,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryUnload = 680,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetKernel = 681,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetModule = 682,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetFunction = 683,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetGlobal = 684,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetManaged = 685,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetAttribute = 686,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetAttribute = 687,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelSetCacheConfig = 688,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddKernelNode_v2 = 689,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeGetParams_v2 = 690,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphKernelNodeSetParams_v2 = 691,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecKernelNodeSetParams_v2 = 692,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId = 693,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetId_ptsz = 694,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetId = 695,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecUpdate_v2 = 696,
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeTiled = 697,
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeIm2col = 698,
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapReplaceAddress = 699,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetUnifiedFunction = 700,
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttribute = 701,
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpGetAttributeGlobal = 702,
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttribute = 703,
+ CUPTI_DRIVER_TRACE_CBID_cuCoredumpSetAttributeGlobal = 704,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxSetFlags = 705,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastCreate = 706,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastAddDevice = 707,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindMem = 708,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastBindAddr = 709,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastUnbind = 710,
+ CUPTI_DRIVER_TRACE_CBID_cuMulticastGetGranularity = 711,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode = 712,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeSetParams = 713,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphExecNodeSetParams = 714,
+ CUPTI_DRIVER_TRACE_CBID_cuMemAdvise_v2 = 715,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2 = 716,
+ CUPTI_DRIVER_TRACE_CBID_cuMemPrefetchAsync_v2_ptsz = 717,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetName = 718,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetName = 719,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph = 720,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamBeginCaptureToGraph_ptsz = 721,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphConditionalHandleCreate = 722,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode_v2 = 723,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphGetEdges_v2 = 724,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependencies_v2 = 725,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphNodeGetDependentNodes_v2 = 726,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphAddDependencies_v2 = 727,
+ CUPTI_DRIVER_TRACE_CBID_cuGraphRemoveDependencies_v2 = 728,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3 = 729,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCaptureInfo_v3_ptsz = 730,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2 = 731,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamUpdateCaptureDependencies_v2_ptsz = 732,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncGetParamInfo = 733,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetParamInfo = 734,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceRegisterAsyncNotification = 735,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceUnregisterAsyncNotification = 736,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleGetFunctionCount = 737,
+ CUPTI_DRIVER_TRACE_CBID_cuModuleEnumerateFunctions = 738,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryGetKernelCount = 739,
+ CUPTI_DRIVER_TRACE_CBID_cuLibraryEnumerateKernels = 740,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncIsLoaded = 741,
+ CUPTI_DRIVER_TRACE_CBID_cuFuncLoad = 742,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxCreate = 743,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxDestroy = 744,
+ CUPTI_DRIVER_TRACE_CBID_cuDeviceGetDevResource = 745,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxGetDevResource = 746,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxGetDevResource = 747,
+ CUPTI_DRIVER_TRACE_CBID_cuDevResourceGenerateDesc = 748,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxRecordEvent = 749,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxWaitEvent = 750,
+ CUPTI_DRIVER_TRACE_CBID_cuDevSmResourceSplitByCount = 751,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetGreenCtx = 752,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxFromGreenCtx = 753,
+ CUPTI_DRIVER_TRACE_CBID_cuKernelGetLibrary = 754,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxRecordEvent = 755,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxWaitEvent = 756,
+ CUPTI_DRIVER_TRACE_CBID_cuCtxCreate_v4 = 757,
+ CUPTI_DRIVER_TRACE_CBID_cuGreenCtxStreamCreate = 758,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_v2 = 759,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetCtx_v2_ptsz = 760,
+ CUPTI_DRIVER_TRACE_CBID_cuMemBatchDecompressAsync = 761,
+ CUPTI_DRIVER_TRACE_CBID_cuMemBatchDecompressAsync_ptsz = 762,
+ CUPTI_DRIVER_TRACE_CBID_cuLogsRegisterCallback = 763,
+ CUPTI_DRIVER_TRACE_CBID_cuLogsUnregisterCallback = 764,
+ CUPTI_DRIVER_TRACE_CBID_cuLogsCurrent = 765,
+ CUPTI_DRIVER_TRACE_CBID_cuLogsDumpToFile = 766,
+ CUPTI_DRIVER_TRACE_CBID_cuLogsDumpToMemory = 767,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessGetRestoreThreadId = 768,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessGetState = 769,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessLock = 770,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessCheckpoint = 771,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessRestore = 772,
+ CUPTI_DRIVER_TRACE_CBID_cuCheckpointProcessUnlock = 773,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetDevice = 774,
+ CUPTI_DRIVER_TRACE_CBID_cuStreamGetDevice_ptsz = 775,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyBatchAsync = 776,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpyBatchAsync_ptsz = 777,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DBatchAsync = 778,
+ CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DBatchAsync_ptsz = 779,
+ CUPTI_DRIVER_TRACE_CBID_cuEventElapsedTime_v2 = 780,
+ CUPTI_DRIVER_TRACE_CBID_cuTensorMapEncodeIm2colWide = 781,
+ CUPTI_DRIVER_TRACE_CBID_SIZE = 782,
+ CUPTI_DRIVER_TRACE_CBID_FORCE_INT = 0x7fffffff
+} CUpti_driver_api_trace_cbid;
+
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_events.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_events.h
new file mode 100644
index 0000000000000000000000000000000000000000..2e4aebc2a1389e8693f02df9b6e3be1e90490870
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_events.h
@@ -0,0 +1,1349 @@
+/*
+ * Copyright 2010-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_EVENTS_H_)
+#define _CUPTI_EVENTS_H_
+
+#include
+#include
+#include
+#include
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_EVENT_API CUPTI Event API
+ * Functions, types, and enums that implement the CUPTI Event API.
+ *
+ * \note The CUPTI event API from the header cupti_events.h is not supported on devices
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
+ * This API is deprecated in CUDA 12.8 release and will be removed in a future CUDA release.
+ * This is replaced by the host profiling API in the header cupti_profiler_host.h and
+ * target profiling API in the header cupti_range_profiler.h which are supported on
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU architectures).
+ *
+ * @{
+ */
+
+/**
+ * \brief ID for an event.
+ *
+ * An event represents a countable activity, action, or occurrence on
+ * the device.
+ */
+typedef uint32_t CUpti_EventID;
+
+/**
+ * \brief ID for an event domain.
+ *
+ * ID for an event domain. An event domain represents a group of
+ * related events. A device may have multiple instances of a domain,
+ * indicating that the device can simultaneously record multiple
+ * instances of each event within that domain.
+ */
+typedef uint32_t CUpti_EventDomainID;
+
+/**
+ * \brief A group of events.
+ *
+ * An event group is a collection of events that are managed
+ * together. All events in an event group must belong to the same
+ * domain.
+ */
+typedef void *CUpti_EventGroup;
+
+/**
+ * \brief Device class.
+ *
+ * Enumeration of device classes for device attribute
+ * CUPTI_DEVICE_ATTR_DEVICE_CLASS.
+ */
+typedef enum {
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TESLA = 0,
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_QUADRO = 1,
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_GEFORCE = 2,
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS_TEGRA = 3,
+} CUpti_DeviceAttributeDeviceClass;
+
+/**
+ * \brief Device attributes.
+ *
+ * CUPTI device attributes. These attributes can be read using \ref
+ * cuptiDeviceGetAttribute.
+ */
+typedef enum {
+ /**
+ * Number of event IDs for a device. Value is a uint32_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_EVENT_ID = 1,
+ /**
+ * Number of event domain IDs for a device. Value is a uint32_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_EVENT_DOMAIN_ID = 2,
+ /**
+ * Get global memory bandwidth in Kbytes/sec. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH = 3,
+ /**
+ * Get theoretical maximum number of instructions per cycle. Value
+ * is a uint32_t.
+ */
+ CUPTI_DEVICE_ATTR_INSTRUCTION_PER_CYCLE = 4,
+ /**
+ * Get theoretical maximum number of single precision instructions
+ * that can be executed per second. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_INSTRUCTION_THROUGHPUT_SINGLE_PRECISION = 5,
+ /**
+ * Get number of frame buffers for device. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_FRAME_BUFFERS = 6,
+ /**
+ * Get PCIE link rate in Mega bits/sec for device. Return 0 if bus-type
+ * is non-PCIE. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_PCIE_LINK_RATE = 7,
+ /**
+ * Get PCIE link width for device. Return 0 if bus-type
+ * is non-PCIE. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH = 8,
+ /**
+ * Get PCIE generation for device. Return 0 if bus-type
+ * is non-PCIE. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_PCIE_GEN = 9,
+ /**
+ * Get the class for the device. Value is a
+ * CUpti_DeviceAttributeDeviceClass.
+ */
+ CUPTI_DEVICE_ATTR_DEVICE_CLASS = 10,
+ /**
+ * Get the peak single precision flop per cycle. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE = 11,
+ /**
+ * Get the peak double precision flop per cycle. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE = 12,
+ /**
+ * Get number of L2 units. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_L2_UNITS = 13,
+ /**
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_SHARED
+ * preference. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_SHARED = 14,
+ /**
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_L1
+ * preference. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_L1 = 15,
+ /**
+ * Get the maximum shared memory for the CU_FUNC_CACHE_PREFER_EQUAL
+ * preference. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_MAX_SHARED_MEMORY_CACHE_CONFIG_PREFER_EQUAL = 16,
+ /**
+ * Get the peak half precision flop per cycle. Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE = 17,
+ /**
+ * Check if Nvlink is connected to device. Returns 1, if at least one
+ * Nvlink is connected to the device, returns 0 otherwise.
+ * Value is a uint32_t.
+ */
+ CUPTI_DEVICE_ATTR_NVLINK_PRESENT = 18,
+ /**
+ * Check if Nvlink is present between GPU and CPU. Returns Bandwidth,
+ * in Bytes/sec, if Nvlink is present, returns 0 otherwise.
+ * Value is a uint64_t.
+ */
+ CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW = 19,
+ /**
+ * Check if NVSwitch is present in the underlying topology.
+ * Returns 1, if present, returns 0 otherwise.
+ * Value is a uint32_t.
+ */
+ CUPTI_DEVICE_ATTR_NVSWITCH_PRESENT = 20,
+ CUPTI_DEVICE_ATTR_FORCE_INT = 0x7fffffff,
+} CUpti_DeviceAttribute;
+
+/**
+ * \brief Event domain attributes.
+ *
+ * Event domain attributes. Except where noted, all the attributes can
+ * be read using either \ref cuptiDeviceGetEventDomainAttribute or
+ * \ref cuptiEventDomainGetAttribute.
+ */
+typedef enum {
+ /**
+ * Event domain name. Value is a null terminated const c-string.
+ */
+ CUPTI_EVENT_DOMAIN_ATTR_NAME = 0,
+ /**
+ * Number of instances of the domain for which event counts will be
+ * collected. The domain may have additional instances that cannot
+ * be profiled (see CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT).
+ * Can be read only with \ref
+ * cuptiDeviceGetEventDomainAttribute. Value is a uint32_t.
+ */
+ CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT = 1,
+ /**
+ * Total number of instances of the domain, including instances that
+ * cannot be profiled. Use CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT
+ * to get the number of instances that can be profiled. Can be read
+ * only with \ref cuptiDeviceGetEventDomainAttribute. Value is a
+ * uint32_t.
+ */
+ CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT = 3,
+ /**
+ * Collection method used for events contained in the event domain.
+ * Value is a \ref CUpti_EventCollectionMethod.
+ */
+ CUPTI_EVENT_DOMAIN_ATTR_COLLECTION_METHOD = 4,
+
+ CUPTI_EVENT_DOMAIN_ATTR_FORCE_INT = 0x7fffffff,
+} CUpti_EventDomainAttribute;
+
+/**
+ * \brief The collection method used for an event.
+ *
+ * The collection method indicates how an event is collected.
+ */
+typedef enum {
+ /**
+ * Event is collected using a hardware global performance monitor.
+ */
+ CUPTI_EVENT_COLLECTION_METHOD_PM = 0,
+ /**
+ * Event is collected using a hardware SM performance monitor.
+ */
+ CUPTI_EVENT_COLLECTION_METHOD_SM = 1,
+ /**
+ * Event is collected using software instrumentation.
+ */
+ CUPTI_EVENT_COLLECTION_METHOD_INSTRUMENTED = 2,
+ /**
+ * Event is collected using NvLink throughput counter method.
+ */
+ CUPTI_EVENT_COLLECTION_METHOD_NVLINK_TC = 3,
+ CUPTI_EVENT_COLLECTION_METHOD_FORCE_INT = 0x7fffffff
+} CUpti_EventCollectionMethod;
+
+/**
+ * \brief Event group attributes.
+ *
+ * Event group attributes. These attributes can be read using \ref
+ * cuptiEventGroupGetAttribute. Attributes marked [rw] can also be
+ * written using \ref cuptiEventGroupSetAttribute.
+ */
+typedef enum {
+ /**
+ * The domain to which the event group is bound. This attribute is
+ * set when the first event is added to the group. Value is a
+ * CUpti_EventDomainID.
+ */
+ CUPTI_EVENT_GROUP_ATTR_EVENT_DOMAIN_ID = 0,
+ /**
+ * [rw] Profile all the instances of the domain for this
+ * eventgroup. This feature can be used to get load balancing
+ * across all instances of a domain. Value is an integer.
+ */
+ CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES = 1,
+ /**
+ * [rw] Reserved for user data.
+ */
+ CUPTI_EVENT_GROUP_ATTR_USER_DATA = 2,
+ /**
+ * Number of events in the group. Value is a uint32_t.
+ */
+ CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS = 3,
+ /**
+ * Enumerates events in the group. Value is a pointer to buffer of
+ * size sizeof(CUpti_EventID) * num_of_events in the eventgroup.
+ * num_of_events can be queried using
+ * CUPTI_EVENT_GROUP_ATTR_NUM_EVENTS.
+ */
+ CUPTI_EVENT_GROUP_ATTR_EVENTS = 4,
+ /**
+ * Number of instances of the domain bound to this event group that
+ * will be counted. Value is a uint32_t.
+ */
+ CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT = 5,
+ /**
+ * Event group scope can be set to CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT for an eventGroup, before
+ * adding any event.
+ * Sets the scope of eventgroup as CUPTI_EVENT_PROFILING_SCOPE_DEVICE or
+ * CUPTI_EVENT_PROFILING_SCOPE_CONTEXT when the scope of the events
+ * that will be added is CUPTI_EVENT_PROFILING_SCOPE_BOTH.
+ * If profiling scope of event is either
+ * CUPTI_EVENT_PROFILING_SCOPE_DEVICE or CUPTI_EVENT_PROFILING_SCOPE_CONTEXT
+ * then setting this attribute will not affect the default scope.
+ * It is not allowed to add events of different scope to same eventgroup.
+ * Value is a uint32_t.
+ */
+ CUPTI_EVENT_GROUP_ATTR_PROFILING_SCOPE = 6,
+ CUPTI_EVENT_GROUP_ATTR_FORCE_INT = 0x7fffffff,
+} CUpti_EventGroupAttribute;
+
+/**
+* \brief Profiling scope for event.
+*
+* Profiling scope of event indicates if the event can be collected at context
+* scope or device scope or both i.e. it can be collected at any of context or
+* device scope.
+*/
+typedef enum {
+ /**
+ * Event is collected at context scope.
+ */
+ CUPTI_EVENT_PROFILING_SCOPE_CONTEXT = 0,
+ /**
+ * Event is collected at device scope.
+ */
+ CUPTI_EVENT_PROFILING_SCOPE_DEVICE = 1,
+ /**
+ * Event can be collected at device or context scope.
+ * The scope can be set using \ref cuptiEventGroupSetAttribute API.
+ */
+ CUPTI_EVENT_PROFILING_SCOPE_BOTH = 2,
+ CUPTI_EVENT_PROFILING_SCOPE_FORCE_INT = 0x7fffffff
+} CUpti_EventProfilingScope;
+
+/**
+ * \brief Event attributes.
+ *
+ * Event attributes. These attributes can be read using \ref
+ * cuptiEventGetAttribute.
+ */
+typedef enum {
+ /**
+ * Event name. Value is a null terminated const c-string.
+ */
+ CUPTI_EVENT_ATTR_NAME = 0,
+ /**
+ * Short description of event. Value is a null terminated const
+ * c-string.
+ */
+ CUPTI_EVENT_ATTR_SHORT_DESCRIPTION = 1,
+ /**
+ * Long description of event. Value is a null terminated const
+ * c-string.
+ */
+ CUPTI_EVENT_ATTR_LONG_DESCRIPTION = 2,
+ /**
+ * Category of event. Value is CUpti_EventCategory.
+ */
+ CUPTI_EVENT_ATTR_CATEGORY = 3,
+ /**
+ * Profiling scope of the events. It can be either device or context or both.
+ * Value is a \ref CUpti_EventProfilingScope.
+ */
+ CUPTI_EVENT_ATTR_PROFILING_SCOPE = 5,
+
+ CUPTI_EVENT_ATTR_FORCE_INT = 0x7fffffff,
+} CUpti_EventAttribute;
+
+/**
+ * \brief Event collection modes.
+ *
+ * The event collection mode determines the period over which the
+ * events within the enabled event groups will be collected.
+ */
+typedef enum {
+ /**
+ * Events are collected for the entire duration between the
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls.
+ * Event values are reset when the events are read.
+ * For CUDA toolkit v6.0 and older this was the default mode.
+ */
+ CUPTI_EVENT_COLLECTION_MODE_CONTINUOUS = 0,
+ /**
+ * Events are collected only for the durations of kernel executions
+ * that occur between the cuptiEventGroupEnable and
+ * cuptiEventGroupDisable calls. Event collection begins when a
+ * kernel execution begins, and stops when kernel execution
+ * completes. Event values are reset to zero when each kernel
+ * execution begins. If multiple kernel executions occur between the
+ * cuptiEventGroupEnable and cuptiEventGroupDisable calls then the
+ * event values must be read after each kernel launch if those
+ * events need to be associated with the specific kernel launch.
+ * Note that collection in this mode may significantly change the
+ * overall performance characteristics of the application because
+ * kernel executions that occur between the cuptiEventGroupEnable and
+ * cuptiEventGroupDisable calls are serialized on the GPU.
+ * This is the default mode from CUDA toolkit v6.5
+ */
+ CUPTI_EVENT_COLLECTION_MODE_KERNEL = 1,
+ CUPTI_EVENT_COLLECTION_MODE_FORCE_INT = 0x7fffffff
+} CUpti_EventCollectionMode;
+
+/**
+ * \brief An event category.
+ *
+ * Each event is assigned to a category that represents the general
+ * type of the event. A event's category is accessed using \ref
+ * cuptiEventGetAttribute and the CUPTI_EVENT_ATTR_CATEGORY attribute.
+ */
+typedef enum {
+ /**
+ * An instruction related event.
+ */
+ CUPTI_EVENT_CATEGORY_INSTRUCTION = 0,
+ /**
+ * A memory related event.
+ */
+ CUPTI_EVENT_CATEGORY_MEMORY = 1,
+ /**
+ * A cache related event.
+ */
+ CUPTI_EVENT_CATEGORY_CACHE = 2,
+ /**
+ * A profile-trigger event.
+ */
+ CUPTI_EVENT_CATEGORY_PROFILE_TRIGGER = 3,
+ /**
+ * A system event.
+ */
+ CUPTI_EVENT_CATEGORY_SYSTEM = 4,
+ CUPTI_EVENT_CATEGORY_FORCE_INT = 0x7fffffff
+} CUpti_EventCategory;
+
+/**
+ * \brief The overflow value for a CUPTI event.
+ *
+ * The CUPTI event value that indicates an overflow.
+ */
+#define CUPTI_EVENT_OVERFLOW ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
+
+/**
+ * \brief The value that indicates the event value is invalid
+ */
+#define CUPTI_EVENT_INVALID ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
+
+/**
+ * \brief Flags for cuptiEventGroupReadEvent an
+ * cuptiEventGroupReadAllEvents.
+ *
+ * Flags for \ref cuptiEventGroupReadEvent an \ref
+ * cuptiEventGroupReadAllEvents.
+ */
+typedef enum {
+ /**
+ * No flags.
+ */
+ CUPTI_EVENT_READ_FLAG_NONE = 0,
+ CUPTI_EVENT_READ_FLAG_FORCE_INT = 0x7fffffff,
+} CUpti_ReadEventFlags;
+
+
+/**
+ * \brief A set of event groups.
+ *
+ * A set of event groups. When returned by \ref
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
+ * a set indicates that event groups that can be enabled at the same
+ * time (i.e. all the events in the set can be collected
+ * simultaneously).
+ */
+typedef struct {
+ /**
+ * The number of event groups in the set.
+ */
+ uint32_t numEventGroups;
+ /**
+ * An array of \p numEventGroups event groups.
+ */
+ CUpti_EventGroup *eventGroups;
+} CUpti_EventGroupSet;
+
+/**
+ * \brief A set of event group sets.
+ *
+ * A set of event group sets. When returned by \ref
+ * cuptiEventGroupSetsCreate and \ref cuptiMetricCreateEventGroupSets
+ * a CUpti_EventGroupSets indicates the number of passes required to
+ * collect all the events, and the event groups that should be
+ * collected during each pass.
+ */
+typedef struct {
+ /**
+ * Number of event group sets.
+ */
+ uint32_t numSets;
+ /**
+ * An array of \p numSets event group sets.
+ */
+ CUpti_EventGroupSet *sets;
+} CUpti_EventGroupSets;
+
+/**
+ * \brief Set the event collection mode.
+ *
+ * Set the event collection mode for a \p context. The \p mode
+ * controls the event collection behavior of all events in event
+ * groups created in the \p context. This API is invalid in kernel
+ * replay mode.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param context The context
+ * \param mode The event collection mode
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_INVALID_OPERATION if called when replay mode is enabled
+ * \retval CUPTI_ERROR_NOT_SUPPORTED if mode is not supported on the device
+ */
+
+CUptiResult CUPTIAPI cuptiSetEventCollectionMode(CUcontext context,
+ CUpti_EventCollectionMode mode);
+
+/**
+ * \brief Read a device attribute.
+ *
+ * Read a device attribute and return it in \p *value.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param device The CUDA device
+ * \param attrib The attribute to read
+ * \param valueSize Size of buffer pointed by the value, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the value of the attribute
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not a device attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiDeviceGetAttribute(CUdevice device,
+ CUpti_DeviceAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Get the number of domains for a device.
+ *
+ * Returns the number of domains in \p numDomains for a device.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param device The CUDA device
+ * \param numDomains Returns the number of domains
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
+ */
+CUptiResult CUPTIAPI cuptiDeviceGetNumEventDomains(CUdevice device,
+ uint32_t *numDomains);
+
+/**
+ * \brief Get the event domains for a device.
+ *
+ * Returns the event domains IDs in \p domainArray for a device. The
+ * size of the \p domainArray buffer is given by \p
+ * *arraySizeBytes. The size of the \p domainArray buffer must be at
+ * least \p numdomains * sizeof(CUpti_EventDomainID) or else all
+ * domains will not be returned. The value returned in \p
+ * *arraySizeBytes contains the number of bytes returned in \p
+ * domainArray.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param device The CUDA device
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
+ * returns the number of bytes written to \p domainArray
+ * \param domainArray Returns the IDs of the event domains for the device
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
+ * \p domainArray are NULL
+ */
+CUptiResult CUPTIAPI cuptiDeviceEnumEventDomains(CUdevice device,
+ size_t *arraySizeBytes,
+ CUpti_EventDomainID *domainArray);
+
+/**
+ * \brief Read an event domain attribute.
+ *
+ * Returns an event domain attribute in \p *value. The size of the \p
+ * value buffer is given by \p *valueSize. The value returned in \p
+ * *valueSize contains the number of bytes returned in \p value.
+ *
+ * If the attribute value is a c-string that is longer than \p
+ * *valueSize, then only the first \p *valueSize characters will be
+ * returned and there will be no terminating null byte.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param device The CUDA device
+ * \param eventDomain ID of the event domain
+ * \param attrib The event domain attribute to read
+ * \param valueSize The size of the \p value buffer in bytes, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the attribute's value
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not an event domain attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiDeviceGetEventDomainAttribute(CUdevice device,
+ CUpti_EventDomainID eventDomain,
+ CUpti_EventDomainAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Get the number of event domains available on any device.
+ *
+ * Returns the total number of event domains available on any
+ * CUDA-capable device.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param numDomains Returns the number of domains
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numDomains is NULL
+ */
+CUptiResult CUPTIAPI cuptiGetNumEventDomains(uint32_t *numDomains);
+
+/**
+ * \brief Get the event domains available on any device.
+ *
+ * Returns all the event domains available on any CUDA-capable device.
+ * Event domain IDs are returned in \p domainArray. The size of the \p
+ * domainArray buffer is given by \p *arraySizeBytes. The size of the
+ * \p domainArray buffer must be at least \p numDomains *
+ * sizeof(CUpti_EventDomainID) or all domains will not be
+ * returned. The value returned in \p *arraySizeBytes contains the
+ * number of bytes returned in \p domainArray.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param arraySizeBytes The size of \p domainArray in bytes, and
+ * returns the number of bytes written to \p domainArray
+ * \param domainArray Returns all the event domains
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
+ * \p domainArray are NULL
+ */
+CUptiResult CUPTIAPI cuptiEnumEventDomains(size_t *arraySizeBytes,
+ CUpti_EventDomainID *domainArray);
+
+/**
+ * \brief Read an event domain attribute.
+ *
+ * Returns an event domain attribute in \p *value. The size of the \p
+ * value buffer is given by \p *valueSize. The value returned in \p
+ * *valueSize contains the number of bytes returned in \p value.
+ *
+ * If the attribute value is a c-string that is longer than \p
+ * *valueSize, then only the first \p *valueSize characters will be
+ * returned and there will be no terminating null byte.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventDomain ID of the event domain
+ * \param attrib The event domain attribute to read
+ * \param valueSize The size of the \p value buffer in bytes, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the attribute's value
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not an event domain attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiEventDomainGetAttribute(CUpti_EventDomainID eventDomain,
+ CUpti_EventDomainAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Get number of events in a domain.
+ *
+ * Returns the number of events in \p numEvents for a domain.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventDomain ID of the event domain
+ * \param numEvents Returns the number of events in the domain
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventDomainGetNumEvents(CUpti_EventDomainID eventDomain,
+ uint32_t *numEvents);
+
+/**
+ * \brief Get the events in a domain.
+ *
+ * Returns the event IDs in \p eventArray for a domain. The size of
+ * the \p eventArray buffer is given by \p *arraySizeBytes. The size
+ * of the \p eventArray buffer must be at least \p numdomainevents *
+ * sizeof(CUpti_EventID) or else all events will not be returned. The
+ * value returned in \p *arraySizeBytes contains the number of bytes
+ * returned in \p eventArray.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventDomain ID of the event domain
+ * \param arraySizeBytes The size of \p eventArray in bytes, and
+ * returns the number of bytes written to \p eventArray
+ * \param eventArray Returns the IDs of the events in the domain
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or \p
+ * eventArray are NULL
+ */
+CUptiResult CUPTIAPI cuptiEventDomainEnumEvents(CUpti_EventDomainID eventDomain,
+ size_t *arraySizeBytes,
+ CUpti_EventID *eventArray);
+
+/**
+ * \brief Get an event attribute.
+ *
+ * Returns an event attribute in \p *value. The size of the \p
+ * value buffer is given by \p *valueSize. The value returned in \p
+ * *valueSize contains the number of bytes returned in \p value.
+ *
+ * If the attribute value is a c-string that is longer than \p
+ * *valueSize, then only the first \p *valueSize characters will be
+ * returned and there will be no terminating null byte.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param event ID of the event
+ * \param attrib The event attribute to read
+ * \param valueSize The size of the \p value buffer in bytes, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the attribute's value
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not an event attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiEventGetAttribute(CUpti_EventID event,
+ CUpti_EventAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Find an event by name.
+ *
+ * Find an event by name and return the event ID in \p *event.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param device The CUDA device
+ * \param eventName The name of the event to find
+ * \param event Returns the ID of the found event or undefined if
+ * unable to find the event
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_EVENT_NAME if unable to find an event
+ * with name \p eventName. In this case \p *event is undefined
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventName or \p event are NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGetIdFromName(CUdevice device,
+ const char *eventName,
+ CUpti_EventID *event);
+
+/**
+ * \brief Create a new event group for a context.
+ *
+ * Creates a new event group for \p context and returns the new group
+ * in \p *eventGroup.
+ * \note \p flags are reserved for future use and should be set to zero.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param context The context for the event group
+ * \param eventGroup Returns the new event group
+ * \param flags Reserved - must be zero
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupCreate(CUcontext context,
+ CUpti_EventGroup *eventGroup,
+ uint32_t flags);
+
+/**
+ * \brief Destroy an event group.
+ *
+ * Destroy an \p eventGroup and free its resources. An event group
+ * cannot be destroyed if it is enabled.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group to destroy
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_OPERATION if the event group is enabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupDestroy(CUpti_EventGroup eventGroup);
+
+/**
+ * \brief Read an event group attribute.
+ *
+ * Read an event group attribute and return it in \p *value.
+ * \note \b Thread-safety: this function is thread safe but client
+ * must guard against simultaneous destruction or modification of \p
+ * eventGroup (for example, client must guard against simultaneous
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
+ * etc.), and must guard against simultaneous destruction of the
+ * context in which \p eventGroup was created (for example, client
+ * must guard against simultaneous calls to cudaDeviceReset,
+ * cuCtxDestroy, etc.).
+ *
+ * \param eventGroup The event group
+ * \param attrib The attribute to read
+ * \param valueSize Size of buffer pointed by the value, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the value of the attribute
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not an eventgroup attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiEventGroupGetAttribute(CUpti_EventGroup eventGroup,
+ CUpti_EventGroupAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Write an event group attribute.
+ *
+ * Write an event group attribute.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ * \param attrib The attribute to write
+ * \param valueSize The size, in bytes, of the value
+ * \param value The attribute value to write
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not an event group attribute, or if
+ * \p attrib is not a writable attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT Indicates that
+ * the \p value buffer is too small to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiEventGroupSetAttribute(CUpti_EventGroup eventGroup,
+ CUpti_EventGroupAttribute attrib,
+ size_t valueSize,
+ void *value);
+
+/**
+ * \brief Add an event to an event group.
+ *
+ * Add an event to an event group. The event add can fail for a number of reasons:
+ * \li The event group is enabled
+ * \li The event does not belong to the same event domain as the
+ * events that are already in the event group
+ * \li Device limitations on the events that can belong to the same group
+ * \li The event group is full
+ *
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ * \param event The event to add to the group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p event belongs to a
+ * different event domain than the events already in \p eventGroup, or
+ * if a device limitation prevents \p event from being collected at
+ * the same time as the events already in \p eventGroup
+ * \retval CUPTI_ERROR_MAX_LIMIT_REACHED if \p eventGroup is full
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupAddEvent(CUpti_EventGroup eventGroup,
+ CUpti_EventID event);
+
+/**
+ * \brief Remove an event from an event group.
+ *
+ * Remove \p event from the an event group. The event cannot be
+ * removed if the event group is enabled.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ * \param event The event to remove from the group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupRemoveEvent(CUpti_EventGroup eventGroup,
+ CUpti_EventID event);
+
+/**
+ * \brief Remove all events from an event group.
+ *
+ * Remove all events from an event group. Events cannot be removed if
+ * the event group is enabled.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is enabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupRemoveAllEvents(CUpti_EventGroup eventGroup);
+
+/**
+ * \brief Zero all the event counts in an event group.
+ *
+ * Zero all the event counts in an event group.
+ * \note \b Thread-safety: this function is thread safe but client
+ * must guard against simultaneous destruction or modification of \p
+ * eventGroup (for example, client must guard against simultaneous
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
+ * etc.), and must guard against simultaneous destruction of the
+ * context in which \p eventGroup was created (for example, client
+ * must guard against simultaneous calls to cudaDeviceReset,
+ * cuCtxDestroy, etc.).
+ *
+ * \param eventGroup The event group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupResetAllEvents(CUpti_EventGroup eventGroup);
+
+/**
+ * \brief Enable an event group.
+ *
+ * Enable an event group. Enabling an event group zeros the value of
+ * all the events in the group and then starts collection of those
+ * events.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
+ * enabled due to other already enabled event groups
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if another client is profiling
+ * and hardware is busy
+ */
+CUptiResult CUPTIAPI cuptiEventGroupEnable(CUpti_EventGroup eventGroup);
+
+/**
+ * \brief Disable an event group.
+ *
+ * Disable an event group. Disabling an event group stops collection
+ * of events contained in the group.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroup The event group
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupDisable(CUpti_EventGroup eventGroup);
+
+/**
+ * \brief Read the value for an event in an event group.
+ *
+ * Read the value for an event in an event group. The event value is
+ * returned in the \p eventValueBuffer buffer. \p
+ * eventValueBufferSizeBytes indicates the size of the \p
+ * eventValueBuffer buffer. The buffer must be at least sizeof(uint64)
+ * if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set
+ * on the group containing the event. The buffer must be at least
+ * (sizeof(uint64) * number of domain instances) if
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is set on the
+ * group.
+ *
+ * If any instance of an event counter overflows, the value returned
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
+ *
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
+ *
+ * Reading an event from a disabled event group is not allowed. After
+ * being read, an event's value is reset to zero.
+ * \note \b Thread-safety: this function is thread safe but client
+ * must guard against simultaneous destruction or modification of \p
+ * eventGroup (for example, client must guard against simultaneous
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
+ * etc.), and must guard against simultaneous destruction of the
+ * context in which \p eventGroup was created (for example, client
+ * must guard against simultaneous calls to cudaDeviceReset,
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
+ * called simultaneously with this function, then returned event
+ * values are undefined.
+ *
+ * \param eventGroup The event group
+ * \param flags Flags controlling the reading mode
+ * \param event The event to read
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer
+ * in bytes, and returns the number of bytes written to \p
+ * eventValueBuffer
+ * \param eventValueBuffer Returns the event value(s)
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
+ * eventValueBufferSizeBytes or \p eventValueBuffer is NULL
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
+ * is not sufficient
+ */
+CUptiResult CUPTIAPI cuptiEventGroupReadEvent(CUpti_EventGroup eventGroup,
+ CUpti_ReadEventFlags flags,
+ CUpti_EventID event,
+ size_t *eventValueBufferSizeBytes,
+ uint64_t *eventValueBuffer);
+
+/**
+ * \brief Read the values for all the events in an event group.
+ *
+ * Read the values for all the events in an event group. The event
+ * values are returned in the \p eventValueBuffer buffer. \p
+ * eventValueBufferSizeBytes indicates the size of \p
+ * eventValueBuffer. The buffer must be at least (sizeof(uint64) *
+ * number of events in group) if
+ * ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is not set on
+ * the group containing the events. The buffer must be at least
+ * (sizeof(uint64) * number of domain instances * number of events in
+ * group) if ::CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES is
+ * set on the group.
+ *
+ * The data format returned in \p eventValueBuffer is:
+ * - domain instance 0: event0 event1 ... eventN
+ * - domain instance 1: event0 event1 ... eventN
+ * - ...
+ * - domain instance M: event0 event1 ... eventN
+ *
+ * The event order in \p eventValueBuffer is returned in \p
+ * eventIdArray. The size of \p eventIdArray is specified in \p
+ * eventIdArraySizeBytes. The size should be at least
+ * (sizeof(CUpti_EventID) * number of events in group).
+ *
+ * If any instance of any event counter overflows, the value returned
+ * for that event instance will be ::CUPTI_EVENT_OVERFLOW.
+ *
+ * The only allowed value for \p flags is ::CUPTI_EVENT_READ_FLAG_NONE.
+ *
+ * Reading events from a disabled event group is not allowed. After
+ * being read, an event's value is reset to zero.
+ * \note \b Thread-safety: this function is thread safe but client
+ * must guard against simultaneous destruction or modification of \p
+ * eventGroup (for example, client must guard against simultaneous
+ * calls to \ref cuptiEventGroupDestroy, \ref cuptiEventGroupAddEvent,
+ * etc.), and must guard against simultaneous destruction of the
+ * context in which \p eventGroup was created (for example, client
+ * must guard against simultaneous calls to cudaDeviceReset,
+ * cuCtxDestroy, etc.). If \ref cuptiEventGroupResetAllEvents is
+ * called simultaneously with this function, then returned event
+ * values are undefined.
+ *
+ * \param eventGroup The event group
+ * \param flags Flags controlling the reading mode
+ * \param eventValueBufferSizeBytes The size of \p eventValueBuffer in
+ * bytes, and returns the number of bytes written to \p
+ * eventValueBuffer
+ * \param eventValueBuffer Returns the event values
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
+ * and returns the number of bytes written to \p eventIdArray
+ * \param eventIdArray Returns the IDs of the events in the same order
+ * as the values return in eventValueBuffer.
+ * \param numEventIdsRead Returns the number of event IDs returned
+ * in \p eventIdArray
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_INVALID_OPERATION if \p eventGroup is disabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroup, \p
+ * eventValueBufferSizeBytes, \p eventValueBuffer, \p
+ * eventIdArraySizeBytes, \p eventIdArray or \p numEventIdsRead is
+ * NULL
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if size of \p eventValueBuffer
+ * or \p eventIdArray is not sufficient
+ */
+CUptiResult CUPTIAPI cuptiEventGroupReadAllEvents(CUpti_EventGroup eventGroup,
+ CUpti_ReadEventFlags flags,
+ size_t *eventValueBufferSizeBytes,
+ uint64_t *eventValueBuffer,
+ size_t *eventIdArraySizeBytes,
+ CUpti_EventID *eventIdArray,
+ size_t *numEventIdsRead);
+
+/**
+ * \brief For a set of events, get the grouping that indicates the
+ * number of passes and the event groups necessary to collect the
+ * events.
+ *
+ * The number of events that can be collected simultaneously varies by
+ * device and by the type of the events. When events can be collected
+ * simultaneously, they may need to be grouped into multiple event
+ * groups because they are from different event domains. This function
+ * takes a set of events and determines how many passes are required
+ * to collect all those events, and which events can be collected
+ * simultaneously in each pass.
+ *
+ * The CUpti_EventGroupSets returned in \p eventGroupPasses indicates
+ * how many passes are required to collect the events with the \p
+ * numSets field. Within each event group set, the \p sets array
+ * indicates the event groups that should be collected on each pass.
+ * \note \b Thread-safety: this function is thread safe, but client
+ * must guard against another thread simultaneously destroying \p
+ * context.
+ *
+ * \param context The context for event collection
+ * \param eventIdArraySizeBytes Size of \p eventIdArray in bytes
+ * \param eventIdArray Array of event IDs that need to be grouped
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
+ * indicates the number of passes required to collect the events and
+ * the events to collect on each pass
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_INVALID_EVENT_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArray or
+ * \p eventGroupPasses is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupSetsCreate(CUcontext context,
+ size_t eventIdArraySizeBytes,
+ CUpti_EventID *eventIdArray,
+ CUpti_EventGroupSets **eventGroupPasses);
+
+/**
+ * \brief Destroy a event group sets object.
+ *
+ * Destroy a CUpti_EventGroupSets object.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroupSets The object to destroy
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_OPERATION if any of the event groups
+ * contained in the sets is enabled
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSets is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupSetsDestroy(CUpti_EventGroupSets *eventGroupSets);
+
+
+/**
+ * \brief Enable an event group set.
+ *
+ * Enable a set of event groups. Enabling a set of event groups zeros the value of
+ * all the events in all the groups and then starts collection of those events.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param eventGroupSet The pointer to the event group set
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_NOT_READY if \p eventGroup does not contain any events
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if \p eventGroup cannot be
+ * enabled due to other already enabled event groups
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
+ * \retval CUPTI_ERROR_HARDWARE_BUSY if other client is profiling and hardware is
+ * busy
+ */
+CUptiResult CUPTIAPI cuptiEventGroupSetEnable(CUpti_EventGroupSet *eventGroupSet);
+
+/**
+ * \brief Disable an event group set.
+ *
+ * Disable a set of event groups. Disabling a set of event groups
+ * stops collection of events contained in the groups.
+ * \note \b Thread-safety: this function is thread safe.
+ * \note \b If this call fails, some of the event groups in the set may be disabled
+ * and other event groups may remain enabled.
+ *
+ * \param eventGroupSet The pointer to the event group set
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_HARDWARE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventGroupSet is NULL
+ */
+CUptiResult CUPTIAPI cuptiEventGroupSetDisable(CUpti_EventGroupSet *eventGroupSet);
+
+/**
+ * \brief Enable kernel replay mode.
+ *
+ * Set profiling mode for the context to replay mode. In this mode,
+ * any number of events can be collected in one run of the kernel. The
+ * event collection mode will automatically switch to
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. In this mode, \ref
+ * cuptiSetEventCollectionMode will return
+ * CUPTI_ERROR_INVALID_OPERATION.
+ * \note \b Kernels might take longer to run if many events are enabled.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param context The context
+ * \retval CUPTI_SUCCESS
+ */
+CUptiResult CUPTIAPI cuptiEnableKernelReplayMode(CUcontext context);
+
+/**
+ * \brief Disable kernel replay mode.
+ *
+ * Set profiling mode for the context to non-replay (default)
+ * mode. Event collection mode will be set to
+ * CUPTI_EVENT_COLLECTION_MODE_KERNEL. All previously enabled
+ * event groups and event group sets will be disabled.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param context The context
+ * \retval CUPTI_SUCCESS
+ */
+CUptiResult CUPTIAPI cuptiDisableKernelReplayMode(CUcontext context);
+
+/**
+ * \brief Function type for getting updates on kernel replay.
+ *
+ * \param kernelName The mangled kernel name
+ * \param numReplaysDone Number of replays done so far
+ * \param customData Pointer of any custom data passed in when subscribing
+ */
+typedef void (CUPTIAPI *CUpti_KernelReplayUpdateFunc)(
+ const char *kernelName,
+ int numReplaysDone,
+ void *customData);
+
+/**
+ * \brief Subscribe to kernel replay updates.
+ *
+ * When subscribed, the function pointer passed in will be called each time a
+ * kernel run is finished during kernel replay. Previously subscribed function
+ * pointer will be replaced. Pass in NULL as the function pointer unsubscribes
+ * the update.
+ *
+ * \param updateFunc The update function pointer
+ * \param customData Pointer to any custom data
+ * \retval CUPTI_SUCCESS
+ */
+CUptiResult CUPTIAPI cuptiKernelReplaySubscribeUpdate(CUpti_KernelReplayUpdateFunc updateFunc, void *customData);
+
+/** @} */ /* END CUPTI_EVENT_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_EVENTS_H_*/
+
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_metrics.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..64b7f2d14580320f1ec938da5ea356add191ec3c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_metrics.h
@@ -0,0 +1,824 @@
+/*
+ * Copyright 2011-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_METRIC_H_)
+#define _CUPTI_METRIC_H_
+
+#include
+#include
+#include
+#include
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_METRIC_API CUPTI Metric API
+ * Functions, types, and enums that implement the CUPTI Metric API.
+ *
+ * \note The CUPTI metric API from the header cupti_metrics.h is not supported on devices
+ * with compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
+ * This API is deprecated in CUDA 12.8 release and will be removed in a future CUDA release.
+ * This is replaced by the host profiling API in the header cupti_profiler_host.h and
+ * target profiling API in the header cupti_range_profiler.h which are supported on
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU architectures).
+ *
+ * @{
+ */
+
+/**
+ * \brief ID for a metric.
+ *
+ * A metric provides a measure of some aspect of the device.
+ */
+typedef uint32_t CUpti_MetricID;
+
+/**
+ * \brief A metric category.
+ *
+ * Each metric is assigned to a category that represents the general
+ * type of the metric. A metric's category is accessed using \ref
+ * cuptiMetricGetAttribute and the CUPTI_METRIC_ATTR_CATEGORY
+ * attribute.
+ */
+typedef enum {
+ /**
+ * A memory related metric.
+ */
+ CUPTI_METRIC_CATEGORY_MEMORY = 0,
+ /**
+ * An instruction related metric.
+ */
+ CUPTI_METRIC_CATEGORY_INSTRUCTION = 1,
+ /**
+ * A multiprocessor related metric.
+ */
+ CUPTI_METRIC_CATEGORY_MULTIPROCESSOR = 2,
+ /**
+ * A cache related metric.
+ */
+ CUPTI_METRIC_CATEGORY_CACHE = 3,
+ /**
+ * A texture related metric.
+ */
+ CUPTI_METRIC_CATEGORY_TEXTURE = 4,
+ /**
+ *A Nvlink related metric.
+ */
+ CUPTI_METRIC_CATEGORY_NVLINK = 5,
+ /**
+ *A PCIe related metric.
+ */
+ CUPTI_METRIC_CATEGORY_PCIE = 6,
+ CUPTI_METRIC_CATEGORY_FORCE_INT = 0x7fffffff,
+} CUpti_MetricCategory;
+
+/**
+ * \brief A metric evaluation mode.
+ *
+ * A metric can be evaluated per hardware instance to know the load balancing
+ * across instances of a domain or the metric can be evaluated in aggregate mode
+ * when the events involved in metric evaluation are from different event
+ * domains. It might be possible to evaluate some metrics in both
+ * modes for convenience. A metric's evaluation mode is accessed using \ref
+ * CUpti_MetricEvaluationMode and the CUPTI_METRIC_ATTR_EVALUATION_MODE
+ * attribute.
+ */
+typedef enum {
+ /**
+ * If this bit is set, the metric can be profiled for each instance of the
+ * domain. The event values passed to \ref cuptiMetricGetValue can contain
+ * values for one instance of the domain. And \ref cuptiMetricGetValue can
+ * be called for each instance.
+ */
+ CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE = 1,
+ /**
+ * If this bit is set, the metric can be profiled over all instances. The
+ * event values passed to \ref cuptiMetricGetValue can be aggregated values
+ * of events for all instances of the domain.
+ */
+ CUPTI_METRIC_EVALUATION_MODE_AGGREGATE = 1 << 1,
+ CUPTI_METRIC_EVALUATION_MODE_FORCE_INT = 0x7fffffff,
+} CUpti_MetricEvaluationMode;
+
+/**
+ * \brief Kinds of metric values.
+ *
+ * Metric values can be one of several different kinds. Corresponding
+ * to each kind is a member of the CUpti_MetricValue union. The metric
+ * value returned by \ref cuptiMetricGetValue should be accessed using
+ * the appropriate member of that union based on its value kind.
+ */
+typedef enum {
+ /**
+ * The metric value is a 64-bit double.
+ */
+ CUPTI_METRIC_VALUE_KIND_DOUBLE = 0,
+ /**
+ * The metric value is a 64-bit unsigned integer.
+ */
+ CUPTI_METRIC_VALUE_KIND_UINT64 = 1,
+ /**
+ * The metric value is a percentage represented by a 64-bit
+ * double. For example, 57.5% is represented by the value 57.5.
+ */
+ CUPTI_METRIC_VALUE_KIND_PERCENT = 2,
+ /**
+ * The metric value is a throughput represented by a 64-bit
+ * integer. The unit for throughput values is bytes/second.
+ */
+ CUPTI_METRIC_VALUE_KIND_THROUGHPUT = 3,
+ /**
+ * The metric value is a 64-bit signed integer.
+ */
+ CUPTI_METRIC_VALUE_KIND_INT64 = 4,
+ /**
+ * The metric value is a utilization level, as represented by
+ * CUpti_MetricValueUtilizationLevel.
+ */
+ CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL = 5,
+
+ CUPTI_METRIC_VALUE_KIND_FORCE_INT = 0x7fffffff
+} CUpti_MetricValueKind;
+
+/**
+ * \brief Enumeration of utilization levels for metrics values of kind
+ * CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL. Utilization values can
+ * vary from IDLE (0) to MAX (10) but the enumeration only provides
+ * specific names for a few values.
+ */
+typedef enum {
+ CUPTI_METRIC_VALUE_UTILIZATION_IDLE = 0,
+ CUPTI_METRIC_VALUE_UTILIZATION_LOW = 2,
+ CUPTI_METRIC_VALUE_UTILIZATION_MID = 5,
+ CUPTI_METRIC_VALUE_UTILIZATION_HIGH = 8,
+ CUPTI_METRIC_VALUE_UTILIZATION_MAX = 10,
+ CUPTI_METRIC_VALUE_UTILIZATION_FORCE_INT = 0x7fffffff
+} CUpti_MetricValueUtilizationLevel;
+
+/**
+ * \brief Metric attributes.
+ *
+ * Metric attributes describe properties of a metric. These attributes
+ * can be read using \ref cuptiMetricGetAttribute.
+ */
+typedef enum {
+ /**
+ * Metric name. Value is a null terminated const c-string.
+ */
+ CUPTI_METRIC_ATTR_NAME = 0,
+ /**
+ * Short description of metric. Value is a null terminated const c-string.
+ */
+ CUPTI_METRIC_ATTR_SHORT_DESCRIPTION = 1,
+ /**
+ * Long description of metric. Value is a null terminated const c-string.
+ */
+ CUPTI_METRIC_ATTR_LONG_DESCRIPTION = 2,
+ /**
+ * Category of the metric. Value is of type CUpti_MetricCategory.
+ */
+ CUPTI_METRIC_ATTR_CATEGORY = 3,
+ /**
+ * Value type of the metric. Value is of type CUpti_MetricValueKind.
+ */
+ CUPTI_METRIC_ATTR_VALUE_KIND = 4,
+ /**
+ * Metric evaluation mode. Value is of type CUpti_MetricEvaluationMode.
+ */
+ CUPTI_METRIC_ATTR_EVALUATION_MODE = 5,
+ CUPTI_METRIC_ATTR_FORCE_INT = 0x7fffffff,
+} CUpti_MetricAttribute;
+
+/**
+ * \brief A metric value.
+ *
+ * Metric values can be one of several different kinds. Corresponding
+ * to each kind is a member of the CUpti_MetricValue union. The metric
+ * value returned by \ref cuptiMetricGetValue should be accessed using
+ * the appropriate member of that union based on its value kind.
+ */
+typedef union {
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_DOUBLE.
+ */
+ double metricValueDouble;
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_UINT64.
+ */
+ uint64_t metricValueUint64;
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_INT64.
+ */
+ int64_t metricValueInt64;
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_PERCENT. For example, 57.5% is
+ * represented by the value 57.5.
+ */
+ double metricValuePercent;
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_THROUGHPUT. The unit for
+ * throughput values is bytes/second.
+ */
+ uint64_t metricValueThroughput;
+ /*
+ * Value for CUPTI_METRIC_VALUE_KIND_UTILIZATION_LEVEL.
+ */
+ CUpti_MetricValueUtilizationLevel metricValueUtilizationLevel;
+} CUpti_MetricValue;
+
+/**
+ * \brief Device class.
+ *
+ * Enumeration of device classes for metric property
+ * CUPTI_METRIC_PROPERTY_DEVICE_CLASS.
+ */
+typedef enum {
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TESLA = 0,
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_QUADRO = 1,
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_GEFORCE = 2,
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS_TEGRA = 3,
+} CUpti_MetricPropertyDeviceClass;
+
+/**
+ * \brief Metric device properties.
+ *
+ * Metric device properties describe device properties which are needed for a metric.
+ * Some of these properties can be collected using cuDeviceGetAttribute.
+ */
+typedef enum {
+ /*
+ * Number of multiprocessors on a device. This can be collected
+ * using value of \param CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT of
+ * cuDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_MULTIPROCESSOR_COUNT,
+ /*
+ * Maximum number of warps on a multiprocessor. This can be
+ * collected using ratio of value of \param
+ * CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR and \param
+ * CU_DEVICE_ATTRIBUTE_WARP_SIZE of cuDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_WARPS_PER_MULTIPROCESSOR,
+ /*
+ * GPU Time for kernel in ns. This should be profiled using CUPTI
+ * Activity API.
+ */
+ CUPTI_METRIC_PROPERTY_KERNEL_GPU_TIME,
+ /*
+ * Clock rate for device in KHz. This should be collected using
+ * value of \param CU_DEVICE_ATTRIBUTE_CLOCK_RATE of
+ * cuDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_CLOCK_RATE,
+ /*
+ * Number of Frame buffer units for device. This should be collected
+ * using value of \param CUPTI_DEVICE_ATTRIBUTE_MAX_FRAME_BUFFERS of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_FRAME_BUFFER_COUNT,
+ /*
+ * Global memory bandwidth in KBytes/sec. This should be collected
+ * using value of \param CUPTI_DEVICE_ATTR_GLOBAL_MEMORY_BANDWIDTH
+ * of cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_GLOBAL_MEMORY_BANDWIDTH,
+ /*
+ * PCIE link rate in Mega bits/sec. This should be collected using
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_RATE of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_RATE,
+ /*
+ * PCIE link width for device. This should be collected using
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_LINK_WIDTH of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_PCIE_LINK_WIDTH,
+ /*
+ * PCIE generation for device. This should be collected using
+ * value of \param CUPTI_DEVICE_ATTR_PCIE_GEN of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_PCIE_GEN,
+ /*
+ * The device class. This should be collected using
+ * value of \param CUPTI_DEVICE_ATTR_DEVICE_CLASS of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_DEVICE_CLASS,
+ /*
+ * Peak single precision floating point operations that
+ * can be performed in one cycle by the device.
+ * This should be collected using value of
+ * \param CUPTI_DEVICE_ATTR_FLOP_SP_PER_CYCLE of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_FLOP_SP_PER_CYCLE,
+ /*
+ * Peak double precision floating point operations that
+ * can be performed in one cycle by the device.
+ * This should be collected using value of
+ * \param CUPTI_DEVICE_ATTR_FLOP_DP_PER_CYCLE of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_FLOP_DP_PER_CYCLE,
+ /*
+ * Number of L2 units on a device. This can be collected
+ * using value of \param CUPTI_DEVICE_ATTR_MAX_L2_UNITS of
+ * cuDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_L2_UNITS,
+ /*
+ * Whether ECC support is enabled on the device. This can be
+ * collected using value of \param CU_DEVICE_ATTRIBUTE_ECC_ENABLED of
+ * cuDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_ECC_ENABLED,
+ /*
+ * Peak half precision floating point operations that
+ * can be performed in one cycle by the device.
+ * This should be collected using value of
+ * \param CUPTI_DEVICE_ATTR_FLOP_HP_PER_CYCLE of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_FLOP_HP_PER_CYCLE,
+ /*
+ * NVLINK Bandwitdh for device. This should be collected
+ * using value of \param CUPTI_DEVICE_ATTR_GPU_CPU_NVLINK_BW of
+ * cuptiDeviceGetAttribute.
+ */
+ CUPTI_METRIC_PROPERTY_GPU_CPU_NVLINK_BANDWIDTH,
+} CUpti_MetricPropertyID;
+
+/**
+ * \brief Get the total number of metrics available on any device.
+ *
+ * Returns the total number of metrics available on any CUDA-capable
+ * devices.
+ *
+ * \param numMetrics Returns the number of metrics
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
+*/
+CUptiResult CUPTIAPI cuptiGetNumMetrics(uint32_t *numMetrics);
+
+/**
+ * \brief Get all the metrics available on any device.
+ *
+ * Returns the metric IDs in \p metricArray for all CUDA-capable
+ * devices. The size of the \p metricArray buffer is given by \p
+ * *arraySizeBytes. The size of the \p metricArray buffer must be at
+ * least \p numMetrics * sizeof(CUpti_MetricID) or all metric IDs will
+ * not be returned. The value returned in \p *arraySizeBytes contains
+ * the number of bytes returned in \p metricArray.
+ *
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
+ * returns the number of bytes written to \p metricArray
+ * \param metricArray Returns the IDs of the metrics
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
+ * \p metricArray are NULL
+*/
+CUptiResult CUPTIAPI cuptiEnumMetrics(size_t *arraySizeBytes,
+ CUpti_MetricID *metricArray);
+
+/**
+ * \brief Get the number of metrics for a device.
+ *
+ * Returns the number of metrics available for a device.
+ *
+ * \param device The CUDA device
+ * \param numMetrics Returns the number of metrics available for the
+ * device
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numMetrics is NULL
+ */
+CUptiResult CUPTIAPI cuptiDeviceGetNumMetrics(CUdevice device,
+ uint32_t *numMetrics);
+
+/**
+ * \brief Get the metrics for a device.
+ *
+ * Returns the metric IDs in \p metricArray for a device. The size of
+ * the \p metricArray buffer is given by \p *arraySizeBytes. The size
+ * of the \p metricArray buffer must be at least \p numMetrics *
+ * sizeof(CUpti_MetricID) or else all metric IDs will not be
+ * returned. The value returned in \p *arraySizeBytes contains the
+ * number of bytes returned in \p metricArray.
+ *
+ * \param device The CUDA device
+ * \param arraySizeBytes The size of \p metricArray in bytes, and
+ * returns the number of bytes written to \p metricArray
+ * \param metricArray Returns the IDs of the metrics for the device
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p arraySizeBytes or
+ * \p metricArray are NULL
+ */
+CUptiResult CUPTIAPI cuptiDeviceEnumMetrics(CUdevice device,
+ size_t *arraySizeBytes,
+ CUpti_MetricID *metricArray);
+
+/**
+ * \brief Get a metric attribute.
+ *
+ * Returns a metric attribute in \p *value. The size of the \p
+ * value buffer is given by \p *valueSize. The value returned in \p
+ * *valueSize contains the number of bytes returned in \p value.
+ *
+ * If the attribute value is a c-string that is longer than \p
+ * *valueSize, then only the first \p *valueSize characters will be
+ * returned and there will be no terminating null byte.
+ *
+ * \param metric ID of the metric
+ * \param attrib The metric attribute to read
+ * \param valueSize The size of the \p value buffer in bytes, and
+ * returns the number of bytes written to \p value
+ * \param value Returns the attribute's value
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p valueSize or \p value
+ * is NULL, or if \p attrib is not a metric attribute
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-string
+ * attribute values, indicates that the \p value buffer is too small
+ * to hold the attribute value.
+ */
+CUptiResult CUPTIAPI cuptiMetricGetAttribute(CUpti_MetricID metric,
+ CUpti_MetricAttribute attrib,
+ size_t *valueSize,
+ void *value);
+
+/**
+ * \brief Find an metric by name.
+ *
+ * Find a metric by name and return the metric ID in \p *metric.
+ *
+ * \param device The CUDA device
+ * \param metricName The name of metric to find
+ * \param metric Returns the ID of the found metric or undefined if
+ * unable to find the metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_DEVICE
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if unable to find a metric
+ * with name \p metricName. In this case \p *metric is undefined
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricName or \p
+ * metric are NULL.
+ */
+CUptiResult CUPTIAPI cuptiMetricGetIdFromName(CUdevice device,
+ const char *metricName,
+ CUpti_MetricID *metric);
+
+/**
+ * \brief Get number of events required to calculate a metric.
+ *
+ * Returns the number of events in \p numEvents that are required to
+ * calculate a metric.
+ *
+ * \param metric ID of the metric
+ * \param numEvents Returns the number of events required for the metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numEvents is NULL
+ */
+CUptiResult CUPTIAPI cuptiMetricGetNumEvents(CUpti_MetricID metric,
+ uint32_t *numEvents);
+
+/**
+ * \brief Get the events required to calculating a metric.
+ *
+ * Gets the event IDs in \p eventIdArray required to calculate a \p
+ * metric. The size of the \p eventIdArray buffer is given by \p
+ * *eventIdArraySizeBytes and must be at least \p numEvents *
+ * sizeof(CUpti_EventID) or all events will not be returned. The value
+ * returned in \p *eventIdArraySizeBytes contains the number of bytes
+ * returned in \p eventIdArray.
+ *
+ * \param metric ID of the metric
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes,
+ * and returns the number of bytes written to \p eventIdArray
+ * \param eventIdArray Returns the IDs of the events required to
+ * calculate \p metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p eventIdArraySizeBytes or \p
+ * eventIdArray are NULL.
+ */
+CUptiResult CUPTIAPI cuptiMetricEnumEvents(CUpti_MetricID metric,
+ size_t *eventIdArraySizeBytes,
+ CUpti_EventID *eventIdArray);
+
+/**
+ * \brief Get number of properties required to calculate a metric.
+ *
+ * Returns the number of properties in \p numProp that are required to
+ * calculate a metric.
+ *
+ * \param metric ID of the metric
+ * \param numProp Returns the number of properties required for the
+ * metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p numProp is NULL
+ */
+CUptiResult CUPTIAPI cuptiMetricGetNumProperties(CUpti_MetricID metric,
+ uint32_t *numProp);
+
+/**
+ * \brief Get the properties required to calculating a metric.
+ *
+ * Gets the property IDs in \p propIdArray required to calculate a \p
+ * metric. The size of the \p propIdArray buffer is given by \p
+ * *propIdArraySizeBytes and must be at least \p numProp *
+ * sizeof(CUpti_DeviceAttribute) or all properties will not be
+ * returned. The value returned in \p *propIdArraySizeBytes contains
+ * the number of bytes returned in \p propIdArray.
+ *
+ * \param metric ID of the metric
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes,
+ * and returns the number of bytes written to \p propIdArray
+ * \param propIdArray Returns the IDs of the properties required to
+ * calculate \p metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p propIdArraySizeBytes or \p
+ * propIdArray are NULL.
+ */
+CUptiResult CUPTIAPI cuptiMetricEnumProperties(CUpti_MetricID metric,
+ size_t *propIdArraySizeBytes,
+ CUpti_MetricPropertyID *propIdArray);
+
+
+/**
+ * \brief For a metric get the groups of events that must be collected
+ * in the same pass.
+ *
+ * For a metric get the groups of events that must be collected in the
+ * same pass to ensure that the metric is calculated correctly. If the
+ * events are not collected as specified then the metric value may be
+ * inaccurate.
+ *
+ * The function returns NULL if a metric does not have any required
+ * event group. In this case the events needed for the metric can be
+ * grouped in any manner for collection.
+ *
+ * \param context The context for event collection
+ * \param metric The metric ID
+ * \param eventGroupSets Returns a CUpti_EventGroupSets object that
+ * indicates the events that must be collected in the same pass to
+ * ensure the metric is calculated correctly. Returns NULL if no
+ * grouping is required for metric
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ */
+CUptiResult CUPTIAPI cuptiMetricGetRequiredEventGroupSets(CUcontext context,
+ CUpti_MetricID metric,
+ CUpti_EventGroupSets **eventGroupSets);
+
+/**
+ * \brief For a set of metrics, get the grouping that indicates the
+ * number of passes and the event groups necessary to collect the
+ * events required for those metrics.
+ *
+ * For a set of metrics, get the grouping that indicates the number of
+ * passes and the event groups necessary to collect the events
+ * required for those metrics.
+ *
+ * \see cuptiEventGroupSetsCreate for details on event group set
+ * creation.
+ *
+ * \param context The context for event collection
+ * \param metricIdArraySizeBytes Size of the metricIdArray in bytes
+ * \param metricIdArray Array of metric IDs
+ * \param eventGroupPasses Returns a CUpti_EventGroupSets object that
+ * indicates the number of passes required to collect the events and
+ * the events to collect on each pass
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_CONTEXT
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricIdArray or
+ * \p eventGroupPasses is NULL
+ */
+CUptiResult CUPTIAPI cuptiMetricCreateEventGroupSets(CUcontext context,
+ size_t metricIdArraySizeBytes,
+ CUpti_MetricID *metricIdArray,
+ CUpti_EventGroupSets **eventGroupPasses);
+
+/**
+ * \brief Calculate the value for a metric.
+ *
+ * Use the events collected for a metric to calculate the metric
+ * value. Metric value evaluation depends on the evaluation mode
+ * \ref CUpti_MetricEvaluationMode that the metric supports.
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE,
+ * then it assumes that the input event value is for one domain instance.
+ * If a metric has evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE,
+ * it assumes that input event values are
+ * normalized to represent all domain instances on a device. For the
+ * most accurate metric collection, the events required for the metric
+ * should be collected for all profiled domain instances. For example,
+ * to collect all instances of an event, set the
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
+ * the group containing the event to 1. The normalized value for the
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
+ * instanceCount, where \p sum_event_values is the summation of the
+ * event values across all profiled domain instances, \p
+ * totalInstanceCount is obtained from querying
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
+ *
+ * \param device The CUDA device that the metric is being calculated for
+ * \param metric The metric ID
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
+ * \param eventIdArray The event IDs required to calculate \p metric
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
+ * \param eventValueArray The normalized event values required to
+ * calculate \p metric. The values must be order to match the order of
+ * events in \p eventIdArray
+ * \param timeDuration The duration over which the events were
+ * collected, in ns
+ * \param metricValue Returns the value for the metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_OPERATION
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
+ * eventIdArray does not contain all the events needed for metric
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
+ * \retval CUPTI_ERROR_INVALID_METRIC_VALUE if the computed metric value
+ * cannot be represented in the metric's value type. For example,
+ * if the metric value type is unsigned and the computed metric value is negative
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
+ * \p eventIdArray or \p eventValueArray is NULL
+ */
+CUptiResult CUPTIAPI cuptiMetricGetValue(CUdevice device,
+ CUpti_MetricID metric,
+ size_t eventIdArraySizeBytes,
+ CUpti_EventID *eventIdArray,
+ size_t eventValueArraySizeBytes,
+ uint64_t *eventValueArray,
+ uint64_t timeDuration,
+ CUpti_MetricValue *metricValue);
+
+/**
+ * \brief Calculate the value for a metric.
+ *
+ * Use the events and properties collected for a metric to calculate
+ * the metric value. Metric value evaluation depends on the evaluation
+ * mode \ref CUpti_MetricEvaluationMode that the metric supports. If
+ * a metric has evaluation mode as
+ * CUPTI_METRIC_EVALUATION_MODE_PER_INSTANCE, then it assumes that the
+ * input event value is for one domain instance. If a metric has
+ * evaluation mode as CUPTI_METRIC_EVALUATION_MODE_AGGREGATE, it
+ * assumes that input event values are normalized to represent all
+ * domain instances on a device. For the most accurate metric
+ * collection, the events required for the metric should be collected
+ * for all profiled domain instances. For example, to collect all
+ * instances of an event, set the
+ * CUPTI_EVENT_GROUP_ATTR_PROFILE_ALL_DOMAIN_INSTANCES attribute on
+ * the group containing the event to 1. The normalized value for the
+ * event is then: (\p sum_event_values * \p totalInstanceCount) / \p
+ * instanceCount, where \p sum_event_values is the summation of the
+ * event values across all profiled domain instances, \p
+ * totalInstanceCount is obtained from querying
+ * CUPTI_EVENT_DOMAIN_ATTR_TOTAL_INSTANCE_COUNT and \p instanceCount
+ * is obtained from querying CUPTI_EVENT_GROUP_ATTR_INSTANCE_COUNT (or
+ * CUPTI_EVENT_DOMAIN_ATTR_INSTANCE_COUNT).
+ *
+ * \param metric The metric ID
+ * \param eventIdArraySizeBytes The size of \p eventIdArray in bytes
+ * \param eventIdArray The event IDs required to calculate \p metric
+ * \param eventValueArraySizeBytes The size of \p eventValueArray in bytes
+ * \param eventValueArray The normalized event values required to
+ * calculate \p metric. The values must be order to match the order of
+ * events in \p eventIdArray
+ * \param propIdArraySizeBytes The size of \p propIdArray in bytes
+ * \param propIdArray The metric property IDs required to calculate \p metric
+ * \param propValueArraySizeBytes The size of \p propValueArray in bytes
+ * \param propValueArray The metric property values required to
+ * calculate \p metric. The values must be order to match the order of
+ * metric properties in \p propIdArray
+ * \param metricValue Returns the value for the metric
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_NOT_INITIALIZED
+ * \retval CUPTI_ERROR_INVALID_METRIC_ID
+ * \retval CUPTI_ERROR_INVALID_OPERATION
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT if the
+ * eventIdArray does not contain all the events needed for metric
+ * \retval CUPTI_ERROR_INVALID_EVENT_VALUE if any of the
+ * event values required for the metric is CUPTI_EVENT_OVERFLOW
+ * \retval CUPTI_ERROR_NOT_COMPATIBLE if the computed metric value
+ * cannot be represented in the metric's value type. For example,
+ * if the metric value type is unsigned and the computed metric value is negative
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p metricValue,
+ * \p eventIdArray or \p eventValueArray is NULL
+ */
+CUptiResult CUPTIAPI cuptiMetricGetValue2(CUpti_MetricID metric,
+ size_t eventIdArraySizeBytes,
+ CUpti_EventID *eventIdArray,
+ size_t eventValueArraySizeBytes,
+ uint64_t *eventValueArray,
+ size_t propIdArraySizeBytes,
+ CUpti_MetricPropertyID *propIdArray,
+ size_t propValueArraySizeBytes,
+ uint64_t *propValueArray,
+ CUpti_MetricValue *metricValue);
+
+/** @} */ /* END CUPTI_METRIC_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_METRIC_H_*/
+
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_nvtx_cbid.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_nvtx_cbid.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ad8c85e6e674b9a016580be88d3c5a2d2619990
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_nvtx_cbid.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2013-2017 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+typedef enum {
+ CUPTI_CBID_NVTX_INVALID = 0,
+ CUPTI_CBID_NVTX_nvtxMarkA = 1,
+ CUPTI_CBID_NVTX_nvtxMarkW = 2,
+ CUPTI_CBID_NVTX_nvtxMarkEx = 3,
+ CUPTI_CBID_NVTX_nvtxRangeStartA = 4,
+ CUPTI_CBID_NVTX_nvtxRangeStartW = 5,
+ CUPTI_CBID_NVTX_nvtxRangeStartEx = 6,
+ CUPTI_CBID_NVTX_nvtxRangeEnd = 7,
+ CUPTI_CBID_NVTX_nvtxRangePushA = 8,
+ CUPTI_CBID_NVTX_nvtxRangePushW = 9,
+ CUPTI_CBID_NVTX_nvtxRangePushEx = 10,
+ CUPTI_CBID_NVTX_nvtxRangePop = 11,
+ CUPTI_CBID_NVTX_nvtxNameCategoryA = 12,
+ CUPTI_CBID_NVTX_nvtxNameCategoryW = 13,
+ CUPTI_CBID_NVTX_nvtxNameOsThreadA = 14,
+ CUPTI_CBID_NVTX_nvtxNameOsThreadW = 15,
+ CUPTI_CBID_NVTX_nvtxNameCuDeviceA = 16,
+ CUPTI_CBID_NVTX_nvtxNameCuDeviceW = 17,
+ CUPTI_CBID_NVTX_nvtxNameCuContextA = 18,
+ CUPTI_CBID_NVTX_nvtxNameCuContextW = 19,
+ CUPTI_CBID_NVTX_nvtxNameCuStreamA = 20,
+ CUPTI_CBID_NVTX_nvtxNameCuStreamW = 21,
+ CUPTI_CBID_NVTX_nvtxNameCuEventA = 22,
+ CUPTI_CBID_NVTX_nvtxNameCuEventW = 23,
+ CUPTI_CBID_NVTX_nvtxNameCudaDeviceA = 24,
+ CUPTI_CBID_NVTX_nvtxNameCudaDeviceW = 25,
+ CUPTI_CBID_NVTX_nvtxNameCudaStreamA = 26,
+ CUPTI_CBID_NVTX_nvtxNameCudaStreamW = 27,
+ CUPTI_CBID_NVTX_nvtxNameCudaEventA = 28,
+ CUPTI_CBID_NVTX_nvtxNameCudaEventW = 29,
+ CUPTI_CBID_NVTX_nvtxDomainMarkEx = 30,
+ CUPTI_CBID_NVTX_nvtxDomainRangeStartEx = 31,
+ CUPTI_CBID_NVTX_nvtxDomainRangeEnd = 32,
+ CUPTI_CBID_NVTX_nvtxDomainRangePushEx = 33,
+ CUPTI_CBID_NVTX_nvtxDomainRangePop = 34,
+ CUPTI_CBID_NVTX_nvtxDomainResourceCreate = 35,
+ CUPTI_CBID_NVTX_nvtxDomainResourceDestroy = 36,
+ CUPTI_CBID_NVTX_nvtxDomainNameCategoryA = 37,
+ CUPTI_CBID_NVTX_nvtxDomainNameCategoryW = 38,
+ CUPTI_CBID_NVTX_nvtxDomainRegisterStringA = 39,
+ CUPTI_CBID_NVTX_nvtxDomainRegisterStringW = 40,
+ CUPTI_CBID_NVTX_nvtxDomainCreateA = 41,
+ CUPTI_CBID_NVTX_nvtxDomainCreateW = 42,
+ CUPTI_CBID_NVTX_nvtxDomainDestroy = 43,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserCreate = 44,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserDestroy = 45,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireStart = 46,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireFailed = 47,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserAcquireSuccess = 48,
+ CUPTI_CBID_NVTX_nvtxDomainSyncUserReleasing = 49,
+ CUPTI_CBID_NVTX_SIZE,
+ CUPTI_CBID_NVTX_FORCE_INT = 0x7fffffff
+} CUpti_nvtx_api_trace_cbid;
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling.h
new file mode 100644
index 0000000000000000000000000000000000000000..97f42d14b938204b3b79c4ca1356b88896bcae35
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling.h
@@ -0,0 +1,936 @@
+/*
+ * Copyright 2020-2022 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_PCSAMPLING_H_)
+#define _CUPTI_PCSAMPLING_H_
+
+#include
+#include
+#include
+#include "cupti_result.h"
+#include "cupti_common.h"
+
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_PCSAMPLING_API CUPTI PC Sampling API
+ * Functions, types, and enums that implement the CUPTI PC Sampling API.
+ * @{
+ */
+
+#ifndef CUPTI_PCSAMPLING_STRUCT_SIZE
+#define CUPTI_PCSAMPLING_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+#ifndef CUPTI_STALL_REASON_STRING_SIZE
+#define CUPTI_STALL_REASON_STRING_SIZE 128
+#endif
+
+/**
+ * \brief PC Sampling collection mode
+ */
+typedef enum
+{
+ /**
+ * INVALID Value
+ */
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_INVALID = 0,
+ /**
+ * Continuous mode. Kernels are not serialized in this mode.
+ */
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS = 1,
+ /**
+ * Serialized mode. Kernels are serialized in this mode.
+ */
+ CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED = 2,
+} CUpti_PCSamplingCollectionMode;
+
+/**
+ * \brief PC Sampling stall reasons
+ */
+typedef struct PACKED_ALIGNMENT
+{
+ /**
+ * [r] Collected stall reason index
+ */
+ uint32_t pcSamplingStallReasonIndex;
+ /**
+ * [r] Number of times the PC was sampled with the stallReason.
+ */
+ uint32_t samples;
+} CUpti_PCSamplingStallReason;
+
+/**
+ * \brief PC Sampling data
+ */
+typedef struct PACKED_ALIGNMENT
+{
+ /**
+ * [w] Size of the data structure.
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [r] Unique cubin id
+ */
+ uint64_t cubinCrc;
+ /**
+ * [r] PC offset
+ */
+ uint64_t pcOffset;
+ /**
+ * The function's unique symbol index in the module.
+ */
+ uint32_t functionIndex;
+ /**
+ * Padding
+ */
+ uint32_t pad;
+ /**
+ * [r] The function name. This name string might be shared across all the records
+ * including records from activity APIs representing the same function, and so it should not be
+ * modified or freed until post processing of all the records is done. Once done, it is user’s responsibility to
+ * free the memory using free() function.
+ */
+ char* functionName;
+ /**
+ * [r] Collected stall reason count
+ */
+ size_t stallReasonCount;
+ /**
+ * [r] Stall reason id
+ * Total samples
+ */
+ CUpti_PCSamplingStallReason *stallReason;
+ /**
+ * The correlation ID of the kernel to which this result is associated. Only valid for serialized mode of pc sampling collection.
+ * For continous mode of collection the correlationId will be set to 0.
+ */
+ uint32_t correlationId;
+} CUpti_PCSamplingPCData;
+
+/**
+ * \brief PC Sampling output data format
+ */
+typedef enum
+{
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_INVALID = 0,
+ /**
+ * HW buffer data will be parsed during collection of data
+ */
+ CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED = 1,
+} CUpti_PCSamplingOutputDataFormat;
+
+/**
+ * \brief Collected PC Sampling data
+ *
+ */
+typedef struct PACKED_ALIGNMENT
+{
+ /**
+ * [w] Size of the data structure.
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Number of PCs to be collected
+ */
+ size_t collectNumPcs;
+ /**
+ * [r] Number of samples collected across all PCs.
+ * It includes samples for user modules, samples for non-user kernels and dropped samples.
+ * It includes counts for all non selected stall reasons.
+ * CUPTI does not provide PC records for non-user kernels.
+ * CUPTI does not provide PC records for instructions for which all selected stall reason metrics counts are zero.
+ */
+ uint64_t totalSamples;
+ /**
+ * [r] Number of samples that were dropped by hardware due to backpressure/overflow.
+ */
+ uint64_t droppedSamples;
+ /**
+ * [r] Number of PCs collected
+ */
+ size_t totalNumPcs;
+ /**
+ * [r] Number of PCs available for collection
+ */
+ size_t remainingNumPcs;
+ /**
+ * [r] Unique identifier for each range.
+ * Data collected across multiple ranges in multiple buffers can be identified using range id.
+ */
+ uint64_t rangeId;
+ /**
+ * [r] Profiled PC data
+ * This data struct should have enough memory to collect number of PCs mentioned in \brief collectNumPcs
+ */
+ CUpti_PCSamplingPCData *pPcData;
+ /**
+ * [r] Number of samples collected across all non user kernels PCs.
+ * It includes samples for non-user kernels.
+ * It includes counts for all non selected stall reasons as well.
+ * CUPTI does not provide PC records for non-user kernels.
+ */
+ uint64_t nonUsrKernelsTotalSamples;
+
+ /**
+ * [r] Status of the hardware buffer.
+ * CUPTI returns the error code CUPTI_ERROR_OUT_OF_MEMORY when hardware buffer is full.
+ * When hardware buffer is full, user will get pc data as 0. To mitigate this issue, one or more of the below options can be tried:
+ * 1. Increase the hardware buffer size using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
+ * 2. Decrease the thread sleep span using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
+ * 3. Decrease the sampling frequency using the attribute CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
+ */
+ uint8_t hardwareBufferFull;
+} CUpti_PCSamplingData;
+
+/**
+ * \brief PC Sampling configuration attributes
+ *
+ * PC Sampling configuration attribute types. These attributes can be read
+ * using \ref cuptiPCSamplingGetConfigurationAttribute and can be written
+ * using \ref cuptiPCSamplingSetConfigurationAttribute. Attributes marked
+ * [r] can only be read using \ref cuptiPCSamplingGetConfigurationAttribute
+ * [w] can only be written using \ref cuptiPCSamplingSetConfigurationAttribute
+ * [rw] can be read using \ref cuptiPCSamplingGetConfigurationAttribute and
+ * written using \ref cuptiPCSamplingSetConfigurationAttribute
+ */
+typedef enum
+{
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_INVALID = 0,
+ /**
+ * [rw] Sampling period for PC Sampling.
+ * DEFAULT - CUPTI defined value based on number of SMs
+ * Valid values for the sampling
+ * periods are between 5 to 31 both inclusive. This will set the
+ * sampling period to (2^samplingPeriod) cycles.
+ * For e.g. for sampling period = 5 to 31, cycles = 32, 64, 128,..., 2^31
+ * Value is a uint32_t
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD = 1,
+ /**
+ * [w] Number of stall reasons to collect.
+ * DEFAULT - All stall reasons will be collected
+ * Value is a size_t
+ * [w] Stall reasons to collect
+ * DEFAULT - All stall reasons will be collected
+ * Input value should be a pointer pointing to array of stall reason indexes
+ * containing all the stall reason indexes to collect.
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON = 2,
+ /**
+ * [rw] Size of SW buffer for raw PC counter data downloaded from HW buffer
+ * DEFAULT - 1 MB, which can accommodate approximately 5500 PCs
+ * with all stall reasons
+ * Approximately it takes 16 Bytes (and some fixed size memory)
+ * to accommodate one PC with one stall reason
+ * For e.g. 1 PC with 1 stall reason = 32 Bytes
+ * 1 PC with 2 stall reason = 48 Bytes
+ * 1 PC with 4 stall reason = 96 Bytes
+ * Value is a size_t
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE = 3,
+ /**
+ * [rw] Size of HW buffer in bytes
+ * DEFAULT - 512 MB
+ * If sampling period is too less, HW buffer can overflow
+ * and drop PC data
+ * Value is a size_t
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE = 4,
+ /**
+ * [rw] PC Sampling collection mode
+ * DEFAULT - CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS
+ * Input value should be of type \ref CUpti_PCSamplingCollectionMode.
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE = 5,
+ /**
+ * [rw] Control over PC Sampling data collection range
+ * Default - 0
+ * 1 - Allows user to start and stop PC Sampling using APIs -
+ * \ref cuptiPCSamplingStart() - Start PC Sampling
+ * \ref cuptiPCSamplingStop() - Stop PC Sampling
+ * Value is a uint32_t
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL = 6,
+ /**
+ * [w] Value for output data format
+ * Default - CUPTI_PC_SAMPLING_OUTPUT_DATA_FORMAT_PARSED
+ * Input value should be of type \ref CUpti_PCSamplingOutputDataFormat.
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT = 7,
+ /**
+ * [w] Data buffer to hold collected PC Sampling data PARSED_DATA
+ * Default - none.
+ * Buffer type is void * which can point to PARSED_DATA
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER = 8,
+ /**
+ * [rw] Control sleep time of the worker threads created by CUPTI for various PC sampling operations.
+ * CUPTI creates multiple worker threads to offload certain operations to these threads. This includes decoding of HW data to
+ * the CUPTI PC sampling data and correlating PC data to SASS instructions. CUPTI wakes up these threads periodically.
+ * Default - 100 milliseconds.
+ * Value is a uint32_t
+ */
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN = 9,
+ CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_FORCE_INT = 0x7fffffff,
+} CUpti_PCSamplingConfigurationAttributeType;
+
+/**
+ * \brief PC sampling configuration information structure
+ *
+ * This structure provides \ref CUpti_PCSamplingConfigurationAttributeType which can be configured
+ * or queried for PC sampling configuration
+ */
+typedef struct
+{
+ /**
+ * Refer \ref CUpti_PCSamplingConfigurationAttributeType for all supported attribute types
+ */
+ CUpti_PCSamplingConfigurationAttributeType attributeType;
+ /*
+ * Configure or query status for \p attributeType
+ * CUPTI_SUCCESS for valid \p attributeType and \p attributeData
+ * CUPTI_ERROR_INVALID_OPERATION if \p attributeData is not valid
+ * CUPTI_ERROR_INVALID_PARAMETER if \p attributeType is not valid
+ */
+ CUptiResult attributeStatus;
+ union
+ {
+ /**
+ * Invalid Value
+ */
+ struct
+ {
+ uint64_t data[3];
+ } invalidData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_PERIOD
+ */
+ struct
+ {
+ uint32_t samplingPeriod;
+ } samplingPeriodData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON
+ */
+ struct
+ {
+ size_t stallReasonCount;
+ uint32_t *pStallReasonIndex;
+ } stallReasonData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SCRATCH_BUFFER_SIZE
+ */
+ struct
+ {
+ size_t scratchBufferSize;
+ } scratchBufferSizeData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_HARDWARE_BUFFER_SIZE
+ */
+ struct
+ {
+ size_t hardwareBufferSize;
+ } hardwareBufferSizeData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_COLLECTION_MODE
+ */
+ struct
+ {
+ CUpti_PCSamplingCollectionMode collectionMode;
+ } collectionModeData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
+ */
+ struct
+ {
+ uint32_t enableStartStopControl;
+ } enableStartStopControlData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_OUTPUT_DATA_FORMAT
+ */
+ struct
+ {
+ CUpti_PCSamplingOutputDataFormat outputDataFormat;
+ } outputDataFormatData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_SAMPLING_DATA_BUFFER
+ */
+ struct
+ {
+ void *samplingDataBuffer;
+ } samplingDataBufferData;
+ /**
+ * Refer \ref CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_WORKER_THREAD_PERIODIC_SLEEP_SPAN
+ */
+ struct
+ {
+ uint32_t workerThreadPeriodicSleepSpan;
+ } workerThreadPeriodicSleepSpanData;
+
+ } attributeData;
+} CUpti_PCSamplingConfigurationInfo;
+
+/**
+ * \brief PC sampling configuration structure
+ *
+ * This structure configures PC sampling using \ref cuptiPCSamplingSetConfigurationAttribute
+ * and queries PC sampling default configuration using \ref cuptiPCSamplingGetConfigurationAttribute
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingConfigurationInfoParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+ /**
+ * [w] Number of attributes to configure using \ref cuptiPCSamplingSetConfigurationAttribute or query
+ * using \ref cuptiPCSamplingGetConfigurationAttribute
+ */
+ size_t numAttributes;
+ /**
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
+ */
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
+} CUpti_PCSamplingConfigurationInfoParams;
+#define CUpti_PCSamplingConfigurationInfoParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingConfigurationInfoParams,pPCSamplingConfigurationInfo)
+
+/**
+ * \brief Write PC Sampling configuration attribute.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingConfigurationInfoParams
+ * containing PC sampling configuration.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
+ * some invalid \p attrib.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if attribute \p value is not valid
+ * or any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingSetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
+
+/**
+ * \brief Read PC Sampling configuration attribute.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingConfigurationInfoParams
+ * containing PC sampling configuration.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
+ * some invalid attribute.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p attrib is not valid
+ * or any \p pParams is not valid
+ * \retval CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT indicates that
+ * the \p value buffer is too small to hold the attribute value
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingGetConfigurationAttribute(CUpti_PCSamplingConfigurationInfoParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingEnable
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetDataParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+ /**
+ * \param pcSamplingData Data buffer to hold collected PC Sampling data PARSED_DATA
+ * Buffer type is void * which can point to PARSED_DATA
+ * Refer \ref CUpti_PCSamplingData for buffer format for PARSED_DATA
+ */
+ void *pcSamplingData;
+} CUpti_PCSamplingGetDataParams;
+#define CUpti_PCSamplingGetDataParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetDataParams, pcSamplingData)
+/**
+ * \brief Flush GPU PC sampling data periodically.
+ *
+ * Flushing of GPU PC Sampling data is required at following point to maintain uniqueness of PCs:
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, after every module load-unload-load
+ * For \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_KERNEL_SERIALIZED, after every kernel ends
+ * If configuration option \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL
+ * is enabled, then after every range end i.e. \brief cuptiPCSamplingStop()
+ *
+ * If application is profiled in \brief CUPTI_PC_SAMPLING_COLLECTION_MODE_CONTINUOUS, with disabled
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL, and there is no module unload,
+ * user can collect data in two ways:
+ * Use \brief cuptiPCSamplingGetData() API periodically
+ * Use \brief cuptiPCSamplingDisable() on application exit and read GPU PC sampling data from sampling
+ * data buffer passed during configuration.
+ * Note: In case, \brief cuptiPCSamplingGetData() API is not called periodically, then sampling data buffer
+ * passed during configuration should be large enough to hold all PCs data.
+ * \brief cuptiPCSamplingGetData() API never does device synchronization.
+ * It is possible that when the API is called there is some unconsumed data from the HW buffer. In this case
+ * CUPTI provides only the data available with it at that moment.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetDataParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called without
+ * enabling PC sampling.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY indicates that the HW buffer is full
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingGetData(CUpti_PCSamplingGetDataParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingEnable
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingEnableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+} CUpti_PCSamplingEnableParams;
+#define CUpti_PCSamplingEnableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingEnableParams, ctx)
+
+/**
+ * \brief Enable PC sampling.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingEnableParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingEnable(CUpti_PCSamplingEnableParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingDisable
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+} CUpti_PCSamplingDisableParams;
+#define CUpti_PCSamplingDisableParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingDisableParams, ctx)
+
+/**
+ * \brief Disable PC sampling.
+ *
+ * For application which doesn't destroy the CUDA context explicitly,
+ * this API does the PC Sampling tear-down, joins threads and copies PC records in the buffer provided
+ * during the PC sampling configuration. PC records which can't be accommodated in the buffer are discarded.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingDisableParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingDisable(CUpti_PCSamplingDisableParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingStart
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStartParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+} CUpti_PCSamplingStartParams;
+#define CUpti_PCSamplingStartParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStartParams, ctx)
+
+/**
+ * \brief Start PC sampling.
+ *
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
+ * This API can be used to mark starting of range. Set configuration option
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingStartParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
+ * incorrect PC Sampling configuration.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingStart(CUpti_PCSamplingStartParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingStop
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingStopParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+} CUpti_PCSamplingStopParams;
+#define CUpti_PCSamplingStopParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingStopParams, ctx)
+
+/**
+ * \brief Stop PC sampling.
+ *
+ * User can collect PC Sampling data for user-defined range specified by Start/Stop APIs.
+ * This API can be used to mark end of range. Set configuration option
+ * \brief CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_ENABLE_START_STOP_CONTROL to use this API.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingStopParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called with
+ * incorrect PC Sampling configuration.
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingStop(CUpti_PCSamplingStopParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingGetNumStallReasons
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetNumStallReasonsParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+ /**
+ * [r] Number of stall reasons
+ */
+ size_t *numStallReasons;
+} CUpti_PCSamplingGetNumStallReasonsParams;
+#define CUpti_PCSamplingGetNumStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetNumStallReasonsParams, numStallReasons)
+
+/**
+ * \brief Get PC sampling stall reason count.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetNumStallReasonsParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingGetNumStallReasons(CUpti_PCSamplingGetNumStallReasonsParams *pParams);
+
+/**
+ * \brief Params for cuptiPCSamplingGetStallReasons
+ */
+typedef struct
+{
+ /**
+ * [w] Size of the data structure i.e. CUpti_PCSamplingGetStallReasonsParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Assign to NULL
+ */
+ void* pPriv;
+ /**
+ * [w] CUcontext
+ */
+ CUcontext ctx;
+ /**
+ * [w] Number of stall reasons
+ */
+ size_t numStallReasons;
+ /**
+ * [r] Stall reason index
+ */
+ uint32_t *stallReasonIndex;
+ /**
+ * [r] Stall reasons name
+ */
+ char **stallReasons;
+} CUpti_PCSamplingGetStallReasonsParams;
+#define CUpti_PCSamplingGetStallReasonsParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_PCSamplingGetStallReasonsParams, stallReasons)
+
+/**
+ * \brief Get PC sampling stall reasons.
+ *
+ * \param pParams A pointer to \ref CUpti_PCSamplingGetStallReasonsParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device
+ * does not support the API
+ */
+CUptiResult CUPTIAPI cuptiPCSamplingGetStallReasons(CUpti_PCSamplingGetStallReasonsParams *pParams);
+
+
+/**
+ * \brief Params for cuptiGetSassToSourceCorrelation
+ */
+typedef struct CUpti_GetSassToSourceCorrelationParams {
+ /**
+ * [w] Size of the data structure i.e. CUpti_GetSassToSourceCorrelationParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Pointer to cubin binary where function belongs.
+ */
+ const void* cubin;
+ /**
+ * [w] Function name to which PC belongs.
+ */
+ const char *functionName;
+ /**
+ * [w] Size of cubin binary.
+ */
+ size_t cubinSize;
+ /**
+ * [r] Line number in the source code.
+ */
+ uint32_t lineNumber;
+ /**
+ * [w] PC offset
+ */
+ uint64_t pcOffset;
+ /**
+ * [r] Path for the source file.
+ */
+ char *fileName;
+ /**
+ * [r] Path for the directory of source file.
+ */
+ char *dirName;
+} CUpti_GetSassToSourceCorrelationParams;
+
+#define CUpti_GetSassToSourceCorrelationParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetSassToSourceCorrelationParams, dirName)
+
+/**
+ * \brief SASS to Source correlation.
+ *
+ * \param pParams A pointer to \ref CUpti_GetSassToSourceCorrelationParams
+ *
+ * It is expected from user to free allocated memory for fileName and dirName after use.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if either of the parameters cubin or functionName
+ * is NULL or cubinSize is zero or size field is not set correctly.
+ * \retval CUPTI_ERROR_INVALID_MODULE provided cubin is invalid.
+ * \retval CUPTI_ERROR_UNKNOWN an internal error occurred.
+ * This error code is also used for cases when the function is not present in the module.
+ * A better error code will be returned in the future release.
+ */
+CUptiResult CUPTIAPI cuptiGetSassToSourceCorrelation(CUpti_GetSassToSourceCorrelationParams *pParams);
+
+/**
+ * \brief Params for cuptiGetCubinCrc
+ */
+typedef struct {
+ /**
+ * [w] Size of configuration structure.
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * [w] Size of cubin binary.
+ */
+ size_t cubinSize;
+ /**
+ * [w] Pointer to cubin binary
+ */
+ const void* cubin;
+ /**
+ * [r] Computed CRC will be stored in it.
+ */
+ uint64_t cubinCrc;
+} CUpti_GetCubinCrcParams;
+#define CUpti_GetCubinCrcParamsSize CUPTI_PCSAMPLING_STRUCT_SIZE(CUpti_GetCubinCrcParams, cubinCrc)
+
+/**
+ * \brief Get the CRC of cubin.
+ *
+ * This function returns the CRC of provided cubin binary.
+ *
+ * \param pParams A pointer to \ref CUpti_GetCubinCrcParams
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if parameter cubin is NULL or
+ * provided cubinSize is zero or size field is not set.
+ */
+CUptiResult CUPTIAPI cuptiGetCubinCrc(CUpti_GetCubinCrcParams *pParams);
+
+/**
+ * \brief Function type for callback used by CUPTI to request crc of
+ * loaded module.
+ *
+ * This callback function ask for crc of provided module in function.
+ * The provided crc will be stored in PC sampling records i.e. in the field 'cubinCrc' of the PC sampling
+ * struct CUpti_PCSamplingPCData. The CRC is uses during the offline source correlation to uniquely identify the module.
+ *
+ * \param cubin The pointer to cubin binary
+ * \param cubinSize The size of cubin binary.
+ * \param cubinCrc Returns the computed crc of cubin.
+ */
+typedef void (CUPTIAPI *CUpti_ComputeCrcCallbackFunc)(
+ const void* cubin,
+ size_t cubinSize,
+ uint64_t *cubinCrc);
+
+/**
+ * \brief Register callback function with CUPTI to use
+ * your own algorithm to compute cubin crc.
+ *
+ * This function registers a callback function and it gets called
+ * from CUPTI when a CUDA module is loaded.
+ *
+ * \param funcComputeCubinCrc callback is invoked when a CUDA module
+ * is loaded.
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p funcComputeCubinCrc is NULL.
+ */
+CUptiResult CUPTIAPI cuptiRegisterComputeCrcCallback(CUpti_ComputeCrcCallbackFunc funcComputeCubinCrc);
+
+/** @} */ /* END CUPTI_PCSAMPLING_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_PCSAMPLING_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling_util.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..595d6028fbf2ff9a3bbffaafe90ec80f7d512533
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pcsampling_util.h
@@ -0,0 +1,402 @@
+#if !defined(_CUPTI_PCSAMPLING_UTIL_H_)
+#define _CUPTI_PCSAMPLING_UTIL_H_
+
+#include
+#include
+
+#include
+
+#ifndef CUPTI_UTIL_STRUCT_SIZE
+#define CUPTI_UTIL_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+#ifndef CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS
+#define CHECK_PC_SAMPLING_STRUCT_FIELD_EXISTS(type, member, structSize) \
+ (offsetof(type, member) < structSize)
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__)
+ #pragma GCC visibility push(default)
+#endif
+
+namespace CUPTI { namespace PcSamplingUtil {
+
+/**
+ * \defgroup CUPTI_PCSAMPLING_UTILITY CUPTI PC Sampling Utility API
+ * Functions, types, and enums that implement the CUPTI PC Sampling Utility API.
+ * @{
+ */
+
+/**
+ * \brief Header info will be stored in file.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Version of file format.
+ */
+ uint32_t version;
+ /**
+ * Total number of buffers present in the file.
+ */
+ uint32_t totalBuffers;
+} Header;
+
+/**
+ * \brief BufferInfo will be stored in the file for every buffer
+ * i.e for every call of UtilDumpPcSamplingBufferInFile() API.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Total number of PC records.
+ */
+ uint64_t recordCount;
+ /**
+ * Count of all stall reasons supported on the GPU
+ */
+ size_t numStallReasons;
+ /**
+ * Total number of stall reasons in single record.
+ */
+ uint64_t numSelectedStallReasons;
+ /**
+ * Buffer size in Bytes.
+ */
+ uint64_t bufferByteSize;
+} BufferInfo;
+
+/**
+ * \brief All available stall reasons name and respective indexes
+ * will be stored in it.
+ */
+typedef struct PACKED_ALIGNMENT {
+ /**
+ * Number of all available stall reasons
+ */
+ size_t numStallReasons;
+ /**
+ * Stall reasons names of all available stall reasons
+ */
+ char **stallReasons;
+ /**
+ * Stall reason index of all available stall reasons
+ */
+ uint32_t *stallReasonIndex;
+} PcSamplingStallReasons;
+
+/**
+ * \brief CUPTI PC sampling buffer types.
+ *
+ */
+typedef enum {
+ /**
+ * Invalid buffer type.
+ */
+ PC_SAMPLING_BUFFER_INVALID = 0,
+ /**
+ * Refers to CUpti_PCSamplingData buffer.
+ */
+ PC_SAMPLING_BUFFER_PC_TO_COUNTER_DATA = 1
+} PcSamplingBufferType;
+
+/**
+ * \brief CUPTI PC sampling utility API result codes.
+ *
+ * Error and result codes returned by CUPTI PC sampling utility API.
+ */
+typedef enum {
+ /**
+ * No error
+ */
+ CUPTI_UTIL_SUCCESS = 0,
+ /**
+ * One or more of the parameters are invalid.
+ */
+ CUPTI_UTIL_ERROR_INVALID_PARAMETER = 1,
+ /**
+ * Unable to create a new file
+ */
+ CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE = 2,
+ /**
+ * Unable to open a file
+ */
+ CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE = 3,
+ /**
+ * Read or write operation failed
+ */
+ CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED = 4,
+ /**
+ * Provided file handle is corrupted.
+ */
+ CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED = 5,
+ /**
+ * seek operation failed.
+ */
+ CUPTI_UTIL_ERROR_SEEK_OPERATION_FAILED = 6,
+ /**
+ * Unable to allocate enough memory to perform the requested
+ * operation.
+ */
+ CUPTI_UTIL_ERROR_OUT_OF_MEMORY = 7,
+ /**
+ * An unknown internal error has occurred.
+ */
+ CUPTI_UTIL_ERROR_UNKNOWN = 999,
+ CUPTI_UTIL_ERROR_FORCE_INT = 0x7fffffff
+} CUptiUtilResult;
+
+/**
+ * \brief Params for \ref CuptiUtilPutPcSampData
+ */
+typedef struct {
+ /**
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * Type of buffer to store in file
+ */
+ PcSamplingBufferType bufferType;
+ /**
+ * PC sampling buffer.
+ */
+ void *pSamplingData;
+ /**
+ * Number of configured attributes
+ */
+ size_t numAttributes;
+ /**
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
+ * It is expected to provide configuration details of at least
+ * CUPTI_PC_SAMPLING_CONFIGURATION_ATTR_TYPE_STALL_REASON attribute.
+ */
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
+ /**
+ * Refer \ref PcSamplingStallReasons.
+ */
+ PcSamplingStallReasons *pPcSamplingStallReasons;
+ /**
+ * File name to store buffer into it.
+ */
+ const char* fileName;
+} CUptiUtil_PutPcSampDataParams;
+#define CUptiUtil_PutPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_PutPcSampDataParams, fileName)
+
+/**
+ * \brief Dump PC sampling data into the file.
+ *
+ * This API can be called multiple times.
+ * It will append buffer in the file.
+ * For every buffer it will store BufferInfo
+ * so that before retrieving data it will help to allocate buffer
+ * to store retrieved data.
+ * This API creates file if file does not present.
+ * If stallReasonIndex or stallReasons pointer of \ref CUptiUtil_PutPcSampDataParams is NULL
+ * then stall reasons data will not be stored in file.
+ * It is expected to store all available stall reason data at least once to refer it during
+ * offline correlation.
+ *
+ * \retval CUPTI_UTIL_SUCCESS
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
+ * or if either of pSamplingData, pParams pointer is NULL or stall reason configuration details not provided
+ * or filename is empty.
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_CREATE_FILE
+ * \retval CUPTI_UTIL_ERROR_UNABLE_TO_OPEN_FILE
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
+ */
+CUptiUtilResult CUPTIUTILAPI CuptiUtilPutPcSampData(CUptiUtil_PutPcSampDataParams *pParams);
+
+/**
+ * \brief Params for \ref CuptiUtilGetHeaderData
+ */
+typedef struct {
+ /**
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * File handle.
+ */
+ std::ifstream *fileHandler;
+ /**
+ * Header Info.
+ */
+ Header headerInfo;
+
+} CUptiUtil_GetHeaderDataParams;
+#define CUptiUtil_GetHeaderDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetHeaderDataParams, headerInfo)
+
+/**
+ * \brief Get header data of file.
+ *
+ * This API must be called once initially while retrieving data from file.
+ * \ref Header structure, it gives info about total number
+ * of buffers present in the file.
+ *
+ * \retval CUPTI_UTIL_SUCCESS
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
+ */
+CUptiUtilResult CUPTIUTILAPI CuptiUtilGetHeaderData(CUptiUtil_GetHeaderDataParams *pParams);
+
+/**
+ * \brief Params for \ref CuptiUtilGetBufferInfo
+ */
+typedef struct {
+ /**
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * File handle.
+ */
+ std::ifstream *fileHandler;
+ /**
+ * Buffer Info.
+ */
+ BufferInfo bufferInfoData;
+} CUptiUtil_GetBufferInfoParams;
+#define CUptiUtil_GetBufferInfoParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetBufferInfoParams, bufferInfoData)
+
+/**
+ * \brief Get buffer info data of file.
+ *
+ * This API must be called every time before calling CuptiUtilGetPcSampData API.
+ * \ref BufferInfo structure, it gives info about recordCount and stallReasonCount
+ * of every record in the buffer. This will help to allocate exact buffer to retrieve data into it.
+ *
+ * \retval CUPTI_UTIL_SUCCESS
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if either of pParam or fileHandle is NULL or param struct size is incorrect.
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED failed to read data from file.
+ */
+CUptiUtilResult CUPTIUTILAPI CuptiUtilGetBufferInfo(CUptiUtil_GetBufferInfoParams *pParams);
+
+/**
+ * \brief Params for \ref CuptiUtilGetPcSampData
+ */
+typedef struct {
+ /**
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * File handle.
+ */
+ std::ifstream *fileHandler;
+ /**
+ * Type of buffer to store in file
+ */
+ PcSamplingBufferType bufferType;
+ /**
+ * Pointer to collected buffer info using \ref CuptiUtilGetBufferInfo
+ */
+ BufferInfo *pBufferInfoData;
+ /**
+ * Pointer to allocated memory to store retrieved data from file.
+ */
+ void *pSamplingData;
+ /**
+ * Number of configuration attributes
+ */
+ size_t numAttributes;
+ /**
+ * Refer \ref CUpti_PCSamplingConfigurationInfo
+ */
+ CUpti_PCSamplingConfigurationInfo *pPCSamplingConfigurationInfo;
+ /**
+ * Refer \ref PcSamplingStallReasons.
+ * For stallReasons field of \ref PcSamplingStallReasons it is expected to
+ * allocate memory for each string element of array.
+ */
+ PcSamplingStallReasons *pPcSamplingStallReasons;
+} CUptiUtil_GetPcSampDataParams;
+#define CUptiUtil_GetPcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_GetPcSampDataParams, pPcSamplingStallReasons)
+
+/**
+ * \brief Retrieve PC sampling data from file into allocated buffer.
+ *
+ * This API must be called after CuptiUtilGetBufferInfo API.
+ * It will retrieve data from file into allocated buffer.
+ *
+ * \retval CUPTI_UTIL_SUCCESS
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if buffer type is invalid
+ * or if either of pSampData, pParams is NULL. If pPcSamplingStallReasons is not NULL then
+ * error out if either of stallReasonIndex, stallReasons or stallReasons array element pointer is NULL.
+ * or filename is empty.
+ * \retval CUPTI_UTIL_ERROR_READ_WRITE_OPERATION_FAILED
+ * \retval CUPTI_UTIL_ERROR_FILE_HANDLE_CORRUPTED file handle is not in good state to read data from file.
+ */
+CUptiUtilResult CUPTIUTILAPI CuptiUtilGetPcSampData(CUptiUtil_GetPcSampDataParams *pParams);
+
+/**
+ * \brief Params for \ref CuptiUtilMergePcSampData
+ */
+typedef struct
+{
+ /**
+ * Size of the data structure i.e. CUpti_PCSamplingDisableParamsSize
+ * CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ * available in the structure. Used to preserve backward compatibility.
+ */
+ size_t size;
+ /**
+ * Number of buffers to merge.
+ */
+ size_t numberOfBuffers;
+ /**
+ * Pointer to array of buffers to merge
+ */
+ CUpti_PCSamplingData *PcSampDataBuffer;
+ /**
+ * Pointer to array of merged buffers as per the range id.
+ */
+ CUpti_PCSamplingData **MergedPcSampDataBuffers;
+ /**
+ * Number of merged buffers.
+ */
+ size_t *numMergedBuffer;
+} CUptiUtil_MergePcSampDataParams;
+#define CUptiUtil_MergePcSampDataParamsSize CUPTI_UTIL_STRUCT_SIZE(CUptiUtil_MergePcSampDataParams, numMergedBuffer)
+
+/**
+ * \brief Merge PC sampling data range id wise.
+ *
+ * This API merge PC sampling data range id wise.
+ * It allocates memory for merged data and fill data in it
+ * and provide buffer pointer in MergedPcSampDataBuffers field.
+ * It is expected from user to free merge data buffers after use.
+ *
+ * \retval CUPTI_UTIL_SUCCESS
+ * \retval CUPTI_UTIL_ERROR_INVALID_PARAMETER error out if param struct size is invalid
+ * or count of buffers to merge is invalid i.e less than 1
+ * or either of PcSampDataBuffer, MergedPcSampDataBuffers, numMergedBuffer is NULL
+ * \retval CUPTI_UTIL_ERROR_OUT_OF_MEMORY Unable to allocate memory for merged buffer.
+ */
+CUptiUtilResult CUPTIUTILAPI CuptiUtilMergePcSampData(CUptiUtil_MergePcSampDataParams *pParams);
+
+/** @} */ /* END CUPTI_PCSAMPLING_UTILITY */
+
+} }
+
+#if defined(__GNUC__)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pmsampling.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pmsampling.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba4171b6710564b56bc7e8e64e46c3674fe6c58c
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_pmsampling.h
@@ -0,0 +1,490 @@
+/*
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_PMSAMPLING_H_)
+#define _CUPTI_PMSAMPLING_H_
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+#ifndef CUPTI_PROFILER_STRUCT_SIZE
+#define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+/* CUPTI PM sampling APIs */
+/**
+ * \defgroup CUPTI_PM_SAMPLING_API CUPTI PM Sampling API
+ * Functions to enable, disable, start, stop, and decode PM sampling.
+ * @{
+ */
+typedef struct CUpti_PmSampling_Object CUpti_PmSampling_Object;
+
+typedef enum CUpti_PmSampling_TriggerMode
+{
+ /// The trigger is based off of the SYSCLK frequency, note SYS frequency by default is variable.
+ /// the sample interval (set in the struct CUpti_PmSampling_SetConfig_Params) is in terms of clocks.
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_SYSCLK_INTERVAL = 0,
+ /// The trigger is based off of a fixed frequency source.
+ /// The sample interval (set in the struct CUpti_PmSampling_SetConfig_Params) is in terms of nanoseconds.
+ /// Note: This trigger mode is not supported on Turing GPU architecture and GA100 GPU.
+ /// It is supported on Ampere GA10x and later GPU architectures.
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL = 1,
+ CUPTI_PM_SAMPLING_TRIGGER_MODE_COUNT
+} CUpti_PmSampling_TriggerMode;
+
+typedef enum CUpti_PmSampling_DecodeStopReason
+{
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_OTHER = 0,
+ /// Counter data image is full.
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_COUNTER_DATA_FULL,
+ /// All the records in the hardware buffer is decoded.
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_END_OF_RECORDS,
+ CUPTI_PM_SAMPLING_DECODE_STOP_REASON_COUNT
+} CUpti_PmSampling_DecodeStopReason;
+
+typedef enum CUpti_PmSampling_HardwareBuffer_AppendMode
+{
+ /// Keep the oldest records in the hardware buffer.
+ /// CUPTI will report error for overflow in case hardware buffer is getting filled up.
+ CUPTI_PM_SAMPLING_HARDWARE_BUFFER_APPEND_MODE_KEEP_OLDEST = 0,
+ /// Keep the latest records in the hardware buffer.
+ /// Note: This mode is not supported on Turing GPU architecture.
+ /// It is supported on Ampere and later GPU architectures.
+ CUPTI_PM_SAMPLING_HARDWARE_BUFFER_APPEND_MODE_KEEP_LATEST = 1
+} CUpti_PmSampling_HardwareBuffer_AppendMode;
+
+/**
+ * \brief Params for cuptiPmSamplingSetConfig
+ */
+typedef struct CUpti_PmSampling_SetConfig_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+ /// [in] Size of the config image.
+ size_t configSize;
+ /// [in] Config image.
+ const uint8_t* pConfig;
+ /// [in] The hardware buffer size in which raw PM sampling data
+ /// will be stored. These samples will be decoded to counter data
+ /// image with \ref cuptiPmSamplingDecodeData call.
+ size_t hardwareBufferSize;
+ /// [in] For the trigger mode `CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_SYSCLK_INTERVAL`, sampling interval
+ /// is the number of sys clock cycles. For the trigger mode `CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL`,
+ /// sampling interval is in nanoseconds.
+ uint64_t samplingInterval;
+ /// [in] Trigger mode.
+ /// Note: CUPTI_PM_SAMPLING_TRIGGER_MODE_GPU_TIME_INTERVAL is not supported in Turing and GA100.
+ /// Supported from GA10x onwards.
+ CUpti_PmSampling_TriggerMode triggerMode;
+ /// [in] Append mode for the records in hardware buffer.
+ /// For KEEP_OLDEST mode, all the records will be kept in the buffer and in case hardware buffer is getting filled up.
+ /// overflow will be set to 1 in \ref CUpti_PmSampling_DecodeData_Params. For KEEP_LATEST mode, the new records will
+ /// overwrite the oldest records in the buffer in case of filled buffer.
+ CUpti_PmSampling_HardwareBuffer_AppendMode hwBufferAppendMode;
+} CUpti_PmSampling_SetConfig_Params;
+
+#define CUpti_PmSampling_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_SetConfig_Params, hwBufferAppendMode)
+
+/**
+ * \brief Set the configuration for PM sampling like sampling interval, maximum number of samples
+ * filled in HW buffer, trigger mode and the config image which has scheduling info for metric collection.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_SetConfig_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED for config image which require multiple passes for data collection
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingSetConfig(CUpti_PmSampling_SetConfig_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingEnable
+ */
+typedef struct CUpti_PmSampling_Enable_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Device index.
+ size_t deviceIndex;
+ /// [out] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+} CUpti_PmSampling_Enable_Params;
+
+#define CUpti_PmSampling_Enable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Enable_Params, pPmSamplingObject)
+
+/**
+ * \brief Create a PM sampling object and enable PM sampling on the CUDA device.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_Enable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if memory allocation fails while creating the PM sampling object
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling is already enabled on the device
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingEnable(CUpti_PmSampling_Enable_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingDisable
+ */
+typedef struct CUpti_PmSampling_Disable_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+} CUpti_PmSampling_Disable_Params;
+
+#define CUpti_PmSampling_Disable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Disable_Params, pPmSamplingObject)
+
+/**
+ * \brief Disable PM sampling on the CUDA device and destroy the PM sampling object.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_Disable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingDisable(CUpti_PmSampling_Disable_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingStart
+ */
+typedef struct CUpti_PmSampling_Start_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+} CUpti_PmSampling_Start_Params;
+
+#define CUpti_PmSampling_Start_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Start_Params, pPmSamplingObject)
+
+/**
+ * \brief Start the PM sampling. The GPU will start collecting the metrics data
+ * periodically based on trigger type and sampling interval passed in CUpti_PmSampling_SetConfig_Params.
+ * The collected data will be stored in the hardware buffer.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_Start_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling Start is called without enabling PM sampling,
+ * and PM sampling is already started
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingStart(CUpti_PmSampling_Start_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingStop
+ */
+typedef struct CUpti_PmSampling_Stop_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+} CUpti_PmSampling_Stop_Params;
+
+#define CUpti_PmSampling_Stop_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_Stop_Params, pPmSamplingObject)
+
+/**
+ * \brief Stop the PM sampling. The GPU will stop collecting the metrics data.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_Stop_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling Stop is called without enabling PM sampling,
+ * and PM sampling is already stopped
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingStop(CUpti_PmSampling_Stop_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingDecodeData
+ */
+typedef struct CUpti_PmSampling_DecodeData_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+ /// [in] Counter data image.
+ uint8_t* pCounterDataImage;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [out] decode stop reason
+ CUpti_PmSampling_DecodeStopReason decodeStopReason;
+ /// [out] overflow status for hardware buffer.
+ /// To avoid overflow, either increase the maxSamples values in
+ /// \ref CUpti_PmSampling_SetConfig_Params or reduce the sampling interval.
+ uint8_t overflow;
+} CUpti_PmSampling_DecodeData_Params;
+
+#define CUpti_PmSampling_DecodeData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_DecodeData_Params, overflow)
+
+/**
+ * \brief Decode the metrics data stored in the hardware buffer to the counter data image.
+ *
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_DecodeData_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling DecodeData is called without enabling PM sampling
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if there is record overflow in the hardware buffer
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingDecodeData(CUpti_PmSampling_DecodeData_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingGetCounterData
+ */
+typedef struct CUpti_PmSampling_GetCounterAvailability_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Device index.
+ size_t deviceIndex;
+ /// [inout] Size of the counter availability image. When pCounterAvailabilityImage is NULL,
+ /// this field is used to return the size of the counter availability image.
+ size_t counterAvailabilityImageSize;
+ /// [out] Counter availability image.
+ uint8_t* pCounterAvailabilityImage;
+} CUpti_PmSampling_GetCounterAvailability_Params;
+#define CUpti_PmSampling_GetCounterAvailability_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterAvailability_Params, pCounterAvailabilityImage)
+
+/**
+ * \brief Query counter availibility information in a buffer which can be used to filter unavailable raw metrics on host.
+ * Note: This API may fail, if any profiling or sampling session is active on the specified device.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterAvailability_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingGetCounterAvailability(CUpti_PmSampling_GetCounterAvailability_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingGetCounterDataSize
+ */
+typedef struct CUpti_PmSampling_GetCounterDataSize_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+ /// [in] Names of the metrics to be collected.
+ const char** pMetricNames;
+ /// [in] Number of metrics to be collected.
+ size_t numMetrics;
+ /// [in] Maximum number of samples to be stored in the counter data image.
+ uint32_t maxSamples;
+ /// [out] Size of the counter data image.
+ size_t counterDataSize;
+} CUpti_PmSampling_GetCounterDataSize_Params;
+#define CUpti_PmSampling_GetCounterDataSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterDataSize_Params, counterDataSize)
+
+/**
+ * \brief Query the size of the counter data image which will be used to store the metrics data.
+ * User need to allocate the memory for the counter data image based on the size returned by this API.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterDataSize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling GetCounterDataSize is called without enabling PM sampling
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingGetCounterDataSize(CUpti_PmSampling_GetCounterDataSize_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingCounterDataImageInitialize
+ */
+typedef struct CUpti_PmSampling_CounterDataImage_Initialize_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+ /// [in] Size of the counter data image.
+ size_t counterDataSize;
+ /// [in] Counter data image.
+ uint8_t* pCounterData;
+} CUpti_PmSampling_CounterDataImage_Initialize_Params;
+#define CUpti_PmSampling_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_CounterDataImage_Initialize_Params, pCounterData)
+
+/**
+ * \brief Initialize the counter data to CUPTI record format for storing the metric data.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_CounterDataImage_Initialize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if PM sampling CounterDataInitialize is called without enabling PM sampling
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingCounterDataImageInitialize(CUpti_PmSampling_CounterDataImage_Initialize_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingGetCounterDataInfo
+ */
+typedef struct CUpti_PmSampling_GetCounterDataInfo_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Counter data image.
+ const uint8_t* pCounterDataImage;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [out] Number of samples in the counter data image.
+ size_t numTotalSamples;
+ /// [out] Number of populated samples.
+ size_t numPopulatedSamples;
+ /// [out] Number of samples that have been completed.
+ size_t numCompletedSamples;
+} CUpti_PmSampling_GetCounterDataInfo_Params;
+#define CUpti_PmSampling_GetCounterDataInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_GetCounterDataInfo_Params, numCompletedSamples)
+
+/**
+ * \brief Get the counter data info like number of samples, number of populated
+ * samples and number of completed samples in a counter data image.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_GetCounterDataInfo_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingGetCounterDataInfo(CUpti_PmSampling_GetCounterDataInfo_Params* pParams);
+
+/**
+ * \brief Params for cuptiPmSamplingCounterDataGetSampleInfo
+ */
+typedef struct CUpti_PmSampling_CounterData_GetSampleInfo_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] PM sampling object.
+ CUpti_PmSampling_Object* pPmSamplingObject;
+ /// [in] Counter data image.
+ const uint8_t* pCounterDataImage;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [in] Index of the sample.
+ size_t sampleIndex;
+ /// [out] Start time of the sample.
+ uint64_t startTimestamp;
+ /// [out] End time of the sample.
+ uint64_t endTimestamp;
+} CUpti_PmSampling_CounterData_GetSampleInfo_Params;
+#define CUpti_PmSampling_CounterData_GetSampleInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_PmSampling_CounterData_GetSampleInfo_Params, endTimestamp)
+
+/**
+ * \brief Get the sample info (start and end time stamp) for the given sample index.
+ * Each sample is distinguished by the start and end time stamp.
+ *
+ * \param pParams A pointer to \ref CUpti_PmSampling_CounterData_GetSampleInfo_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiPmSamplingCounterDataGetSampleInfo(CUpti_PmSampling_CounterData_GetSampleInfo_Params* pParams);
+
+/** @} */ /* END CUPTI_PMSAMPLING_API */
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif // _CUPTI_PMSAMPLING_H_
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_host.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e38ceb160791ae51fd681623d45dba1c688dda1
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_host.h
@@ -0,0 +1,541 @@
+/*
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_PROFILER_HOST_H_)
+#define _CUPTI_PROFILER_HOST_H_
+
+/*
+CUPTI profiler host API's
+This file contains the CUPTI profiling host API's.
+*/
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_PROFILER_HOST_API CUPTI Profiler Host API
+ * Functions, types, and enums that implement the CUPTI Profiler Host API.
+ * @{
+ */
+#ifndef CUPTI_PROFILER_STRUCT_SIZE
+#define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+typedef enum CUpti_MetricType
+{
+ CUPTI_METRIC_TYPE_COUNTER = 0,
+ CUPTI_METRIC_TYPE_RATIO,
+ CUPTI_METRIC_TYPE_THROUGHPUT,
+ CUPTI_METRIC_TYPE__COUNT
+} CUpti_MetricType;
+
+typedef enum CUpti_ProfilerType
+{
+ CUPTI_PROFILER_TYPE_RANGE_PROFILER,
+ CUPTI_PROFILER_TYPE_PM_SAMPLING,
+ CUPTI_PROFILER_TYPE_PROFILER_INVALID
+} CUpti_ProfilerType;
+
+typedef struct CUpti_Profiler_Host_Object CUpti_Profiler_Host_Object;
+
+/**
+ * \brief Params for cuptiProfilerHostInitialize
+ */
+typedef struct CUpti_Profiler_Host_Initialize_Params
+{
+ /// [in] Size of the data structure.
+ /// CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ /// available in the structure. Used to preserve backward compatibility.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] the profiler kind one from CUpti_ProfilerType
+ CUpti_ProfilerType profilerType;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ const uint8_t* pCounterAvailabilityImage;
+ /// [out] binary blob allocated by CUPTI and operations associated with this object.
+ CUpti_Profiler_Host_Object* pHostObject;
+} CUpti_Profiler_Host_Initialize_Params;
+
+#define CUpti_Profiler_Host_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_Initialize_Params, pHostObject)
+
+/**
+ * \brief Create and initialize the profiler host object (CUpti_Profiler_Host_Object).
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_Initialize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostInitialize(CUpti_Profiler_Host_Initialize_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostDeinitialize
+ */
+typedef struct CUpti_Profiler_Host_Deinitialize_Params
+{
+ /// [in] Size of the data structure.
+ /// CUPTI client should set the size of the structure. It will be used in CUPTI to check what fields are
+ /// available in the structure. Used to preserve backward compatibility.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ struct CUpti_Profiler_Host_Object* pHostObject;
+} CUpti_Profiler_Host_Deinitialize_Params;
+
+#define CUpti_Profiler_Host_Deinitialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_Deinitialize_Params, pHostObject)
+
+/**
+ * \brief Deinitialize and destroy the profiler host object (CUpti_Profiler_Host_Object).
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_Deinitialize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostDeinitialize(CUpti_Profiler_Host_Deinitialize_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetSupportedChips
+ */
+typedef struct CUpti_Profiler_Host_GetSupportedChips_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [out] number of supported chips
+ size_t numChips;
+ /// [out] list of supported chips
+ const char* const* ppChipNames;
+} CUpti_Profiler_Host_GetSupportedChips_Params;
+
+#define CUpti_Profiler_Host_GetSupportedChips_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetSupportedChips_Params, ppChipNames)
+
+/**
+ * \brief Get the list of supported chips.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetSupportedChips_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetSupportedChips(CUpti_Profiler_Host_GetSupportedChips_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetSupportedMetrics
+ */
+typedef struct CUpti_Profiler_Host_GetBaseMetrics_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ struct CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] metric type (counter, ratio, throughput)
+ CUpti_MetricType metricType;
+ /// [out] list of base metrics supported of queried metric type for the chip
+ const char** ppMetricNames;
+ /// [out] number of metrics
+ size_t numMetrics;
+} CUpti_Profiler_Host_GetBaseMetrics_Params;
+
+#define CUpti_Profiler_Host_GetBaseMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetBaseMetrics_Params, numMetrics)
+
+/**
+ * \brief Get the list of supported base metrics for the chip.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetBaseMetrics_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetBaseMetrics(CUpti_Profiler_Host_GetBaseMetrics_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetSubMetrics
+ */
+typedef struct CUpti_Profiler_Host_GetSubMetrics_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] the metric type for queried metric
+ CUpti_MetricType metricType;
+ /// [in] metric name for which sub-metric will be listed
+ const char* pMetricName;
+ /// [out] number of submetrics supported
+ size_t numOfSubmetrics;
+ /// [out] list of submetrics supported for the metric.
+ const char** ppSubMetrics;
+} CUpti_Profiler_Host_GetSubMetrics_Params;
+
+#define CUpti_Profiler_Host_GetSubMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetSubMetrics_Params, ppSubMetrics)
+
+/**
+ * \brief Get the list of supported sub-metrics for the metric.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetSubMetrics_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetSubMetrics(CUpti_Profiler_Host_GetSubMetrics_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetMetricProperties
+ */
+typedef struct CUpti_Profiler_Host_GetMetricProperties_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] metric name for which its properties will be listed
+ const char* pMetricName;
+ /// [out] a short description about the metric
+ const char* pDescription;
+ /// [out] associated hw unit for the metric
+ const char* pHwUnit;
+ /// [out] the dimension of the metric values
+ const char* pDimUnit;
+ /// [out] the metric type (counter, ratio or throughput)
+ CUpti_MetricType metricType;
+} CUpti_Profiler_Host_GetMetricProperties_Params;
+
+#define CUpti_Profiler_Host_GetMetricProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetMetricProperties_Params, metricType)
+
+/**
+ * \brief Get the properties of the metric.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetMetricProperties_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetMetricProperties(CUpti_Profiler_Host_GetMetricProperties_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetRangeName
+ */
+typedef struct CUpti_Profiler_Host_GetRangeName_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] the counter data image where profiling data has been decoded
+ const uint8_t* pCounterDataImage;
+ /// [in] size of counter data image
+ size_t counterDataImageSize;
+ /// [in] range index for which the range name will be queried
+ size_t rangeIndex;
+ /// [in] used in case of nested ranges, default="/". Range1Range2
+ const char* delimiter;
+ /// [out] the range name.
+ /// Note: that the CUPTI allocate the memory internal and
+ /// its user responsibility to free up the allocated memory
+ const char* pRangeName;
+} CUpti_Profiler_Host_GetRangeName_Params;
+
+#define CUpti_Profiler_Host_GetRangeName_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetRangeName_Params, pRangeName)
+
+/**
+ * \brief Get the range name for the range index stored in the counter data.
+ * In Range profiler, for Auto range mode the range name will be numeric value
+ * assigned to the kernel based on execution order. For user range mode, the
+ * name of range will be based on the range name provided by the user using
+ * Push range API.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetRangeName_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetRangeName(CUpti_Profiler_Host_GetRangeName_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostEvaluateToGpuValues
+ */
+typedef struct CUpti_Profiler_Host_EvaluateToGpuValues_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] the counter data image where profiling data has been decoded
+ const uint8_t* pCounterDataImage;
+ /// [in] size of counter data image
+ size_t counterDataImageSize;
+ /// [in] range index for which the range name will be queried
+ size_t rangeIndex;
+ /// [in] the metrics for which GPU values will be evaluated for the range
+ const char** ppMetricNames;
+ /// [in] number of metrics
+ size_t numMetrics;
+ /// [out] output value for given metric and range index
+ double* pMetricValues;
+} CUpti_Profiler_Host_EvaluateToGpuValues_Params;
+
+#define CUpti_Profiler_Host_EvaluateToGpuValues_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_EvaluateToGpuValues_Params, pMetricValues)
+
+/**
+ * \brief Evaluate the metric values for the range index stored in the counter data.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_EvaluateToGpuValues_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostEvaluateToGpuValues(CUpti_Profiler_Host_EvaluateToGpuValues_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostConfigAddMetrics
+ */
+typedef struct CUpti_Profiler_Host_ConfigAddMetrics_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ struct CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] metric names for which config image will be generated
+ const char** ppMetricNames;
+ /// [in] number of metrics
+ size_t numMetrics;
+} CUpti_Profiler_Host_ConfigAddMetrics_Params;
+
+#define CUpti_Profiler_Host_ConfigAddMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_ConfigAddMetrics_Params, numMetrics)
+
+/**
+ * \brief Add the metrics to the profiler host object for generating the config image.
+ * The config image will have the required information to schedule the metrics for
+ * collecting the profiling data.
+ * Note: PM sampling only supports single pass config image.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_ConfigAddMetrics_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_METRIC_NAME if the metric name is not valid or not supported for the chip
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostConfigAddMetrics(CUpti_Profiler_Host_ConfigAddMetrics_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetConfigImageSize
+ */
+typedef struct CUpti_Profiler_Host_GetConfigImageSize_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ CUpti_Profiler_Host_Object* pHostObject;
+ /// [out] the size of config image, users need to allocate the buffer for storing
+ size_t configImageSize;
+} CUpti_Profiler_Host_GetConfigImageSize_Params;
+
+#define CUpti_Profiler_Host_GetConfigImageSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetConfigImageSize_Params, configImageSize)
+
+/**
+ * \brief Get the size of the config image for the metrics added to the profiler host object.
+ * Users need to allocate the buffer for storing the config image.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetConfigImageSize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetConfigImageSize(CUpti_Profiler_Host_GetConfigImageSize_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetConfigImage
+ */
+typedef struct CUpti_Profiler_Host_GetConfigImage_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] reference to the profiler host object allocated by CUPTI in cuptiProfilerHostInitialize
+ CUpti_Profiler_Host_Object* pHostObject;
+ /// [in] Number of bytes allocated for pBuffer
+ size_t configImageSize;
+ /// [out] Buffer receiving the config image
+ uint8_t* pConfigImage;
+} CUpti_Profiler_Host_GetConfigImage_Params;
+
+#define CUpti_Profiler_Host_GetConfigImage_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetConfigImage_Params, pConfigImage)
+
+/**
+ * \brief Get the config image for the metrics added to the profiler host object.
+ * User will pass the allocated buffer to store the config image.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetConfigImage_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetConfigImage(CUpti_Profiler_Host_GetConfigImage_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetNumOfPasses
+ */
+typedef struct CUpti_Profiler_Host_GetNumOfPasses_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] Number of bytes allocated for pConfigImage
+ size_t configImageSize;
+ /// [in] the config image buffer
+ uint8_t* pConfigImage;
+ /// [out] number of passes required for profiling scheduled metrics in the config image
+ size_t numOfPasses;
+} CUpti_Profiler_Host_GetNumOfPasses_Params;
+
+#define CUpti_Profiler_Host_GetNumOfPasses_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetNumOfPasses_Params, numOfPasses)
+
+/**
+ * \brief Get the number of passes required for profiling the scheduled metrics in the config image.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetNumOfPasses_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetNumOfPasses(CUpti_Profiler_Host_GetNumOfPasses_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerHostGetMaxNumHardwareMetricsPerPass
+ */
+typedef struct CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Assign to NULL
+ void* pPriv;
+ /// [in] the profiler kind one from CUpti_ProfilerType
+ CUpti_ProfilerType profilerType;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ uint8_t* pCounterAvailabilityImage;
+ /// [out] maximum number of metrics that can be scheduled in a pass
+ size_t maxMetricsPerPass;
+} CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params;
+
+#define CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params, maxMetricsPerPass)
+
+/**
+ * \brief Get the maximum number of hardware metrics (metric names which doesn't include _sass_ keyword)
+ * that can be scheduled in a single pass for a chip. While this represents a theoretical upper limit,
+ * practical constraints may prevent reaching this threshold for a specific set of metrics. Furthermore,
+ * the maximum achievable value is contingent upon the characteristics and architecture of the chip in question.
+ *
+ * Use cuptiProfilerHostGetNumOfPasses API for getting the actual number of passes required for the
+ * for collecting the profiling data for the scheduled metrics in a config image.
+ *
+ * \param pParams A pointer to \ref CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiProfilerHostGetMaxNumHardwareMetricsPerPass(CUpti_Profiler_Host_GetMaxNumHardwareMetricsPerPass_Params* pParams);
+
+/** @} */ /* END CUPTI_METRIC_API */
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
\ No newline at end of file
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_target.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..a8fc197073dcb3bdec1a7349d136ac03434dc932
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_profiler_target.h
@@ -0,0 +1,602 @@
+/*
+ * Copyright 2011-2023 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_PROFILER_TARGET_H_)
+#define _CUPTI_PROFILER_TARGET_H_
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_PROFILER_API CUPTI Profiling API
+ * Functions, types, and enums that implement the CUPTI Profiling API.
+ * @{
+ */
+#ifndef CUPTI_PROFILER_STRUCT_SIZE
+#define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+/**
+ * \brief Profiler range attribute
+ *
+ * A metric enabled in the session's configuration is collected separately per unique range-stack in the pass.
+ * This is an attribute to collect metrics around each kernel in a profiling session or in an user defined range.
+ */
+typedef enum
+{
+ /**
+ * Invalid value
+ */
+ CUPTI_Range_INVALID,
+ /**
+ * Ranges are auto defined around each kernel in a profiling session
+ */
+ CUPTI_AutoRange,
+ /**
+ * A range in which metric data to be collected is defined by the user
+ */
+ CUPTI_UserRange,
+ /**
+ * Range count
+ */
+ CUPTI_Range_COUNT,
+} CUpti_ProfilerRange;
+
+/**
+ * \brief Profiler replay attribute
+ *
+ * For metrics which require multipass collection, a replay of the GPU kernel(s) is required.
+ * This is an attribute which specify how the replay of the kernel(s) to be measured is done.
+ */
+typedef enum
+{
+ /**
+ * Invalid Value
+ */
+ CUPTI_Replay_INVALID,
+ /**
+ * Replay is done by CUPTI user around the process
+ */
+ CUPTI_ApplicationReplay,
+ /**
+ * Replay is done around kernel implicitly by CUPTI
+ */
+ CUPTI_KernelReplay,
+ /**
+ * Replay is done by CUPTI user within a process
+ */
+ CUPTI_UserReplay,
+ /**
+ * Replay count
+ */
+ CUPTI_Replay_COUNT,
+} CUpti_ProfilerReplayMode;
+
+/**
+ * \brief Default parameter for cuptiProfilerInitialize
+ */
+typedef struct CUpti_Profiler_Initialize_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_Initialize_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+} CUpti_Profiler_Initialize_Params;
+#define CUpti_Profiler_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_Initialize_Params, pPriv)
+
+/**
+ * \brief Default parameter for cuptiProfilerDeInitialize
+ */
+typedef struct CUpti_Profiler_DeInitialize_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+} CUpti_Profiler_DeInitialize_Params;
+#define CUpti_Profiler_DeInitialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeInitialize_Params, pPriv)
+
+/**
+ * \brief Initializes the profiler interface
+ *
+ * Loads the required libraries in the process address space.
+ * Sets up the hooks with the CUDA driver.
+ */
+CUptiResult CUPTIAPI cuptiProfilerInitialize(CUpti_Profiler_Initialize_Params *pParams);
+
+/**
+ * \brief DeInitializes the profiler interface
+ */
+CUptiResult CUPTIAPI cuptiProfilerDeInitialize(CUpti_Profiler_DeInitialize_Params *pParams);
+
+/**
+ * \brief Input parameter to define the counterDataImage
+ */
+typedef struct CUpti_Profiler_CounterDataImageOptions
+{
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImageOptions_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ const uint8_t* pCounterDataPrefix; /**< [in] Address of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
+ Must be align(8).*/
+ size_t counterDataPrefixSize; //!< [in] Size of CounterDataPrefix generated from NVPW_CounterDataBuilder_GetCounterDataPrefix().
+ uint32_t maxNumRanges; //!< [in] Maximum number of ranges that can be profiled
+ uint32_t maxNumRangeTreeNodes; //!< [in] Maximum number of RangeTree nodes; must be >= maxNumRanges
+ uint32_t maxRangeNameLength; //!< [in] Maximum string length of each RangeName, including the trailing NULL character
+} CUpti_Profiler_CounterDataImageOptions;
+#define CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImageOptions, maxRangeNameLength)
+
+/**
+ * \brief Params for cuptiProfilerCounterDataImageCalculateSize
+ */
+typedef struct CUpti_Profiler_CounterDataImage_CalculateSize_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
+ size_t counterDataImageSize; //!< [out]
+} CUpti_Profiler_CounterDataImage_CalculateSize_Params;
+#define CUpti_Profiler_CounterDataImage_CalculateSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_CalculateSize_Params, counterDataImageSize)
+
+/**
+ * \brief Params for cuptiProfilerCounterDataImageInitialize
+ */
+typedef struct CUpti_Profiler_CounterDataImage_Initialize_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ size_t sizeofCounterDataImageOptions; //!< [in] CUpti_Profiler_CounterDataImageOptions_STRUCT_SIZE
+ const CUpti_Profiler_CounterDataImageOptions* pOptions; //!< [in] Pointer to Counter Data Image Options
+ size_t counterDataImageSize; //!< [in] Size calculated from cuptiProfilerCounterDataImageCalculateSize
+ uint8_t* pCounterDataImage; //!< [in] The buffer to be initialized.
+} CUpti_Profiler_CounterDataImage_Initialize_Params;
+#define CUpti_Profiler_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_Initialize_Params, pCounterDataImage)
+
+/**
+ * \brief A CounterData image allocates space for values for each counter for each range.
+ *
+ * User borne the resposibility of managing the counterDataImage allocations.
+ * CounterDataPrefix contains meta data about the metrics that will be stored in counterDataImage.
+ * Use these APIs to calculate the allocation size and initialize counterData image.
+ */
+CUptiResult CUPTIAPI cuptiProfilerCounterDataImageCalculateSize(CUpti_Profiler_CounterDataImage_CalculateSize_Params* pParams);
+CUptiResult CUPTIAPI cuptiProfilerCounterDataImageInitialize(CUpti_Profiler_CounterDataImage_Initialize_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerCounterDataImageCalculateScratchBufferSize
+ */
+typedef struct CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
+ uint8_t* pCounterDataImage; //!< [in]
+ size_t counterDataScratchBufferSize; //!< [out]
+} CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params;
+#define CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params, counterDataScratchBufferSize)
+
+/**
+ * \brief Params for cuptiProfilerCounterDataImageInitializeScratchBuffer
+ */
+typedef struct CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
+ uint8_t* pCounterDataImage; //!< [in]
+ size_t counterDataScratchBufferSize; //!< [in] size calculated using cuptiProfilerCounterDataImageCalculateScratchBufferSize
+ uint8_t* pCounterDataScratchBuffer; //!< [in] the scratch buffer to be initialized.
+} CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params;
+#define CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params, pCounterDataScratchBuffer)
+
+/**
+ * \brief A temporary storage for CounterData image needed for internal operations
+ *
+ * Use these APIs to calculate the allocation size and initialize counterData image scratch buffer.
+ */
+CUptiResult CUPTIAPI cuptiProfilerCounterDataImageCalculateScratchBufferSize(CUpti_Profiler_CounterDataImage_CalculateScratchBufferSize_Params* pParams);
+CUptiResult CUPTIAPI cuptiProfilerCounterDataImageInitializeScratchBuffer(CUpti_Profiler_CounterDataImage_InitializeScratchBuffer_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerBeginSession
+ */
+typedef struct CUpti_Profiler_BeginSession_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_BeginSession_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ size_t counterDataImageSize; //!< [in] size calculated from cuptiProfilerCounterDataImageCalculateSize
+ uint8_t* pCounterDataImage; //!< [in] address of CounterDataImage
+ size_t counterDataScratchBufferSize; //!< [in] size calculated from cuptiProfilerCounterDataImageInitializeScratchBuffer
+ uint8_t* pCounterDataScratchBuffer; //!< [in] address of CounterDataImage scratch buffer
+ uint8_t bDumpCounterDataInFile; //!< [in] [optional]
+ const char* pCounterDataFilePath; //!< [in] [optional]
+ CUpti_ProfilerRange range; //!< [in] CUpti_ProfilerRange
+ CUpti_ProfilerReplayMode replayMode; //!< [in] CUpti_ProfilerReplayMode
+ /* Replay options, required when replay is done by cupti user */
+ size_t maxRangesPerPass; //!< [in] Maximum number of ranges that can be recorded in a single pass.
+ size_t maxLaunchesPerPass; //!< [in] Maximum number of kernel launches that can be recorded in a single pass; must be >= maxRangesPerPass.
+
+} CUpti_Profiler_BeginSession_Params;
+#define CUpti_Profiler_BeginSession_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_BeginSession_Params, maxLaunchesPerPass)
+/**
+ * \brief Params for cuptiProfilerEndSession
+ */
+typedef struct CUpti_Profiler_EndSession_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_EndSession_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_EndSession_Params;
+#define CUpti_Profiler_EndSession_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EndSession_Params, ctx)
+
+/**
+ * \brief Begin profiling session sets up the profiling on the device
+ *
+ * Although, it doesn't start the profiling but GPU resources needed for profiling are allocated.
+ * Outside of a session, the GPU will return to its normal operating state.
+ */
+CUptiResult CUPTIAPI cuptiProfilerBeginSession(CUpti_Profiler_BeginSession_Params* pParams);
+/**
+ * \brief Ends profiling session
+ *
+ * Frees up the GPU resources acquired for profiling.
+ * Outside of a session, the GPU will return to it's normal operating state.
+ */
+CUptiResult CUPTIAPI cuptiProfilerEndSession(CUpti_Profiler_EndSession_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerSetConfig
+ */
+typedef struct CUpti_Profiler_SetConfig_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_SetConfig_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ const uint8_t* pConfig; //!< [in] Config created by NVPW_RawMetricsConfig_GetConfigImage(). Must be align(8).
+ size_t configSize; //!< [in] size of config
+ uint16_t minNestingLevel; //!< [in] the lowest nesting level to be profiled; must be >= 1
+ uint16_t numNestingLevels; //!< [in] the number of nesting levels to profile; must be >= 1
+ size_t passIndex; //!< [in] Set this to zero for in-app replay; set this to the output of EndPass() for application replay
+ uint16_t targetNestingLevel; //!< [in] Set this to minNestingLevel for in-app replay; set this to the output of EndPass() for application
+} CUpti_Profiler_SetConfig_Params;
+
+#define CUpti_Profiler_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_SetConfig_Params, targetNestingLevel)
+
+/**
+ * \brief Params for cuptiProfilerUnsetConfig
+ */
+typedef struct CUpti_Profiler_UnsetConfig_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_UnsetConfig_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_UnsetConfig_Params;
+#define CUpti_Profiler_UnsetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_UnsetConfig_Params, ctx)
+
+/**
+ * \brief Set metrics configuration to be profiled
+ *
+ * Use these APIs to set the config to profile in a session. It can be used for advanced cases such as where multiple
+ * configurations are collected into a single CounterData Image on the need basis, without restarting the session.
+ */
+CUptiResult CUPTIAPI cuptiProfilerSetConfig(CUpti_Profiler_SetConfig_Params* pParams);
+/**
+ * \brief Unset metrics configuration profiled
+ *
+ */
+CUptiResult CUPTIAPI cuptiProfilerUnsetConfig(CUpti_Profiler_UnsetConfig_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerBeginPass
+ */
+typedef struct CUpti_Profiler_BeginPass_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_BeginPass_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_BeginPass_Params;
+#define CUpti_Profiler_BeginPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_BeginPass_Params, ctx)
+
+/**
+ * \brief Params for cuptiProfilerEndPass
+ */
+typedef struct CUpti_Profiler_EndPass_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_EndPass_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ uint16_t targetNestingLevel; //! [out] The targetNestingLevel that will be collected by the *next* BeginPass.
+ size_t passIndex; //!< [out] The passIndex that will be collected by the *next* BeginPass
+ uint8_t allPassesSubmitted; //!< [out] becomes true when the last pass has been queued to the GPU
+} CUpti_Profiler_EndPass_Params;
+#define CUpti_Profiler_EndPass_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EndPass_Params, allPassesSubmitted)
+
+/**
+ * \brief Replay API: used for multipass collection.
+
+ * These APIs are used if user chooses to replay by itself \ref CUPTI_UserReplay or \ref CUPTI_ApplicationReplay
+ * for multipass collection of the metrics configurations.
+ * It's a no-op in case of \ref CUPTI_KernelReplay.
+ */
+CUptiResult CUPTIAPI cuptiProfilerBeginPass(CUpti_Profiler_BeginPass_Params* pParams);
+
+/**
+ * \brief Replay API: used for multipass collection.
+
+ * These APIs are used if user chooses to replay by itself \ref CUPTI_UserReplay or \ref CUPTI_ApplicationReplay
+ * for multipass collection of the metrics configurations.
+ * Its a no-op in case of \ref CUPTI_KernelReplay.
+ * Returns information for next pass.
+ */
+CUptiResult CUPTIAPI cuptiProfilerEndPass(CUpti_Profiler_EndPass_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerEnableProfiling
+ */
+typedef struct CUpti_Profiler_EnableProfiling_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_EnableProfiling_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_EnableProfiling_Params;
+#define CUpti_Profiler_EnableProfiling_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_EnableProfiling_Params, ctx)
+
+/**
+ * \brief Params for cuptiProfilerDisableProfiling
+ */
+typedef struct CUpti_Profiler_DisableProfiling_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_DisableProfiling_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_DisableProfiling_Params;
+#define CUpti_Profiler_DisableProfiling_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DisableProfiling_Params, ctx)
+
+/**
+ * \brief Enables Profiling
+ *
+ * In \ref CUPTI_AutoRange, these APIs are used to enable/disable profiling for the kernels to be executed in
+ * a profiling session.
+ */
+CUptiResult CUPTIAPI cuptiProfilerEnableProfiling(CUpti_Profiler_EnableProfiling_Params* pParams);
+
+/**
+ * \brief Disable Profiling
+ *
+ * In \ref CUPTI_AutoRange, these APIs are used to enable/disable profiling for the kernels to be executed in
+ * a profiling session.
+ */
+CUptiResult CUPTIAPI cuptiProfilerDisableProfiling(CUpti_Profiler_DisableProfiling_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerIsPassCollected
+ */
+typedef struct CUpti_Profiler_IsPassCollected_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_IsPassCollected_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ size_t numRangesDropped; //!< [out] number of ranges whose data was dropped in the processed pass
+ size_t numTraceBytesDropped; //!< [out] number of bytes not written to TraceBuffer due to buffer full
+ uint8_t onePassCollected; //!< [out] true if a pass was successfully decoded
+ uint8_t allPassesCollected; //!< [out] becomes true when the last pass has been decoded
+} CUpti_Profiler_IsPassCollected_Params;
+#define CUpti_Profiler_IsPassCollected_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_IsPassCollected_Params, allPassesCollected)
+
+/**
+ * \brief Asynchronous call to query if the submitted pass to GPU is collected
+ *
+ */
+CUptiResult CUPTIAPI cuptiProfilerIsPassCollected(CUpti_Profiler_IsPassCollected_Params* pParams);
+
+/**
+ * \brief Params for cuptiProfilerFlushCounterData
+ */
+typedef struct CUpti_Profiler_FlushCounterData_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ size_t numRangesDropped; //!< [out] number of ranges whose data was dropped in the processed passes
+ size_t numTraceBytesDropped; //!< [out] number of bytes not written to TraceBuffer due to buffer full
+} CUpti_Profiler_FlushCounterData_Params;
+#define CUpti_Profiler_FlushCounterData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_FlushCounterData_Params, numTraceBytesDropped)
+
+/**
+ * \brief Decode all the submitted passes
+ *
+ * Flush Counter data API to ensure every pass is decoded into the counterDataImage passed at beginSession.
+ * This will cause the CPU/GPU sync to collect all the undecoded pass.
+ */
+CUptiResult CUPTIAPI cuptiProfilerFlushCounterData(CUpti_Profiler_FlushCounterData_Params* pParams);
+
+typedef struct CUpti_Profiler_PushRange_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_PushRange_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ const char* pRangeName; //!< [in] specifies the range for subsequent launches; must not be NULL
+ size_t rangeNameLength; //!< [in] assign to strlen(pRangeName) if known; if set to zero, the library will call strlen()
+} CUpti_Profiler_PushRange_Params;
+#define CUpti_Profiler_PushRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_PushRange_Params, rangeNameLength)
+
+typedef struct CUpti_Profiler_PopRange_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_PopRange_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+} CUpti_Profiler_PopRange_Params;
+#define CUpti_Profiler_PopRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_PopRange_Params, ctx)
+
+
+/**
+ * \brief Range API's : Push user range
+ *
+ * Counter data is collected per unique range-stack. Identified by a string label passsed by the user.
+ * It's an invalid operation in case of \ref CUPTI_AutoRange.
+ */
+CUptiResult CUPTIAPI cuptiProfilerPushRange(CUpti_Profiler_PushRange_Params *pParams);
+
+/**
+ * \brief Range API's : Pop user range
+ *
+ * Counter data is collected per unique range-stack. Identified by a string label passsed by the user.
+ * It's an invalid operation in case of \ref CUPTI_AutoRange.
+ */
+CUptiResult CUPTIAPI cuptiProfilerPopRange(CUpti_Profiler_PopRange_Params *pParams);
+
+/**
+ * \brief Params for cuptiProfilerGetCounterAvailability
+ */
+typedef struct CUpti_Profiler_GetCounterAvailability_Params
+{
+ size_t structSize; //!< [in] CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE
+ void* pPriv; //!< [in] assign to NULL
+ CUcontext ctx; //!< [in] if NULL, the current CUcontext is used
+ size_t counterAvailabilityImageSize; //!< [in/out] If `pCounterAvailabilityImage` is NULL, then the required size is returned in
+ //!< `counterAvailabilityImageSize`, otherwise `counterAvailabilityImageSize` should be set to the size of
+ //!< `pCounterAvailabilityImage`, and on return it would be overwritten with number of actual bytes copied
+ uint8_t* pCounterAvailabilityImage; //!< [in] buffer receiving counter availability image, may be NULL
+} CUpti_Profiler_GetCounterAvailability_Params;
+#define CUpti_Profiler_GetCounterAvailability_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_GetCounterAvailability_Params, pCounterAvailabilityImage)
+
+/**
+ * \brief Query counter availibility
+ *
+ * Use this API to query counter availability information in a buffer which can be used to filter unavailable raw metrics on host.
+ * Note: This API may fail, if any profiling or sampling session is active on the specified context or its device.
+ */
+CUptiResult CUPTIAPI cuptiProfilerGetCounterAvailability(CUpti_Profiler_GetCounterAvailability_Params *pParams);
+
+/// Generic support level enum for CUPTI
+typedef enum
+{
+ CUPTI_PROFILER_CONFIGURATION_UNKNOWN = 0, //!< Configuration support level unknown - either detection code errored out before setting this value, or unable to determine it
+ CUPTI_PROFILER_CONFIGURATION_UNSUPPORTED, //!< Profiling is unavailable. For specific feature fields, this means that the current configuration of this feature does not work with profiling. For instance, SLI-enabled devices do not support profiling, and this value would be returned for SLI on an SLI-enabled device.
+ CUPTI_PROFILER_CONFIGURATION_DISABLED, //!< Profiling would be available for this configuration, but was disabled by the system
+ CUPTI_PROFILER_CONFIGURATION_SUPPORTED //!< Profiling is supported. For specific feature fields, this means that the current configuration of this feature works with profiling. For instance, SLI-enabled devices do not support profiling, and this value would only be returned for devices which are not SLI-enabled.
+} CUpti_Profiler_Support_Level;
+
+/**
+ * \brief Profiler API types
+ */
+typedef enum
+{
+ CUPTI_PROFILER_RANGE_PROFILING = 0, //!< CUPTI APIs for range based profiling (cuptiProfiler*)
+ CUPTI_PROFILER_PC_SAMPLING, //!< CUPTI APIs collecting pc sampling data (cuptiPcSampling*)
+ CUPTI_PROFILER_SASS_METRICS, //!< CUPTI APIs collecting SASS metrics data (cuptiSassMetrics*)
+ CUPTI_PROFILER_PM_SAMPLING, //!< CUPTI APIs collecting PM Sampling data (cuptiPmSampling*)
+ CUPTI_PROFILER_UNKNOWN
+} CUpti_Profiler_API;
+
+/**
+ * \brief Params for cuptiProfilerDeviceSupported
+ */
+typedef struct
+{
+ size_t structSize; //!< [in] Must be CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE
+ void *pPriv; //!< [in] assign to NULL
+ CUdevice cuDevice; //!< [in] if NULL, the current CUcontext is used
+
+ CUpti_Profiler_Support_Level isSupported; //!< [out] overall SUPPORTED / UNSUPPORTED flag representing whether Profiling and PC Sampling APIs work on the given device and configuration. SUPPORTED if all following flags are SUPPORTED, UNSUPPORTED otherwise.
+
+ CUpti_Profiler_Support_Level architecture; //!< [out] SUPPORTED if the device architecture level supports the Profiling API (Compute Capability >= 7.0), UNSUPPORTED otherwise
+ CUpti_Profiler_Support_Level sli; //!< [out] SUPPORTED if SLI is not enabled, UNSUPPORTED otherwise
+ CUpti_Profiler_Support_Level vGpu; //!< [out] SUPPORTED if vGPU is supported and profiling is enabled, DISABLED if profiling is supported but not enabled, UNSUPPORTED otherwise
+ CUpti_Profiler_Support_Level confidentialCompute; //!< [out] SUPPORTED if confidential compute is not enabled, UNSUPPORTED otherwise
+ CUpti_Profiler_Support_Level cmp; //!< [out] SUPPORTED if not NVIDIA Crypto Mining Processors (CMP), UNSUPPORTED otherwise
+ CUpti_Profiler_Support_Level wsl; //!< [out] SUPPORTED if WSL supported, UNSUPPORTED otherwise
+ CUpti_Profiler_API api; //!< [in] the CUPTI API type for which device support will be checked
+} CUpti_Profiler_DeviceSupported_Params;
+#define CUpti_Profiler_DeviceSupported_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Profiler_DeviceSupported_Params, api)
+
+/**
+ * \brief Query device compatibility with Profiling API
+ *
+ * Use this call to determine whether a compute device and configuration are compatible with the Profiling API.
+ * If the configuration does not support profiling, one of several flags will indicate why.
+ */
+CUptiResult CUPTIAPI cuptiProfilerDeviceSupported(CUpti_Profiler_DeviceSupported_Params *pParams);
+
+/** @} */ /* END CUPTI_METRIC_API */
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*_CUPTI_PROFILER_TARGET_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_range_profiler.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_range_profiler.h
new file mode 100644
index 0000000000000000000000000000000000000000..ebcb25c0921bf473df943d63f476b877fdec2d66
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_range_profiler.h
@@ -0,0 +1,465 @@
+/*
+ * Copyright 2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_RANGE_PROFILER_H_)
+#define _CUPTI_RANGE_PROFILER_H_
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_RANGE_PROFILER_API CUPTI Range Profiling API
+ * Functions, types, and enums that implement the CUPTI Range Profiling API.
+ * @{
+ */
+#ifndef CUPTI_PROFILER_STRUCT_SIZE
+#define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+
+typedef struct CUpti_RangeProfiler_Object CUpti_RangeProfiler_Object;
+
+/**
+ * \brief Params for cuptiRangeProfilerSetConfig
+ */
+typedef struct CUpti_RangeProfiler_SetConfig_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [in] Size of the config image.
+ size_t configSize;
+ /// [in] Config image.
+ const uint8_t* pConfig;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [in] Counter data image.
+ uint8_t* pCounterDataImage;
+ /// [in] Profiling Range mode.
+ CUpti_ProfilerRange range;
+ /// [in] Replay mode.
+ CUpti_ProfilerReplayMode replayMode;
+ /// [in] Maximum number of ranges that can be profiled in a pass.
+ size_t maxRangesPerPass;
+ /// [in] number of nesting level to be profiled. For Auto range mode, this should be set to 1.
+ uint16_t numNestingLevels;
+ /// [in] minimum nesting level to be profiled.
+ uint16_t minNestingLevel;
+ /// [in] Pass index for the replay session.
+ size_t passIndex;
+ /// [in] Target nesting level for the replay session.
+ uint16_t targetNestingLevel;
+} CUpti_RangeProfiler_SetConfig_Params;
+
+#define CUpti_RangeProfiler_SetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_SetConfig_Params, targetNestingLevel)
+
+/**
+ * \brief Set the configuration for range profiler like maximum number of ranges per pass, number of nesting levels,
+ * range and replay mode and the config image which has scheduling info for metric collection.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_SetConfig_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ */
+CUptiResult CUPTIAPI cuptiRangeProfilerSetConfig(CUpti_RangeProfiler_SetConfig_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerEnable
+ */
+typedef struct CUpti_RangeProfiler_Enable_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Context to be used for profiling.
+ CUcontext ctx;
+ /// [out] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+} CUpti_RangeProfiler_Enable_Params;
+#define CUpti_RangeProfiler_Enable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Enable_Params, pRangeProfilerObject)
+
+/**
+ * \brief Create a range profiler object and enable range profiling on the CUDA context.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Enable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_OUT_OF_MEMORY if memory allocation fails while creating the PM sampling object
+ * \retval CUPTI_ERROR_INSUFFICIENT_PRIVILEGES if the user does not have sufficient privileges to perform the operation
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiRangeProfilerEnable(CUpti_RangeProfiler_Enable_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerDisable
+ */
+typedef struct CUpti_RangeProfiler_Disable_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+} CUpti_RangeProfiler_Disable_Params;
+#define CUpti_RangeProfiler_Disable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Disable_Params, pRangeProfilerObject)
+
+/**
+ * \brief Disable the range profiler on the CUDA context and destroy the range profiler object.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Disable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ */
+CUptiResult CUPTIAPI cuptiRangeProfilerDisable(CUpti_RangeProfiler_Disable_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerStart
+ */
+typedef struct CUpti_RangeProfiler_Start_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+} CUpti_RangeProfiler_Start_Params;
+#define CUpti_RangeProfiler_Start_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Start_Params, pRangeProfilerObject)
+
+/**
+ * \brief Start the range profiler.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Start_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler Start is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiRangeProfilerStart(CUpti_RangeProfiler_Start_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerStop
+ */
+typedef struct CUpti_RangeProfiler_Stop_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [out] pass index for the replay session.
+ size_t passIndex;
+ /// [out] target nesting level for the replay session.
+ size_t targetNestingLevel;
+ /// [out] 1 if all passes are submitted to GPU for collection, 0 otherwise.
+ uint8_t isAllPassSubmitted;
+} CUpti_RangeProfiler_Stop_Params;
+#define CUpti_RangeProfiler_Stop_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_Stop_Params, isAllPassSubmitted)
+
+/**
+ * \brief Stop the range profiler.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_Stop_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler Stop is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+ */
+CUptiResult CUPTIAPI cuptiRangeProfilerStop(CUpti_RangeProfiler_Stop_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerPushRange
+ */
+typedef struct CUpti_RangeProfiler_PushRange_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [in] Name of the range to be profiled (only valid for User range mode).
+ const char* pRangeName;
+} CUpti_RangeProfiler_PushRange_Params;
+#define CUpti_RangeProfiler_PushRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_PushRange_Params, pRangeName)
+
+/**
+ * \brief Add a new range to the Range Profiler with a given range name.
+ * For nested ranges, this API should be called again for the innermost range. For profiling the nested
+ * range, users need to set the values for minNestingLevel and numNestingLevels in the SetConfig API.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_PushRange_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler PushRange is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerPushRange(CUpti_RangeProfiler_PushRange_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerPopRange
+ */
+typedef struct CUpti_RangeProfiler_PopRange_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+} CUpti_RangeProfiler_PopRange_Params;
+#define CUpti_RangeProfiler_PopRange_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_PopRange_Params, pRangeProfilerObject)
+
+/**
+ * \brief pop the current range to the Range Profiler.
+ * The number of pop range API call should be same as number of push ranges in the same order.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_PopRange_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler PopRange is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerPopRange(CUpti_RangeProfiler_PopRange_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerDecodeData
+ */
+typedef struct CUpti_RangeProfiler_DecodeData_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Range Profiler Object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [out] Number of ranges dropped in the processed passes.
+ size_t numOfRangeDropped;
+} CUpti_RangeProfiler_DecodeData_Params;
+#define CUpti_RangeProfiler_DecodeData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_DecodeData_Params, numOfRangeDropped)
+
+/**
+ * \brief Decode the profiling data stored in the hardware to the counter data image passed in the
+ * SetConfig API. This API should be called after cuptiRangeProfilerStop. The counter data image
+ * will be updated with the profiling data for the ranges profiled.
+ *
+ * For the cases where the number of ranges counter data image can store is less than the number of ranges
+ * profiled (= maxRangesPerPass in SetConfig API), the counter data image will report dropped ranges.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_DecodeData_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler DecodeData is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerDecodeData(CUpti_RangeProfiler_DecodeData_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerGetCounterDataSize
+ */
+typedef struct CUpti_RangeProfiler_GetCounterDataSize_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Periodic sampler object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [in] Names of the metrics to be collected.
+ const char** pMetricNames;
+ /// [in] Number of metrics to be collected.
+ size_t numMetrics;
+ /// [in] Maximum number of ranges to be stored in the counter data image.
+ size_t maxNumOfRanges;
+ /// [in] Maximum number of RangeTree nodes; must be >= maxNumOfRanges
+ uint32_t maxNumRangeTreeNodes;
+ /// [out] Size of the counter data image.
+ size_t counterDataSize;
+} CUpti_RangeProfiler_GetCounterDataSize_Params;
+#define CUpti_RangeProfiler_GetCounterDataSize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_GetCounterDataSize_Params, counterDataSize)
+
+/**
+ * \brief Get the size of the counter data image required to store the profiling data for the ranges profiled.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_GetCounterDataSize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler GetCounterDataSize is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerGetCounterDataSize(CUpti_RangeProfiler_GetCounterDataSize_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerCounterDataImageInitialize
+ */
+typedef struct CUpti_RangeProfiler_CounterDataImage_Initialize_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Periodic sampler object.
+ CUpti_RangeProfiler_Object* pRangeProfilerObject;
+ /// [in] Size of the counter data image.
+ size_t counterDataSize;
+ /// [in] Counter data image.
+ uint8_t* pCounterData;
+} CUpti_RangeProfiler_CounterDataImage_Initialize_Params;
+#define CUpti_RangeProfiler_CounterDataImage_Initialize_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_CounterDataImage_Initialize_Params, pCounterData)
+
+/**
+ * \brief Initialize the counter data image with the profiling data for the ranges profiled.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_CounterDataImage_Initialize_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_OPERATION if range profiler CounterDataImageInitialize is called without enabling range profiler
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerCounterDataImageInitialize(CUpti_RangeProfiler_CounterDataImage_Initialize_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerGetCounterDataInfo
+ */
+typedef struct CUpti_RangeProfiler_GetCounterDataInfo_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Counter data image.
+ const uint8_t* pCounterDataImage;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [out] Number of ranges in the counter data image.
+ size_t numTotalRanges;
+} CUpti_RangeProfiler_GetCounterDataInfo_Params;
+#define CUpti_RangeProfiler_GetCounterDataInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_GetCounterDataInfo_Params, numTotalRanges)
+
+/**
+ * \brief Get the number of ranges stored in the counter data image.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_GetCounterDataInfo_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerGetCounterDataInfo(CUpti_RangeProfiler_GetCounterDataInfo_Params* pParams);
+
+/**
+ * \brief Params for cuptiRangeProfilerCounterDataGetRangeInfo
+ */
+typedef struct CUpti_RangeProfiler_CounterData_GetRangeInfo_Params
+{
+ /// [in] Size of the data structure.
+ size_t structSize;
+ /// [in] Set to NULL.
+ void* pPriv;
+ /// [in] Counter data image.
+ const uint8_t* pCounterDataImage;
+ /// [in] Size of the counter data image.
+ size_t counterDataImageSize;
+ /// [in] Index of the sample.
+ size_t rangeIndex;
+ /// [in] range delimiter.
+ const char* rangeDelimiter;
+ /// [out] RangeName;
+ const char* rangeName;
+} CUpti_RangeProfiler_CounterData_GetRangeInfo_Params;
+#define CUpti_RangeProfiler_CounterData_GetRangeInfo_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_RangeProfiler_CounterData_GetRangeInfo_Params, rangeName)
+
+/**
+ * \brief Get the range name for the given range index.
+ *
+ * \param pParams A pointer to \ref CUpti_RangeProfiler_CounterData_GetRangeInfo_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_UNKNOWN for any internal error
+*/
+CUptiResult CUPTIAPI cuptiRangeProfilerCounterDataGetRangeInfo(CUpti_RangeProfiler_CounterData_GetRangeInfo_Params* pParams);
+
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /*_CUPTI_RANGE_PROFILER_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_result.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_result.h
new file mode 100644
index 0000000000000000000000000000000000000000..10371ac621b2472086a4d68af4dc9bdc91f8e417
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_result.h
@@ -0,0 +1,360 @@
+/*
+ * Copyright 2010-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_RESULT_H_)
+#define _CUPTI_RESULT_H_
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_RESULT_API CUPTI Result Codes
+ * Error and result codes returned by CUPTI functions.
+ * @{
+ */
+
+/**
+ * \brief CUPTI result codes.
+ *
+ * Error and result codes returned by CUPTI functions.
+ */
+typedef enum {
+ /**
+ * No error.
+ */
+ CUPTI_SUCCESS = 0,
+ /**
+ * One or more of the parameters is invalid.
+ */
+ CUPTI_ERROR_INVALID_PARAMETER = 1,
+ /**
+ * The device does not correspond to a valid CUDA device.
+ */
+ CUPTI_ERROR_INVALID_DEVICE = 2,
+ /**
+ * The context is NULL or not valid.
+ */
+ CUPTI_ERROR_INVALID_CONTEXT = 3,
+ /**
+ * The event domain id is invalid.
+ */
+ CUPTI_ERROR_INVALID_EVENT_DOMAIN_ID = 4,
+ /**
+ * The event id is invalid.
+ */
+ CUPTI_ERROR_INVALID_EVENT_ID = 5,
+ /**
+ * The event name is invalid.
+ */
+ CUPTI_ERROR_INVALID_EVENT_NAME = 6,
+ /**
+ * The current operation cannot be performed due to dependency on
+ * other factors.
+ */
+ CUPTI_ERROR_INVALID_OPERATION = 7,
+ /**
+ * Unable to allocate enough memory to perform the requested
+ * operation.
+ */
+ CUPTI_ERROR_OUT_OF_MEMORY = 8,
+ /**
+ * An error occurred on the performance monitoring hardware.
+ */
+ CUPTI_ERROR_HARDWARE = 9,
+ /**
+ * The output buffer size is not sufficient to return all
+ * requested data.
+ */
+ CUPTI_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT = 10,
+ /**
+ * API is not implemented.
+ */
+ CUPTI_ERROR_API_NOT_IMPLEMENTED = 11,
+ /**
+ * The maximum limit is reached.
+ */
+ CUPTI_ERROR_MAX_LIMIT_REACHED = 12,
+ /**
+ * The object is not yet ready to perform the requested operation.
+ */
+ CUPTI_ERROR_NOT_READY = 13,
+ /**
+ * The current operation is not compatible with the current state
+ * of the object
+ */
+ CUPTI_ERROR_NOT_COMPATIBLE = 14,
+ /**
+ * CUPTI is unable to initialize its connection to the CUDA
+ * driver.
+ */
+ CUPTI_ERROR_NOT_INITIALIZED = 15,
+ /**
+ * The metric id is invalid.
+ */
+ CUPTI_ERROR_INVALID_METRIC_ID = 16,
+ /**
+ * The metric name is invalid.
+ */
+ CUPTI_ERROR_INVALID_METRIC_NAME = 17,
+ /**
+ * The queue is empty.
+ */
+ CUPTI_ERROR_QUEUE_EMPTY = 18,
+ /**
+ * Invalid handle (internal?).
+ */
+ CUPTI_ERROR_INVALID_HANDLE = 19,
+ /**
+ * Invalid stream.
+ */
+ CUPTI_ERROR_INVALID_STREAM = 20,
+ /**
+ * Invalid kind.
+ */
+ CUPTI_ERROR_INVALID_KIND = 21,
+ /**
+ * Invalid event value.
+ */
+ CUPTI_ERROR_INVALID_EVENT_VALUE = 22,
+ /**
+ * CUPTI is disabled due to conflicts with other enabled profilers
+ */
+ CUPTI_ERROR_DISABLED = 23,
+ /**
+ * Invalid module.
+ */
+ CUPTI_ERROR_INVALID_MODULE = 24,
+ /**
+ * Invalid metric value.
+ */
+ CUPTI_ERROR_INVALID_METRIC_VALUE = 25,
+ /**
+ * The performance monitoring hardware is in use by other client.
+ */
+ CUPTI_ERROR_HARDWARE_BUSY = 26,
+ /**
+ * The attempted operation is not supported on the current
+ * system or device.
+ */
+ CUPTI_ERROR_NOT_SUPPORTED = 27,
+ /**
+ * Unified memory profiling is not supported on the system.
+ * Potential reason could be unsupported OS or architecture.
+ */
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED = 28,
+ /**
+ * Unified memory profiling is not supported on the device
+ */
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_DEVICE = 29,
+ /**
+ * Unified memory profiling is not supported on a multi-GPU
+ * configuration without P2P support between any pair of devices
+ */
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_NON_P2P_DEVICES = 30,
+ /**
+ * Unified memory profiling is not supported under the
+ * Multi-Process Service (MPS) environment. CUDA 7.5 removes this
+ * restriction.
+ */
+ CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_WITH_MPS = 31,
+ /**
+ * In CUDA 9.0, devices with compute capability 7.0 don't
+ * support CDP tracing
+ */
+ CUPTI_ERROR_CDP_TRACING_NOT_SUPPORTED = 32,
+ /**
+ * Profiling on virtualized GPU is not supported.
+ */
+ CUPTI_ERROR_VIRTUALIZED_DEVICE_NOT_SUPPORTED = 33,
+ /**
+ * Profiling results might be incorrect for CUDA applications
+ * compiled with nvcc version older than 9.0 for devices with
+ * compute capability 6.0 and 6.1.
+ * Profiling session will continue and CUPTI will notify it using this error code.
+ * User is advised to recompile the application code with nvcc version 9.0 or later.
+ * Ignore this warning if code is already compiled with the recommended nvcc version.
+ */
+ CUPTI_ERROR_CUDA_COMPILER_NOT_COMPATIBLE = 34,
+ /**
+ * User doesn't have sufficient privileges which are required to
+ * start the profiling session.
+ * One possible reason for this may be that the NVIDIA driver or your system
+ * administrator may have restricted access to the NVIDIA GPU performance counters.
+ * To learn how to resolve this issue and find more information, please visit
+ * https://developer.nvidia.com/CUPTI_ERROR_INSUFFICIENT_PRIVILEGES
+ */
+ CUPTI_ERROR_INSUFFICIENT_PRIVILEGES = 35,
+ /**
+ * Legacy CUPTI Profiling API i.e. event API from the header cupti_events.h and
+ * metric API from the header cupti_metrics.h are not compatible with the
+ * Profiling API in the header cupti_profiler_target.h and Perfworks metrics API
+ * in the headers nvperf_host.h and nvperf_target.h.
+ */
+ CUPTI_ERROR_OLD_PROFILER_API_INITIALIZED = 36,
+ /**
+ * Missing definition of the OpenACC API routine in the linked OpenACC library.
+ *
+ * One possible reason is that OpenACC library is linked statically in the
+ * user application, which might not have the definition of all the OpenACC
+ * API routines needed for the OpenACC profiling, as compiler might ignore
+ * definitions for the functions not used in the application. This issue
+ * can be mitigated by linking the OpenACC library dynamically.
+ */
+ CUPTI_ERROR_OPENACC_UNDEFINED_ROUTINE = 37,
+ /**
+ * Legacy CUPTI Profiling API i.e. event API from the header cupti_events.h and
+ * metric API from the header cupti_metrics.h are not supported on devices with
+ * compute capability 7.5 and higher (i.e. Turing and later GPU architectures).
+ * These APIs are deprecated in the CUDA 12.8 release and will be removed in a future CUDA release.
+ * These are replaced by the host profiling API in the header cupti_profiler_host.h and
+ * target profiling API in the header cupti_range_profiler.h which are supported on
+ * devices with compute capability 7.0 and higher (i.e. Volta and later GPU
+ * architectures).
+ */
+ CUPTI_ERROR_LEGACY_PROFILER_NOT_SUPPORTED = 38,
+ /**
+ * CUPTI doesn't allow multiple callback subscribers. Only a single subscriber
+ * can be registered at a time.
+ * Same error code is used when application is launched using NVIDIA tools
+ * like nvprof, Visual Profiler, Nsight Systems, Nsight Compute, cuda-gdb and
+ * cuda-memcheck.
+ */
+ CUPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED = 39,
+ /**
+ * Profiling on virtualized GPU is not allowed by hypervisor.
+ */
+ CUPTI_ERROR_VIRTUALIZED_DEVICE_INSUFFICIENT_PRIVILEGES = 40,
+ /**
+ * Profiling and tracing are not allowed when confidential computing mode
+ * is enabled.
+ */
+ CUPTI_ERROR_CONFIDENTIAL_COMPUTING_NOT_SUPPORTED = 41,
+ /**
+ * CUPTI does not support NVIDIA Crypto Mining Processors (CMP).
+ * For more information, please visit https://developer.nvidia.com/ERR_NVCMPGPU
+ */
+ CUPTI_ERROR_CMP_DEVICE_NOT_SUPPORTED = 42,
+ /**
+ * Profiling on Multi-instance GPU (MIG) is not supported.
+ */
+ CUPTI_ERROR_MIG_DEVICE_NOT_SUPPORTED = 43,
+ /**
+ * Profiling on SLI device is not supported.
+ */
+ CUPTI_ERROR_SLI_DEVICE_NOT_SUPPORTED = 44,
+ /**
+ * Profiling on WSL device is not supported.
+ */
+ CUPTI_ERROR_WSL_DEVICE_NOT_SUPPORTED = 45,
+ /**
+ * An unknown internal error has occurred.
+ */
+ CUPTI_ERROR_UNKNOWN = 999,
+ CUPTI_ERROR_FORCE_INT = 0x7fffffff
+} CUptiResult;
+
+/**
+ * \brief Get the descriptive string for a CUptiResult.
+ *
+ * Return the descriptive string for a CUptiResult in \p *str.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param result The result to get the string for
+ * \param str Returns the string
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p str is NULL or \p
+ * result is not a valid CUptiResult
+ */
+CUptiResult CUPTIAPI cuptiGetResultString(CUptiResult result, const char **str);
+
+/**
+ * @brief Get the descriptive message corresponding to error codes returned
+ * by CUPTI.
+ *
+ * Return the descriptive error message for a CUptiResult in \p *str.
+ * \note \b Thread-safety: this function is thread safe.
+ *
+ * \param result The result to get the descriptive error message for
+ * \param str Returns the error message string
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p str is NULL or \p
+ * result is not a valid CUptiResult
+ *
+ */
+
+CUptiResult CUPTIAPI cuptiGetErrorMessage(CUptiResult result, const char **str);
+
+/** @} */ /* END CUPTI_RESULT_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_RESULT_H_*/
+
+
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_runtime_cbid.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_runtime_cbid.h
new file mode 100644
index 0000000000000000000000000000000000000000..16b41e475fcfcf76e6507949699cd04c594becc9
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_runtime_cbid.h
@@ -0,0 +1,504 @@
+
+// *************************************************************************
+// Definitions of indices for API functions, unique across entire API
+// *************************************************************************
+
+// This file is generated. Any changes you make will be lost during the next clean build.
+// CUDA public interface, for type definitions and cu* function prototypes
+
+#if !defined(_CUPTI_RUNTIME_CBID_H)
+#define _CUPTI_RUNTIME_CBID_H
+
+typedef enum CUpti_runtime_api_trace_cbid_enum {
+ CUPTI_RUNTIME_TRACE_CBID_INVALID = 0,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDriverGetVersion_v3020 = 1,
+ CUPTI_RUNTIME_TRACE_CBID_cudaRuntimeGetVersion_v3020 = 2,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceCount_v3020 = 3,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceProperties_v3020 = 4,
+ CUPTI_RUNTIME_TRACE_CBID_cudaChooseDevice_v3020 = 5,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetChannelDesc_v3020 = 6,
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateChannelDesc_v3020 = 7,
+ CUPTI_RUNTIME_TRACE_CBID_cudaConfigureCall_v3020 = 8,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetupArgument_v3020 = 9,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetLastError_v3020 = 10,
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeekAtLastError_v3020 = 11,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetErrorString_v3020 = 12,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunch_v3020 = 13,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetCacheConfig_v3020 = 14,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncGetAttributes_v3020 = 15,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDevice_v3020 = 16,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDevice_v3020 = 17,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetValidDevices_v3020 = 18,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDeviceFlags_v3020 = 19,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc_v3020 = 20,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocPitch_v3020 = 21,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFree_v3020 = 22,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocArray_v3020 = 23,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeArray_v3020 = 24,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocHost_v3020 = 25,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeHost_v3020 = 26,
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostAlloc_v3020 = 27,
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostGetDevicePointer_v3020 = 28,
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostGetFlags_v3020 = 29,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemGetInfo_v3020 = 30,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy_v3020 = 31,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2D_v3020 = 32,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArray_v3020 = 33,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArray_v3020 = 34,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArray_v3020 = 35,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArray_v3020 = 36,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyArrayToArray_v3020 = 37,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DArrayToArray_v3020 = 38,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbol_v3020 = 39,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbol_v3020 = 40,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyAsync_v3020 = 41,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArrayAsync_v3020 = 42,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArrayAsync_v3020 = 43,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DAsync_v3020 = 44,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArrayAsync_v3020 = 45,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArrayAsync_v3020 = 46,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbolAsync_v3020 = 47,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbolAsync_v3020 = 48,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset_v3020 = 49,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2D_v3020 = 50,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemsetAsync_v3020 = 51,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2DAsync_v3020 = 52,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSymbolAddress_v3020 = 53,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSymbolSize_v3020 = 54,
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTexture_v3020 = 55,
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTexture2D_v3020 = 56,
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTextureToArray_v3020 = 57,
+ CUPTI_RUNTIME_TRACE_CBID_cudaUnbindTexture_v3020 = 58,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureAlignmentOffset_v3020 = 59,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureReference_v3020 = 60,
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindSurfaceToArray_v3020 = 61,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSurfaceReference_v3020 = 62,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLSetGLDevice_v3020 = 63,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLRegisterBufferObject_v3020 = 64,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLMapBufferObject_v3020 = 65,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnmapBufferObject_v3020 = 66,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnregisterBufferObject_v3020 = 67,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLSetBufferObjectMapFlags_v3020 = 68,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLMapBufferObjectAsync_v3020 = 69,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLUnmapBufferObjectAsync_v3020 = 70,
+ CUPTI_RUNTIME_TRACE_CBID_cudaWGLGetDevice_v3020 = 71,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsGLRegisterImage_v3020 = 72,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsGLRegisterBuffer_v3020 = 73,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsUnregisterResource_v3020 = 74,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceSetMapFlags_v3020 = 75,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsMapResources_v3020 = 76,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsUnmapResources_v3020 = 77,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedPointer_v3020 = 78,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsSubResourceGetMappedArray_v3020 = 79,
+ CUPTI_RUNTIME_TRACE_CBID_cudaVDPAUGetDevice_v3020 = 80,
+ CUPTI_RUNTIME_TRACE_CBID_cudaVDPAUSetVDPAUDevice_v3020 = 81,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsVDPAURegisterVideoSurface_v3020 = 82,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsVDPAURegisterOutputSurface_v3020 = 83,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDevice_v3020 = 84,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDevices_v3020 = 85,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11SetDirect3DDevice_v3020 = 86,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D11RegisterResource_v3020 = 87,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDevice_v3020 = 88,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDevices_v3020 = 89,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10SetDirect3DDevice_v3020 = 90,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D10RegisterResource_v3020 = 91,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10RegisterResource_v3020 = 92,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10UnregisterResource_v3020 = 93,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10MapResources_v3020 = 94,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10UnmapResources_v3020 = 95,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceSetMapFlags_v3020 = 96,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetSurfaceDimensions_v3020 = 97,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedArray_v3020 = 98,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedPointer_v3020 = 99,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedSize_v3020 = 100,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10ResourceGetMappedPitch_v3020 = 101,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDevice_v3020 = 102,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDevices_v3020 = 103,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9SetDirect3DDevice_v3020 = 104,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9GetDirect3DDevice_v3020 = 105,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsD3D9RegisterResource_v3020 = 106,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9RegisterResource_v3020 = 107,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnregisterResource_v3020 = 108,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9MapResources_v3020 = 109,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnmapResources_v3020 = 110,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceSetMapFlags_v3020 = 111,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetSurfaceDimensions_v3020 = 112,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedArray_v3020 = 113,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedPointer_v3020 = 114,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedSize_v3020 = 115,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9ResourceGetMappedPitch_v3020 = 116,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9Begin_v3020 = 117,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9End_v3020 = 118,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9RegisterVertexBuffer_v3020 = 119,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnregisterVertexBuffer_v3020 = 120,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9MapVertexBuffer_v3020 = 121,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D9UnmapVertexBuffer_v3020 = 122,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadExit_v3020 = 123,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDoubleForDevice_v3020 = 124,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSetDoubleForHost_v3020 = 125,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSynchronize_v3020 = 126,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadGetLimit_v3020 = 127,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSetLimit_v3020 = 128,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreate_v3020 = 129,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamDestroy_v3020 = 130,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSynchronize_v3020 = 131,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamQuery_v3020 = 132,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreate_v3020 = 133,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreateWithFlags_v3020 = 134,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecord_v3020 = 135,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventDestroy_v3020 = 136,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventSynchronize_v3020 = 137,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventQuery_v3020 = 138,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventElapsedTime_v3020 = 139,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc3D_v3020 = 140,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMalloc3DArray_v3020 = 141,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3D_v3020 = 142,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3DAsync_v3020 = 143,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3D_v3020 = 144,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DAsync_v3020 = 145,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadSetCacheConfig_v3020 = 146,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamWaitEvent_v3020 = 147,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D11GetDirect3DDevice_v3020 = 148,
+ CUPTI_RUNTIME_TRACE_CBID_cudaD3D10GetDirect3DDevice_v3020 = 149,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadGetCacheConfig_v3020 = 150,
+ CUPTI_RUNTIME_TRACE_CBID_cudaPointerGetAttributes_v4000 = 151,
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostRegister_v4000 = 152,
+ CUPTI_RUNTIME_TRACE_CBID_cudaHostUnregister_v4000 = 153,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceCanAccessPeer_v4000 = 154,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceEnablePeerAccess_v4000 = 155,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceDisablePeerAccess_v4000 = 156,
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerRegister_v4000 = 157,
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerUnregister_v4000 = 158,
+ CUPTI_RUNTIME_TRACE_CBID_cudaPeerGetDevicePointer_v4000 = 159,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyPeer_v4000 = 160,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyPeerAsync_v4000 = 161,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeer_v4000 = 162,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeerAsync_v4000 = 163,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceReset_v3020 = 164,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSynchronize_v3020 = 165,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetLimit_v3020 = 166,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetLimit_v3020 = 167,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetCacheConfig_v3020 = 168,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetCacheConfig_v3020 = 169,
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerInitialize_v4000 = 170,
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerStart_v4000 = 171,
+ CUPTI_RUNTIME_TRACE_CBID_cudaProfilerStop_v4000 = 172,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetByPCIBusId_v4010 = 173,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetPCIBusId_v4010 = 174,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGLGetDevices_v4010 = 175,
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcGetEventHandle_v4010 = 176,
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcOpenEventHandle_v4010 = 177,
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcGetMemHandle_v4010 = 178,
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcOpenMemHandle_v4010 = 179,
+ CUPTI_RUNTIME_TRACE_CBID_cudaIpcCloseMemHandle_v4010 = 180,
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetInfo_v4010 = 181,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetSharedMemConfig_v4020 = 182,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetSharedMemConfig_v4020 = 183,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetSharedMemConfig_v4020 = 184,
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateTextureObject_v5000 = 185,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyTextureObject_v5000 = 186,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectResourceDesc_v5000 = 187,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectTextureDesc_v5000 = 188,
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateSurfaceObject_v5000 = 189,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroySurfaceObject_v5000 = 190,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetSurfaceObjectResourceDesc_v5000 = 191,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocMipmappedArray_v5000 = 192,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetMipmappedArrayLevel_v5000 = 193,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeMipmappedArray_v5000 = 194,
+ CUPTI_RUNTIME_TRACE_CBID_cudaBindTextureToMipmappedArray_v5000 = 195,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedMipmappedArray_v5000 = 196,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAddCallback_v5000 = 197,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreateWithFlags_v5000 = 198,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectResourceViewDesc_v5000 = 199,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetAttribute_v5000 = 200,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamDestroy_v5050 = 201,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCreateWithPriority_v5050 = 202,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetPriority_v5050 = 203,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetFlags_v5050 = 204,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetStreamPriorityRange_v5050 = 205,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocManaged_v6000 = 206,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000 = 207,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAttachMemAsync_v6000 = 208,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetErrorName_v6050 = 209,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6050 = 210,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernel_v7000 = 211,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceFlags_v7000 = 212,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunch_ptsz_v7000 = 213,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernel_ptsz_v7000 = 214,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy_ptds_v7000 = 215,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2D_ptds_v7000 = 216,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArray_ptds_v7000 = 217,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArray_ptds_v7000 = 218,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArray_ptds_v7000 = 219,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArray_ptds_v7000 = 220,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyArrayToArray_ptds_v7000 = 221,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DArrayToArray_ptds_v7000 = 222,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbol_ptds_v7000 = 223,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbol_ptds_v7000 = 224,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyAsync_ptsz_v7000 = 225,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToArrayAsync_ptsz_v7000 = 226,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromArrayAsync_ptsz_v7000 = 227,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DAsync_ptsz_v7000 = 228,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DToArrayAsync_ptsz_v7000 = 229,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy2DFromArrayAsync_ptsz_v7000 = 230,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyToSymbolAsync_ptsz_v7000 = 231,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyFromSymbolAsync_ptsz_v7000 = 232,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset_ptds_v7000 = 233,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2D_ptds_v7000 = 234,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemsetAsync_ptsz_v7000 = 235,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset2DAsync_ptsz_v7000 = 236,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetPriority_ptsz_v7000 = 237,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetFlags_ptsz_v7000 = 238,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSynchronize_ptsz_v7000 = 239,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamQuery_ptsz_v7000 = 240,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAttachMemAsync_ptsz_v7000 = 241,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecord_ptsz_v7000 = 242,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3D_ptds_v7000 = 243,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemset3DAsync_ptsz_v7000 = 244,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3D_ptds_v7000 = 245,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DAsync_ptsz_v7000 = 246,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamWaitEvent_ptsz_v7000 = 247,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamAddCallback_ptsz_v7000 = 248,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeer_ptds_v7000 = 249,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DPeerAsync_ptsz_v7000 = 250,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_v7000 = 251,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_v8000 = 252,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_ptsz_v8000 = 253,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemAdvise_v8000 = 254,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetP2PAttribute_v8000 = 255,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsEGLRegisterImage_v7000 = 256,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerConnect_v7000 = 257,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerDisconnect_v7000 = 258,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerAcquireFrame_v7000 = 259,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerReleaseFrame_v7000 = 260,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerConnect_v7000 = 261,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerDisconnect_v7000 = 262,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerPresentFrame_v7000 = 263,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamProducerReturnFrame_v7000 = 264,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphicsResourceGetMappedEglFrame_v7000 = 265,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemRangeGetAttribute_v8000 = 266,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemRangeGetAttributes_v8000 = 267,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEGLStreamConsumerConnectWithFlags_v7000 = 268,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernel_v9000 = 269,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernel_ptsz_v9000 = 270,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventCreateFromEGLSync_v9000 = 271,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchCooperativeKernelMultiDevice_v9000 = 272,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncSetAttribute_v9000 = 273,
+ CUPTI_RUNTIME_TRACE_CBID_cudaImportExternalMemory_v10000 = 274,
+ CUPTI_RUNTIME_TRACE_CBID_cudaExternalMemoryGetMappedBuffer_v10000 = 275,
+ CUPTI_RUNTIME_TRACE_CBID_cudaExternalMemoryGetMappedMipmappedArray_v10000 = 276,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyExternalMemory_v10000 = 277,
+ CUPTI_RUNTIME_TRACE_CBID_cudaImportExternalSemaphore_v10000 = 278,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v10000 = 279,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_ptsz_v10000 = 280,
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v10000 = 281,
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_ptsz_v10000 = 282,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDestroyExternalSemaphore_v10000 = 283,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchHostFunc_v10000 = 284,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchHostFunc_ptsz_v10000 = 285,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphCreate_v10000 = 286,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeGetParams_v10000 = 287,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeSetParams_v10000 = 288,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddKernelNode_v10000 = 289,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNode_v10000 = 290,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeGetParams_v10000 = 291,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParams_v10000 = 292,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemsetNode_v10000 = 293,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemsetNodeGetParams_v10000 = 294,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemsetNodeSetParams_v10000 = 295,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddHostNode_v10000 = 296,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphHostNodeGetParams_v10000 = 297,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddChildGraphNode_v10000 = 298,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphChildGraphNodeGetGraph_v10000 = 299,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEmptyNode_v10000 = 300,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphClone_v10000 = 301,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeFindInClone_v10000 = 302,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetType_v10000 = 303,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetRootNodes_v10000 = 304,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependencies_v10000 = 305,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependentNodes_v10000 = 306,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddDependencies_v10000 = 307,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphRemoveDependencies_v10000 = 308,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDestroyNode_v10000 = 309,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiate_v10000 = 310,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphLaunch_v10000 = 311,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphLaunch_ptsz_v10000 = 312,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecDestroy_v10000 = 313,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDestroy_v10000 = 314,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCapture_v10000 = 315,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCapture_ptsz_v10000 = 316,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamIsCapturing_v10000 = 317,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamIsCapturing_ptsz_v10000 = 318,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamEndCapture_v10000 = 319,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamEndCapture_ptsz_v10000 = 320,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphHostNodeSetParams_v10000 = 321,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetNodes_v10000 = 322,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetEdges_v10000 = 323,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v10010 = 324,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_ptsz_v10010 = 325,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecKernelNodeSetParams_v10010 = 326,
+ CUPTI_RUNTIME_TRACE_CBID_cudaThreadExchangeStreamCaptureMode_v10010 = 327,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetNvSciSyncAttributes_v10020 = 328,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyAvailableDynamicSMemPerBlock_v10200 = 329,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetFlags_v10200 = 330,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetFlags_ptsz_v10200 = 331,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParams_v10020 = 332,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemsetNodeSetParams_v10020 = 333,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecHostNodeSetParams_v10020 = 334,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecUpdate_v10020 = 335,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetFuncBySymbol_v11000 = 336,
+ CUPTI_RUNTIME_TRACE_CBID_cudaCtxResetPersistingL2Cache_v11000 = 337,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeCopyAttributes_v11000 = 338,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeGetAttribute_v11000 = 339,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphKernelNodeSetAttribute_v11000 = 340,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCopyAttributes_v11000 = 341,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamCopyAttributes_ptsz_v11000 = 342,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetAttribute_v11000 = 343,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetAttribute_ptsz_v11000 = 344,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetAttribute_v11000 = 345,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamSetAttribute_ptsz_v11000 = 346,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetTexture1DLinearMaxWidth_v11010 = 347,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphUpload_v10000 = 348,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphUpload_ptsz_v10000 = 349,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNodeToSymbol_v11010 = 350,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNodeFromSymbol_v11010 = 351,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemcpyNode1D_v11010 = 352,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParamsToSymbol_v11010 = 353,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParamsFromSymbol_v11010 = 354,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemcpyNodeSetParams1D_v11010 = 355,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParamsToSymbol_v11010 = 356,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParamsFromSymbol_v11010 = 357,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecMemcpyNodeSetParams1D_v11010 = 358,
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetSparseProperties_v11010 = 359,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMipmappedArrayGetSparseProperties_v11010 = 360,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecChildGraphNodeSetParams_v11010 = 361,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEventRecordNode_v11010 = 362,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventRecordNodeGetEvent_v11010 = 363,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventRecordNodeSetEvent_v11010 = 364,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddEventWaitNode_v11010 = 365,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventWaitNodeGetEvent_v11010 = 366,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphEventWaitNodeSetEvent_v11010 = 367,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecEventRecordNodeSetEvent_v11010 = 368,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecEventWaitNodeSetEvent_v11010 = 369,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecordWithFlags_v11010 = 370,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventRecordWithFlags_ptsz_v11010 = 371,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetDefaultMemPool_v11020 = 372,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocAsync_v11020 = 373,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocAsync_ptsz_v11020 = 374,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeAsync_v11020 = 375,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFreeAsync_ptsz_v11020 = 376,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolTrimTo_v11020 = 377,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolSetAttribute_v11020 = 378,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolGetAttribute_v11020 = 379,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolSetAccess_v11020 = 380,
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetPlane_v11020 = 381,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolGetAccess_v11020 = 382,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolCreate_v11020 = 383,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolDestroy_v11020 = 384,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetMemPool_v11020 = 385,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetMemPool_v11020 = 386,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolExportToShareableHandle_v11020 = 387,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolImportFromShareableHandle_v11020 = 388,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolExportPointer_v11020 = 389,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPoolImportPointer_v11020 = 390,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocFromPoolAsync_v11020 = 391,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMallocFromPoolAsync_ptsz_v11020 = 392,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v2_v11020 = 393,
+ CUPTI_RUNTIME_TRACE_CBID_cudaSignalExternalSemaphoresAsync_v2_ptsz_v11020 = 394,
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v2_v11020 = 395,
+ CUPTI_RUNTIME_TRACE_CBID_cudaWaitExternalSemaphoresAsync_v2_ptsz_v11020 = 396,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddExternalSemaphoresSignalNode_v11020 = 397,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresSignalNodeGetParams_v11020 = 398,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresSignalNodeSetParams_v11020 = 399,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddExternalSemaphoresWaitNode_v11020 = 400,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresWaitNodeGetParams_v11020 = 401,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExternalSemaphoresWaitNodeSetParams_v11020 = 402,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecExternalSemaphoresSignalNodeSetParams_v11020 = 403,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecExternalSemaphoresWaitNodeSetParams_v11020 = 404,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceFlushGPUDirectRDMAWrites_v11030 = 405,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPoint_v11030 = 406,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPoint_ptsz_v11030 = 407,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphDebugDotPrint_v11030 = 408,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v2_v11030 = 409,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v2_ptsz_v11030 = 410,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_v11030 = 411,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_ptsz_v11030 = 412,
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectCreate_v11030 = 413,
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectRetain_v11030 = 414,
+ CUPTI_RUNTIME_TRACE_CBID_cudaUserObjectRelease_v11030 = 415,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphRetainUserObject_v11030 = 416,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphReleaseUserObject_v11030 = 417,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithFlags_v11040 = 418,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemAllocNode_v11040 = 419,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemAllocNodeGetParams_v11040 = 420,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddMemFreeNode_v11040 = 421,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphMemFreeNodeGetParams_v11040 = 422,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGraphMemTrim_v11040 = 423,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceGetGraphMemAttribute_v11040 = 424,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceSetGraphMemAttribute_v11040 = 425,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeSetEnabled_v11060 = 426,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetEnabled_v11060 = 427,
+ CUPTI_RUNTIME_TRACE_CBID_cudaArrayGetMemoryRequirements_v11060 = 428,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMipmappedArrayGetMemoryRequirements_v11060 = 429,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernelExC_v11060 = 430,
+ CUPTI_RUNTIME_TRACE_CBID_cudaLaunchKernelExC_ptsz_v11060 = 431,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxPotentialClusterSize_v11070 = 432,
+ CUPTI_RUNTIME_TRACE_CBID_cudaOccupancyMaxActiveClusters_v11070 = 433,
+ CUPTI_RUNTIME_TRACE_CBID_cudaCreateTextureObject_v2_v11080 = 434,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetTextureObjectTextureDesc_v2_v11080 = 435,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithParams_v12000 = 436,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiateWithParams_ptsz_v12000 = 437,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecGetFlags_v12000 = 438,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetKernel_v12000 = 439,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDeviceProperties_v2_v12000 = 440,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetId_v12000 = 441,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetId_ptsz_v12000 = 442,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphInstantiate_v12000 = 443,
+ CUPTI_RUNTIME_TRACE_CBID_cudaInitDevice_v12000 = 444,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddNode_v12020 = 445,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeSetParams_v12020 = 446,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphExecNodeSetParams_v12020 = 447,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemAdvise_v2_v12020 = 448,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_v2_v12020 = 449,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemPrefetchAsync_v2_ptsz_v12020 = 450,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncGetName_v12030 = 451,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCaptureToGraph_v12030 = 452,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamBeginCaptureToGraph_ptsz_v12030 = 453,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphConditionalHandleCreate_v12030 = 454,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphGetEdges_v2_v12030 = 455,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependencies_v2_v12030 = 456,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphNodeGetDependentNodes_v2_v12030 = 457,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddDependencies_v2_v12030 = 458,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphRemoveDependencies_v2_v12030 = 459,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGraphAddNode_v2_v12030 = 460,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v3_v12030 = 461,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetCaptureInfo_v3_ptsz_v12030 = 462,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_v2_v12030 = 463,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamUpdateCaptureDependencies_v2_ptsz_v12030 = 464,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceRegisterAsyncNotification_v12040 = 465,
+ CUPTI_RUNTIME_TRACE_CBID_cudaDeviceUnregisterAsyncNotification_v12040 = 466,
+ CUPTI_RUNTIME_TRACE_CBID_cudaFuncGetParamInfo_v12040 = 467,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPointByVersion_v12050 = 468,
+ CUPTI_RUNTIME_TRACE_CBID_cudaGetDriverEntryPointByVersion_ptsz_v12050 = 469,
+ CUPTI_RUNTIME_TRACE_CBID_cuda470_v12060 = 470,
+ CUPTI_RUNTIME_TRACE_CBID_cuda471_v12060 = 471,
+ CUPTI_RUNTIME_TRACE_CBID_cuda472_v12060 = 472,
+ CUPTI_RUNTIME_TRACE_CBID_cuda473_v12060 = 473,
+ CUPTI_RUNTIME_TRACE_CBID_cuda474_v12060 = 474,
+ CUPTI_RUNTIME_TRACE_CBID_cuda475_v12060 = 475,
+ CUPTI_RUNTIME_TRACE_CBID_cuda476_v12060 = 476,
+ CUPTI_RUNTIME_TRACE_CBID_cuda477_v12060 = 477,
+ CUPTI_RUNTIME_TRACE_CBID_cuda478_v12060 = 478,
+ CUPTI_RUNTIME_TRACE_CBID_cuda479_v12060 = 479,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetDevice_v12080 = 480,
+ CUPTI_RUNTIME_TRACE_CBID_cudaStreamGetDevice_ptsz_v12080 = 481,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyBatchAsync_v12080 = 482,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpyBatchAsync_ptsz_v12080 = 483,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DBatchAsync_v12080 = 484,
+ CUPTI_RUNTIME_TRACE_CBID_cudaMemcpy3DBatchAsync_ptsz_v12080 = 485,
+ CUPTI_RUNTIME_TRACE_CBID_cudaEventElapsedTime_v2_v12080 = 486,
+ CUPTI_RUNTIME_TRACE_CBID_SIZE = 487,
+ CUPTI_RUNTIME_TRACE_CBID_FORCE_INT = 0x7fffffff
+} CUpti_runtime_api_trace_cbid;
+
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_sass_metrics.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_sass_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..acb59cf8e5882a5ff13b4a1b0fdc6bc7b0ec47f7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_sass_metrics.h
@@ -0,0 +1,436 @@
+/*
+ * Copyright 2023 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_SASS_METRICS_H_)
+#define _CUPTI_SASS_METRICS_H_
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_SASS_METRICS_API CUPTI SASS Metrics API
+ * Functions, types, and enums that implement the CUPTI SASS Metrics API.
+ * @{
+ */
+
+typedef enum
+{
+ /// SASS metric data will be collected at GPU level.
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to 1
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_GPU = 0,
+
+ /// SASS metric data will be collected at SM level
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to number of SMs in the GPU
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_SM = 1,
+
+ /// SASS metric data will be collected at SM sub-partition level
+ /// In CUpti_SassMetricsGetDataProperties_Params struct the numOfInstances will be equal to number of SM sub-partitions in the GPU
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_SMSP = 2,
+
+ CUPTI_SASS_METRICS_OUTPUT_GRANULARITY_INVALID
+} CUpti_SassMetrics_OutputGranularity;
+
+typedef struct CUpti_SassMetrics_MetricDetails
+{
+ /// unique ID for the SASS metric
+ uint64_t metricId;
+ /// metric name
+ const char* pMetricName;
+ /// metric description
+ const char* pMetricDescription;
+} CUpti_SassMetrics_MetricDetails;
+
+/**
+ * \brief Params for cuptiSassMetricsGetNumOfMetrics
+ */
+typedef struct CUpti_SassMetrics_GetNumOfMetrics_Params
+{
+ /// [in] should be equal to CUpti_SassMetrics_GetNumOfMetrics_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] chip name for which metrics will be queried
+ const char* pChipName;
+ /// [out] number of metrics supported for the queried chip
+ size_t numOfMetrics;
+} CUpti_SassMetrics_GetNumOfMetrics_Params;
+
+#define CUpti_SassMetrics_GetNumOfMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetNumOfMetrics_Params, numOfMetrics)
+
+/**
+ * \brief Get the number of supported SASS metrics for the chip.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetrics_GetNumOfMetrics_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric collection
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsGetNumOfMetrics(CUpti_SassMetrics_GetNumOfMetrics_Params* pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsGetMetrics
+ */
+typedef struct CUpti_SassMetrics_GetMetrics_Params
+{
+ /// [in] should be equal to CUpti_SassMetrics_GetMetrics_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] chip name for which metrics will be queried
+ const char* pChipName;
+ /// [in] number of metrics supported for the queried chip (can be queried using cuptiSassMetricsGetNumOfMetrics())
+ size_t numOfMetrics;
+ /// [out] list of metrics supported for queried chip
+ CUpti_SassMetrics_MetricDetails* pMetricsList;
+} CUpti_SassMetrics_GetMetrics_Params;
+#define CUpti_SassMetrics_GetMetrics_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetMetrics_Params, pMetricsList)
+
+/**
+ * \brief Get the list of all supported SASS metrics for the chip.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetrics_GetMetrics_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric collection
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsGetMetrics(CUpti_SassMetrics_GetMetrics_Params* pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsGetProperties
+ */
+typedef struct CUpti_SassMetrics_GetProperties_Params
+{
+ /// [in] should be equal to CUpti_SassMetrics_GetProperties_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] chip name for which metric will be queried
+ const char* pChipName;
+ /// [in] metric name
+ const char* pMetricName;
+ /// [out] returns the metric ID and the metric description
+ CUpti_SassMetrics_MetricDetails metric;
+} CUpti_SassMetrics_GetProperties_Params;
+#define CUpti_SassMetrics_GetProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_GetProperties_Params, metric)
+
+/**
+ * \brief Get metric properties for the queried metric.
+ * For a given metric the results will be put in CUpti_SassMetrics_MetricDetails which
+ * stores metric ID, description of the metric.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetrics_GetProperties_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsGetProperties(CUpti_SassMetrics_GetProperties_Params *pParams);
+
+typedef struct CUpti_SassMetrics_Config
+{
+ /// [in] unique id for the SASS metric, can be queried using cuptiSassMetricsGetProperties()
+ uint64_t metricId;
+ /// [in] CUpti_SassMetrics_OutputGranularity
+ uint8_t outputGranularity;
+} CUpti_SassMetrics_Config;
+
+/**
+ * \brief Params for cuptiSassMetricsSetConfig
+ */
+typedef struct CUpti_SassMetricsSetConfig_Params
+{
+ /// [in] equal to CUpti_SassMetricsSetConfig_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] num of metric configs, will be equal to number of metrics queried
+ size_t numOfMetricConfig;
+ /// [in] list of metric config generated for given sass metrics
+ CUpti_SassMetrics_Config* pConfigs;
+ /// [in] device index for which config will be set, user can call this once for
+ /// the device on which the the SASS metric data will be collected
+ uint32_t deviceIndex;
+} CUpti_SassMetricsSetConfig_Params;
+#define CUpti_SassMetricsSetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsSetConfig_Params, deviceIndex)
+
+/**
+ * \brief Set config for the SASS metric data collection for a device.
+ * User need to call this API before calling any of the SASS metric data collection APIs.
+ * Each set config API call need to be followed by cuptiSassPatchingUnSetConfig API
+ * before calling the cuptiSassMetricsSetConfig() API again for the same device.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsSetConfig_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this is called multiple times for the device without calling unset config API
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsSetConfig(CUpti_SassMetricsSetConfig_Params *pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsUnsetConfig
+ */
+typedef struct CUpti_SassMetricsUnsetConfig_Params
+{
+ /// [in] equal to CUpti_SassMetricsUnsetConfig_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] device index for which SASS metric data collection config will get reset, user need to call this API for
+ /// all the devices on which the the SASS metric data collection have been configured.
+ uint32_t deviceIndex;
+} CUpti_SassMetricsUnsetConfig_Params;
+#define CUpti_SassMetricsUnsetConfig_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsUnsetConfig_Params, deviceIndex)
+
+/**
+ * \brief Unset config API will reset the SASS metric data collection configuration for the device.
+ * Once this API called CUPTI will deallocate all the memory allocated and remove all
+ * the configuration for SASS metric data collection. User can only call this API for a device where
+ * cuptiSassMetricsSetConfig() API has been called earlier for the device.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsSetConfig_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this is called multiple times for the device without calling set config API
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsUnsetConfig(CUpti_SassMetricsUnsetConfig_Params *pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsEnable
+ */
+typedef struct CUpti_SassMetricsEnable_Params
+{
+ /// [in] equal to CUpti_SassMetricsEnable_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] CUDA context on which SASS metric data collection will be enabled.
+ /// If set NULL, default context will be consider for SASS metric data collection.
+ CUcontext ctx;
+ /// [in] if false, all the functions will patched regardless of their execution with cuptiSassMetricsEnable() API call.
+ /// when this parameter is set to true, metric data collection for the function will be done at the very first execution in the enable/disble
+ /// range.
+ uint8_t enableLazyPatching;
+} CUpti_SassMetricsEnable_Params;
+#define CUpti_SassMetricsEnable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsEnable_Params, enableLazyPatching)
+
+/**
+ * \brief Sass metric data collection enable API will mark the start of a range, between which kernel
+ * will be profiled for SASS metrics.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsEnable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called multiple times for a cuda context without calling
+ * cuptiSassMetricsDisable() API or called before cuptiSassMetricsSetConfig() API call.
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsEnable(CUpti_SassMetricsEnable_Params* pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsDisable
+ */
+typedef struct CUpti_SassMetricsDisable_Params
+{
+ /// [in] equal to CUpti_SassMetricsDisable_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] CUDA context on which SASS metric data collection will be disabled.
+ /// If set NULL, default context will be consider for SASS metric data collection.
+ CUcontext ctx;
+ /// [out] Num of dropped SASS records will be equal to numOfPatchedInstructions * numOfInstances.
+ /// Number of dropped records will be zero when data is flushed prior to calling the disable API.
+ size_t numOfDroppedRecords;
+} CUpti_SassMetricsDisable_Params;
+#define CUpti_SassMetricsDisable_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsDisable_Params, numOfDroppedRecords)
+
+/**
+ * \brief SASS metric data collection disable API will mark the end of a range, any kernel launched after this
+ * API call will not be profiled for the SASS metrics.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsDisable_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ * \retval CUPTI_ERROR_INVALID_CONTEXT if any cuda context has not been created prior to this API call
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called multiple times for a cuda context without calling
+ * cuptiSassMetricsEnable() API or called before cuptiSassMetricsSetConfig() API call.
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsDisable(CUpti_SassMetricsDisable_Params* pParams);
+
+/**
+ * \brief Params for cuptiSassMetricsGetDataProperties
+ */
+typedef struct CUpti_SassMetricsGetDataProperties_Params
+{
+ /// [in] equal to CUpti_SassMetricsGetDataProperties_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] CUDA context on which SASS metric data collection was enabled.
+ /// If set NULL, default context will be consider for SASS metric data collection.
+ CUcontext ctx;
+ /// [out] total number of SASS records has been collected
+ size_t numOfPatchedInstructionRecords;
+ /// [out] number of instances for each metric value per instruction.
+ /// This will depend on CUpti_SassPatching_OutputGranularity level set for the metric config.
+ size_t numOfInstances;
+} CUpti_SassMetricsGetDataProperties_Params;
+
+#define CUpti_SassMetricsGetDataProperties_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsGetDataProperties_Params, numOfInstances)
+/**
+ * \brief SASS metric data properties API will give the data regarding number of instances of a metric
+ * value and number of SASS instruction data has been collected. The number of instances of a metric
+ * will vary as per user set the output granularity level with CUpti_SassMetrics_OutputGranularity value.
+ * User need to allocate memory for retriving the SASS data using cuptiSassMetricsFlushData() API.
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsGetDataProperties_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called outside the enable/disable range.
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsGetDataProperties(CUpti_SassMetricsGetDataProperties_Params* pParams);
+
+typedef struct CUpti_SassMetrics_InstanceValue
+{
+ // unique id of the metric
+ uint64_t metricId;
+ // metric value
+ uint64_t value;
+} CUpti_SassMetrics_InstanceValue;
+#define CUpti_SassMetrics_InstanceValue_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetrics_InstanceValue, value)
+
+typedef struct CUpti_SassMetrics_Data
+{
+ /// [in] equal to CUpti_SassMetricsFlushData_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [out] Unique cubin id
+ uint32_t cubinCrc;
+ /// [out] function's unique symbol index in the module.
+ uint32_t functionIndex;
+ /// [out] The function name
+ const char* functionName;
+ /// [out] pc offset for the function in a module
+ uint32_t pcOffset;
+ /// [out] array of size equal to number of instances per metric, which contains the metric ID and metric value.
+ CUpti_SassMetrics_InstanceValue* pInstanceValues;
+} CUpti_SassMetrics_Data;
+
+/**
+ * \brief Params for cuptiSassMetricsFlushData
+ */
+typedef struct CUpti_SassMetricsFlushData_Params
+{
+ /// [in] equal to CUpti_SassMetricsFlushData_Params_STRUCT_SIZE
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] CUDA context on which SASS metric data collection was enabled.
+ /// If set NULL, default context will be consider for SASS metric data collection.
+ CUcontext ctx;
+ /// [in] number of patched instruction record will be retrived, user can call cuptiSassMetricsGetDataProperties()
+ /// for getting total number of records available.
+ size_t numOfPatchedInstructionRecords;
+ /// [in] number of patched instruction record instances for a metric, user can call cuptiSassMetricsGetDataProperties()
+ /// for getting total number of instances for each record per metric available.
+ size_t numOfInstances;
+ /// [out]
+ CUpti_SassMetrics_Data* pMetricsData;
+} CUpti_SassMetricsFlushData_Params;
+#define CUpti_SassMetricsFlushData_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_SassMetricsFlushData_Params, numOfInstances)
+
+/**
+ * \brief Flush SASS metrics data from CUPTI internal buffer to the user buffer.
+ * User needs to allocate the buffer for retrieving the data. The number of records collected
+ * can be queried using the API cuptiSassMetricsGetDataProperties().
+ *
+ * \param pParams A pointer to \ref CUpti_SassMetricsFlushData_Params
+ *
+ * \retval CUPTI_SUCCESS
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if any \p pParams is not valid
+ * \retval CUPTI_ERROR_NOT_SUPPORTED indicates that the system/device doesn't support SASS metric data collection.
+ * \retval CUPTI_ERROR_INVALID_OPERATION if this API is called outside the enable/disable range.
+ */
+CUptiResult CUPTIAPI cuptiSassMetricsFlushData(CUpti_SassMetricsFlushData_Params* pParams);
+
+/** @} */ /* END CUPTI_SASS_METRICS_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif // _CUPTI_SASS_METRICS_H_
\ No newline at end of file
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_target.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4b625d45c65288fa2ea7dc05819ee4dfc4cbdd3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_target.h
@@ -0,0 +1,43 @@
+#if !defined(_CUPTI_TARGET_H_)
+#define _CUPTI_TARGET_H_
+
+/*
+CUPTI profiler target API's
+This file contains the CUPTI profiling API's.
+*/
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+#ifndef CUPTI_PROFILER_STRUCT_SIZE
+#define CUPTI_PROFILER_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif
+
+typedef struct CUpti_Device_GetChipName_Params
+{
+ size_t structSize; //!< [in]
+ void* pPriv; //!< [in] assign to NULL
+
+ size_t deviceIndex; //!< [in]
+ const char* pChipName; //!< [out]
+} CUpti_Device_GetChipName_Params;
+
+#define CUpti_Device_GetChipName_Params_STRUCT_SIZE CUPTI_PROFILER_STRUCT_SIZE(CUpti_Device_GetChipName_Params, pChipName)
+CUptiResult CUPTIAPI cuptiDeviceGetChipName(CUpti_Device_GetChipName_Params *pParams);
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_version.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_version.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a8808ea022b4116a1177e6f78d34d0f39604344
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/cupti_version.h
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2010-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(_CUPTI_VERSION_H_)
+#define _CUPTI_VERSION_H_
+
+#include
+#include
+
+#ifndef CUPTIAPI
+#ifdef _WIN32
+#define CUPTIAPI __stdcall
+#else
+#define CUPTIAPI
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+/**
+ * \defgroup CUPTI_VERSION_API CUPTI Version
+ * Function and macro to determine the CUPTI version.
+ * @{
+ */
+
+/**
+ * \brief The API version for this implementation of CUPTI.
+ *
+ * The API version for this implementation of CUPTI. This define along
+ * with \ref cuptiGetVersion can be used to dynamically detect if the
+ * version of CUPTI compiled against matches the version of the loaded
+ * CUPTI library.
+ *
+ * v1 : CUDAToolsSDK 4.0
+ * v2 : CUDAToolsSDK 4.1
+ * v3 : CUDA Toolkit 5.0
+ * v4 : CUDA Toolkit 5.5
+ * v5 : CUDA Toolkit 6.0
+ * v6 : CUDA Toolkit 6.5
+ * v7 : CUDA Toolkit 6.5(with sm_52 support)
+ * v8 : CUDA Toolkit 7.0
+ * v9 : CUDA Toolkit 8.0
+ * v10 : CUDA Toolkit 9.0
+ * v11 : CUDA Toolkit 9.1
+ * v12 : CUDA Toolkit 10.0, 10.1 and 10.2
+ * v13 : CUDA Toolkit 11.0
+ * v14 : CUDA Toolkit 11.1
+ * v15 : CUDA Toolkit 11.2, 11.3 and 11.4
+ * v16 : CUDA Toolkit 11.5
+ * v17 : CUDA Toolkit 11.6
+ * v18 : CUDA Toolkit 11.8
+ * v19 : CUDA Toolkit 12.0
+ * v20 : CUDA Toolkit 12.2
+ * v21 : CUDA Toolkit 12.3
+ * v22 : CUDA Toolkit 12.4
+ * v23 : CUDA Toolkit 12.5
+ * v24 : CUDA Toolkit 12.6
+ * v26 : CUDA Toolkit 12.8
+ */
+#define CUPTI_API_VERSION 26
+
+/**
+ * \brief Get the CUPTI API version.
+ *
+ * Return the API version in \p *version.
+ *
+ * \param version Returns the version
+ *
+ * \retval CUPTI_SUCCESS on success
+ * \retval CUPTI_ERROR_INVALID_PARAMETER if \p version is NULL
+ * \sa CUPTI_API_VERSION
+ */
+CUptiResult CUPTIAPI cuptiGetVersion(uint32_t *version);
+
+/** @} */ /* END CUPTI_VERSION_API */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /*_CUPTI_VERSION_H_*/
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaGL_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaGL_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a52e194b265d32f61d47bd3081f4958755bff46
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaGL_meta.h
@@ -0,0 +1,116 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// Dependent includes
+#ifdef __APPLE__
+#include
+#else
+#include
+#endif
+
+// CUDA public interface, for type definitions and cu* function prototypes
+#include "cudaGL.h"
+
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+typedef struct cuGraphicsGLRegisterBuffer_params_st {
+ CUgraphicsResource *pCudaResource;
+ GLuint buffer;
+ unsigned int Flags;
+} cuGraphicsGLRegisterBuffer_params;
+
+typedef struct cuGraphicsGLRegisterImage_params_st {
+ CUgraphicsResource *pCudaResource;
+ GLuint image;
+ GLenum target;
+ unsigned int Flags;
+} cuGraphicsGLRegisterImage_params;
+
+typedef struct cuGLGetDevices_v2_params_st {
+ unsigned int *pCudaDeviceCount;
+ CUdevice *pCudaDevices;
+ unsigned int cudaDeviceCount;
+ CUGLDeviceList deviceList;
+} cuGLGetDevices_v2_params;
+
+typedef struct cuGLCtxCreate_v2_params_st {
+ CUcontext *pCtx;
+ unsigned int Flags;
+ CUdevice device;
+} cuGLCtxCreate_v2_params;
+
+typedef struct cuGLRegisterBufferObject_params_st {
+ GLuint buffer;
+} cuGLRegisterBufferObject_params;
+
+typedef struct cuGLMapBufferObject_v2_ptds_params_st {
+ CUdeviceptr *dptr;
+ size_t *size;
+ GLuint buffer;
+} cuGLMapBufferObject_v2_ptds_params;
+
+typedef struct cuGLUnmapBufferObject_params_st {
+ GLuint buffer;
+} cuGLUnmapBufferObject_params;
+
+typedef struct cuGLUnregisterBufferObject_params_st {
+ GLuint buffer;
+} cuGLUnregisterBufferObject_params;
+
+typedef struct cuGLSetBufferObjectMapFlags_params_st {
+ GLuint buffer;
+ unsigned int Flags;
+} cuGLSetBufferObjectMapFlags_params;
+
+typedef struct cuGLMapBufferObjectAsync_v2_ptsz_params_st {
+ CUdeviceptr *dptr;
+ size_t *size;
+ GLuint buffer;
+ CUstream hStream;
+} cuGLMapBufferObjectAsync_v2_ptsz_params;
+
+typedef struct cuGLUnmapBufferObjectAsync_params_st {
+ GLuint buffer;
+ CUstream hStream;
+} cuGLUnmapBufferObjectAsync_params;
+
+typedef struct cuGLGetDevices_params_st {
+ unsigned int *pCudaDeviceCount;
+ CUdevice *pCudaDevices;
+ unsigned int cudaDeviceCount;
+ CUGLDeviceList deviceList;
+} cuGLGetDevices_params;
+
+typedef struct cuGLMapBufferObject_v2_params_st {
+ CUdeviceptr *dptr;
+ size_t *size;
+ GLuint buffer;
+} cuGLMapBufferObject_v2_params;
+
+typedef struct cuGLMapBufferObjectAsync_v2_params_st {
+ CUdeviceptr *dptr;
+ size_t *size;
+ GLuint buffer;
+ CUstream hStream;
+} cuGLMapBufferObjectAsync_v2_params;
+
+typedef struct cuGLCtxCreate_params_st {
+ CUcontext *pCtx;
+ unsigned int Flags;
+ CUdevice device;
+} cuGLCtxCreate_params;
+
+typedef struct cuGLMapBufferObject_params_st {
+ CUdeviceptr_v1 *dptr;
+ unsigned int *size;
+ GLuint buffer;
+} cuGLMapBufferObject_params;
+
+typedef struct cuGLMapBufferObjectAsync_params_st {
+ CUdeviceptr_v1 *dptr;
+ unsigned int *size;
+ GLuint buffer;
+ CUstream hStream;
+} cuGLMapBufferObjectAsync_params;
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaVDPAU_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaVDPAU_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..abc603c8d9be21e012a9b1641330c2e203d623b2
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudaVDPAU_meta.h
@@ -0,0 +1,46 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// Dependent includes
+#include
+
+// CUDA public interface, for type definitions and cu* function prototypes
+#include "cudaVDPAU.h"
+
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+typedef struct cuVDPAUGetDevice_params_st {
+ CUdevice *pDevice;
+ VdpDevice vdpDevice;
+ VdpGetProcAddress *vdpGetProcAddress;
+} cuVDPAUGetDevice_params;
+
+typedef struct cuVDPAUCtxCreate_v2_params_st {
+ CUcontext *pCtx;
+ unsigned int flags;
+ CUdevice device;
+ VdpDevice vdpDevice;
+ VdpGetProcAddress *vdpGetProcAddress;
+} cuVDPAUCtxCreate_v2_params;
+
+typedef struct cuGraphicsVDPAURegisterVideoSurface_params_st {
+ CUgraphicsResource *pCudaResource;
+ VdpVideoSurface vdpSurface;
+ unsigned int flags;
+} cuGraphicsVDPAURegisterVideoSurface_params;
+
+typedef struct cuGraphicsVDPAURegisterOutputSurface_params_st {
+ CUgraphicsResource *pCudaResource;
+ VdpOutputSurface vdpSurface;
+ unsigned int flags;
+} cuGraphicsVDPAURegisterOutputSurface_params;
+
+typedef struct cuVDPAUCtxCreate_params_st {
+ CUcontext *pCtx;
+ unsigned int flags;
+ CUdevice device;
+ VdpDevice vdpDevice;
+ VdpGetProcAddress *vdpGetProcAddress;
+} cuVDPAUCtxCreate_params;
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_gl_interop_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_gl_interop_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..eaba3ac5a760e338f1edc191609f6fa2a32adee7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_gl_interop_meta.h
@@ -0,0 +1,71 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// CUDA public interface, for type definitions and api function prototypes
+#include "cuda_gl_interop.h"
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+// Currently used parameter trace structures
+typedef struct cudaGLGetDevices_v4010_params_st {
+ unsigned int *pCudaDeviceCount;
+ int *pCudaDevices;
+ unsigned int cudaDeviceCount;
+ enum cudaGLDeviceList deviceList;
+} cudaGLGetDevices_v4010_params;
+
+typedef struct cudaGraphicsGLRegisterImage_v3020_params_st {
+ struct cudaGraphicsResource **resource;
+ GLuint image;
+ GLenum target;
+ unsigned int flags;
+} cudaGraphicsGLRegisterImage_v3020_params;
+
+typedef struct cudaGraphicsGLRegisterBuffer_v3020_params_st {
+ struct cudaGraphicsResource **resource;
+ GLuint buffer;
+ unsigned int flags;
+} cudaGraphicsGLRegisterBuffer_v3020_params;
+
+typedef struct cudaGLSetGLDevice_v3020_params_st {
+ int device;
+} cudaGLSetGLDevice_v3020_params;
+
+typedef struct cudaGLRegisterBufferObject_v3020_params_st {
+ GLuint bufObj;
+} cudaGLRegisterBufferObject_v3020_params;
+
+typedef struct cudaGLMapBufferObject_v3020_params_st {
+ void **devPtr;
+ GLuint bufObj;
+} cudaGLMapBufferObject_v3020_params;
+
+typedef struct cudaGLUnmapBufferObject_v3020_params_st {
+ GLuint bufObj;
+} cudaGLUnmapBufferObject_v3020_params;
+
+typedef struct cudaGLUnregisterBufferObject_v3020_params_st {
+ GLuint bufObj;
+} cudaGLUnregisterBufferObject_v3020_params;
+
+typedef struct cudaGLSetBufferObjectMapFlags_v3020_params_st {
+ GLuint bufObj;
+ unsigned int flags;
+} cudaGLSetBufferObjectMapFlags_v3020_params;
+
+typedef struct cudaGLMapBufferObjectAsync_v3020_params_st {
+ void **devPtr;
+ GLuint bufObj;
+ cudaStream_t stream;
+} cudaGLMapBufferObjectAsync_v3020_params;
+
+typedef struct cudaGLUnmapBufferObjectAsync_v3020_params_st {
+ GLuint bufObj;
+ cudaStream_t stream;
+} cudaGLUnmapBufferObjectAsync_v3020_params;
+
+// Parameter trace structures for removed functions
+
+
+// End of parameter trace structures
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..954db0ad73e2eb029918f595ddee452aa9afd0e3
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_meta.h
@@ -0,0 +1,3718 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// No dependent includes
+
+// CUDA public interface, for type definitions and cu* function prototypes
+#include "cuda.h"
+
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+typedef struct cuGetErrorString_params_st {
+ CUresult error;
+ const char **pStr;
+} cuGetErrorString_params;
+
+typedef struct cuGetErrorName_params_st {
+ CUresult error;
+ const char **pStr;
+} cuGetErrorName_params;
+
+typedef struct cuInit_params_st {
+ unsigned int Flags;
+} cuInit_params;
+
+typedef struct cuDriverGetVersion_params_st {
+ int *driverVersion;
+} cuDriverGetVersion_params;
+
+typedef struct cuDeviceGet_params_st {
+ CUdevice *device;
+ int ordinal;
+} cuDeviceGet_params;
+
+typedef struct cuDeviceGetCount_params_st {
+ int *count;
+} cuDeviceGetCount_params;
+
+typedef struct cuDeviceGetName_params_st {
+ char *name;
+ int len;
+ CUdevice dev;
+} cuDeviceGetName_params;
+
+typedef struct cuDeviceGetUuid_params_st {
+ CUuuid *uuid;
+ CUdevice dev;
+} cuDeviceGetUuid_params;
+
+typedef struct cuDeviceGetUuid_v2_params_st {
+ CUuuid *uuid;
+ CUdevice dev;
+} cuDeviceGetUuid_v2_params;
+
+typedef struct cuDeviceGetLuid_params_st {
+ char *luid;
+ unsigned int *deviceNodeMask;
+ CUdevice dev;
+} cuDeviceGetLuid_params;
+
+typedef struct cuDeviceTotalMem_v2_params_st {
+ size_t *bytes;
+ CUdevice dev;
+} cuDeviceTotalMem_v2_params;
+
+typedef struct cuDeviceGetTexture1DLinearMaxWidth_params_st {
+ size_t *maxWidthInElements;
+ CUarray_format format;
+ unsigned numChannels;
+ CUdevice dev;
+} cuDeviceGetTexture1DLinearMaxWidth_params;
+
+typedef struct cuDeviceGetAttribute_params_st {
+ int *pi;
+ CUdevice_attribute attrib;
+ CUdevice dev;
+} cuDeviceGetAttribute_params;
+
+typedef struct cuDeviceGetNvSciSyncAttributes_params_st {
+ void *nvSciSyncAttrList;
+ CUdevice dev;
+ int flags;
+} cuDeviceGetNvSciSyncAttributes_params;
+
+typedef struct cuDeviceSetMemPool_params_st {
+ CUdevice dev;
+ CUmemoryPool pool;
+} cuDeviceSetMemPool_params;
+
+typedef struct cuDeviceGetMemPool_params_st {
+ CUmemoryPool *pool;
+ CUdevice dev;
+} cuDeviceGetMemPool_params;
+
+typedef struct cuDeviceGetDefaultMemPool_params_st {
+ CUmemoryPool *pool_out;
+ CUdevice dev;
+} cuDeviceGetDefaultMemPool_params;
+
+typedef struct cuDeviceGetExecAffinitySupport_params_st {
+ int *pi;
+ CUexecAffinityType type;
+ CUdevice dev;
+} cuDeviceGetExecAffinitySupport_params;
+
+typedef struct cuFlushGPUDirectRDMAWrites_params_st {
+ CUflushGPUDirectRDMAWritesTarget target;
+ CUflushGPUDirectRDMAWritesScope scope;
+} cuFlushGPUDirectRDMAWrites_params;
+
+typedef struct cuDeviceGetProperties_params_st {
+ CUdevprop *prop;
+ CUdevice dev;
+} cuDeviceGetProperties_params;
+
+typedef struct cuDeviceComputeCapability_params_st {
+ int *major;
+ int *minor;
+ CUdevice dev;
+} cuDeviceComputeCapability_params;
+
+typedef struct cuDevicePrimaryCtxRetain_params_st {
+ CUcontext *pctx;
+ CUdevice dev;
+} cuDevicePrimaryCtxRetain_params;
+
+typedef struct cuDevicePrimaryCtxRelease_v2_params_st {
+ CUdevice dev;
+} cuDevicePrimaryCtxRelease_v2_params;
+
+typedef struct cuDevicePrimaryCtxSetFlags_v2_params_st {
+ CUdevice dev;
+ unsigned int flags;
+} cuDevicePrimaryCtxSetFlags_v2_params;
+
+typedef struct cuDevicePrimaryCtxGetState_params_st {
+ CUdevice dev;
+ unsigned int *flags;
+ int *active;
+} cuDevicePrimaryCtxGetState_params;
+
+typedef struct cuDevicePrimaryCtxReset_v2_params_st {
+ CUdevice dev;
+} cuDevicePrimaryCtxReset_v2_params;
+
+typedef struct cuCtxCreate_v2_params_st {
+ CUcontext *pctx;
+ unsigned int flags;
+ CUdevice dev;
+} cuCtxCreate_v2_params;
+
+typedef struct cuCtxCreate_v3_params_st {
+ CUcontext *pctx;
+ CUexecAffinityParam *paramsArray;
+ int numParams;
+ unsigned int flags;
+ CUdevice dev;
+} cuCtxCreate_v3_params;
+
+typedef struct cuCtxCreate_v4_params_st {
+ CUcontext *pctx;
+ CUctxCreateParams *ctxCreateParams;
+ unsigned int flags;
+ CUdevice dev;
+} cuCtxCreate_v4_params;
+
+typedef struct cuCtxDestroy_v2_params_st {
+ CUcontext ctx;
+} cuCtxDestroy_v2_params;
+
+typedef struct cuCtxPushCurrent_v2_params_st {
+ CUcontext ctx;
+} cuCtxPushCurrent_v2_params;
+
+typedef struct cuCtxPopCurrent_v2_params_st {
+ CUcontext *pctx;
+} cuCtxPopCurrent_v2_params;
+
+typedef struct cuCtxSetCurrent_params_st {
+ CUcontext ctx;
+} cuCtxSetCurrent_params;
+
+typedef struct cuCtxGetCurrent_params_st {
+ CUcontext *pctx;
+} cuCtxGetCurrent_params;
+
+typedef struct cuCtxGetDevice_params_st {
+ CUdevice *device;
+} cuCtxGetDevice_params;
+
+typedef struct cuCtxGetFlags_params_st {
+ unsigned int *flags;
+} cuCtxGetFlags_params;
+
+typedef struct cuCtxSetFlags_params_st {
+ unsigned int flags;
+} cuCtxSetFlags_params;
+
+typedef struct cuCtxGetId_params_st {
+ CUcontext ctx;
+ unsigned long long *ctxId;
+} cuCtxGetId_params;
+
+typedef struct cuCtxSetLimit_params_st {
+ CUlimit limit;
+ size_t value;
+} cuCtxSetLimit_params;
+
+typedef struct cuCtxGetLimit_params_st {
+ size_t *pvalue;
+ CUlimit limit;
+} cuCtxGetLimit_params;
+
+typedef struct cuCtxGetCacheConfig_params_st {
+ CUfunc_cache *pconfig;
+} cuCtxGetCacheConfig_params;
+
+typedef struct cuCtxSetCacheConfig_params_st {
+ CUfunc_cache config;
+} cuCtxSetCacheConfig_params;
+
+typedef struct cuCtxGetApiVersion_params_st {
+ CUcontext ctx;
+ unsigned int *version;
+} cuCtxGetApiVersion_params;
+
+typedef struct cuCtxGetStreamPriorityRange_params_st {
+ int *leastPriority;
+ int *greatestPriority;
+} cuCtxGetStreamPriorityRange_params;
+
+typedef struct cuCtxGetExecAffinity_params_st {
+ CUexecAffinityParam *pExecAffinity;
+ CUexecAffinityType type;
+} cuCtxGetExecAffinity_params;
+
+typedef struct cuCtxRecordEvent_params_st {
+ CUcontext hCtx;
+ CUevent hEvent;
+} cuCtxRecordEvent_params;
+
+typedef struct cuCtxWaitEvent_params_st {
+ CUcontext hCtx;
+ CUevent hEvent;
+} cuCtxWaitEvent_params;
+
+typedef struct cuCtxAttach_params_st {
+ CUcontext *pctx;
+ unsigned int flags;
+} cuCtxAttach_params;
+
+typedef struct cuCtxDetach_params_st {
+ CUcontext ctx;
+} cuCtxDetach_params;
+
+typedef struct cuCtxGetSharedMemConfig_params_st {
+ CUsharedconfig *pConfig;
+} cuCtxGetSharedMemConfig_params;
+
+typedef struct cuCtxSetSharedMemConfig_params_st {
+ CUsharedconfig config;
+} cuCtxSetSharedMemConfig_params;
+
+typedef struct cuModuleLoad_params_st {
+ CUmodule *module;
+ const char *fname;
+} cuModuleLoad_params;
+
+typedef struct cuModuleLoadData_params_st {
+ CUmodule *module;
+ const void *image;
+} cuModuleLoadData_params;
+
+typedef struct cuModuleLoadDataEx_params_st {
+ CUmodule *module;
+ const void *image;
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+} cuModuleLoadDataEx_params;
+
+typedef struct cuModuleLoadFatBinary_params_st {
+ CUmodule *module;
+ const void *fatCubin;
+} cuModuleLoadFatBinary_params;
+
+typedef struct cuModuleUnload_params_st {
+ CUmodule hmod;
+} cuModuleUnload_params;
+
+typedef struct cuModuleGetLoadingMode_params_st {
+ CUmoduleLoadingMode *mode;
+} cuModuleGetLoadingMode_params;
+
+typedef struct cuModuleGetFunction_params_st {
+ CUfunction *hfunc;
+ CUmodule hmod;
+ const char *name;
+} cuModuleGetFunction_params;
+
+typedef struct cuModuleGetFunctionCount_params_st {
+ unsigned int *count;
+ CUmodule mod;
+} cuModuleGetFunctionCount_params;
+
+typedef struct cuModuleEnumerateFunctions_params_st {
+ CUfunction *functions;
+ unsigned int numFunctions;
+ CUmodule mod;
+} cuModuleEnumerateFunctions_params;
+
+typedef struct cuModuleGetGlobal_v2_params_st {
+ CUdeviceptr *dptr;
+ size_t *bytes;
+ CUmodule hmod;
+ const char *name;
+} cuModuleGetGlobal_v2_params;
+
+typedef struct cuLinkCreate_v2_params_st {
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+ CUlinkState *stateOut;
+} cuLinkCreate_v2_params;
+
+typedef struct cuLinkAddData_v2_params_st {
+ CUlinkState state;
+ CUjitInputType type;
+ void *data;
+ size_t size;
+ const char *name;
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+} cuLinkAddData_v2_params;
+
+typedef struct cuLinkAddFile_v2_params_st {
+ CUlinkState state;
+ CUjitInputType type;
+ const char *path;
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+} cuLinkAddFile_v2_params;
+
+typedef struct cuLinkComplete_params_st {
+ CUlinkState state;
+ void **cubinOut;
+ size_t *sizeOut;
+} cuLinkComplete_params;
+
+typedef struct cuLinkDestroy_params_st {
+ CUlinkState state;
+} cuLinkDestroy_params;
+
+typedef struct cuModuleGetTexRef_params_st {
+ CUtexref *pTexRef;
+ CUmodule hmod;
+ const char *name;
+} cuModuleGetTexRef_params;
+
+typedef struct cuModuleGetSurfRef_params_st {
+ CUsurfref *pSurfRef;
+ CUmodule hmod;
+ const char *name;
+} cuModuleGetSurfRef_params;
+
+typedef struct cuLibraryLoadData_params_st {
+ CUlibrary *library;
+ const void *code;
+ CUjit_option *jitOptions;
+ void **jitOptionsValues;
+ unsigned int numJitOptions;
+ CUlibraryOption *libraryOptions;
+ void **libraryOptionValues;
+ unsigned int numLibraryOptions;
+} cuLibraryLoadData_params;
+
+typedef struct cuLibraryLoadFromFile_params_st {
+ CUlibrary *library;
+ const char *fileName;
+ CUjit_option *jitOptions;
+ void **jitOptionsValues;
+ unsigned int numJitOptions;
+ CUlibraryOption *libraryOptions;
+ void **libraryOptionValues;
+ unsigned int numLibraryOptions;
+} cuLibraryLoadFromFile_params;
+
+typedef struct cuLibraryUnload_params_st {
+ CUlibrary library;
+} cuLibraryUnload_params;
+
+typedef struct cuLibraryGetKernel_params_st {
+ CUkernel *pKernel;
+ CUlibrary library;
+ const char *name;
+} cuLibraryGetKernel_params;
+
+typedef struct cuLibraryGetKernelCount_params_st {
+ unsigned int *count;
+ CUlibrary lib;
+} cuLibraryGetKernelCount_params;
+
+typedef struct cuLibraryEnumerateKernels_params_st {
+ CUkernel *kernels;
+ unsigned int numKernels;
+ CUlibrary lib;
+} cuLibraryEnumerateKernels_params;
+
+typedef struct cuLibraryGetModule_params_st {
+ CUmodule *pMod;
+ CUlibrary library;
+} cuLibraryGetModule_params;
+
+typedef struct cuKernelGetFunction_params_st {
+ CUfunction *pFunc;
+ CUkernel kernel;
+} cuKernelGetFunction_params;
+
+typedef struct cuKernelGetLibrary_params_st {
+ CUlibrary *pLib;
+ CUkernel kernel;
+} cuKernelGetLibrary_params;
+
+typedef struct cuLibraryGetGlobal_params_st {
+ CUdeviceptr *dptr;
+ size_t *bytes;
+ CUlibrary library;
+ const char *name;
+} cuLibraryGetGlobal_params;
+
+typedef struct cuLibraryGetManaged_params_st {
+ CUdeviceptr *dptr;
+ size_t *bytes;
+ CUlibrary library;
+ const char *name;
+} cuLibraryGetManaged_params;
+
+typedef struct cuLibraryGetUnifiedFunction_params_st {
+ void **fptr;
+ CUlibrary library;
+ const char *symbol;
+} cuLibraryGetUnifiedFunction_params;
+
+typedef struct cuKernelGetAttribute_params_st {
+ int *pi;
+ CUfunction_attribute attrib;
+ CUkernel kernel;
+ CUdevice dev;
+} cuKernelGetAttribute_params;
+
+typedef struct cuKernelSetAttribute_params_st {
+ CUfunction_attribute attrib;
+ int val;
+ CUkernel kernel;
+ CUdevice dev;
+} cuKernelSetAttribute_params;
+
+typedef struct cuKernelSetCacheConfig_params_st {
+ CUkernel kernel;
+ CUfunc_cache config;
+ CUdevice dev;
+} cuKernelSetCacheConfig_params;
+
+typedef struct cuKernelGetName_params_st {
+ const char **name;
+ CUkernel hfunc;
+} cuKernelGetName_params;
+
+typedef struct cuKernelGetParamInfo_params_st {
+ CUkernel kernel;
+ size_t paramIndex;
+ size_t *paramOffset;
+ size_t *paramSize;
+} cuKernelGetParamInfo_params;
+
+typedef struct cuMemGetInfo_v2_params_st {
+ size_t *free;
+ size_t *total;
+} cuMemGetInfo_v2_params;
+
+typedef struct cuMemAlloc_v2_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+} cuMemAlloc_v2_params;
+
+typedef struct cuMemAllocPitch_v2_params_st {
+ CUdeviceptr *dptr;
+ size_t *pPitch;
+ size_t WidthInBytes;
+ size_t Height;
+ unsigned int ElementSizeBytes;
+} cuMemAllocPitch_v2_params;
+
+typedef struct cuMemFree_v2_params_st {
+ CUdeviceptr dptr;
+} cuMemFree_v2_params;
+
+typedef struct cuMemGetAddressRange_v2_params_st {
+ CUdeviceptr *pbase;
+ size_t *psize;
+ CUdeviceptr dptr;
+} cuMemGetAddressRange_v2_params;
+
+typedef struct cuMemAllocHost_v2_params_st {
+ void **pp;
+ size_t bytesize;
+} cuMemAllocHost_v2_params;
+
+typedef struct cuMemFreeHost_params_st {
+ void *p;
+} cuMemFreeHost_params;
+
+typedef struct cuMemHostAlloc_params_st {
+ void **pp;
+ size_t bytesize;
+ unsigned int Flags;
+} cuMemHostAlloc_params;
+
+typedef struct cuMemHostGetDevicePointer_v2_params_st {
+ CUdeviceptr *pdptr;
+ void *p;
+ unsigned int Flags;
+} cuMemHostGetDevicePointer_v2_params;
+
+typedef struct cuMemHostGetFlags_params_st {
+ unsigned int *pFlags;
+ void *p;
+} cuMemHostGetFlags_params;
+
+typedef struct cuMemAllocManaged_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+ unsigned int flags;
+} cuMemAllocManaged_params;
+
+typedef struct cuDeviceRegisterAsyncNotification_params_st {
+ CUdevice device;
+ CUasyncCallback callbackFunc;
+ void *userData;
+ CUasyncCallbackHandle *callback;
+} cuDeviceRegisterAsyncNotification_params;
+
+typedef struct cuDeviceUnregisterAsyncNotification_params_st {
+ CUdevice device;
+ CUasyncCallbackHandle callback;
+} cuDeviceUnregisterAsyncNotification_params;
+
+typedef struct cuDeviceGetByPCIBusId_params_st {
+ CUdevice *dev;
+ const char *pciBusId;
+} cuDeviceGetByPCIBusId_params;
+
+typedef struct cuDeviceGetPCIBusId_params_st {
+ char *pciBusId;
+ int len;
+ CUdevice dev;
+} cuDeviceGetPCIBusId_params;
+
+typedef struct cuIpcGetEventHandle_params_st {
+ CUipcEventHandle *pHandle;
+ CUevent event;
+} cuIpcGetEventHandle_params;
+
+typedef struct cuIpcOpenEventHandle_params_st {
+ CUevent *phEvent;
+ CUipcEventHandle handle;
+} cuIpcOpenEventHandle_params;
+
+typedef struct cuIpcGetMemHandle_params_st {
+ CUipcMemHandle *pHandle;
+ CUdeviceptr dptr;
+} cuIpcGetMemHandle_params;
+
+typedef struct cuIpcOpenMemHandle_v2_params_st {
+ CUdeviceptr *pdptr;
+ CUipcMemHandle handle;
+ unsigned int Flags;
+} cuIpcOpenMemHandle_v2_params;
+
+typedef struct cuIpcCloseMemHandle_params_st {
+ CUdeviceptr dptr;
+} cuIpcCloseMemHandle_params;
+
+typedef struct cuMemHostRegister_v2_params_st {
+ void *p;
+ size_t bytesize;
+ unsigned int Flags;
+} cuMemHostRegister_v2_params;
+
+typedef struct cuMemHostUnregister_params_st {
+ void *p;
+} cuMemHostUnregister_params;
+
+typedef struct cuMemcpy_ptds_params_st {
+ CUdeviceptr dst;
+ CUdeviceptr src;
+ size_t ByteCount;
+} cuMemcpy_ptds_params;
+
+typedef struct cuMemcpyPeer_ptds_params_st {
+ CUdeviceptr dstDevice;
+ CUcontext dstContext;
+ CUdeviceptr srcDevice;
+ CUcontext srcContext;
+ size_t ByteCount;
+} cuMemcpyPeer_ptds_params;
+
+typedef struct cuMemcpyHtoD_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ const void *srcHost;
+ size_t ByteCount;
+} cuMemcpyHtoD_v2_ptds_params;
+
+typedef struct cuMemcpyDtoH_v2_ptds_params_st {
+ void *dstHost;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoH_v2_ptds_params;
+
+typedef struct cuMemcpyDtoD_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoD_v2_ptds_params;
+
+typedef struct cuMemcpyDtoA_v2_ptds_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoA_v2_ptds_params;
+
+typedef struct cuMemcpyAtoD_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoD_v2_ptds_params;
+
+typedef struct cuMemcpyHtoA_v2_ptds_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ const void *srcHost;
+ size_t ByteCount;
+} cuMemcpyHtoA_v2_ptds_params;
+
+typedef struct cuMemcpyAtoH_v2_ptds_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoH_v2_ptds_params;
+
+typedef struct cuMemcpyAtoA_v2_ptds_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoA_v2_ptds_params;
+
+typedef struct cuMemcpy2D_v2_ptds_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+} cuMemcpy2D_v2_ptds_params;
+
+typedef struct cuMemcpy2DUnaligned_v2_ptds_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+} cuMemcpy2DUnaligned_v2_ptds_params;
+
+typedef struct cuMemcpy3D_v2_ptds_params_st {
+ const CUDA_MEMCPY3D *pCopy;
+} cuMemcpy3D_v2_ptds_params;
+
+typedef struct cuMemcpy3DPeer_ptds_params_st {
+ const CUDA_MEMCPY3D_PEER *pCopy;
+} cuMemcpy3DPeer_ptds_params;
+
+typedef struct cuMemcpyAsync_ptsz_params_st {
+ CUdeviceptr dst;
+ CUdeviceptr src;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyAsync_ptsz_params;
+
+typedef struct cuMemcpyPeerAsync_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ CUcontext dstContext;
+ CUdeviceptr srcDevice;
+ CUcontext srcContext;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyPeerAsync_ptsz_params;
+
+typedef struct cuMemcpyHtoDAsync_v2_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ const void *srcHost;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoDAsync_v2_ptsz_params;
+
+typedef struct cuMemcpyDtoHAsync_v2_ptsz_params_st {
+ void *dstHost;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoHAsync_v2_ptsz_params;
+
+typedef struct cuMemcpyDtoDAsync_v2_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoDAsync_v2_ptsz_params;
+
+typedef struct cuMemcpyHtoAAsync_v2_ptsz_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ const void *srcHost;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoAAsync_v2_ptsz_params;
+
+typedef struct cuMemcpyAtoHAsync_v2_ptsz_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyAtoHAsync_v2_ptsz_params;
+
+typedef struct cuMemcpy2DAsync_v2_ptsz_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+ CUstream hStream;
+} cuMemcpy2DAsync_v2_ptsz_params;
+
+typedef struct cuMemcpy3DAsync_v2_ptsz_params_st {
+ const CUDA_MEMCPY3D *pCopy;
+ CUstream hStream;
+} cuMemcpy3DAsync_v2_ptsz_params;
+
+typedef struct cuMemcpy3DPeerAsync_ptsz_params_st {
+ const CUDA_MEMCPY3D_PEER *pCopy;
+ CUstream hStream;
+} cuMemcpy3DPeerAsync_ptsz_params;
+
+typedef struct cuMemcpyBatchAsync_ptsz_params_st {
+ CUdeviceptr *dsts;
+ CUdeviceptr *srcs;
+ size_t *sizes;
+ size_t count;
+ CUmemcpyAttributes *attrs;
+ size_t *attrsIdxs;
+ size_t numAttrs;
+ size_t *failIdx;
+ CUstream hStream;
+} cuMemcpyBatchAsync_ptsz_params;
+
+typedef struct cuMemcpy3DBatchAsync_ptsz_params_st {
+ size_t numOps;
+ CUDA_MEMCPY3D_BATCH_OP *opList;
+ size_t *failIdx;
+ unsigned long long flags;
+ CUstream hStream;
+} cuMemcpy3DBatchAsync_ptsz_params;
+
+typedef struct cuMemsetD8_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ unsigned char uc;
+ size_t N;
+} cuMemsetD8_v2_ptds_params;
+
+typedef struct cuMemsetD16_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ unsigned short us;
+ size_t N;
+} cuMemsetD16_v2_ptds_params;
+
+typedef struct cuMemsetD32_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ unsigned int ui;
+ size_t N;
+} cuMemsetD32_v2_ptds_params;
+
+typedef struct cuMemsetD2D8_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned char uc;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D8_v2_ptds_params;
+
+typedef struct cuMemsetD2D16_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned short us;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D16_v2_ptds_params;
+
+typedef struct cuMemsetD2D32_v2_ptds_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned int ui;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D32_v2_ptds_params;
+
+typedef struct cuMemsetD8Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ unsigned char uc;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD8Async_ptsz_params;
+
+typedef struct cuMemsetD16Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ unsigned short us;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD16Async_ptsz_params;
+
+typedef struct cuMemsetD32Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ unsigned int ui;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD32Async_ptsz_params;
+
+typedef struct cuMemsetD2D8Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned char uc;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D8Async_ptsz_params;
+
+typedef struct cuMemsetD2D16Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned short us;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D16Async_ptsz_params;
+
+typedef struct cuMemsetD2D32Async_ptsz_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned int ui;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D32Async_ptsz_params;
+
+typedef struct cuArrayCreate_v2_params_st {
+ CUarray *pHandle;
+ const CUDA_ARRAY_DESCRIPTOR *pAllocateArray;
+} cuArrayCreate_v2_params;
+
+typedef struct cuArrayGetDescriptor_v2_params_st {
+ CUDA_ARRAY_DESCRIPTOR *pArrayDescriptor;
+ CUarray hArray;
+} cuArrayGetDescriptor_v2_params;
+
+typedef struct cuArrayGetSparseProperties_params_st {
+ CUDA_ARRAY_SPARSE_PROPERTIES *sparseProperties;
+ CUarray array;
+} cuArrayGetSparseProperties_params;
+
+typedef struct cuMipmappedArrayGetSparseProperties_params_st {
+ CUDA_ARRAY_SPARSE_PROPERTIES *sparseProperties;
+ CUmipmappedArray mipmap;
+} cuMipmappedArrayGetSparseProperties_params;
+
+typedef struct cuArrayGetMemoryRequirements_params_st {
+ CUDA_ARRAY_MEMORY_REQUIREMENTS *memoryRequirements;
+ CUarray array;
+ CUdevice device;
+} cuArrayGetMemoryRequirements_params;
+
+typedef struct cuMipmappedArrayGetMemoryRequirements_params_st {
+ CUDA_ARRAY_MEMORY_REQUIREMENTS *memoryRequirements;
+ CUmipmappedArray mipmap;
+ CUdevice device;
+} cuMipmappedArrayGetMemoryRequirements_params;
+
+typedef struct cuArrayGetPlane_params_st {
+ CUarray *pPlaneArray;
+ CUarray hArray;
+ unsigned int planeIdx;
+} cuArrayGetPlane_params;
+
+typedef struct cuArrayDestroy_params_st {
+ CUarray hArray;
+} cuArrayDestroy_params;
+
+typedef struct cuArray3DCreate_v2_params_st {
+ CUarray *pHandle;
+ const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray;
+} cuArray3DCreate_v2_params;
+
+typedef struct cuArray3DGetDescriptor_v2_params_st {
+ CUDA_ARRAY3D_DESCRIPTOR *pArrayDescriptor;
+ CUarray hArray;
+} cuArray3DGetDescriptor_v2_params;
+
+typedef struct cuMipmappedArrayCreate_params_st {
+ CUmipmappedArray *pHandle;
+ const CUDA_ARRAY3D_DESCRIPTOR *pMipmappedArrayDesc;
+ unsigned int numMipmapLevels;
+} cuMipmappedArrayCreate_params;
+
+typedef struct cuMipmappedArrayGetLevel_params_st {
+ CUarray *pLevelArray;
+ CUmipmappedArray hMipmappedArray;
+ unsigned int level;
+} cuMipmappedArrayGetLevel_params;
+
+typedef struct cuMipmappedArrayDestroy_params_st {
+ CUmipmappedArray hMipmappedArray;
+} cuMipmappedArrayDestroy_params;
+
+typedef struct cuMemGetHandleForAddressRange_params_st {
+ void *handle;
+ CUdeviceptr dptr;
+ size_t size;
+ CUmemRangeHandleType handleType;
+ unsigned long long flags;
+} cuMemGetHandleForAddressRange_params;
+
+typedef struct cuMemBatchDecompressAsync_ptsz_params_st {
+ CUmemDecompressParams *paramsArray;
+ size_t count;
+ unsigned int flags;
+ size_t *errorIndex;
+ CUstream stream;
+} cuMemBatchDecompressAsync_ptsz_params;
+
+typedef struct cuMemAddressReserve_params_st {
+ CUdeviceptr *ptr;
+ size_t size;
+ size_t alignment;
+ CUdeviceptr addr;
+ unsigned long long flags;
+} cuMemAddressReserve_params;
+
+typedef struct cuMemAddressFree_params_st {
+ CUdeviceptr ptr;
+ size_t size;
+} cuMemAddressFree_params;
+
+typedef struct cuMemCreate_params_st {
+ CUmemGenericAllocationHandle *handle;
+ size_t size;
+ const CUmemAllocationProp *prop;
+ unsigned long long flags;
+} cuMemCreate_params;
+
+typedef struct cuMemRelease_params_st {
+ CUmemGenericAllocationHandle handle;
+} cuMemRelease_params;
+
+typedef struct cuMemMap_params_st {
+ CUdeviceptr ptr;
+ size_t size;
+ size_t offset;
+ CUmemGenericAllocationHandle handle;
+ unsigned long long flags;
+} cuMemMap_params;
+
+typedef struct cuMemMapArrayAsync_ptsz_params_st {
+ CUarrayMapInfo *mapInfoList;
+ unsigned int count;
+ CUstream hStream;
+} cuMemMapArrayAsync_ptsz_params;
+
+typedef struct cuMemUnmap_params_st {
+ CUdeviceptr ptr;
+ size_t size;
+} cuMemUnmap_params;
+
+typedef struct cuMemSetAccess_params_st {
+ CUdeviceptr ptr;
+ size_t size;
+ const CUmemAccessDesc *desc;
+ size_t count;
+} cuMemSetAccess_params;
+
+typedef struct cuMemGetAccess_params_st {
+ unsigned long long *flags;
+ const CUmemLocation *location;
+ CUdeviceptr ptr;
+} cuMemGetAccess_params;
+
+typedef struct cuMemExportToShareableHandle_params_st {
+ void *shareableHandle;
+ CUmemGenericAllocationHandle handle;
+ CUmemAllocationHandleType handleType;
+ unsigned long long flags;
+} cuMemExportToShareableHandle_params;
+
+typedef struct cuMemImportFromShareableHandle_params_st {
+ CUmemGenericAllocationHandle *handle;
+ void *osHandle;
+ CUmemAllocationHandleType shHandleType;
+} cuMemImportFromShareableHandle_params;
+
+typedef struct cuMemGetAllocationGranularity_params_st {
+ size_t *granularity;
+ const CUmemAllocationProp *prop;
+ CUmemAllocationGranularity_flags option;
+} cuMemGetAllocationGranularity_params;
+
+typedef struct cuMemGetAllocationPropertiesFromHandle_params_st {
+ CUmemAllocationProp *prop;
+ CUmemGenericAllocationHandle handle;
+} cuMemGetAllocationPropertiesFromHandle_params;
+
+typedef struct cuMemRetainAllocationHandle_params_st {
+ CUmemGenericAllocationHandle *handle;
+ void *addr;
+} cuMemRetainAllocationHandle_params;
+
+typedef struct cuMemFreeAsync_ptsz_params_st {
+ CUdeviceptr dptr;
+ CUstream hStream;
+} cuMemFreeAsync_ptsz_params;
+
+typedef struct cuMemAllocAsync_ptsz_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+ CUstream hStream;
+} cuMemAllocAsync_ptsz_params;
+
+typedef struct cuMemPoolTrimTo_params_st {
+ CUmemoryPool pool;
+ size_t minBytesToKeep;
+} cuMemPoolTrimTo_params;
+
+typedef struct cuMemPoolSetAttribute_params_st {
+ CUmemoryPool pool;
+ CUmemPool_attribute attr;
+ void *value;
+} cuMemPoolSetAttribute_params;
+
+typedef struct cuMemPoolGetAttribute_params_st {
+ CUmemoryPool pool;
+ CUmemPool_attribute attr;
+ void *value;
+} cuMemPoolGetAttribute_params;
+
+typedef struct cuMemPoolSetAccess_params_st {
+ CUmemoryPool pool;
+ const CUmemAccessDesc *map;
+ size_t count;
+} cuMemPoolSetAccess_params;
+
+typedef struct cuMemPoolGetAccess_params_st {
+ CUmemAccess_flags *flags;
+ CUmemoryPool memPool;
+ CUmemLocation *location;
+} cuMemPoolGetAccess_params;
+
+typedef struct cuMemPoolCreate_params_st {
+ CUmemoryPool *pool;
+ const CUmemPoolProps *poolProps;
+} cuMemPoolCreate_params;
+
+typedef struct cuMemPoolDestroy_params_st {
+ CUmemoryPool pool;
+} cuMemPoolDestroy_params;
+
+typedef struct cuMemAllocFromPoolAsync_ptsz_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+ CUmemoryPool pool;
+ CUstream hStream;
+} cuMemAllocFromPoolAsync_ptsz_params;
+
+typedef struct cuMemPoolExportToShareableHandle_params_st {
+ void *handle_out;
+ CUmemoryPool pool;
+ CUmemAllocationHandleType handleType;
+ unsigned long long flags;
+} cuMemPoolExportToShareableHandle_params;
+
+typedef struct cuMemPoolImportFromShareableHandle_params_st {
+ CUmemoryPool *pool_out;
+ void *handle;
+ CUmemAllocationHandleType handleType;
+ unsigned long long flags;
+} cuMemPoolImportFromShareableHandle_params;
+
+typedef struct cuMemPoolExportPointer_params_st {
+ CUmemPoolPtrExportData *shareData_out;
+ CUdeviceptr ptr;
+} cuMemPoolExportPointer_params;
+
+typedef struct cuMemPoolImportPointer_params_st {
+ CUdeviceptr *ptr_out;
+ CUmemoryPool pool;
+ CUmemPoolPtrExportData *shareData;
+} cuMemPoolImportPointer_params;
+
+typedef struct cuMulticastCreate_params_st {
+ CUmemGenericAllocationHandle *mcHandle;
+ const CUmulticastObjectProp *prop;
+} cuMulticastCreate_params;
+
+typedef struct cuMulticastAddDevice_params_st {
+ CUmemGenericAllocationHandle mcHandle;
+ CUdevice dev;
+} cuMulticastAddDevice_params;
+
+typedef struct cuMulticastBindMem_params_st {
+ CUmemGenericAllocationHandle mcHandle;
+ size_t mcOffset;
+ CUmemGenericAllocationHandle memHandle;
+ size_t memOffset;
+ size_t size;
+ unsigned long long flags;
+} cuMulticastBindMem_params;
+
+typedef struct cuMulticastBindAddr_params_st {
+ CUmemGenericAllocationHandle mcHandle;
+ size_t mcOffset;
+ CUdeviceptr memptr;
+ size_t size;
+ unsigned long long flags;
+} cuMulticastBindAddr_params;
+
+typedef struct cuMulticastUnbind_params_st {
+ CUmemGenericAllocationHandle mcHandle;
+ CUdevice dev;
+ size_t mcOffset;
+ size_t size;
+} cuMulticastUnbind_params;
+
+typedef struct cuMulticastGetGranularity_params_st {
+ size_t *granularity;
+ const CUmulticastObjectProp *prop;
+ CUmulticastGranularity_flags option;
+} cuMulticastGetGranularity_params;
+
+typedef struct cuPointerGetAttribute_params_st {
+ void *data;
+ CUpointer_attribute attribute;
+ CUdeviceptr ptr;
+} cuPointerGetAttribute_params;
+
+typedef struct cuMemPrefetchAsync_ptsz_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUdevice dstDevice;
+ CUstream hStream;
+} cuMemPrefetchAsync_ptsz_params;
+
+typedef struct cuMemPrefetchAsync_v2_ptsz_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUmemLocation location;
+ unsigned int flags;
+ CUstream hStream;
+} cuMemPrefetchAsync_v2_ptsz_params;
+
+typedef struct cuMemAdvise_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUmem_advise advice;
+ CUdevice device;
+} cuMemAdvise_params;
+
+typedef struct cuMemAdvise_v2_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUmem_advise advice;
+ CUmemLocation location;
+} cuMemAdvise_v2_params;
+
+typedef struct cuMemRangeGetAttribute_params_st {
+ void *data;
+ size_t dataSize;
+ CUmem_range_attribute attribute;
+ CUdeviceptr devPtr;
+ size_t count;
+} cuMemRangeGetAttribute_params;
+
+typedef struct cuMemRangeGetAttributes_params_st {
+ void **data;
+ size_t *dataSizes;
+ CUmem_range_attribute *attributes;
+ size_t numAttributes;
+ CUdeviceptr devPtr;
+ size_t count;
+} cuMemRangeGetAttributes_params;
+
+typedef struct cuPointerSetAttribute_params_st {
+ const void *value;
+ CUpointer_attribute attribute;
+ CUdeviceptr ptr;
+} cuPointerSetAttribute_params;
+
+typedef struct cuPointerGetAttributes_params_st {
+ unsigned int numAttributes;
+ CUpointer_attribute *attributes;
+ void **data;
+ CUdeviceptr ptr;
+} cuPointerGetAttributes_params;
+
+typedef struct cuStreamCreate_params_st {
+ CUstream *phStream;
+ unsigned int Flags;
+} cuStreamCreate_params;
+
+typedef struct cuStreamCreateWithPriority_params_st {
+ CUstream *phStream;
+ unsigned int flags;
+ int priority;
+} cuStreamCreateWithPriority_params;
+
+typedef struct cuStreamGetPriority_ptsz_params_st {
+ CUstream hStream;
+ int *priority;
+} cuStreamGetPriority_ptsz_params;
+
+typedef struct cuStreamGetDevice_ptsz_params_st {
+ CUstream hStream;
+ CUdevice *device;
+} cuStreamGetDevice_ptsz_params;
+
+typedef struct cuStreamGetFlags_ptsz_params_st {
+ CUstream hStream;
+ unsigned int *flags;
+} cuStreamGetFlags_ptsz_params;
+
+typedef struct cuStreamGetId_ptsz_params_st {
+ CUstream hStream;
+ unsigned long long *streamId;
+} cuStreamGetId_ptsz_params;
+
+typedef struct cuStreamGetCtx_ptsz_params_st {
+ CUstream hStream;
+ CUcontext *pctx;
+} cuStreamGetCtx_ptsz_params;
+
+typedef struct cuStreamGetCtx_v2_ptsz_params_st {
+ CUstream hStream;
+ CUcontext *pCtx;
+ CUgreenCtx *pGreenCtx;
+} cuStreamGetCtx_v2_ptsz_params;
+
+typedef struct cuStreamWaitEvent_ptsz_params_st {
+ CUstream hStream;
+ CUevent hEvent;
+ unsigned int Flags;
+} cuStreamWaitEvent_ptsz_params;
+
+typedef struct cuStreamAddCallback_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCallback callback;
+ void *userData;
+ unsigned int flags;
+} cuStreamAddCallback_ptsz_params;
+
+typedef struct cuStreamBeginCapture_v2_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCaptureMode mode;
+} cuStreamBeginCapture_v2_ptsz_params;
+
+typedef struct cuStreamBeginCaptureToGraph_ptsz_params_st {
+ CUstream hStream;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ const CUgraphEdgeData *dependencyData;
+ size_t numDependencies;
+ CUstreamCaptureMode mode;
+} cuStreamBeginCaptureToGraph_ptsz_params;
+
+typedef struct cuThreadExchangeStreamCaptureMode_params_st {
+ CUstreamCaptureMode *mode;
+} cuThreadExchangeStreamCaptureMode_params;
+
+typedef struct cuStreamEndCapture_ptsz_params_st {
+ CUstream hStream;
+ CUgraph *phGraph;
+} cuStreamEndCapture_ptsz_params;
+
+typedef struct cuStreamIsCapturing_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus;
+} cuStreamIsCapturing_ptsz_params;
+
+typedef struct cuStreamGetCaptureInfo_v2_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+ CUgraph *graph_out;
+ const CUgraphNode **dependencies_out;
+ size_t *numDependencies_out;
+} cuStreamGetCaptureInfo_v2_ptsz_params;
+
+typedef struct cuStreamGetCaptureInfo_v3_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+ CUgraph *graph_out;
+ const CUgraphNode **dependencies_out;
+ const CUgraphEdgeData **edgeData_out;
+ size_t *numDependencies_out;
+} cuStreamGetCaptureInfo_v3_ptsz_params;
+
+typedef struct cuStreamUpdateCaptureDependencies_ptsz_params_st {
+ CUstream hStream;
+ CUgraphNode *dependencies;
+ size_t numDependencies;
+ unsigned int flags;
+} cuStreamUpdateCaptureDependencies_ptsz_params;
+
+typedef struct cuStreamUpdateCaptureDependencies_v2_ptsz_params_st {
+ CUstream hStream;
+ CUgraphNode *dependencies;
+ const CUgraphEdgeData *dependencyData;
+ size_t numDependencies;
+ unsigned int flags;
+} cuStreamUpdateCaptureDependencies_v2_ptsz_params;
+
+typedef struct cuStreamAttachMemAsync_ptsz_params_st {
+ CUstream hStream;
+ CUdeviceptr dptr;
+ size_t length;
+ unsigned int flags;
+} cuStreamAttachMemAsync_ptsz_params;
+
+typedef struct cuStreamQuery_ptsz_params_st {
+ CUstream hStream;
+} cuStreamQuery_ptsz_params;
+
+typedef struct cuStreamSynchronize_ptsz_params_st {
+ CUstream hStream;
+} cuStreamSynchronize_ptsz_params;
+
+typedef struct cuStreamDestroy_v2_params_st {
+ CUstream hStream;
+} cuStreamDestroy_v2_params;
+
+typedef struct cuStreamCopyAttributes_ptsz_params_st {
+ CUstream dst;
+ CUstream src;
+} cuStreamCopyAttributes_ptsz_params;
+
+typedef struct cuStreamGetAttribute_ptsz_params_st {
+ CUstream hStream;
+ CUstreamAttrID attr;
+ CUstreamAttrValue *value_out;
+} cuStreamGetAttribute_ptsz_params;
+
+typedef struct cuStreamSetAttribute_ptsz_params_st {
+ CUstream hStream;
+ CUstreamAttrID attr;
+ const CUstreamAttrValue *value;
+} cuStreamSetAttribute_ptsz_params;
+
+typedef struct cuEventCreate_params_st {
+ CUevent *phEvent;
+ unsigned int Flags;
+} cuEventCreate_params;
+
+typedef struct cuEventRecord_ptsz_params_st {
+ CUevent hEvent;
+ CUstream hStream;
+} cuEventRecord_ptsz_params;
+
+typedef struct cuEventRecordWithFlags_ptsz_params_st {
+ CUevent hEvent;
+ CUstream hStream;
+ unsigned int flags;
+} cuEventRecordWithFlags_ptsz_params;
+
+typedef struct cuEventQuery_params_st {
+ CUevent hEvent;
+} cuEventQuery_params;
+
+typedef struct cuEventSynchronize_params_st {
+ CUevent hEvent;
+} cuEventSynchronize_params;
+
+typedef struct cuEventDestroy_v2_params_st {
+ CUevent hEvent;
+} cuEventDestroy_v2_params;
+
+typedef struct cuEventElapsedTime_params_st {
+ float *pMilliseconds;
+ CUevent hStart;
+ CUevent hEnd;
+} cuEventElapsedTime_params;
+
+typedef struct cuEventElapsedTime_v2_params_st {
+ float *pMilliseconds;
+ CUevent hStart;
+ CUevent hEnd;
+} cuEventElapsedTime_v2_params;
+
+typedef struct cuImportExternalMemory_params_st {
+ CUexternalMemory *extMem_out;
+ const CUDA_EXTERNAL_MEMORY_HANDLE_DESC *memHandleDesc;
+} cuImportExternalMemory_params;
+
+typedef struct cuExternalMemoryGetMappedBuffer_params_st {
+ CUdeviceptr *devPtr;
+ CUexternalMemory extMem;
+ const CUDA_EXTERNAL_MEMORY_BUFFER_DESC *bufferDesc;
+} cuExternalMemoryGetMappedBuffer_params;
+
+typedef struct cuExternalMemoryGetMappedMipmappedArray_params_st {
+ CUmipmappedArray *mipmap;
+ CUexternalMemory extMem;
+ const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *mipmapDesc;
+} cuExternalMemoryGetMappedMipmappedArray_params;
+
+typedef struct cuDestroyExternalMemory_params_st {
+ CUexternalMemory extMem;
+} cuDestroyExternalMemory_params;
+
+typedef struct cuImportExternalSemaphore_params_st {
+ CUexternalSemaphore *extSem_out;
+ const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *semHandleDesc;
+} cuImportExternalSemaphore_params;
+
+typedef struct cuSignalExternalSemaphoresAsync_ptsz_params_st {
+ const CUexternalSemaphore *extSemArray;
+ const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *paramsArray;
+ unsigned int numExtSems;
+ CUstream stream;
+} cuSignalExternalSemaphoresAsync_ptsz_params;
+
+typedef struct cuWaitExternalSemaphoresAsync_ptsz_params_st {
+ const CUexternalSemaphore *extSemArray;
+ const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *paramsArray;
+ unsigned int numExtSems;
+ CUstream stream;
+} cuWaitExternalSemaphoresAsync_ptsz_params;
+
+typedef struct cuDestroyExternalSemaphore_params_st {
+ CUexternalSemaphore extSem;
+} cuDestroyExternalSemaphore_params;
+
+typedef struct cuStreamWaitValue32_v2_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWaitValue32_v2_ptsz_params;
+
+typedef struct cuStreamWaitValue64_v2_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWaitValue64_v2_ptsz_params;
+
+typedef struct cuStreamWriteValue32_v2_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWriteValue32_v2_ptsz_params;
+
+typedef struct cuStreamWriteValue64_v2_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWriteValue64_v2_ptsz_params;
+
+typedef struct cuStreamBatchMemOp_v2_ptsz_params_st {
+ CUstream stream;
+ unsigned int count;
+ CUstreamBatchMemOpParams *paramArray;
+ unsigned int flags;
+} cuStreamBatchMemOp_v2_ptsz_params;
+
+typedef struct cuFuncGetAttribute_params_st {
+ int *pi;
+ CUfunction_attribute attrib;
+ CUfunction hfunc;
+} cuFuncGetAttribute_params;
+
+typedef struct cuFuncSetAttribute_params_st {
+ CUfunction hfunc;
+ CUfunction_attribute attrib;
+ int value;
+} cuFuncSetAttribute_params;
+
+typedef struct cuFuncSetCacheConfig_params_st {
+ CUfunction hfunc;
+ CUfunc_cache config;
+} cuFuncSetCacheConfig_params;
+
+typedef struct cuFuncGetModule_params_st {
+ CUmodule *hmod;
+ CUfunction hfunc;
+} cuFuncGetModule_params;
+
+typedef struct cuFuncGetName_params_st {
+ const char **name;
+ CUfunction hfunc;
+} cuFuncGetName_params;
+
+typedef struct cuFuncGetParamInfo_params_st {
+ CUfunction func;
+ size_t paramIndex;
+ size_t *paramOffset;
+ size_t *paramSize;
+} cuFuncGetParamInfo_params;
+
+typedef struct cuFuncIsLoaded_params_st {
+ CUfunctionLoadingState *state;
+ CUfunction function;
+} cuFuncIsLoaded_params;
+
+typedef struct cuFuncLoad_params_st {
+ CUfunction function;
+} cuFuncLoad_params;
+
+typedef struct cuLaunchKernel_ptsz_params_st {
+ CUfunction f;
+ unsigned int gridDimX;
+ unsigned int gridDimY;
+ unsigned int gridDimZ;
+ unsigned int blockDimX;
+ unsigned int blockDimY;
+ unsigned int blockDimZ;
+ unsigned int sharedMemBytes;
+ CUstream hStream;
+ void **kernelParams;
+ void **extra;
+} cuLaunchKernel_ptsz_params;
+
+typedef struct cuLaunchKernelEx_ptsz_params_st {
+ const CUlaunchConfig *config;
+ CUfunction f;
+ void **kernelParams;
+ void **extra;
+} cuLaunchKernelEx_ptsz_params;
+
+typedef struct cuLaunchCooperativeKernel_ptsz_params_st {
+ CUfunction f;
+ unsigned int gridDimX;
+ unsigned int gridDimY;
+ unsigned int gridDimZ;
+ unsigned int blockDimX;
+ unsigned int blockDimY;
+ unsigned int blockDimZ;
+ unsigned int sharedMemBytes;
+ CUstream hStream;
+ void **kernelParams;
+} cuLaunchCooperativeKernel_ptsz_params;
+
+typedef struct cuLaunchCooperativeKernelMultiDevice_params_st {
+ CUDA_LAUNCH_PARAMS *launchParamsList;
+ unsigned int numDevices;
+ unsigned int flags;
+} cuLaunchCooperativeKernelMultiDevice_params;
+
+typedef struct cuLaunchHostFunc_ptsz_params_st {
+ CUstream hStream;
+ CUhostFn fn;
+ void *userData;
+} cuLaunchHostFunc_ptsz_params;
+
+typedef struct cuFuncSetBlockShape_params_st {
+ CUfunction hfunc;
+ int x;
+ int y;
+ int z;
+} cuFuncSetBlockShape_params;
+
+typedef struct cuFuncSetSharedSize_params_st {
+ CUfunction hfunc;
+ unsigned int bytes;
+} cuFuncSetSharedSize_params;
+
+typedef struct cuParamSetSize_params_st {
+ CUfunction hfunc;
+ unsigned int numbytes;
+} cuParamSetSize_params;
+
+typedef struct cuParamSeti_params_st {
+ CUfunction hfunc;
+ int offset;
+ unsigned int value;
+} cuParamSeti_params;
+
+typedef struct cuParamSetf_params_st {
+ CUfunction hfunc;
+ int offset;
+ float value;
+} cuParamSetf_params;
+
+typedef struct cuParamSetv_params_st {
+ CUfunction hfunc;
+ int offset;
+ void *ptr;
+ unsigned int numbytes;
+} cuParamSetv_params;
+
+typedef struct cuLaunch_params_st {
+ CUfunction f;
+} cuLaunch_params;
+
+typedef struct cuLaunchGrid_params_st {
+ CUfunction f;
+ int grid_width;
+ int grid_height;
+} cuLaunchGrid_params;
+
+typedef struct cuLaunchGridAsync_params_st {
+ CUfunction f;
+ int grid_width;
+ int grid_height;
+ CUstream hStream;
+} cuLaunchGridAsync_params;
+
+typedef struct cuParamSetTexRef_params_st {
+ CUfunction hfunc;
+ int texunit;
+ CUtexref hTexRef;
+} cuParamSetTexRef_params;
+
+typedef struct cuFuncSetSharedMemConfig_params_st {
+ CUfunction hfunc;
+ CUsharedconfig config;
+} cuFuncSetSharedMemConfig_params;
+
+typedef struct cuGraphCreate_params_st {
+ CUgraph *phGraph;
+ unsigned int flags;
+} cuGraphCreate_params;
+
+typedef struct cuGraphAddKernelNode_v2_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_KERNEL_NODE_PARAMS *nodeParams;
+} cuGraphAddKernelNode_v2_params;
+
+typedef struct cuGraphKernelNodeGetParams_v2_params_st {
+ CUgraphNode hNode;
+ CUDA_KERNEL_NODE_PARAMS *nodeParams;
+} cuGraphKernelNodeGetParams_v2_params;
+
+typedef struct cuGraphKernelNodeSetParams_v2_params_st {
+ CUgraphNode hNode;
+ const CUDA_KERNEL_NODE_PARAMS *nodeParams;
+} cuGraphKernelNodeSetParams_v2_params;
+
+typedef struct cuGraphAddMemcpyNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_MEMCPY3D *copyParams;
+ CUcontext ctx;
+} cuGraphAddMemcpyNode_params;
+
+typedef struct cuGraphMemcpyNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_MEMCPY3D *nodeParams;
+} cuGraphMemcpyNodeGetParams_params;
+
+typedef struct cuGraphMemcpyNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_MEMCPY3D *nodeParams;
+} cuGraphMemcpyNodeSetParams_params;
+
+typedef struct cuGraphAddMemsetNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_MEMSET_NODE_PARAMS *memsetParams;
+ CUcontext ctx;
+} cuGraphAddMemsetNode_params;
+
+typedef struct cuGraphMemsetNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_MEMSET_NODE_PARAMS *nodeParams;
+} cuGraphMemsetNodeGetParams_params;
+
+typedef struct cuGraphMemsetNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_MEMSET_NODE_PARAMS *nodeParams;
+} cuGraphMemsetNodeSetParams_params;
+
+typedef struct cuGraphAddHostNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_HOST_NODE_PARAMS *nodeParams;
+} cuGraphAddHostNode_params;
+
+typedef struct cuGraphHostNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_HOST_NODE_PARAMS *nodeParams;
+} cuGraphHostNodeGetParams_params;
+
+typedef struct cuGraphHostNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_HOST_NODE_PARAMS *nodeParams;
+} cuGraphHostNodeSetParams_params;
+
+typedef struct cuGraphAddChildGraphNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUgraph childGraph;
+} cuGraphAddChildGraphNode_params;
+
+typedef struct cuGraphChildGraphNodeGetGraph_params_st {
+ CUgraphNode hNode;
+ CUgraph *phGraph;
+} cuGraphChildGraphNodeGetGraph_params;
+
+typedef struct cuGraphAddEmptyNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+} cuGraphAddEmptyNode_params;
+
+typedef struct cuGraphAddEventRecordNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUevent event;
+} cuGraphAddEventRecordNode_params;
+
+typedef struct cuGraphEventRecordNodeGetEvent_params_st {
+ CUgraphNode hNode;
+ CUevent *event_out;
+} cuGraphEventRecordNodeGetEvent_params;
+
+typedef struct cuGraphEventRecordNodeSetEvent_params_st {
+ CUgraphNode hNode;
+ CUevent event;
+} cuGraphEventRecordNodeSetEvent_params;
+
+typedef struct cuGraphAddEventWaitNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUevent event;
+} cuGraphAddEventWaitNode_params;
+
+typedef struct cuGraphEventWaitNodeGetEvent_params_st {
+ CUgraphNode hNode;
+ CUevent *event_out;
+} cuGraphEventWaitNodeGetEvent_params;
+
+typedef struct cuGraphEventWaitNodeSetEvent_params_st {
+ CUgraphNode hNode;
+ CUevent event;
+} cuGraphEventWaitNodeSetEvent_params;
+
+typedef struct cuGraphAddExternalSemaphoresSignalNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *nodeParams;
+} cuGraphAddExternalSemaphoresSignalNode_params;
+
+typedef struct cuGraphExternalSemaphoresSignalNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *params_out;
+} cuGraphExternalSemaphoresSignalNodeGetParams_params;
+
+typedef struct cuGraphExternalSemaphoresSignalNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *nodeParams;
+} cuGraphExternalSemaphoresSignalNodeSetParams_params;
+
+typedef struct cuGraphAddExternalSemaphoresWaitNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_EXT_SEM_WAIT_NODE_PARAMS *nodeParams;
+} cuGraphAddExternalSemaphoresWaitNode_params;
+
+typedef struct cuGraphExternalSemaphoresWaitNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_EXT_SEM_WAIT_NODE_PARAMS *params_out;
+} cuGraphExternalSemaphoresWaitNodeGetParams_params;
+
+typedef struct cuGraphExternalSemaphoresWaitNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_EXT_SEM_WAIT_NODE_PARAMS *nodeParams;
+} cuGraphExternalSemaphoresWaitNodeSetParams_params;
+
+typedef struct cuGraphAddBatchMemOpNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_BATCH_MEM_OP_NODE_PARAMS *nodeParams;
+} cuGraphAddBatchMemOpNode_params;
+
+typedef struct cuGraphBatchMemOpNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_BATCH_MEM_OP_NODE_PARAMS *nodeParams_out;
+} cuGraphBatchMemOpNodeGetParams_params;
+
+typedef struct cuGraphBatchMemOpNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_BATCH_MEM_OP_NODE_PARAMS *nodeParams;
+} cuGraphBatchMemOpNodeSetParams_params;
+
+typedef struct cuGraphExecBatchMemOpNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_BATCH_MEM_OP_NODE_PARAMS *nodeParams;
+} cuGraphExecBatchMemOpNodeSetParams_params;
+
+typedef struct cuGraphAddMemAllocNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUDA_MEM_ALLOC_NODE_PARAMS *nodeParams;
+} cuGraphAddMemAllocNode_params;
+
+typedef struct cuGraphMemAllocNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_MEM_ALLOC_NODE_PARAMS *params_out;
+} cuGraphMemAllocNodeGetParams_params;
+
+typedef struct cuGraphAddMemFreeNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUdeviceptr dptr;
+} cuGraphAddMemFreeNode_params;
+
+typedef struct cuGraphMemFreeNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUdeviceptr *dptr_out;
+} cuGraphMemFreeNodeGetParams_params;
+
+typedef struct cuDeviceGraphMemTrim_params_st {
+ CUdevice device;
+} cuDeviceGraphMemTrim_params;
+
+typedef struct cuDeviceGetGraphMemAttribute_params_st {
+ CUdevice device;
+ CUgraphMem_attribute attr;
+ void *value;
+} cuDeviceGetGraphMemAttribute_params;
+
+typedef struct cuDeviceSetGraphMemAttribute_params_st {
+ CUdevice device;
+ CUgraphMem_attribute attr;
+ void *value;
+} cuDeviceSetGraphMemAttribute_params;
+
+typedef struct cuGraphClone_params_st {
+ CUgraph *phGraphClone;
+ CUgraph originalGraph;
+} cuGraphClone_params;
+
+typedef struct cuGraphNodeFindInClone_params_st {
+ CUgraphNode *phNode;
+ CUgraphNode hOriginalNode;
+ CUgraph hClonedGraph;
+} cuGraphNodeFindInClone_params;
+
+typedef struct cuGraphNodeGetType_params_st {
+ CUgraphNode hNode;
+ CUgraphNodeType *type;
+} cuGraphNodeGetType_params;
+
+typedef struct cuGraphGetNodes_params_st {
+ CUgraph hGraph;
+ CUgraphNode *nodes;
+ size_t *numNodes;
+} cuGraphGetNodes_params;
+
+typedef struct cuGraphGetRootNodes_params_st {
+ CUgraph hGraph;
+ CUgraphNode *rootNodes;
+ size_t *numRootNodes;
+} cuGraphGetRootNodes_params;
+
+typedef struct cuGraphGetEdges_params_st {
+ CUgraph hGraph;
+ CUgraphNode *from;
+ CUgraphNode *to;
+ size_t *numEdges;
+} cuGraphGetEdges_params;
+
+typedef struct cuGraphGetEdges_v2_params_st {
+ CUgraph hGraph;
+ CUgraphNode *from;
+ CUgraphNode *to;
+ CUgraphEdgeData *edgeData;
+ size_t *numEdges;
+} cuGraphGetEdges_v2_params;
+
+typedef struct cuGraphNodeGetDependencies_params_st {
+ CUgraphNode hNode;
+ CUgraphNode *dependencies;
+ size_t *numDependencies;
+} cuGraphNodeGetDependencies_params;
+
+typedef struct cuGraphNodeGetDependencies_v2_params_st {
+ CUgraphNode hNode;
+ CUgraphNode *dependencies;
+ CUgraphEdgeData *edgeData;
+ size_t *numDependencies;
+} cuGraphNodeGetDependencies_v2_params;
+
+typedef struct cuGraphNodeGetDependentNodes_params_st {
+ CUgraphNode hNode;
+ CUgraphNode *dependentNodes;
+ size_t *numDependentNodes;
+} cuGraphNodeGetDependentNodes_params;
+
+typedef struct cuGraphNodeGetDependentNodes_v2_params_st {
+ CUgraphNode hNode;
+ CUgraphNode *dependentNodes;
+ CUgraphEdgeData *edgeData;
+ size_t *numDependentNodes;
+} cuGraphNodeGetDependentNodes_v2_params;
+
+typedef struct cuGraphAddDependencies_params_st {
+ CUgraph hGraph;
+ const CUgraphNode *from;
+ const CUgraphNode *to;
+ size_t numDependencies;
+} cuGraphAddDependencies_params;
+
+typedef struct cuGraphAddDependencies_v2_params_st {
+ CUgraph hGraph;
+ const CUgraphNode *from;
+ const CUgraphNode *to;
+ const CUgraphEdgeData *edgeData;
+ size_t numDependencies;
+} cuGraphAddDependencies_v2_params;
+
+typedef struct cuGraphRemoveDependencies_params_st {
+ CUgraph hGraph;
+ const CUgraphNode *from;
+ const CUgraphNode *to;
+ size_t numDependencies;
+} cuGraphRemoveDependencies_params;
+
+typedef struct cuGraphRemoveDependencies_v2_params_st {
+ CUgraph hGraph;
+ const CUgraphNode *from;
+ const CUgraphNode *to;
+ const CUgraphEdgeData *edgeData;
+ size_t numDependencies;
+} cuGraphRemoveDependencies_v2_params;
+
+typedef struct cuGraphDestroyNode_params_st {
+ CUgraphNode hNode;
+} cuGraphDestroyNode_params;
+
+typedef struct cuGraphInstantiateWithFlags_params_st {
+ CUgraphExec *phGraphExec;
+ CUgraph hGraph;
+ unsigned long long flags;
+} cuGraphInstantiateWithFlags_params;
+
+typedef struct cuGraphInstantiateWithParams_ptsz_params_st {
+ CUgraphExec *phGraphExec;
+ CUgraph hGraph;
+ CUDA_GRAPH_INSTANTIATE_PARAMS *instantiateParams;
+} cuGraphInstantiateWithParams_ptsz_params;
+
+typedef struct cuGraphExecGetFlags_params_st {
+ CUgraphExec hGraphExec;
+ cuuint64_t *flags;
+} cuGraphExecGetFlags_params;
+
+typedef struct cuGraphExecKernelNodeSetParams_v2_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_KERNEL_NODE_PARAMS *nodeParams;
+} cuGraphExecKernelNodeSetParams_v2_params;
+
+typedef struct cuGraphExecMemcpyNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_MEMCPY3D *copyParams;
+ CUcontext ctx;
+} cuGraphExecMemcpyNodeSetParams_params;
+
+typedef struct cuGraphExecMemsetNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_MEMSET_NODE_PARAMS *memsetParams;
+ CUcontext ctx;
+} cuGraphExecMemsetNodeSetParams_params;
+
+typedef struct cuGraphExecHostNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_HOST_NODE_PARAMS *nodeParams;
+} cuGraphExecHostNodeSetParams_params;
+
+typedef struct cuGraphExecChildGraphNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ CUgraph childGraph;
+} cuGraphExecChildGraphNodeSetParams_params;
+
+typedef struct cuGraphExecEventRecordNodeSetEvent_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ CUevent event;
+} cuGraphExecEventRecordNodeSetEvent_params;
+
+typedef struct cuGraphExecEventWaitNodeSetEvent_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ CUevent event;
+} cuGraphExecEventWaitNodeSetEvent_params;
+
+typedef struct cuGraphExecExternalSemaphoresSignalNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *nodeParams;
+} cuGraphExecExternalSemaphoresSignalNodeSetParams_params;
+
+typedef struct cuGraphExecExternalSemaphoresWaitNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_EXT_SEM_WAIT_NODE_PARAMS *nodeParams;
+} cuGraphExecExternalSemaphoresWaitNodeSetParams_params;
+
+typedef struct cuGraphNodeSetEnabled_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ unsigned int isEnabled;
+} cuGraphNodeSetEnabled_params;
+
+typedef struct cuGraphNodeGetEnabled_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ unsigned int *isEnabled;
+} cuGraphNodeGetEnabled_params;
+
+typedef struct cuGraphUpload_ptsz_params_st {
+ CUgraphExec hGraphExec;
+ CUstream hStream;
+} cuGraphUpload_ptsz_params;
+
+typedef struct cuGraphLaunch_ptsz_params_st {
+ CUgraphExec hGraphExec;
+ CUstream hStream;
+} cuGraphLaunch_ptsz_params;
+
+typedef struct cuGraphExecDestroy_params_st {
+ CUgraphExec hGraphExec;
+} cuGraphExecDestroy_params;
+
+typedef struct cuGraphDestroy_params_st {
+ CUgraph hGraph;
+} cuGraphDestroy_params;
+
+typedef struct cuGraphExecUpdate_v2_params_st {
+ CUgraphExec hGraphExec;
+ CUgraph hGraph;
+ CUgraphExecUpdateResultInfo *resultInfo;
+} cuGraphExecUpdate_v2_params;
+
+typedef struct cuGraphKernelNodeCopyAttributes_params_st {
+ CUgraphNode dst;
+ CUgraphNode src;
+} cuGraphKernelNodeCopyAttributes_params;
+
+typedef struct cuGraphKernelNodeGetAttribute_params_st {
+ CUgraphNode hNode;
+ CUkernelNodeAttrID attr;
+ CUkernelNodeAttrValue *value_out;
+} cuGraphKernelNodeGetAttribute_params;
+
+typedef struct cuGraphKernelNodeSetAttribute_params_st {
+ CUgraphNode hNode;
+ CUkernelNodeAttrID attr;
+ const CUkernelNodeAttrValue *value;
+} cuGraphKernelNodeSetAttribute_params;
+
+typedef struct cuGraphDebugDotPrint_params_st {
+ CUgraph hGraph;
+ const char *path;
+ unsigned int flags;
+} cuGraphDebugDotPrint_params;
+
+typedef struct cuUserObjectCreate_params_st {
+ CUuserObject *object_out;
+ void *ptr;
+ CUhostFn destroy;
+ unsigned int initialRefcount;
+ unsigned int flags;
+} cuUserObjectCreate_params;
+
+typedef struct cuUserObjectRetain_params_st {
+ CUuserObject object;
+ unsigned int count;
+} cuUserObjectRetain_params;
+
+typedef struct cuUserObjectRelease_params_st {
+ CUuserObject object;
+ unsigned int count;
+} cuUserObjectRelease_params;
+
+typedef struct cuGraphRetainUserObject_params_st {
+ CUgraph graph;
+ CUuserObject object;
+ unsigned int count;
+ unsigned int flags;
+} cuGraphRetainUserObject_params;
+
+typedef struct cuGraphReleaseUserObject_params_st {
+ CUgraph graph;
+ CUuserObject object;
+ unsigned int count;
+} cuGraphReleaseUserObject_params;
+
+typedef struct cuGraphAddNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ CUgraphNodeParams *nodeParams;
+} cuGraphAddNode_params;
+
+typedef struct cuGraphAddNode_v2_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ const CUgraphEdgeData *dependencyData;
+ size_t numDependencies;
+ CUgraphNodeParams *nodeParams;
+} cuGraphAddNode_v2_params;
+
+typedef struct cuGraphNodeSetParams_params_st {
+ CUgraphNode hNode;
+ CUgraphNodeParams *nodeParams;
+} cuGraphNodeSetParams_params;
+
+typedef struct cuGraphExecNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ CUgraphNodeParams *nodeParams;
+} cuGraphExecNodeSetParams_params;
+
+typedef struct cuGraphConditionalHandleCreate_params_st {
+ CUgraphConditionalHandle *pHandle_out;
+ CUgraph hGraph;
+ CUcontext ctx;
+ unsigned int defaultLaunchValue;
+ unsigned int flags;
+} cuGraphConditionalHandleCreate_params;
+
+typedef struct cuOccupancyMaxActiveBlocksPerMultiprocessor_params_st {
+ int *numBlocks;
+ CUfunction func;
+ int blockSize;
+ size_t dynamicSMemSize;
+} cuOccupancyMaxActiveBlocksPerMultiprocessor_params;
+
+typedef struct cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_params_st {
+ int *numBlocks;
+ CUfunction func;
+ int blockSize;
+ size_t dynamicSMemSize;
+ unsigned int flags;
+} cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_params;
+
+typedef struct cuOccupancyMaxPotentialBlockSize_params_st {
+ int *minGridSize;
+ int *blockSize;
+ CUfunction func;
+ CUoccupancyB2DSize blockSizeToDynamicSMemSize;
+ size_t dynamicSMemSize;
+ int blockSizeLimit;
+} cuOccupancyMaxPotentialBlockSize_params;
+
+typedef struct cuOccupancyMaxPotentialBlockSizeWithFlags_params_st {
+ int *minGridSize;
+ int *blockSize;
+ CUfunction func;
+ CUoccupancyB2DSize blockSizeToDynamicSMemSize;
+ size_t dynamicSMemSize;
+ int blockSizeLimit;
+ unsigned int flags;
+} cuOccupancyMaxPotentialBlockSizeWithFlags_params;
+
+typedef struct cuOccupancyAvailableDynamicSMemPerBlock_params_st {
+ size_t *dynamicSmemSize;
+ CUfunction func;
+ int numBlocks;
+ int blockSize;
+} cuOccupancyAvailableDynamicSMemPerBlock_params;
+
+typedef struct cuOccupancyMaxPotentialClusterSize_params_st {
+ int *clusterSize;
+ CUfunction func;
+ const CUlaunchConfig *config;
+} cuOccupancyMaxPotentialClusterSize_params;
+
+typedef struct cuOccupancyMaxActiveClusters_params_st {
+ int *numClusters;
+ CUfunction func;
+ const CUlaunchConfig *config;
+} cuOccupancyMaxActiveClusters_params;
+
+typedef struct cuTexRefSetArray_params_st {
+ CUtexref hTexRef;
+ CUarray hArray;
+ unsigned int Flags;
+} cuTexRefSetArray_params;
+
+typedef struct cuTexRefSetMipmappedArray_params_st {
+ CUtexref hTexRef;
+ CUmipmappedArray hMipmappedArray;
+ unsigned int Flags;
+} cuTexRefSetMipmappedArray_params;
+
+typedef struct cuTexRefSetAddress_v2_params_st {
+ size_t *ByteOffset;
+ CUtexref hTexRef;
+ CUdeviceptr dptr;
+ size_t bytes;
+} cuTexRefSetAddress_v2_params;
+
+typedef struct cuTexRefSetAddress2D_v3_params_st {
+ CUtexref hTexRef;
+ const CUDA_ARRAY_DESCRIPTOR *desc;
+ CUdeviceptr dptr;
+ size_t Pitch;
+} cuTexRefSetAddress2D_v3_params;
+
+typedef struct cuTexRefSetFormat_params_st {
+ CUtexref hTexRef;
+ CUarray_format fmt;
+ int NumPackedComponents;
+} cuTexRefSetFormat_params;
+
+typedef struct cuTexRefSetAddressMode_params_st {
+ CUtexref hTexRef;
+ int dim;
+ CUaddress_mode am;
+} cuTexRefSetAddressMode_params;
+
+typedef struct cuTexRefSetFilterMode_params_st {
+ CUtexref hTexRef;
+ CUfilter_mode fm;
+} cuTexRefSetFilterMode_params;
+
+typedef struct cuTexRefSetMipmapFilterMode_params_st {
+ CUtexref hTexRef;
+ CUfilter_mode fm;
+} cuTexRefSetMipmapFilterMode_params;
+
+typedef struct cuTexRefSetMipmapLevelBias_params_st {
+ CUtexref hTexRef;
+ float bias;
+} cuTexRefSetMipmapLevelBias_params;
+
+typedef struct cuTexRefSetMipmapLevelClamp_params_st {
+ CUtexref hTexRef;
+ float minMipmapLevelClamp;
+ float maxMipmapLevelClamp;
+} cuTexRefSetMipmapLevelClamp_params;
+
+typedef struct cuTexRefSetMaxAnisotropy_params_st {
+ CUtexref hTexRef;
+ unsigned int maxAniso;
+} cuTexRefSetMaxAnisotropy_params;
+
+typedef struct cuTexRefSetBorderColor_params_st {
+ CUtexref hTexRef;
+ float *pBorderColor;
+} cuTexRefSetBorderColor_params;
+
+typedef struct cuTexRefSetFlags_params_st {
+ CUtexref hTexRef;
+ unsigned int Flags;
+} cuTexRefSetFlags_params;
+
+typedef struct cuTexRefGetAddress_v2_params_st {
+ CUdeviceptr *pdptr;
+ CUtexref hTexRef;
+} cuTexRefGetAddress_v2_params;
+
+typedef struct cuTexRefGetArray_params_st {
+ CUarray *phArray;
+ CUtexref hTexRef;
+} cuTexRefGetArray_params;
+
+typedef struct cuTexRefGetMipmappedArray_params_st {
+ CUmipmappedArray *phMipmappedArray;
+ CUtexref hTexRef;
+} cuTexRefGetMipmappedArray_params;
+
+typedef struct cuTexRefGetAddressMode_params_st {
+ CUaddress_mode *pam;
+ CUtexref hTexRef;
+ int dim;
+} cuTexRefGetAddressMode_params;
+
+typedef struct cuTexRefGetFilterMode_params_st {
+ CUfilter_mode *pfm;
+ CUtexref hTexRef;
+} cuTexRefGetFilterMode_params;
+
+typedef struct cuTexRefGetFormat_params_st {
+ CUarray_format *pFormat;
+ int *pNumChannels;
+ CUtexref hTexRef;
+} cuTexRefGetFormat_params;
+
+typedef struct cuTexRefGetMipmapFilterMode_params_st {
+ CUfilter_mode *pfm;
+ CUtexref hTexRef;
+} cuTexRefGetMipmapFilterMode_params;
+
+typedef struct cuTexRefGetMipmapLevelBias_params_st {
+ float *pbias;
+ CUtexref hTexRef;
+} cuTexRefGetMipmapLevelBias_params;
+
+typedef struct cuTexRefGetMipmapLevelClamp_params_st {
+ float *pminMipmapLevelClamp;
+ float *pmaxMipmapLevelClamp;
+ CUtexref hTexRef;
+} cuTexRefGetMipmapLevelClamp_params;
+
+typedef struct cuTexRefGetMaxAnisotropy_params_st {
+ int *pmaxAniso;
+ CUtexref hTexRef;
+} cuTexRefGetMaxAnisotropy_params;
+
+typedef struct cuTexRefGetBorderColor_params_st {
+ float *pBorderColor;
+ CUtexref hTexRef;
+} cuTexRefGetBorderColor_params;
+
+typedef struct cuTexRefGetFlags_params_st {
+ unsigned int *pFlags;
+ CUtexref hTexRef;
+} cuTexRefGetFlags_params;
+
+typedef struct cuTexRefCreate_params_st {
+ CUtexref *pTexRef;
+} cuTexRefCreate_params;
+
+typedef struct cuTexRefDestroy_params_st {
+ CUtexref hTexRef;
+} cuTexRefDestroy_params;
+
+typedef struct cuSurfRefSetArray_params_st {
+ CUsurfref hSurfRef;
+ CUarray hArray;
+ unsigned int Flags;
+} cuSurfRefSetArray_params;
+
+typedef struct cuSurfRefGetArray_params_st {
+ CUarray *phArray;
+ CUsurfref hSurfRef;
+} cuSurfRefGetArray_params;
+
+typedef struct cuTexObjectCreate_params_st {
+ CUtexObject *pTexObject;
+ const CUDA_RESOURCE_DESC *pResDesc;
+ const CUDA_TEXTURE_DESC *pTexDesc;
+ const CUDA_RESOURCE_VIEW_DESC *pResViewDesc;
+} cuTexObjectCreate_params;
+
+typedef struct cuTexObjectDestroy_params_st {
+ CUtexObject texObject;
+} cuTexObjectDestroy_params;
+
+typedef struct cuTexObjectGetResourceDesc_params_st {
+ CUDA_RESOURCE_DESC *pResDesc;
+ CUtexObject texObject;
+} cuTexObjectGetResourceDesc_params;
+
+typedef struct cuTexObjectGetTextureDesc_params_st {
+ CUDA_TEXTURE_DESC *pTexDesc;
+ CUtexObject texObject;
+} cuTexObjectGetTextureDesc_params;
+
+typedef struct cuTexObjectGetResourceViewDesc_params_st {
+ CUDA_RESOURCE_VIEW_DESC *pResViewDesc;
+ CUtexObject texObject;
+} cuTexObjectGetResourceViewDesc_params;
+
+typedef struct cuSurfObjectCreate_params_st {
+ CUsurfObject *pSurfObject;
+ const CUDA_RESOURCE_DESC *pResDesc;
+} cuSurfObjectCreate_params;
+
+typedef struct cuSurfObjectDestroy_params_st {
+ CUsurfObject surfObject;
+} cuSurfObjectDestroy_params;
+
+typedef struct cuSurfObjectGetResourceDesc_params_st {
+ CUDA_RESOURCE_DESC *pResDesc;
+ CUsurfObject surfObject;
+} cuSurfObjectGetResourceDesc_params;
+
+typedef struct cuTensorMapEncodeTiled_params_st {
+ CUtensorMap *tensorMap;
+ CUtensorMapDataType tensorDataType;
+ cuuint32_t tensorRank;
+ void *globalAddress;
+ const cuuint64_t *globalDim;
+ const cuuint64_t *globalStrides;
+ const cuuint32_t *boxDim;
+ const cuuint32_t *elementStrides;
+ CUtensorMapInterleave interleave;
+ CUtensorMapSwizzle swizzle;
+ CUtensorMapL2promotion l2Promotion;
+ CUtensorMapFloatOOBfill oobFill;
+} cuTensorMapEncodeTiled_params;
+
+typedef struct cuTensorMapEncodeIm2col_params_st {
+ CUtensorMap *tensorMap;
+ CUtensorMapDataType tensorDataType;
+ cuuint32_t tensorRank;
+ void *globalAddress;
+ const cuuint64_t *globalDim;
+ const cuuint64_t *globalStrides;
+ const int *pixelBoxLowerCorner;
+ const int *pixelBoxUpperCorner;
+ cuuint32_t channelsPerPixel;
+ cuuint32_t pixelsPerColumn;
+ const cuuint32_t *elementStrides;
+ CUtensorMapInterleave interleave;
+ CUtensorMapSwizzle swizzle;
+ CUtensorMapL2promotion l2Promotion;
+ CUtensorMapFloatOOBfill oobFill;
+} cuTensorMapEncodeIm2col_params;
+
+typedef struct cuTensorMapReplaceAddress_params_st {
+ CUtensorMap *tensorMap;
+ void *globalAddress;
+} cuTensorMapReplaceAddress_params;
+
+typedef struct cuDeviceCanAccessPeer_params_st {
+ int *canAccessPeer;
+ CUdevice dev;
+ CUdevice peerDev;
+} cuDeviceCanAccessPeer_params;
+
+typedef struct cuCtxEnablePeerAccess_params_st {
+ CUcontext peerContext;
+ unsigned int Flags;
+} cuCtxEnablePeerAccess_params;
+
+typedef struct cuCtxDisablePeerAccess_params_st {
+ CUcontext peerContext;
+} cuCtxDisablePeerAccess_params;
+
+typedef struct cuDeviceGetP2PAttribute_params_st {
+ int *value;
+ CUdevice_P2PAttribute attrib;
+ CUdevice srcDevice;
+ CUdevice dstDevice;
+} cuDeviceGetP2PAttribute_params;
+
+typedef struct cuGraphicsUnregisterResource_params_st {
+ CUgraphicsResource resource;
+} cuGraphicsUnregisterResource_params;
+
+typedef struct cuGraphicsSubResourceGetMappedArray_params_st {
+ CUarray *pArray;
+ CUgraphicsResource resource;
+ unsigned int arrayIndex;
+ unsigned int mipLevel;
+} cuGraphicsSubResourceGetMappedArray_params;
+
+typedef struct cuGraphicsResourceGetMappedMipmappedArray_params_st {
+ CUmipmappedArray *pMipmappedArray;
+ CUgraphicsResource resource;
+} cuGraphicsResourceGetMappedMipmappedArray_params;
+
+typedef struct cuGraphicsResourceGetMappedPointer_v2_params_st {
+ CUdeviceptr *pDevPtr;
+ size_t *pSize;
+ CUgraphicsResource resource;
+} cuGraphicsResourceGetMappedPointer_v2_params;
+
+typedef struct cuGraphicsResourceSetMapFlags_v2_params_st {
+ CUgraphicsResource resource;
+ unsigned int flags;
+} cuGraphicsResourceSetMapFlags_v2_params;
+
+typedef struct cuGraphicsMapResources_ptsz_params_st {
+ unsigned int count;
+ CUgraphicsResource *resources;
+ CUstream hStream;
+} cuGraphicsMapResources_ptsz_params;
+
+typedef struct cuGraphicsUnmapResources_ptsz_params_st {
+ unsigned int count;
+ CUgraphicsResource *resources;
+ CUstream hStream;
+} cuGraphicsUnmapResources_ptsz_params;
+
+typedef struct cuGetProcAddress_v2_params_st {
+ const char *symbol;
+ void **pfn;
+ int cudaVersion;
+ cuuint64_t flags;
+ CUdriverProcAddressQueryResult *symbolStatus;
+} cuGetProcAddress_v2_params;
+
+typedef struct cuCoredumpGetAttribute_params_st {
+ CUcoredumpSettings attrib;
+ void *value;
+ size_t *size;
+} cuCoredumpGetAttribute_params;
+
+typedef struct cuCoredumpGetAttributeGlobal_params_st {
+ CUcoredumpSettings attrib;
+ void *value;
+ size_t *size;
+} cuCoredumpGetAttributeGlobal_params;
+
+typedef struct cuCoredumpSetAttribute_params_st {
+ CUcoredumpSettings attrib;
+ void *value;
+ size_t *size;
+} cuCoredumpSetAttribute_params;
+
+typedef struct cuCoredumpSetAttributeGlobal_params_st {
+ CUcoredumpSettings attrib;
+ void *value;
+ size_t *size;
+} cuCoredumpSetAttributeGlobal_params;
+
+typedef struct cuGetExportTable_params_st {
+ const void **ppExportTable;
+ const CUuuid *pExportTableId;
+} cuGetExportTable_params;
+
+typedef struct cuGreenCtxCreate_params_st {
+ CUgreenCtx *phCtx;
+ CUdevResourceDesc desc;
+ CUdevice dev;
+ unsigned int flags;
+} cuGreenCtxCreate_params;
+
+typedef struct cuGreenCtxDestroy_params_st {
+ CUgreenCtx hCtx;
+} cuGreenCtxDestroy_params;
+
+typedef struct cuCtxFromGreenCtx_params_st {
+ CUcontext *pContext;
+ CUgreenCtx hCtx;
+} cuCtxFromGreenCtx_params;
+
+typedef struct cuDeviceGetDevResource_params_st {
+ CUdevice device;
+ CUdevResource *resource;
+ CUdevResourceType type;
+} cuDeviceGetDevResource_params;
+
+typedef struct cuCtxGetDevResource_params_st {
+ CUcontext hCtx;
+ CUdevResource *resource;
+ CUdevResourceType type;
+} cuCtxGetDevResource_params;
+
+typedef struct cuGreenCtxGetDevResource_params_st {
+ CUgreenCtx hCtx;
+ CUdevResource *resource;
+ CUdevResourceType type;
+} cuGreenCtxGetDevResource_params;
+
+typedef struct cuDevSmResourceSplitByCount_params_st {
+ CUdevResource *result;
+ unsigned int *nbGroups;
+ const CUdevResource *input;
+ CUdevResource *remaining;
+ unsigned int useFlags;
+ unsigned int minCount;
+} cuDevSmResourceSplitByCount_params;
+
+typedef struct cuDevResourceGenerateDesc_params_st {
+ CUdevResourceDesc *phDesc;
+ CUdevResource *resources;
+ unsigned int nbResources;
+} cuDevResourceGenerateDesc_params;
+
+typedef struct cuGreenCtxRecordEvent_params_st {
+ CUgreenCtx hCtx;
+ CUevent hEvent;
+} cuGreenCtxRecordEvent_params;
+
+typedef struct cuGreenCtxWaitEvent_params_st {
+ CUgreenCtx hCtx;
+ CUevent hEvent;
+} cuGreenCtxWaitEvent_params;
+
+typedef struct cuStreamGetGreenCtx_params_st {
+ CUstream hStream;
+ CUgreenCtx *phCtx;
+} cuStreamGetGreenCtx_params;
+
+typedef struct cuGreenCtxStreamCreate_params_st {
+ CUstream *phStream;
+ CUgreenCtx greenCtx;
+ unsigned int flags;
+ int priority;
+} cuGreenCtxStreamCreate_params;
+
+typedef struct cuMemHostRegister_params_st {
+ void *p;
+ size_t bytesize;
+ unsigned int Flags;
+} cuMemHostRegister_params;
+
+typedef struct cuGraphicsResourceSetMapFlags_params_st {
+ CUgraphicsResource resource;
+ unsigned int flags;
+} cuGraphicsResourceSetMapFlags_params;
+
+typedef struct cuLinkCreate_params_st {
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+ CUlinkState *stateOut;
+} cuLinkCreate_params;
+
+typedef struct cuLinkAddData_params_st {
+ CUlinkState state;
+ CUjitInputType type;
+ void *data;
+ size_t size;
+ const char *name;
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+} cuLinkAddData_params;
+
+typedef struct cuLinkAddFile_params_st {
+ CUlinkState state;
+ CUjitInputType type;
+ const char *path;
+ unsigned int numOptions;
+ CUjit_option *options;
+ void **optionValues;
+} cuLinkAddFile_params;
+
+typedef struct cuTexRefSetAddress2D_v2_params_st {
+ CUtexref hTexRef;
+ const CUDA_ARRAY_DESCRIPTOR *desc;
+ CUdeviceptr dptr;
+ size_t Pitch;
+} cuTexRefSetAddress2D_v2_params;
+
+typedef struct cuDeviceTotalMem_params_st {
+ unsigned int *bytes;
+ CUdevice dev;
+} cuDeviceTotalMem_params;
+
+typedef struct cuCtxCreate_params_st {
+ CUcontext *pctx;
+ unsigned int flags;
+ CUdevice dev;
+} cuCtxCreate_params;
+
+typedef struct cuModuleGetGlobal_params_st {
+ CUdeviceptr_v1 *dptr;
+ unsigned int *bytes;
+ CUmodule hmod;
+ const char *name;
+} cuModuleGetGlobal_params;
+
+typedef struct cuMemGetInfo_params_st {
+ unsigned int *free;
+ unsigned int *total;
+} cuMemGetInfo_params;
+
+typedef struct cuMemAlloc_params_st {
+ CUdeviceptr_v1 *dptr;
+ unsigned int bytesize;
+} cuMemAlloc_params;
+
+typedef struct cuMemAllocPitch_params_st {
+ CUdeviceptr_v1 *dptr;
+ unsigned int *pPitch;
+ unsigned int WidthInBytes;
+ unsigned int Height;
+ unsigned int ElementSizeBytes;
+} cuMemAllocPitch_params;
+
+typedef struct cuMemFree_params_st {
+ CUdeviceptr_v1 dptr;
+} cuMemFree_params;
+
+typedef struct cuMemGetAddressRange_params_st {
+ CUdeviceptr_v1 *pbase;
+ unsigned int *psize;
+ CUdeviceptr_v1 dptr;
+} cuMemGetAddressRange_params;
+
+typedef struct cuMemAllocHost_params_st {
+ void **pp;
+ unsigned int bytesize;
+} cuMemAllocHost_params;
+
+typedef struct cuMemHostGetDevicePointer_params_st {
+ CUdeviceptr_v1 *pdptr;
+ void *p;
+ unsigned int Flags;
+} cuMemHostGetDevicePointer_params;
+
+typedef struct cuMemcpyHtoD_params_st {
+ CUdeviceptr_v1 dstDevice;
+ const void *srcHost;
+ unsigned int ByteCount;
+} cuMemcpyHtoD_params;
+
+typedef struct cuMemcpyDtoH_params_st {
+ void *dstHost;
+ CUdeviceptr_v1 srcDevice;
+ unsigned int ByteCount;
+} cuMemcpyDtoH_params;
+
+typedef struct cuMemcpyDtoD_params_st {
+ CUdeviceptr_v1 dstDevice;
+ CUdeviceptr_v1 srcDevice;
+ unsigned int ByteCount;
+} cuMemcpyDtoD_params;
+
+typedef struct cuMemcpyDtoA_params_st {
+ CUarray dstArray;
+ unsigned int dstOffset;
+ CUdeviceptr_v1 srcDevice;
+ unsigned int ByteCount;
+} cuMemcpyDtoA_params;
+
+typedef struct cuMemcpyAtoD_params_st {
+ CUdeviceptr_v1 dstDevice;
+ CUarray srcArray;
+ unsigned int srcOffset;
+ unsigned int ByteCount;
+} cuMemcpyAtoD_params;
+
+typedef struct cuMemcpyHtoA_params_st {
+ CUarray dstArray;
+ unsigned int dstOffset;
+ const void *srcHost;
+ unsigned int ByteCount;
+} cuMemcpyHtoA_params;
+
+typedef struct cuMemcpyAtoH_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ unsigned int srcOffset;
+ unsigned int ByteCount;
+} cuMemcpyAtoH_params;
+
+typedef struct cuMemcpyAtoA_params_st {
+ CUarray dstArray;
+ unsigned int dstOffset;
+ CUarray srcArray;
+ unsigned int srcOffset;
+ unsigned int ByteCount;
+} cuMemcpyAtoA_params;
+
+typedef struct cuMemcpyHtoAAsync_params_st {
+ CUarray dstArray;
+ unsigned int dstOffset;
+ const void *srcHost;
+ unsigned int ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoAAsync_params;
+
+typedef struct cuMemcpyAtoHAsync_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ unsigned int srcOffset;
+ unsigned int ByteCount;
+ CUstream hStream;
+} cuMemcpyAtoHAsync_params;
+
+typedef struct cuMemcpy2D_params_st {
+ const CUDA_MEMCPY2D_v1 *pCopy;
+} cuMemcpy2D_params;
+
+typedef struct cuMemcpy2DUnaligned_params_st {
+ const CUDA_MEMCPY2D_v1 *pCopy;
+} cuMemcpy2DUnaligned_params;
+
+typedef struct cuMemcpy3D_params_st {
+ const CUDA_MEMCPY3D_v1 *pCopy;
+} cuMemcpy3D_params;
+
+typedef struct cuMemcpyHtoDAsync_params_st {
+ CUdeviceptr_v1 dstDevice;
+ const void *srcHost;
+ unsigned int ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoDAsync_params;
+
+typedef struct cuMemcpyDtoHAsync_params_st {
+ void *dstHost;
+ CUdeviceptr_v1 srcDevice;
+ unsigned int ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoHAsync_params;
+
+typedef struct cuMemcpyDtoDAsync_params_st {
+ CUdeviceptr_v1 dstDevice;
+ CUdeviceptr_v1 srcDevice;
+ unsigned int ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoDAsync_params;
+
+typedef struct cuMemcpy2DAsync_params_st {
+ const CUDA_MEMCPY2D_v1 *pCopy;
+ CUstream hStream;
+} cuMemcpy2DAsync_params;
+
+typedef struct cuMemcpy3DAsync_params_st {
+ const CUDA_MEMCPY3D_v1 *pCopy;
+ CUstream hStream;
+} cuMemcpy3DAsync_params;
+
+typedef struct cuMemsetD8_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned char uc;
+ unsigned int N;
+} cuMemsetD8_params;
+
+typedef struct cuMemsetD16_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned short us;
+ unsigned int N;
+} cuMemsetD16_params;
+
+typedef struct cuMemsetD32_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned int ui;
+ unsigned int N;
+} cuMemsetD32_params;
+
+typedef struct cuMemsetD2D8_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned int dstPitch;
+ unsigned char uc;
+ unsigned int Width;
+ unsigned int Height;
+} cuMemsetD2D8_params;
+
+typedef struct cuMemsetD2D16_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned int dstPitch;
+ unsigned short us;
+ unsigned int Width;
+ unsigned int Height;
+} cuMemsetD2D16_params;
+
+typedef struct cuMemsetD2D32_params_st {
+ CUdeviceptr_v1 dstDevice;
+ unsigned int dstPitch;
+ unsigned int ui;
+ unsigned int Width;
+ unsigned int Height;
+} cuMemsetD2D32_params;
+
+typedef struct cuArrayCreate_params_st {
+ CUarray *pHandle;
+ const CUDA_ARRAY_DESCRIPTOR_v1 *pAllocateArray;
+} cuArrayCreate_params;
+
+typedef struct cuArrayGetDescriptor_params_st {
+ CUDA_ARRAY_DESCRIPTOR_v1 *pArrayDescriptor;
+ CUarray hArray;
+} cuArrayGetDescriptor_params;
+
+typedef struct cuArray3DCreate_params_st {
+ CUarray *pHandle;
+ const CUDA_ARRAY3D_DESCRIPTOR_v1 *pAllocateArray;
+} cuArray3DCreate_params;
+
+typedef struct cuArray3DGetDescriptor_params_st {
+ CUDA_ARRAY3D_DESCRIPTOR_v1 *pArrayDescriptor;
+ CUarray hArray;
+} cuArray3DGetDescriptor_params;
+
+typedef struct cuTexRefSetAddress_params_st {
+ unsigned int *ByteOffset;
+ CUtexref hTexRef;
+ CUdeviceptr_v1 dptr;
+ unsigned int bytes;
+} cuTexRefSetAddress_params;
+
+typedef struct cuTexRefSetAddress2D_params_st {
+ CUtexref hTexRef;
+ const CUDA_ARRAY_DESCRIPTOR_v1 *desc;
+ CUdeviceptr_v1 dptr;
+ unsigned int Pitch;
+} cuTexRefSetAddress2D_params;
+
+typedef struct cuTexRefGetAddress_params_st {
+ CUdeviceptr_v1 *pdptr;
+ CUtexref hTexRef;
+} cuTexRefGetAddress_params;
+
+typedef struct cuGraphicsResourceGetMappedPointer_params_st {
+ CUdeviceptr_v1 *pDevPtr;
+ unsigned int *pSize;
+ CUgraphicsResource resource;
+} cuGraphicsResourceGetMappedPointer_params;
+
+typedef struct cuCtxDestroy_params_st {
+ CUcontext ctx;
+} cuCtxDestroy_params;
+
+typedef struct cuCtxPopCurrent_params_st {
+ CUcontext *pctx;
+} cuCtxPopCurrent_params;
+
+typedef struct cuCtxPushCurrent_params_st {
+ CUcontext ctx;
+} cuCtxPushCurrent_params;
+
+typedef struct cuStreamDestroy_params_st {
+ CUstream hStream;
+} cuStreamDestroy_params;
+
+typedef struct cuEventDestroy_params_st {
+ CUevent hEvent;
+} cuEventDestroy_params;
+
+typedef struct cuDevicePrimaryCtxRelease_params_st {
+ CUdevice dev;
+} cuDevicePrimaryCtxRelease_params;
+
+typedef struct cuDevicePrimaryCtxReset_params_st {
+ CUdevice dev;
+} cuDevicePrimaryCtxReset_params;
+
+typedef struct cuDevicePrimaryCtxSetFlags_params_st {
+ CUdevice dev;
+ unsigned int flags;
+} cuDevicePrimaryCtxSetFlags_params;
+
+typedef struct cuMemcpyHtoD_v2_params_st {
+ CUdeviceptr dstDevice;
+ const void *srcHost;
+ size_t ByteCount;
+} cuMemcpyHtoD_v2_params;
+
+typedef struct cuMemcpyDtoH_v2_params_st {
+ void *dstHost;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoH_v2_params;
+
+typedef struct cuMemcpyDtoD_v2_params_st {
+ CUdeviceptr dstDevice;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoD_v2_params;
+
+typedef struct cuMemcpyDtoA_v2_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+} cuMemcpyDtoA_v2_params;
+
+typedef struct cuMemcpyAtoD_v2_params_st {
+ CUdeviceptr dstDevice;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoD_v2_params;
+
+typedef struct cuMemcpyHtoA_v2_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ const void *srcHost;
+ size_t ByteCount;
+} cuMemcpyHtoA_v2_params;
+
+typedef struct cuMemcpyAtoH_v2_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoH_v2_params;
+
+typedef struct cuMemcpyAtoA_v2_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+} cuMemcpyAtoA_v2_params;
+
+typedef struct cuMemcpyHtoAAsync_v2_params_st {
+ CUarray dstArray;
+ size_t dstOffset;
+ const void *srcHost;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoAAsync_v2_params;
+
+typedef struct cuMemcpyAtoHAsync_v2_params_st {
+ void *dstHost;
+ CUarray srcArray;
+ size_t srcOffset;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyAtoHAsync_v2_params;
+
+typedef struct cuMemcpy2D_v2_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+} cuMemcpy2D_v2_params;
+
+typedef struct cuMemcpy2DUnaligned_v2_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+} cuMemcpy2DUnaligned_v2_params;
+
+typedef struct cuMemcpy3D_v2_params_st {
+ const CUDA_MEMCPY3D *pCopy;
+} cuMemcpy3D_v2_params;
+
+typedef struct cuMemcpyHtoDAsync_v2_params_st {
+ CUdeviceptr dstDevice;
+ const void *srcHost;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyHtoDAsync_v2_params;
+
+typedef struct cuMemcpyDtoHAsync_v2_params_st {
+ void *dstHost;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoHAsync_v2_params;
+
+typedef struct cuMemcpyDtoDAsync_v2_params_st {
+ CUdeviceptr dstDevice;
+ CUdeviceptr srcDevice;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyDtoDAsync_v2_params;
+
+typedef struct cuMemcpy2DAsync_v2_params_st {
+ const CUDA_MEMCPY2D *pCopy;
+ CUstream hStream;
+} cuMemcpy2DAsync_v2_params;
+
+typedef struct cuMemcpy3DAsync_v2_params_st {
+ const CUDA_MEMCPY3D *pCopy;
+ CUstream hStream;
+} cuMemcpy3DAsync_v2_params;
+
+typedef struct cuMemsetD8_v2_params_st {
+ CUdeviceptr dstDevice;
+ unsigned char uc;
+ size_t N;
+} cuMemsetD8_v2_params;
+
+typedef struct cuMemsetD16_v2_params_st {
+ CUdeviceptr dstDevice;
+ unsigned short us;
+ size_t N;
+} cuMemsetD16_v2_params;
+
+typedef struct cuMemsetD32_v2_params_st {
+ CUdeviceptr dstDevice;
+ unsigned int ui;
+ size_t N;
+} cuMemsetD32_v2_params;
+
+typedef struct cuMemsetD2D8_v2_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned char uc;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D8_v2_params;
+
+typedef struct cuMemsetD2D16_v2_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned short us;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D16_v2_params;
+
+typedef struct cuMemsetD2D32_v2_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned int ui;
+ size_t Width;
+ size_t Height;
+} cuMemsetD2D32_v2_params;
+
+typedef struct cuMemcpy_params_st {
+ CUdeviceptr dst;
+ CUdeviceptr src;
+ size_t ByteCount;
+} cuMemcpy_params;
+
+typedef struct cuMemcpyAsync_params_st {
+ CUdeviceptr dst;
+ CUdeviceptr src;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyAsync_params;
+
+typedef struct cuMemcpyPeer_params_st {
+ CUdeviceptr dstDevice;
+ CUcontext dstContext;
+ CUdeviceptr srcDevice;
+ CUcontext srcContext;
+ size_t ByteCount;
+} cuMemcpyPeer_params;
+
+typedef struct cuMemcpyPeerAsync_params_st {
+ CUdeviceptr dstDevice;
+ CUcontext dstContext;
+ CUdeviceptr srcDevice;
+ CUcontext srcContext;
+ size_t ByteCount;
+ CUstream hStream;
+} cuMemcpyPeerAsync_params;
+
+typedef struct cuMemcpy3DPeer_params_st {
+ const CUDA_MEMCPY3D_PEER *pCopy;
+} cuMemcpy3DPeer_params;
+
+typedef struct cuMemcpy3DPeerAsync_params_st {
+ const CUDA_MEMCPY3D_PEER *pCopy;
+ CUstream hStream;
+} cuMemcpy3DPeerAsync_params;
+
+typedef struct cuMemcpyBatchAsync_params_st {
+ CUdeviceptr *dsts;
+ CUdeviceptr *srcs;
+ size_t *sizes;
+ size_t count;
+ CUmemcpyAttributes *attrs;
+ size_t *attrsIdxs;
+ size_t numAttrs;
+ size_t *failIdx;
+ CUstream hStream;
+} cuMemcpyBatchAsync_params;
+
+typedef struct cuMemcpy3DBatchAsync_params_st {
+ size_t numOps;
+ CUDA_MEMCPY3D_BATCH_OP *opList;
+ size_t *failIdx;
+ unsigned long long flags;
+ CUstream hStream;
+} cuMemcpy3DBatchAsync_params;
+
+typedef struct cuMemsetD8Async_params_st {
+ CUdeviceptr dstDevice;
+ unsigned char uc;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD8Async_params;
+
+typedef struct cuMemsetD16Async_params_st {
+ CUdeviceptr dstDevice;
+ unsigned short us;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD16Async_params;
+
+typedef struct cuMemsetD32Async_params_st {
+ CUdeviceptr dstDevice;
+ unsigned int ui;
+ size_t N;
+ CUstream hStream;
+} cuMemsetD32Async_params;
+
+typedef struct cuMemsetD2D8Async_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned char uc;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D8Async_params;
+
+typedef struct cuMemsetD2D16Async_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned short us;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D16Async_params;
+
+typedef struct cuMemsetD2D32Async_params_st {
+ CUdeviceptr dstDevice;
+ size_t dstPitch;
+ unsigned int ui;
+ size_t Width;
+ size_t Height;
+ CUstream hStream;
+} cuMemsetD2D32Async_params;
+
+typedef struct cuStreamGetPriority_params_st {
+ CUstream hStream;
+ int *priority;
+} cuStreamGetPriority_params;
+
+typedef struct cuStreamGetId_params_st {
+ CUstream hStream;
+ unsigned long long *streamId;
+} cuStreamGetId_params;
+
+typedef struct cuStreamGetFlags_params_st {
+ CUstream hStream;
+ unsigned int *flags;
+} cuStreamGetFlags_params;
+
+typedef struct cuStreamGetDevice_params_st {
+ CUstream hStream;
+ CUdevice *device;
+} cuStreamGetDevice_params;
+
+typedef struct cuStreamGetCtx_params_st {
+ CUstream hStream;
+ CUcontext *pctx;
+} cuStreamGetCtx_params;
+
+typedef struct cuStreamGetCtx_v2_params_st {
+ CUstream hStream;
+ CUcontext *pCtx;
+ CUgreenCtx *pGreenCtx;
+} cuStreamGetCtx_v2_params;
+
+typedef struct cuStreamWaitEvent_params_st {
+ CUstream hStream;
+ CUevent hEvent;
+ unsigned int Flags;
+} cuStreamWaitEvent_params;
+
+typedef struct cuStreamAddCallback_params_st {
+ CUstream hStream;
+ CUstreamCallback callback;
+ void *userData;
+ unsigned int flags;
+} cuStreamAddCallback_params;
+
+typedef struct cuStreamAttachMemAsync_params_st {
+ CUstream hStream;
+ CUdeviceptr dptr;
+ size_t length;
+ unsigned int flags;
+} cuStreamAttachMemAsync_params;
+
+typedef struct cuStreamQuery_params_st {
+ CUstream hStream;
+} cuStreamQuery_params;
+
+typedef struct cuStreamSynchronize_params_st {
+ CUstream hStream;
+} cuStreamSynchronize_params;
+
+typedef struct cuEventRecord_params_st {
+ CUevent hEvent;
+ CUstream hStream;
+} cuEventRecord_params;
+
+typedef struct cuEventRecordWithFlags_params_st {
+ CUevent hEvent;
+ CUstream hStream;
+ unsigned int flags;
+} cuEventRecordWithFlags_params;
+
+typedef struct cuLaunchKernel_params_st {
+ CUfunction f;
+ unsigned int gridDimX;
+ unsigned int gridDimY;
+ unsigned int gridDimZ;
+ unsigned int blockDimX;
+ unsigned int blockDimY;
+ unsigned int blockDimZ;
+ unsigned int sharedMemBytes;
+ CUstream hStream;
+ void **kernelParams;
+ void **extra;
+} cuLaunchKernel_params;
+
+typedef struct cuLaunchKernelEx_params_st {
+ const CUlaunchConfig *config;
+ CUfunction f;
+ void **kernelParams;
+ void **extra;
+} cuLaunchKernelEx_params;
+
+typedef struct cuLaunchHostFunc_params_st {
+ CUstream hStream;
+ CUhostFn fn;
+ void *userData;
+} cuLaunchHostFunc_params;
+
+typedef struct cuGraphicsMapResources_params_st {
+ unsigned int count;
+ CUgraphicsResource *resources;
+ CUstream hStream;
+} cuGraphicsMapResources_params;
+
+typedef struct cuGraphicsUnmapResources_params_st {
+ unsigned int count;
+ CUgraphicsResource *resources;
+ CUstream hStream;
+} cuGraphicsUnmapResources_params;
+
+typedef struct cuStreamWriteValue32_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWriteValue32_params;
+
+typedef struct cuStreamWaitValue32_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWaitValue32_params;
+
+typedef struct cuStreamWriteValue64_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWriteValue64_params;
+
+typedef struct cuStreamWaitValue64_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWaitValue64_params;
+
+typedef struct cuStreamBatchMemOp_params_st {
+ CUstream stream;
+ unsigned int count;
+ CUstreamBatchMemOpParams *paramArray;
+ unsigned int flags;
+} cuStreamBatchMemOp_params;
+
+typedef struct cuStreamWriteValue32_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWriteValue32_ptsz_params;
+
+typedef struct cuStreamWaitValue32_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWaitValue32_ptsz_params;
+
+typedef struct cuStreamWriteValue64_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWriteValue64_ptsz_params;
+
+typedef struct cuStreamWaitValue64_ptsz_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWaitValue64_ptsz_params;
+
+typedef struct cuStreamBatchMemOp_ptsz_params_st {
+ CUstream stream;
+ unsigned int count;
+ CUstreamBatchMemOpParams *paramArray;
+ unsigned int flags;
+} cuStreamBatchMemOp_ptsz_params;
+
+typedef struct cuStreamWriteValue32_v2_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWriteValue32_v2_params;
+
+typedef struct cuStreamWaitValue32_v2_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint32_t value;
+ unsigned int flags;
+} cuStreamWaitValue32_v2_params;
+
+typedef struct cuStreamWriteValue64_v2_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWriteValue64_v2_params;
+
+typedef struct cuStreamWaitValue64_v2_params_st {
+ CUstream stream;
+ CUdeviceptr addr;
+ cuuint64_t value;
+ unsigned int flags;
+} cuStreamWaitValue64_v2_params;
+
+typedef struct cuStreamBatchMemOp_v2_params_st {
+ CUstream stream;
+ unsigned int count;
+ CUstreamBatchMemOpParams *paramArray;
+ unsigned int flags;
+} cuStreamBatchMemOp_v2_params;
+
+typedef struct cuMemPrefetchAsync_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUdevice dstDevice;
+ CUstream hStream;
+} cuMemPrefetchAsync_params;
+
+typedef struct cuMemPrefetchAsync_v2_params_st {
+ CUdeviceptr devPtr;
+ size_t count;
+ CUmemLocation location;
+ unsigned int flags;
+ CUstream hStream;
+} cuMemPrefetchAsync_v2_params;
+
+typedef struct cuLaunchCooperativeKernel_params_st {
+ CUfunction f;
+ unsigned int gridDimX;
+ unsigned int gridDimY;
+ unsigned int gridDimZ;
+ unsigned int blockDimX;
+ unsigned int blockDimY;
+ unsigned int blockDimZ;
+ unsigned int sharedMemBytes;
+ CUstream hStream;
+ void **kernelParams;
+} cuLaunchCooperativeKernel_params;
+
+typedef struct cuSignalExternalSemaphoresAsync_params_st {
+ const CUexternalSemaphore *extSemArray;
+ const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *paramsArray;
+ unsigned int numExtSems;
+ CUstream stream;
+} cuSignalExternalSemaphoresAsync_params;
+
+typedef struct cuWaitExternalSemaphoresAsync_params_st {
+ const CUexternalSemaphore *extSemArray;
+ const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *paramsArray;
+ unsigned int numExtSems;
+ CUstream stream;
+} cuWaitExternalSemaphoresAsync_params;
+
+typedef struct cuStreamBeginCapture_params_st {
+ CUstream hStream;
+} cuStreamBeginCapture_params;
+
+typedef struct cuStreamBeginCapture_ptsz_params_st {
+ CUstream hStream;
+} cuStreamBeginCapture_ptsz_params;
+
+typedef struct cuStreamBeginCapture_v2_params_st {
+ CUstream hStream;
+ CUstreamCaptureMode mode;
+} cuStreamBeginCapture_v2_params;
+
+typedef struct cuStreamBeginCaptureToGraph_params_st {
+ CUstream hStream;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ const CUgraphEdgeData *dependencyData;
+ size_t numDependencies;
+ CUstreamCaptureMode mode;
+} cuStreamBeginCaptureToGraph_params;
+
+typedef struct cuStreamEndCapture_params_st {
+ CUstream hStream;
+ CUgraph *phGraph;
+} cuStreamEndCapture_params;
+
+typedef struct cuStreamIsCapturing_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus;
+} cuStreamIsCapturing_params;
+
+typedef struct cuStreamGetCaptureInfo_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+} cuStreamGetCaptureInfo_params;
+
+typedef struct cuStreamGetCaptureInfo_ptsz_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+} cuStreamGetCaptureInfo_ptsz_params;
+
+typedef struct cuStreamGetCaptureInfo_v2_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+ CUgraph *graph_out;
+ const CUgraphNode **dependencies_out;
+ size_t *numDependencies_out;
+} cuStreamGetCaptureInfo_v2_params;
+
+typedef struct cuStreamGetCaptureInfo_v3_params_st {
+ CUstream hStream;
+ CUstreamCaptureStatus *captureStatus_out;
+ cuuint64_t *id_out;
+ CUgraph *graph_out;
+ const CUgraphNode **dependencies_out;
+ const CUgraphEdgeData **edgeData_out;
+ size_t *numDependencies_out;
+} cuStreamGetCaptureInfo_v3_params;
+
+typedef struct cuGraphAddKernelNode_params_st {
+ CUgraphNode *phGraphNode;
+ CUgraph hGraph;
+ const CUgraphNode *dependencies;
+ size_t numDependencies;
+ const CUDA_KERNEL_NODE_PARAMS_v1 *nodeParams;
+} cuGraphAddKernelNode_params;
+
+typedef struct cuGraphKernelNodeGetParams_params_st {
+ CUgraphNode hNode;
+ CUDA_KERNEL_NODE_PARAMS_v1 *nodeParams;
+} cuGraphKernelNodeGetParams_params;
+
+typedef struct cuGraphKernelNodeSetParams_params_st {
+ CUgraphNode hNode;
+ const CUDA_KERNEL_NODE_PARAMS_v1 *nodeParams;
+} cuGraphKernelNodeSetParams_params;
+
+typedef struct cuGraphExecKernelNodeSetParams_params_st {
+ CUgraphExec hGraphExec;
+ CUgraphNode hNode;
+ const CUDA_KERNEL_NODE_PARAMS_v1 *nodeParams;
+} cuGraphExecKernelNodeSetParams_params;
+
+typedef struct cuGraphInstantiateWithParams_params_st {
+ CUgraphExec *phGraphExec;
+ CUgraph hGraph;
+ CUDA_GRAPH_INSTANTIATE_PARAMS *instantiateParams;
+} cuGraphInstantiateWithParams_params;
+
+typedef struct cuGraphExecUpdate_params_st {
+ CUgraphExec hGraphExec;
+ CUgraph hGraph;
+ CUgraphNode *hErrorNode_out;
+ CUgraphExecUpdateResult *updateResult_out;
+} cuGraphExecUpdate_params;
+
+typedef struct cuGraphUpload_params_st {
+ CUgraphExec hGraph;
+ CUstream hStream;
+} cuGraphUpload_params;
+
+typedef struct cuGraphLaunch_params_st {
+ CUgraphExec hGraph;
+ CUstream hStream;
+} cuGraphLaunch_params;
+
+typedef struct cuStreamCopyAttributes_params_st {
+ CUstream dstStream;
+ CUstream srcStream;
+} cuStreamCopyAttributes_params;
+
+typedef struct cuStreamGetAttribute_params_st {
+ CUstream hStream;
+ CUstreamAttrID attr;
+ CUstreamAttrValue *value;
+} cuStreamGetAttribute_params;
+
+typedef struct cuStreamSetAttribute_params_st {
+ CUstream hStream;
+ CUstreamAttrID attr;
+ const CUstreamAttrValue *param;
+} cuStreamSetAttribute_params;
+
+typedef struct cuIpcOpenMemHandle_params_st {
+ CUdeviceptr *pdptr;
+ CUipcMemHandle handle;
+ unsigned int Flags;
+} cuIpcOpenMemHandle_params;
+
+typedef struct cuGraphInstantiate_params_st {
+ CUgraphExec *phGraphExec;
+ CUgraph hGraph;
+ CUgraphNode *phErrorNode;
+ char *logBuffer;
+ size_t bufferSize;
+} cuGraphInstantiate_params;
+
+typedef struct cuGraphInstantiate_v2_params_st {
+ CUgraphExec *phGraphExec;
+ CUgraph hGraph;
+ CUgraphNode *phErrorNode;
+ char *logBuffer;
+ size_t bufferSize;
+} cuGraphInstantiate_v2_params;
+
+typedef struct cuMemMapArrayAsync_params_st {
+ CUarrayMapInfo *mapInfoList;
+ unsigned int count;
+ CUstream hStream;
+} cuMemMapArrayAsync_params;
+
+typedef struct cuMemFreeAsync_params_st {
+ CUdeviceptr dptr;
+ CUstream hStream;
+} cuMemFreeAsync_params;
+
+typedef struct cuMemAllocAsync_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+ CUstream hStream;
+} cuMemAllocAsync_params;
+
+typedef struct cuMemAllocFromPoolAsync_params_st {
+ CUdeviceptr *dptr;
+ size_t bytesize;
+ CUmemoryPool pool;
+ CUstream hStream;
+} cuMemAllocFromPoolAsync_params;
+
+typedef struct cuStreamUpdateCaptureDependencies_params_st {
+ CUstream hStream;
+ CUgraphNode *dependencies;
+ size_t numDependencies;
+ unsigned int flags;
+} cuStreamUpdateCaptureDependencies_params;
+
+typedef struct cuStreamUpdateCaptureDependencies_v2_params_st {
+ CUstream hStream;
+ CUgraphNode *dependencies;
+ const CUgraphEdgeData *dependencyData;
+ size_t numDependencies;
+ unsigned int flags;
+} cuStreamUpdateCaptureDependencies_v2_params;
+
+typedef struct cuMemBatchDecompressAsync_params_st {
+ CUmemDecompressParams *paramsArray;
+ size_t count;
+ unsigned int flags;
+ size_t *errorIndex;
+ CUstream stream;
+} cuMemBatchDecompressAsync_params;
+
+typedef struct cuGetProcAddress_params_st {
+ const char *symbol;
+ void **pfn;
+ int cudaVersion;
+ cuuint64_t flags;
+} cuGetProcAddress_params;
+
+typedef struct cuCheckpointProcessGetRestoreThreadId_params_st {
+ int pid;
+ int *tid;
+} cuCheckpointProcessGetRestoreThreadId_params;
+
+typedef struct cuCheckpointProcessGetState_params_st {
+ int pid;
+ CUprocessState *state;
+} cuCheckpointProcessGetState_params;
+
+typedef struct cuCheckpointProcessLock_params_st {
+ int pid;
+ CUcheckpointLockArgs *args;
+} cuCheckpointProcessLock_params;
+
+typedef struct cuCheckpointProcessCheckpoint_params_st {
+ int pid;
+ CUcheckpointCheckpointArgs *args;
+} cuCheckpointProcessCheckpoint_params;
+
+typedef struct cuCheckpointProcessRestore_params_st {
+ int pid;
+ CUcheckpointRestoreArgs *args;
+} cuCheckpointProcessRestore_params;
+
+typedef struct cuCheckpointProcessUnlock_params_st {
+ int pid;
+ CUcheckpointUnlockArgs *args;
+} cuCheckpointProcessUnlock_params;
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_runtime_api_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_runtime_api_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..52321905dd0a82e550332f5d67b03fd4612860e7
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_runtime_api_meta.h
@@ -0,0 +1,2372 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// CUDA public interface, for type definitions and api function prototypes
+#include "cuda_runtime_api.h"
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+// Currently used parameter trace structures
+typedef struct cudaDeviceSetLimit_v3020_params_st {
+ enum cudaLimit limit;
+ size_t value;
+} cudaDeviceSetLimit_v3020_params;
+
+typedef struct cudaDeviceGetLimit_v3020_params_st {
+ size_t *pValue;
+ enum cudaLimit limit;
+} cudaDeviceGetLimit_v3020_params;
+
+typedef struct cudaDeviceGetTexture1DLinearMaxWidth_v11010_params_st {
+ size_t *maxWidthInElements;
+ const struct cudaChannelFormatDesc *fmtDesc;
+ int device;
+} cudaDeviceGetTexture1DLinearMaxWidth_v11010_params;
+
+typedef struct cudaDeviceGetCacheConfig_v3020_params_st {
+ enum cudaFuncCache *pCacheConfig;
+} cudaDeviceGetCacheConfig_v3020_params;
+
+typedef struct cudaDeviceGetStreamPriorityRange_v5050_params_st {
+ int *leastPriority;
+ int *greatestPriority;
+} cudaDeviceGetStreamPriorityRange_v5050_params;
+
+typedef struct cudaDeviceSetCacheConfig_v3020_params_st {
+ enum cudaFuncCache cacheConfig;
+} cudaDeviceSetCacheConfig_v3020_params;
+
+typedef struct cudaDeviceGetByPCIBusId_v4010_params_st {
+ int *device;
+ const char *pciBusId;
+} cudaDeviceGetByPCIBusId_v4010_params;
+
+typedef struct cudaDeviceGetPCIBusId_v4010_params_st {
+ char *pciBusId;
+ int len;
+ int device;
+} cudaDeviceGetPCIBusId_v4010_params;
+
+typedef struct cudaIpcGetEventHandle_v4010_params_st {
+ cudaIpcEventHandle_t *handle;
+ cudaEvent_t event;
+} cudaIpcGetEventHandle_v4010_params;
+
+typedef struct cudaIpcOpenEventHandle_v4010_params_st {
+ cudaEvent_t *event;
+ cudaIpcEventHandle_t handle;
+} cudaIpcOpenEventHandle_v4010_params;
+
+typedef struct cudaIpcGetMemHandle_v4010_params_st {
+ cudaIpcMemHandle_t *handle;
+ void *devPtr;
+} cudaIpcGetMemHandle_v4010_params;
+
+typedef struct cudaIpcOpenMemHandle_v4010_params_st {
+ void **devPtr;
+ cudaIpcMemHandle_t handle;
+ unsigned int flags;
+} cudaIpcOpenMemHandle_v4010_params;
+
+typedef struct cudaIpcCloseMemHandle_v4010_params_st {
+ void *devPtr;
+} cudaIpcCloseMemHandle_v4010_params;
+
+typedef struct cudaDeviceFlushGPUDirectRDMAWrites_v11030_params_st {
+ enum cudaFlushGPUDirectRDMAWritesTarget target;
+ enum cudaFlushGPUDirectRDMAWritesScope scope;
+} cudaDeviceFlushGPUDirectRDMAWrites_v11030_params;
+
+typedef struct cudaDeviceRegisterAsyncNotification_v12040_params_st {
+ int device;
+ cudaAsyncCallback callbackFunc;
+ void *userData;
+ cudaAsyncCallbackHandle_t *callback;
+} cudaDeviceRegisterAsyncNotification_v12040_params;
+
+typedef struct cudaDeviceUnregisterAsyncNotification_v12040_params_st {
+ int device;
+ cudaAsyncCallbackHandle_t callback;
+} cudaDeviceUnregisterAsyncNotification_v12040_params;
+
+typedef struct cudaDeviceGetSharedMemConfig_v4020_params_st {
+ enum cudaSharedMemConfig *pConfig;
+} cudaDeviceGetSharedMemConfig_v4020_params;
+
+typedef struct cudaDeviceSetSharedMemConfig_v4020_params_st {
+ enum cudaSharedMemConfig config;
+} cudaDeviceSetSharedMemConfig_v4020_params;
+
+typedef struct cudaGetErrorName_v6050_params_st {
+ cudaError_t error;
+} cudaGetErrorName_v6050_params;
+
+typedef struct cudaGetErrorString_v3020_params_st {
+ cudaError_t error;
+} cudaGetErrorString_v3020_params;
+
+typedef struct cudaGetDeviceCount_v3020_params_st {
+ int *count;
+} cudaGetDeviceCount_v3020_params;
+
+typedef struct cudaGetDeviceProperties_v2_v12000_params_st {
+ struct cudaDeviceProp *prop;
+ int device;
+} cudaGetDeviceProperties_v2_v12000_params;
+
+typedef struct cudaDeviceGetAttribute_v5000_params_st {
+ int *value;
+ enum cudaDeviceAttr attr;
+ int device;
+} cudaDeviceGetAttribute_v5000_params;
+
+typedef struct cudaDeviceGetDefaultMemPool_v11020_params_st {
+ cudaMemPool_t *memPool;
+ int device;
+} cudaDeviceGetDefaultMemPool_v11020_params;
+
+typedef struct cudaDeviceSetMemPool_v11020_params_st {
+ int device;
+ cudaMemPool_t memPool;
+} cudaDeviceSetMemPool_v11020_params;
+
+typedef struct cudaDeviceGetMemPool_v11020_params_st {
+ cudaMemPool_t *memPool;
+ int device;
+} cudaDeviceGetMemPool_v11020_params;
+
+typedef struct cudaDeviceGetNvSciSyncAttributes_v10020_params_st {
+ void *nvSciSyncAttrList;
+ int device;
+ int flags;
+} cudaDeviceGetNvSciSyncAttributes_v10020_params;
+
+typedef struct cudaDeviceGetP2PAttribute_v8000_params_st {
+ int *value;
+ enum cudaDeviceP2PAttr attr;
+ int srcDevice;
+ int dstDevice;
+} cudaDeviceGetP2PAttribute_v8000_params;
+
+typedef struct cudaChooseDevice_v3020_params_st {
+ int *device;
+ const struct cudaDeviceProp *prop;
+} cudaChooseDevice_v3020_params;
+
+typedef struct cudaInitDevice_v12000_params_st {
+ int device;
+ unsigned int deviceFlags;
+ unsigned int flags;
+} cudaInitDevice_v12000_params;
+
+typedef struct cudaSetDevice_v3020_params_st {
+ int device;
+} cudaSetDevice_v3020_params;
+
+typedef struct cudaGetDevice_v3020_params_st {
+ int *device;
+} cudaGetDevice_v3020_params;
+
+typedef struct cudaSetValidDevices_v3020_params_st {
+ int *device_arr;
+ int len;
+} cudaSetValidDevices_v3020_params;
+
+typedef struct cudaSetDeviceFlags_v3020_params_st {
+ unsigned int flags;
+} cudaSetDeviceFlags_v3020_params;
+
+typedef struct cudaGetDeviceFlags_v7000_params_st {
+ unsigned int *flags;
+} cudaGetDeviceFlags_v7000_params;
+
+typedef struct cudaStreamCreate_v3020_params_st {
+ cudaStream_t *pStream;
+} cudaStreamCreate_v3020_params;
+
+typedef struct cudaStreamCreateWithFlags_v5000_params_st {
+ cudaStream_t *pStream;
+ unsigned int flags;
+} cudaStreamCreateWithFlags_v5000_params;
+
+typedef struct cudaStreamCreateWithPriority_v5050_params_st {
+ cudaStream_t *pStream;
+ unsigned int flags;
+ int priority;
+} cudaStreamCreateWithPriority_v5050_params;
+
+typedef struct cudaStreamGetPriority_ptsz_v7000_params_st {
+ cudaStream_t hStream;
+ int *priority;
+} cudaStreamGetPriority_ptsz_v7000_params;
+
+typedef struct cudaStreamGetFlags_ptsz_v7000_params_st {
+ cudaStream_t hStream;
+ unsigned int *flags;
+} cudaStreamGetFlags_ptsz_v7000_params;
+
+typedef struct cudaStreamGetId_ptsz_v12000_params_st {
+ cudaStream_t hStream;
+ unsigned long long *streamId;
+} cudaStreamGetId_ptsz_v12000_params;
+
+typedef struct cudaStreamGetDevice_ptsz_v12080_params_st {
+ cudaStream_t hStream;
+ int *device;
+} cudaStreamGetDevice_ptsz_v12080_params;
+
+typedef struct cudaStreamCopyAttributes_ptsz_v11000_params_st {
+ cudaStream_t dst;
+ cudaStream_t src;
+} cudaStreamCopyAttributes_ptsz_v11000_params;
+
+typedef struct cudaStreamGetAttribute_ptsz_v11000_params_st {
+ cudaStream_t hStream;
+ cudaStreamAttrID attr;
+ cudaStreamAttrValue *value_out;
+} cudaStreamGetAttribute_ptsz_v11000_params;
+
+typedef struct cudaStreamSetAttribute_ptsz_v11000_params_st {
+ cudaStream_t hStream;
+ cudaStreamAttrID attr;
+ const cudaStreamAttrValue *value;
+} cudaStreamSetAttribute_ptsz_v11000_params;
+
+typedef struct cudaStreamDestroy_v5050_params_st {
+ cudaStream_t stream;
+} cudaStreamDestroy_v5050_params;
+
+typedef struct cudaStreamWaitEvent_ptsz_v7000_params_st {
+ cudaStream_t stream;
+ cudaEvent_t event;
+ unsigned int flags;
+} cudaStreamWaitEvent_ptsz_v7000_params;
+
+typedef struct cudaStreamAddCallback_ptsz_v7000_params_st {
+ cudaStream_t stream;
+ cudaStreamCallback_t callback;
+ void *userData;
+ unsigned int flags;
+} cudaStreamAddCallback_ptsz_v7000_params;
+
+typedef struct cudaStreamSynchronize_ptsz_v7000_params_st {
+ cudaStream_t stream;
+} cudaStreamSynchronize_ptsz_v7000_params;
+
+typedef struct cudaStreamQuery_ptsz_v7000_params_st {
+ cudaStream_t stream;
+} cudaStreamQuery_ptsz_v7000_params;
+
+typedef struct cudaStreamAttachMemAsync_ptsz_v7000_params_st {
+ cudaStream_t stream;
+ void *devPtr;
+ size_t length;
+ unsigned int flags;
+} cudaStreamAttachMemAsync_ptsz_v7000_params;
+
+typedef struct cudaStreamBeginCapture_ptsz_v10000_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureMode mode;
+} cudaStreamBeginCapture_ptsz_v10000_params;
+
+typedef struct cudaStreamBeginCaptureToGraph_ptsz_v12030_params_st {
+ cudaStream_t stream;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *dependencies;
+ const cudaGraphEdgeData *dependencyData;
+ size_t numDependencies;
+ enum cudaStreamCaptureMode mode;
+} cudaStreamBeginCaptureToGraph_ptsz_v12030_params;
+
+typedef struct cudaThreadExchangeStreamCaptureMode_v10010_params_st {
+ enum cudaStreamCaptureMode *mode;
+} cudaThreadExchangeStreamCaptureMode_v10010_params;
+
+typedef struct cudaStreamEndCapture_ptsz_v10000_params_st {
+ cudaStream_t stream;
+ cudaGraph_t *pGraph;
+} cudaStreamEndCapture_ptsz_v10000_params;
+
+typedef struct cudaStreamIsCapturing_ptsz_v10000_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *pCaptureStatus;
+} cudaStreamIsCapturing_ptsz_v10000_params;
+
+typedef struct cudaStreamGetCaptureInfo_v2_ptsz_v11030_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+ cudaGraph_t *graph_out;
+ const cudaGraphNode_t **dependencies_out;
+ size_t *numDependencies_out;
+} cudaStreamGetCaptureInfo_v2_ptsz_v11030_params;
+
+typedef struct cudaStreamGetCaptureInfo_v3_ptsz_v12030_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+ cudaGraph_t *graph_out;
+ const cudaGraphNode_t **dependencies_out;
+ const cudaGraphEdgeData **edgeData_out;
+ size_t *numDependencies_out;
+} cudaStreamGetCaptureInfo_v3_ptsz_v12030_params;
+
+typedef struct cudaStreamUpdateCaptureDependencies_ptsz_v11030_params_st {
+ cudaStream_t stream;
+ cudaGraphNode_t *dependencies;
+ size_t numDependencies;
+ unsigned int flags;
+} cudaStreamUpdateCaptureDependencies_ptsz_v11030_params;
+
+typedef struct cudaStreamUpdateCaptureDependencies_v2_ptsz_v12030_params_st {
+ cudaStream_t stream;
+ cudaGraphNode_t *dependencies;
+ const cudaGraphEdgeData *dependencyData;
+ size_t numDependencies;
+ unsigned int flags;
+} cudaStreamUpdateCaptureDependencies_v2_ptsz_v12030_params;
+
+typedef struct cudaEventCreate_v3020_params_st {
+ cudaEvent_t *event;
+} cudaEventCreate_v3020_params;
+
+typedef struct cudaEventCreateWithFlags_v3020_params_st {
+ cudaEvent_t *event;
+ unsigned int flags;
+} cudaEventCreateWithFlags_v3020_params;
+
+typedef struct cudaEventRecord_ptsz_v7000_params_st {
+ cudaEvent_t event;
+ cudaStream_t stream;
+} cudaEventRecord_ptsz_v7000_params;
+
+typedef struct cudaEventRecordWithFlags_ptsz_v11010_params_st {
+ cudaEvent_t event;
+ cudaStream_t stream;
+ unsigned int flags;
+} cudaEventRecordWithFlags_ptsz_v11010_params;
+
+typedef struct cudaEventQuery_v3020_params_st {
+ cudaEvent_t event;
+} cudaEventQuery_v3020_params;
+
+typedef struct cudaEventSynchronize_v3020_params_st {
+ cudaEvent_t event;
+} cudaEventSynchronize_v3020_params;
+
+typedef struct cudaEventDestroy_v3020_params_st {
+ cudaEvent_t event;
+} cudaEventDestroy_v3020_params;
+
+typedef struct cudaEventElapsedTime_v3020_params_st {
+ float *ms;
+ cudaEvent_t start;
+ cudaEvent_t end;
+} cudaEventElapsedTime_v3020_params;
+
+typedef struct cudaEventElapsedTime_v2_v12080_params_st {
+ float *ms;
+ cudaEvent_t start;
+ cudaEvent_t end;
+} cudaEventElapsedTime_v2_v12080_params;
+
+typedef struct cudaImportExternalMemory_v10000_params_st {
+ cudaExternalMemory_t *extMem_out;
+ const struct cudaExternalMemoryHandleDesc *memHandleDesc;
+} cudaImportExternalMemory_v10000_params;
+
+typedef struct cudaExternalMemoryGetMappedBuffer_v10000_params_st {
+ void **devPtr;
+ cudaExternalMemory_t extMem;
+ const struct cudaExternalMemoryBufferDesc *bufferDesc;
+} cudaExternalMemoryGetMappedBuffer_v10000_params;
+
+typedef struct cudaExternalMemoryGetMappedMipmappedArray_v10000_params_st {
+ cudaMipmappedArray_t *mipmap;
+ cudaExternalMemory_t extMem;
+ const struct cudaExternalMemoryMipmappedArrayDesc *mipmapDesc;
+} cudaExternalMemoryGetMappedMipmappedArray_v10000_params;
+
+typedef struct cudaDestroyExternalMemory_v10000_params_st {
+ cudaExternalMemory_t extMem;
+} cudaDestroyExternalMemory_v10000_params;
+
+typedef struct cudaImportExternalSemaphore_v10000_params_st {
+ cudaExternalSemaphore_t *extSem_out;
+ const struct cudaExternalSemaphoreHandleDesc *semHandleDesc;
+} cudaImportExternalSemaphore_v10000_params;
+
+typedef struct cudaSignalExternalSemaphoresAsync_v2_ptsz_v11020_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreSignalParams *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaSignalExternalSemaphoresAsync_v2_ptsz_v11020_params;
+
+typedef struct cudaWaitExternalSemaphoresAsync_v2_ptsz_v11020_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreWaitParams *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaWaitExternalSemaphoresAsync_v2_ptsz_v11020_params;
+
+typedef struct cudaDestroyExternalSemaphore_v10000_params_st {
+ cudaExternalSemaphore_t extSem;
+} cudaDestroyExternalSemaphore_v10000_params;
+
+typedef struct cudaLaunchKernel_ptsz_v7000_params_st {
+ const void *func;
+ dim3 gridDim;
+ dim3 blockDim;
+ void **args;
+ size_t sharedMem;
+ cudaStream_t stream;
+} cudaLaunchKernel_ptsz_v7000_params;
+
+typedef struct cudaLaunchKernelExC_ptsz_v11060_params_st {
+ const cudaLaunchConfig_t *config;
+ const void *func;
+ void **args;
+} cudaLaunchKernelExC_ptsz_v11060_params;
+
+typedef struct cudaLaunchCooperativeKernel_ptsz_v9000_params_st {
+ const void *func;
+ dim3 gridDim;
+ dim3 blockDim;
+ void **args;
+ size_t sharedMem;
+ cudaStream_t stream;
+} cudaLaunchCooperativeKernel_ptsz_v9000_params;
+
+typedef struct cudaLaunchCooperativeKernelMultiDevice_v9000_params_st {
+ struct cudaLaunchParams *launchParamsList;
+ unsigned int numDevices;
+ unsigned int flags;
+} cudaLaunchCooperativeKernelMultiDevice_v9000_params;
+
+typedef struct cudaFuncSetCacheConfig_v3020_params_st {
+ const void *func;
+ enum cudaFuncCache cacheConfig;
+} cudaFuncSetCacheConfig_v3020_params;
+
+typedef struct cudaFuncGetAttributes_v3020_params_st {
+ struct cudaFuncAttributes *attr;
+ const void *func;
+} cudaFuncGetAttributes_v3020_params;
+
+typedef struct cudaFuncSetAttribute_v9000_params_st {
+ const void *func;
+ enum cudaFuncAttribute attr;
+ int value;
+} cudaFuncSetAttribute_v9000_params;
+
+typedef struct cudaFuncGetName_v12030_params_st {
+ const char **name;
+ const void *func;
+} cudaFuncGetName_v12030_params;
+
+typedef struct cudaFuncGetParamInfo_v12040_params_st {
+ const void *func;
+ size_t paramIndex;
+ size_t *paramOffset;
+ size_t *paramSize;
+} cudaFuncGetParamInfo_v12040_params;
+
+typedef struct cudaLaunchHostFunc_ptsz_v10000_params_st {
+ cudaStream_t stream;
+ cudaHostFn_t fn;
+ void *userData;
+} cudaLaunchHostFunc_ptsz_v10000_params;
+
+typedef struct cudaFuncSetSharedMemConfig_v4020_params_st {
+ const void *func;
+ enum cudaSharedMemConfig config;
+} cudaFuncSetSharedMemConfig_v4020_params;
+
+typedef struct cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6050_params_st {
+ int *numBlocks;
+ const void *func;
+ int blockSize;
+ size_t dynamicSMemSize;
+} cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6050_params;
+
+typedef struct cudaOccupancyAvailableDynamicSMemPerBlock_v10200_params_st {
+ size_t *dynamicSmemSize;
+ const void *func;
+ int numBlocks;
+ int blockSize;
+} cudaOccupancyAvailableDynamicSMemPerBlock_v10200_params;
+
+typedef struct cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_v7000_params_st {
+ int *numBlocks;
+ const void *func;
+ int blockSize;
+ size_t dynamicSMemSize;
+ unsigned int flags;
+} cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags_v7000_params;
+
+typedef struct cudaOccupancyMaxPotentialClusterSize_v11070_params_st {
+ int *clusterSize;
+ const void *func;
+ const cudaLaunchConfig_t *launchConfig;
+} cudaOccupancyMaxPotentialClusterSize_v11070_params;
+
+typedef struct cudaOccupancyMaxActiveClusters_v11070_params_st {
+ int *numClusters;
+ const void *func;
+ const cudaLaunchConfig_t *launchConfig;
+} cudaOccupancyMaxActiveClusters_v11070_params;
+
+typedef struct cudaMallocManaged_v6000_params_st {
+ void **devPtr;
+ size_t size;
+ unsigned int flags;
+} cudaMallocManaged_v6000_params;
+
+typedef struct cudaMalloc_v3020_params_st {
+ void **devPtr;
+ size_t size;
+} cudaMalloc_v3020_params;
+
+typedef struct cudaMallocHost_v3020_params_st {
+ void **ptr;
+ size_t size;
+} cudaMallocHost_v3020_params;
+
+typedef struct cudaMallocPitch_v3020_params_st {
+ void **devPtr;
+ size_t *pitch;
+ size_t width;
+ size_t height;
+} cudaMallocPitch_v3020_params;
+
+typedef struct cudaMallocArray_v3020_params_st {
+ cudaArray_t *array;
+ const struct cudaChannelFormatDesc *desc;
+ size_t width;
+ size_t height;
+ unsigned int flags;
+} cudaMallocArray_v3020_params;
+
+typedef struct cudaFree_v3020_params_st {
+ void *devPtr;
+} cudaFree_v3020_params;
+
+typedef struct cudaFreeHost_v3020_params_st {
+ void *ptr;
+} cudaFreeHost_v3020_params;
+
+typedef struct cudaFreeArray_v3020_params_st {
+ cudaArray_t array;
+} cudaFreeArray_v3020_params;
+
+typedef struct cudaFreeMipmappedArray_v5000_params_st {
+ cudaMipmappedArray_t mipmappedArray;
+} cudaFreeMipmappedArray_v5000_params;
+
+typedef struct cudaHostAlloc_v3020_params_st {
+ void **pHost;
+ size_t size;
+ unsigned int flags;
+} cudaHostAlloc_v3020_params;
+
+typedef struct cudaHostRegister_v4000_params_st {
+ void *ptr;
+ size_t size;
+ unsigned int flags;
+} cudaHostRegister_v4000_params;
+
+typedef struct cudaHostUnregister_v4000_params_st {
+ void *ptr;
+} cudaHostUnregister_v4000_params;
+
+typedef struct cudaHostGetDevicePointer_v3020_params_st {
+ void **pDevice;
+ void *pHost;
+ unsigned int flags;
+} cudaHostGetDevicePointer_v3020_params;
+
+typedef struct cudaHostGetFlags_v3020_params_st {
+ unsigned int *pFlags;
+ void *pHost;
+} cudaHostGetFlags_v3020_params;
+
+typedef struct cudaMalloc3D_v3020_params_st {
+ struct cudaPitchedPtr *pitchedDevPtr;
+ struct cudaExtent extent;
+} cudaMalloc3D_v3020_params;
+
+typedef struct cudaMalloc3DArray_v3020_params_st {
+ cudaArray_t *array;
+ const struct cudaChannelFormatDesc *desc;
+ struct cudaExtent extent;
+ unsigned int flags;
+} cudaMalloc3DArray_v3020_params;
+
+typedef struct cudaMallocMipmappedArray_v5000_params_st {
+ cudaMipmappedArray_t *mipmappedArray;
+ const struct cudaChannelFormatDesc *desc;
+ struct cudaExtent extent;
+ unsigned int numLevels;
+ unsigned int flags;
+} cudaMallocMipmappedArray_v5000_params;
+
+typedef struct cudaGetMipmappedArrayLevel_v5000_params_st {
+ cudaArray_t *levelArray;
+ cudaMipmappedArray_const_t mipmappedArray;
+ unsigned int level;
+} cudaGetMipmappedArrayLevel_v5000_params;
+
+typedef struct cudaMemcpy3D_ptds_v7000_params_st {
+ const struct cudaMemcpy3DParms *p;
+} cudaMemcpy3D_ptds_v7000_params;
+
+typedef struct cudaMemcpy3DPeer_ptds_v7000_params_st {
+ const struct cudaMemcpy3DPeerParms *p;
+} cudaMemcpy3DPeer_ptds_v7000_params;
+
+typedef struct cudaMemcpy3DAsync_ptsz_v7000_params_st {
+ const struct cudaMemcpy3DParms *p;
+ cudaStream_t stream;
+} cudaMemcpy3DAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpy3DPeerAsync_ptsz_v7000_params_st {
+ const struct cudaMemcpy3DPeerParms *p;
+ cudaStream_t stream;
+} cudaMemcpy3DPeerAsync_ptsz_v7000_params;
+
+typedef struct cudaMemGetInfo_v3020_params_st {
+ size_t *free;
+ size_t *total;
+} cudaMemGetInfo_v3020_params;
+
+typedef struct cudaArrayGetInfo_v4010_params_st {
+ struct cudaChannelFormatDesc *desc;
+ struct cudaExtent *extent;
+ unsigned int *flags;
+ cudaArray_t array;
+} cudaArrayGetInfo_v4010_params;
+
+typedef struct cudaArrayGetPlane_v11020_params_st {
+ cudaArray_t *pPlaneArray;
+ cudaArray_t hArray;
+ unsigned int planeIdx;
+} cudaArrayGetPlane_v11020_params;
+
+typedef struct cudaArrayGetMemoryRequirements_v11060_params_st {
+ struct cudaArrayMemoryRequirements *memoryRequirements;
+ cudaArray_t array;
+ int device;
+} cudaArrayGetMemoryRequirements_v11060_params;
+
+typedef struct cudaMipmappedArrayGetMemoryRequirements_v11060_params_st {
+ struct cudaArrayMemoryRequirements *memoryRequirements;
+ cudaMipmappedArray_t mipmap;
+ int device;
+} cudaMipmappedArrayGetMemoryRequirements_v11060_params;
+
+typedef struct cudaArrayGetSparseProperties_v11010_params_st {
+ struct cudaArraySparseProperties *sparseProperties;
+ cudaArray_t array;
+} cudaArrayGetSparseProperties_v11010_params;
+
+typedef struct cudaMipmappedArrayGetSparseProperties_v11010_params_st {
+ struct cudaArraySparseProperties *sparseProperties;
+ cudaMipmappedArray_t mipmap;
+} cudaMipmappedArrayGetSparseProperties_v11010_params;
+
+typedef struct cudaMemcpy_ptds_v7000_params_st {
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy_ptds_v7000_params;
+
+typedef struct cudaMemcpyPeer_v4000_params_st {
+ void *dst;
+ int dstDevice;
+ const void *src;
+ int srcDevice;
+ size_t count;
+} cudaMemcpyPeer_v4000_params;
+
+typedef struct cudaMemcpy2D_ptds_v7000_params_st {
+ void *dst;
+ size_t dpitch;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2D_ptds_v7000_params;
+
+typedef struct cudaMemcpy2DToArray_ptds_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DToArray_ptds_v7000_params;
+
+typedef struct cudaMemcpy2DFromArray_ptds_v7000_params_st {
+ void *dst;
+ size_t dpitch;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DFromArray_ptds_v7000_params;
+
+typedef struct cudaMemcpy2DArrayToArray_ptds_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffsetDst;
+ size_t hOffsetDst;
+ cudaArray_const_t src;
+ size_t wOffsetSrc;
+ size_t hOffsetSrc;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DArrayToArray_ptds_v7000_params;
+
+typedef struct cudaMemcpyToSymbol_ptds_v7000_params_st {
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyToSymbol_ptds_v7000_params;
+
+typedef struct cudaMemcpyFromSymbol_ptds_v7000_params_st {
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyFromSymbol_ptds_v7000_params;
+
+typedef struct cudaMemcpyAsync_ptsz_v7000_params_st {
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpyPeerAsync_v4000_params_st {
+ void *dst;
+ int dstDevice;
+ const void *src;
+ int srcDevice;
+ size_t count;
+ cudaStream_t stream;
+} cudaMemcpyPeerAsync_v4000_params;
+
+typedef struct cudaMemcpyBatchAsync_ptsz_v12080_params_st {
+ void **dsts;
+ void **srcs;
+ size_t *sizes;
+ size_t count;
+ struct cudaMemcpyAttributes *attrs;
+ size_t *attrsIdxs;
+ size_t numAttrs;
+ size_t *failIdx;
+ cudaStream_t stream;
+} cudaMemcpyBatchAsync_ptsz_v12080_params;
+
+typedef struct cudaMemcpy3DBatchAsync_ptsz_v12080_params_st {
+ size_t numOps;
+ struct cudaMemcpy3DBatchOp *opList;
+ size_t *failIdx;
+ unsigned long long flags;
+ cudaStream_t stream;
+} cudaMemcpy3DBatchAsync_ptsz_v12080_params;
+
+typedef struct cudaMemcpy2DAsync_ptsz_v7000_params_st {
+ void *dst;
+ size_t dpitch;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpy2DToArrayAsync_ptsz_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DToArrayAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpy2DFromArrayAsync_ptsz_v7000_params_st {
+ void *dst;
+ size_t dpitch;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DFromArrayAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpyToSymbolAsync_ptsz_v7000_params_st {
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyToSymbolAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpyFromSymbolAsync_ptsz_v7000_params_st {
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyFromSymbolAsync_ptsz_v7000_params;
+
+typedef struct cudaMemset_ptds_v7000_params_st {
+ void *devPtr;
+ int value;
+ size_t count;
+} cudaMemset_ptds_v7000_params;
+
+typedef struct cudaMemset2D_ptds_v7000_params_st {
+ void *devPtr;
+ size_t pitch;
+ int value;
+ size_t width;
+ size_t height;
+} cudaMemset2D_ptds_v7000_params;
+
+typedef struct cudaMemset3D_ptds_v7000_params_st {
+ struct cudaPitchedPtr pitchedDevPtr;
+ int value;
+ struct cudaExtent extent;
+} cudaMemset3D_ptds_v7000_params;
+
+typedef struct cudaMemsetAsync_ptsz_v7000_params_st {
+ void *devPtr;
+ int value;
+ size_t count;
+ cudaStream_t stream;
+} cudaMemsetAsync_ptsz_v7000_params;
+
+typedef struct cudaMemset2DAsync_ptsz_v7000_params_st {
+ void *devPtr;
+ size_t pitch;
+ int value;
+ size_t width;
+ size_t height;
+ cudaStream_t stream;
+} cudaMemset2DAsync_ptsz_v7000_params;
+
+typedef struct cudaMemset3DAsync_ptsz_v7000_params_st {
+ struct cudaPitchedPtr pitchedDevPtr;
+ int value;
+ struct cudaExtent extent;
+ cudaStream_t stream;
+} cudaMemset3DAsync_ptsz_v7000_params;
+
+typedef struct cudaGetSymbolAddress_v3020_params_st {
+ void **devPtr;
+ const void *symbol;
+} cudaGetSymbolAddress_v3020_params;
+
+typedef struct cudaGetSymbolSize_v3020_params_st {
+ size_t *size;
+ const void *symbol;
+} cudaGetSymbolSize_v3020_params;
+
+typedef struct cudaMemPrefetchAsync_ptsz_v8000_params_st {
+ const void *devPtr;
+ size_t count;
+ int dstDevice;
+ cudaStream_t stream;
+} cudaMemPrefetchAsync_ptsz_v8000_params;
+
+typedef struct cudaMemPrefetchAsync_v2_ptsz_v12020_params_st {
+ const void *devPtr;
+ size_t count;
+ struct cudaMemLocation location;
+ unsigned int flags;
+ cudaStream_t stream;
+} cudaMemPrefetchAsync_v2_ptsz_v12020_params;
+
+typedef struct cudaMemAdvise_v8000_params_st {
+ const void *devPtr;
+ size_t count;
+ enum cudaMemoryAdvise advice;
+ int device;
+} cudaMemAdvise_v8000_params;
+
+typedef struct cudaMemAdvise_v2_v12020_params_st {
+ const void *devPtr;
+ size_t count;
+ enum cudaMemoryAdvise advice;
+ struct cudaMemLocation location;
+} cudaMemAdvise_v2_v12020_params;
+
+typedef struct cudaMemRangeGetAttribute_v8000_params_st {
+ void *data;
+ size_t dataSize;
+ enum cudaMemRangeAttribute attribute;
+ const void *devPtr;
+ size_t count;
+} cudaMemRangeGetAttribute_v8000_params;
+
+typedef struct cudaMemRangeGetAttributes_v8000_params_st {
+ void **data;
+ size_t *dataSizes;
+ enum cudaMemRangeAttribute *attributes;
+ size_t numAttributes;
+ const void *devPtr;
+ size_t count;
+} cudaMemRangeGetAttributes_v8000_params;
+
+typedef struct cudaMemcpyToArray_ptds_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyToArray_ptds_v7000_params;
+
+typedef struct cudaMemcpyFromArray_ptds_v7000_params_st {
+ void *dst;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyFromArray_ptds_v7000_params;
+
+typedef struct cudaMemcpyArrayToArray_ptds_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffsetDst;
+ size_t hOffsetDst;
+ cudaArray_const_t src;
+ size_t wOffsetSrc;
+ size_t hOffsetSrc;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyArrayToArray_ptds_v7000_params;
+
+typedef struct cudaMemcpyToArrayAsync_ptsz_v7000_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyToArrayAsync_ptsz_v7000_params;
+
+typedef struct cudaMemcpyFromArrayAsync_ptsz_v7000_params_st {
+ void *dst;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyFromArrayAsync_ptsz_v7000_params;
+
+typedef struct cudaMallocAsync_ptsz_v11020_params_st {
+ void **devPtr;
+ size_t size;
+ cudaStream_t hStream;
+} cudaMallocAsync_ptsz_v11020_params;
+
+typedef struct cudaFreeAsync_ptsz_v11020_params_st {
+ void *devPtr;
+ cudaStream_t hStream;
+} cudaFreeAsync_ptsz_v11020_params;
+
+typedef struct cudaMemPoolTrimTo_v11020_params_st {
+ cudaMemPool_t memPool;
+ size_t minBytesToKeep;
+} cudaMemPoolTrimTo_v11020_params;
+
+typedef struct cudaMemPoolSetAttribute_v11020_params_st {
+ cudaMemPool_t memPool;
+ enum cudaMemPoolAttr attr;
+ void *value;
+} cudaMemPoolSetAttribute_v11020_params;
+
+typedef struct cudaMemPoolGetAttribute_v11020_params_st {
+ cudaMemPool_t memPool;
+ enum cudaMemPoolAttr attr;
+ void *value;
+} cudaMemPoolGetAttribute_v11020_params;
+
+typedef struct cudaMemPoolSetAccess_v11020_params_st {
+ cudaMemPool_t memPool;
+ const struct cudaMemAccessDesc *descList;
+ size_t count;
+} cudaMemPoolSetAccess_v11020_params;
+
+typedef struct cudaMemPoolGetAccess_v11020_params_st {
+ enum cudaMemAccessFlags *flags;
+ cudaMemPool_t memPool;
+ struct cudaMemLocation *location;
+} cudaMemPoolGetAccess_v11020_params;
+
+typedef struct cudaMemPoolCreate_v11020_params_st {
+ cudaMemPool_t *memPool;
+ const struct cudaMemPoolProps *poolProps;
+} cudaMemPoolCreate_v11020_params;
+
+typedef struct cudaMemPoolDestroy_v11020_params_st {
+ cudaMemPool_t memPool;
+} cudaMemPoolDestroy_v11020_params;
+
+typedef struct cudaMallocFromPoolAsync_ptsz_v11020_params_st {
+ void **ptr;
+ size_t size;
+ cudaMemPool_t memPool;
+ cudaStream_t stream;
+} cudaMallocFromPoolAsync_ptsz_v11020_params;
+
+typedef struct cudaMemPoolExportToShareableHandle_v11020_params_st {
+ void *shareableHandle;
+ cudaMemPool_t memPool;
+ enum cudaMemAllocationHandleType handleType;
+ unsigned int flags;
+} cudaMemPoolExportToShareableHandle_v11020_params;
+
+typedef struct cudaMemPoolImportFromShareableHandle_v11020_params_st {
+ cudaMemPool_t *memPool;
+ void *shareableHandle;
+ enum cudaMemAllocationHandleType handleType;
+ unsigned int flags;
+} cudaMemPoolImportFromShareableHandle_v11020_params;
+
+typedef struct cudaMemPoolExportPointer_v11020_params_st {
+ struct cudaMemPoolPtrExportData *exportData;
+ void *ptr;
+} cudaMemPoolExportPointer_v11020_params;
+
+typedef struct cudaMemPoolImportPointer_v11020_params_st {
+ void **ptr;
+ cudaMemPool_t memPool;
+ struct cudaMemPoolPtrExportData *exportData;
+} cudaMemPoolImportPointer_v11020_params;
+
+typedef struct cudaPointerGetAttributes_v4000_params_st {
+ struct cudaPointerAttributes *attributes;
+ const void *ptr;
+} cudaPointerGetAttributes_v4000_params;
+
+typedef struct cudaDeviceCanAccessPeer_v4000_params_st {
+ int *canAccessPeer;
+ int device;
+ int peerDevice;
+} cudaDeviceCanAccessPeer_v4000_params;
+
+typedef struct cudaDeviceEnablePeerAccess_v4000_params_st {
+ int peerDevice;
+ unsigned int flags;
+} cudaDeviceEnablePeerAccess_v4000_params;
+
+typedef struct cudaDeviceDisablePeerAccess_v4000_params_st {
+ int peerDevice;
+} cudaDeviceDisablePeerAccess_v4000_params;
+
+typedef struct cudaGraphicsUnregisterResource_v3020_params_st {
+ cudaGraphicsResource_t resource;
+} cudaGraphicsUnregisterResource_v3020_params;
+
+typedef struct cudaGraphicsResourceSetMapFlags_v3020_params_st {
+ cudaGraphicsResource_t resource;
+ unsigned int flags;
+} cudaGraphicsResourceSetMapFlags_v3020_params;
+
+typedef struct cudaGraphicsMapResources_v3020_params_st {
+ int count;
+ cudaGraphicsResource_t *resources;
+ cudaStream_t stream;
+} cudaGraphicsMapResources_v3020_params;
+
+typedef struct cudaGraphicsUnmapResources_v3020_params_st {
+ int count;
+ cudaGraphicsResource_t *resources;
+ cudaStream_t stream;
+} cudaGraphicsUnmapResources_v3020_params;
+
+typedef struct cudaGraphicsResourceGetMappedPointer_v3020_params_st {
+ void **devPtr;
+ size_t *size;
+ cudaGraphicsResource_t resource;
+} cudaGraphicsResourceGetMappedPointer_v3020_params;
+
+typedef struct cudaGraphicsSubResourceGetMappedArray_v3020_params_st {
+ cudaArray_t *array;
+ cudaGraphicsResource_t resource;
+ unsigned int arrayIndex;
+ unsigned int mipLevel;
+} cudaGraphicsSubResourceGetMappedArray_v3020_params;
+
+typedef struct cudaGraphicsResourceGetMappedMipmappedArray_v5000_params_st {
+ cudaMipmappedArray_t *mipmappedArray;
+ cudaGraphicsResource_t resource;
+} cudaGraphicsResourceGetMappedMipmappedArray_v5000_params;
+
+typedef struct cudaGetChannelDesc_v3020_params_st {
+ struct cudaChannelFormatDesc *desc;
+ cudaArray_const_t array;
+} cudaGetChannelDesc_v3020_params;
+
+typedef struct cudaCreateChannelDesc_v3020_params_st {
+ int x;
+ int y;
+ int z;
+ int w;
+ enum cudaChannelFormatKind f;
+} cudaCreateChannelDesc_v3020_params;
+
+typedef struct cudaCreateTextureObject_v5000_params_st {
+ cudaTextureObject_t *pTexObject;
+ const struct cudaResourceDesc *pResDesc;
+ const struct cudaTextureDesc *pTexDesc;
+ const struct cudaResourceViewDesc *pResViewDesc;
+} cudaCreateTextureObject_v5000_params;
+
+typedef struct cudaDestroyTextureObject_v5000_params_st {
+ cudaTextureObject_t texObject;
+} cudaDestroyTextureObject_v5000_params;
+
+typedef struct cudaGetTextureObjectResourceDesc_v5000_params_st {
+ struct cudaResourceDesc *pResDesc;
+ cudaTextureObject_t texObject;
+} cudaGetTextureObjectResourceDesc_v5000_params;
+
+typedef struct cudaGetTextureObjectTextureDesc_v5000_params_st {
+ struct cudaTextureDesc *pTexDesc;
+ cudaTextureObject_t texObject;
+} cudaGetTextureObjectTextureDesc_v5000_params;
+
+typedef struct cudaGetTextureObjectResourceViewDesc_v5000_params_st {
+ struct cudaResourceViewDesc *pResViewDesc;
+ cudaTextureObject_t texObject;
+} cudaGetTextureObjectResourceViewDesc_v5000_params;
+
+typedef struct cudaCreateSurfaceObject_v5000_params_st {
+ cudaSurfaceObject_t *pSurfObject;
+ const struct cudaResourceDesc *pResDesc;
+} cudaCreateSurfaceObject_v5000_params;
+
+typedef struct cudaDestroySurfaceObject_v5000_params_st {
+ cudaSurfaceObject_t surfObject;
+} cudaDestroySurfaceObject_v5000_params;
+
+typedef struct cudaGetSurfaceObjectResourceDesc_v5000_params_st {
+ struct cudaResourceDesc *pResDesc;
+ cudaSurfaceObject_t surfObject;
+} cudaGetSurfaceObjectResourceDesc_v5000_params;
+
+typedef struct cudaDriverGetVersion_v3020_params_st {
+ int *driverVersion;
+} cudaDriverGetVersion_v3020_params;
+
+typedef struct cudaRuntimeGetVersion_v3020_params_st {
+ int *runtimeVersion;
+} cudaRuntimeGetVersion_v3020_params;
+
+typedef struct cudaGraphCreate_v10000_params_st {
+ cudaGraph_t *pGraph;
+ unsigned int flags;
+} cudaGraphCreate_v10000_params;
+
+typedef struct cudaGraphAddKernelNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaKernelNodeParams *pNodeParams;
+} cudaGraphAddKernelNode_v10000_params;
+
+typedef struct cudaGraphKernelNodeGetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ struct cudaKernelNodeParams *pNodeParams;
+} cudaGraphKernelNodeGetParams_v10000_params;
+
+typedef struct cudaGraphKernelNodeSetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ const struct cudaKernelNodeParams *pNodeParams;
+} cudaGraphKernelNodeSetParams_v10000_params;
+
+typedef struct cudaGraphKernelNodeCopyAttributes_v11000_params_st {
+ cudaGraphNode_t hSrc;
+ cudaGraphNode_t hDst;
+} cudaGraphKernelNodeCopyAttributes_v11000_params;
+
+typedef struct cudaGraphKernelNodeGetAttribute_v11000_params_st {
+ cudaGraphNode_t hNode;
+ cudaKernelNodeAttrID attr;
+ cudaKernelNodeAttrValue *value_out;
+} cudaGraphKernelNodeGetAttribute_v11000_params;
+
+typedef struct cudaGraphKernelNodeSetAttribute_v11000_params_st {
+ cudaGraphNode_t hNode;
+ cudaKernelNodeAttrID attr;
+ const cudaKernelNodeAttrValue *value;
+} cudaGraphKernelNodeSetAttribute_v11000_params;
+
+typedef struct cudaGraphAddMemcpyNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaMemcpy3DParms *pCopyParams;
+} cudaGraphAddMemcpyNode_v10000_params;
+
+typedef struct cudaGraphAddMemcpyNodeToSymbol_v11010_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphAddMemcpyNodeToSymbol_v11010_params;
+
+typedef struct cudaGraphAddMemcpyNodeFromSymbol_v11010_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphAddMemcpyNodeFromSymbol_v11010_params;
+
+typedef struct cudaGraphAddMemcpyNode1D_v11010_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaGraphAddMemcpyNode1D_v11010_params;
+
+typedef struct cudaGraphMemcpyNodeGetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ struct cudaMemcpy3DParms *pNodeParams;
+} cudaGraphMemcpyNodeGetParams_v10000_params;
+
+typedef struct cudaGraphMemcpyNodeSetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ const struct cudaMemcpy3DParms *pNodeParams;
+} cudaGraphMemcpyNodeSetParams_v10000_params;
+
+typedef struct cudaGraphMemcpyNodeSetParamsToSymbol_v11010_params_st {
+ cudaGraphNode_t node;
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphMemcpyNodeSetParamsToSymbol_v11010_params;
+
+typedef struct cudaGraphMemcpyNodeSetParamsFromSymbol_v11010_params_st {
+ cudaGraphNode_t node;
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphMemcpyNodeSetParamsFromSymbol_v11010_params;
+
+typedef struct cudaGraphMemcpyNodeSetParams1D_v11010_params_st {
+ cudaGraphNode_t node;
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaGraphMemcpyNodeSetParams1D_v11010_params;
+
+typedef struct cudaGraphAddMemsetNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaMemsetParams *pMemsetParams;
+} cudaGraphAddMemsetNode_v10000_params;
+
+typedef struct cudaGraphMemsetNodeGetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ struct cudaMemsetParams *pNodeParams;
+} cudaGraphMemsetNodeGetParams_v10000_params;
+
+typedef struct cudaGraphMemsetNodeSetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ const struct cudaMemsetParams *pNodeParams;
+} cudaGraphMemsetNodeSetParams_v10000_params;
+
+typedef struct cudaGraphAddHostNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaHostNodeParams *pNodeParams;
+} cudaGraphAddHostNode_v10000_params;
+
+typedef struct cudaGraphHostNodeGetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ struct cudaHostNodeParams *pNodeParams;
+} cudaGraphHostNodeGetParams_v10000_params;
+
+typedef struct cudaGraphHostNodeSetParams_v10000_params_st {
+ cudaGraphNode_t node;
+ const struct cudaHostNodeParams *pNodeParams;
+} cudaGraphHostNodeSetParams_v10000_params;
+
+typedef struct cudaGraphAddChildGraphNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ cudaGraph_t childGraph;
+} cudaGraphAddChildGraphNode_v10000_params;
+
+typedef struct cudaGraphChildGraphNodeGetGraph_v10000_params_st {
+ cudaGraphNode_t node;
+ cudaGraph_t *pGraph;
+} cudaGraphChildGraphNodeGetGraph_v10000_params;
+
+typedef struct cudaGraphAddEmptyNode_v10000_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+} cudaGraphAddEmptyNode_v10000_params;
+
+typedef struct cudaGraphAddEventRecordNode_v11010_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ cudaEvent_t event;
+} cudaGraphAddEventRecordNode_v11010_params;
+
+typedef struct cudaGraphEventRecordNodeGetEvent_v11010_params_st {
+ cudaGraphNode_t node;
+ cudaEvent_t *event_out;
+} cudaGraphEventRecordNodeGetEvent_v11010_params;
+
+typedef struct cudaGraphEventRecordNodeSetEvent_v11010_params_st {
+ cudaGraphNode_t node;
+ cudaEvent_t event;
+} cudaGraphEventRecordNodeSetEvent_v11010_params;
+
+typedef struct cudaGraphAddEventWaitNode_v11010_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ cudaEvent_t event;
+} cudaGraphAddEventWaitNode_v11010_params;
+
+typedef struct cudaGraphEventWaitNodeGetEvent_v11010_params_st {
+ cudaGraphNode_t node;
+ cudaEvent_t *event_out;
+} cudaGraphEventWaitNodeGetEvent_v11010_params;
+
+typedef struct cudaGraphEventWaitNodeSetEvent_v11010_params_st {
+ cudaGraphNode_t node;
+ cudaEvent_t event;
+} cudaGraphEventWaitNodeSetEvent_v11010_params;
+
+typedef struct cudaGraphAddExternalSemaphoresSignalNode_v11020_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaExternalSemaphoreSignalNodeParams *nodeParams;
+} cudaGraphAddExternalSemaphoresSignalNode_v11020_params;
+
+typedef struct cudaGraphExternalSemaphoresSignalNodeGetParams_v11020_params_st {
+ cudaGraphNode_t hNode;
+ struct cudaExternalSemaphoreSignalNodeParams *params_out;
+} cudaGraphExternalSemaphoresSignalNodeGetParams_v11020_params;
+
+typedef struct cudaGraphExternalSemaphoresSignalNodeSetParams_v11020_params_st {
+ cudaGraphNode_t hNode;
+ const struct cudaExternalSemaphoreSignalNodeParams *nodeParams;
+} cudaGraphExternalSemaphoresSignalNodeSetParams_v11020_params;
+
+typedef struct cudaGraphAddExternalSemaphoresWaitNode_v11020_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ const struct cudaExternalSemaphoreWaitNodeParams *nodeParams;
+} cudaGraphAddExternalSemaphoresWaitNode_v11020_params;
+
+typedef struct cudaGraphExternalSemaphoresWaitNodeGetParams_v11020_params_st {
+ cudaGraphNode_t hNode;
+ struct cudaExternalSemaphoreWaitNodeParams *params_out;
+} cudaGraphExternalSemaphoresWaitNodeGetParams_v11020_params;
+
+typedef struct cudaGraphExternalSemaphoresWaitNodeSetParams_v11020_params_st {
+ cudaGraphNode_t hNode;
+ const struct cudaExternalSemaphoreWaitNodeParams *nodeParams;
+} cudaGraphExternalSemaphoresWaitNodeSetParams_v11020_params;
+
+typedef struct cudaGraphAddMemAllocNode_v11040_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ struct cudaMemAllocNodeParams *nodeParams;
+} cudaGraphAddMemAllocNode_v11040_params;
+
+typedef struct cudaGraphMemAllocNodeGetParams_v11040_params_st {
+ cudaGraphNode_t node;
+ struct cudaMemAllocNodeParams *params_out;
+} cudaGraphMemAllocNodeGetParams_v11040_params;
+
+typedef struct cudaGraphAddMemFreeNode_v11040_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ void *dptr;
+} cudaGraphAddMemFreeNode_v11040_params;
+
+typedef struct cudaGraphMemFreeNodeGetParams_v11040_params_st {
+ cudaGraphNode_t node;
+ void *dptr_out;
+} cudaGraphMemFreeNodeGetParams_v11040_params;
+
+typedef struct cudaDeviceGraphMemTrim_v11040_params_st {
+ int device;
+} cudaDeviceGraphMemTrim_v11040_params;
+
+typedef struct cudaDeviceGetGraphMemAttribute_v11040_params_st {
+ int device;
+ enum cudaGraphMemAttributeType attr;
+ void *value;
+} cudaDeviceGetGraphMemAttribute_v11040_params;
+
+typedef struct cudaDeviceSetGraphMemAttribute_v11040_params_st {
+ int device;
+ enum cudaGraphMemAttributeType attr;
+ void *value;
+} cudaDeviceSetGraphMemAttribute_v11040_params;
+
+typedef struct cudaGraphClone_v10000_params_st {
+ cudaGraph_t *pGraphClone;
+ cudaGraph_t originalGraph;
+} cudaGraphClone_v10000_params;
+
+typedef struct cudaGraphNodeFindInClone_v10000_params_st {
+ cudaGraphNode_t *pNode;
+ cudaGraphNode_t originalNode;
+ cudaGraph_t clonedGraph;
+} cudaGraphNodeFindInClone_v10000_params;
+
+typedef struct cudaGraphNodeGetType_v10000_params_st {
+ cudaGraphNode_t node;
+ enum cudaGraphNodeType *pType;
+} cudaGraphNodeGetType_v10000_params;
+
+typedef struct cudaGraphGetNodes_v10000_params_st {
+ cudaGraph_t graph;
+ cudaGraphNode_t *nodes;
+ size_t *numNodes;
+} cudaGraphGetNodes_v10000_params;
+
+typedef struct cudaGraphGetRootNodes_v10000_params_st {
+ cudaGraph_t graph;
+ cudaGraphNode_t *pRootNodes;
+ size_t *pNumRootNodes;
+} cudaGraphGetRootNodes_v10000_params;
+
+typedef struct cudaGraphGetEdges_v10000_params_st {
+ cudaGraph_t graph;
+ cudaGraphNode_t *from;
+ cudaGraphNode_t *to;
+ size_t *numEdges;
+} cudaGraphGetEdges_v10000_params;
+
+typedef struct cudaGraphGetEdges_v2_v12030_params_st {
+ cudaGraph_t graph;
+ cudaGraphNode_t *from;
+ cudaGraphNode_t *to;
+ cudaGraphEdgeData *edgeData;
+ size_t *numEdges;
+} cudaGraphGetEdges_v2_v12030_params;
+
+typedef struct cudaGraphNodeGetDependencies_v10000_params_st {
+ cudaGraphNode_t node;
+ cudaGraphNode_t *pDependencies;
+ size_t *pNumDependencies;
+} cudaGraphNodeGetDependencies_v10000_params;
+
+typedef struct cudaGraphNodeGetDependencies_v2_v12030_params_st {
+ cudaGraphNode_t node;
+ cudaGraphNode_t *pDependencies;
+ cudaGraphEdgeData *edgeData;
+ size_t *pNumDependencies;
+} cudaGraphNodeGetDependencies_v2_v12030_params;
+
+typedef struct cudaGraphNodeGetDependentNodes_v10000_params_st {
+ cudaGraphNode_t node;
+ cudaGraphNode_t *pDependentNodes;
+ size_t *pNumDependentNodes;
+} cudaGraphNodeGetDependentNodes_v10000_params;
+
+typedef struct cudaGraphNodeGetDependentNodes_v2_v12030_params_st {
+ cudaGraphNode_t node;
+ cudaGraphNode_t *pDependentNodes;
+ cudaGraphEdgeData *edgeData;
+ size_t *pNumDependentNodes;
+} cudaGraphNodeGetDependentNodes_v2_v12030_params;
+
+typedef struct cudaGraphAddDependencies_v10000_params_st {
+ cudaGraph_t graph;
+ const cudaGraphNode_t *from;
+ const cudaGraphNode_t *to;
+ size_t numDependencies;
+} cudaGraphAddDependencies_v10000_params;
+
+typedef struct cudaGraphAddDependencies_v2_v12030_params_st {
+ cudaGraph_t graph;
+ const cudaGraphNode_t *from;
+ const cudaGraphNode_t *to;
+ const cudaGraphEdgeData *edgeData;
+ size_t numDependencies;
+} cudaGraphAddDependencies_v2_v12030_params;
+
+typedef struct cudaGraphRemoveDependencies_v10000_params_st {
+ cudaGraph_t graph;
+ const cudaGraphNode_t *from;
+ const cudaGraphNode_t *to;
+ size_t numDependencies;
+} cudaGraphRemoveDependencies_v10000_params;
+
+typedef struct cudaGraphRemoveDependencies_v2_v12030_params_st {
+ cudaGraph_t graph;
+ const cudaGraphNode_t *from;
+ const cudaGraphNode_t *to;
+ const cudaGraphEdgeData *edgeData;
+ size_t numDependencies;
+} cudaGraphRemoveDependencies_v2_v12030_params;
+
+typedef struct cudaGraphDestroyNode_v10000_params_st {
+ cudaGraphNode_t node;
+} cudaGraphDestroyNode_v10000_params;
+
+typedef struct cudaGraphInstantiate_v12000_params_st {
+ cudaGraphExec_t *pGraphExec;
+ cudaGraph_t graph;
+ unsigned long long flags;
+} cudaGraphInstantiate_v12000_params;
+
+typedef struct cudaGraphInstantiateWithFlags_v11040_params_st {
+ cudaGraphExec_t *pGraphExec;
+ cudaGraph_t graph;
+ unsigned long long flags;
+} cudaGraphInstantiateWithFlags_v11040_params;
+
+typedef struct cudaGraphInstantiateWithParams_ptsz_v12000_params_st {
+ cudaGraphExec_t *pGraphExec;
+ cudaGraph_t graph;
+ cudaGraphInstantiateParams *instantiateParams;
+} cudaGraphInstantiateWithParams_ptsz_v12000_params;
+
+typedef struct cudaGraphExecGetFlags_v12000_params_st {
+ cudaGraphExec_t graphExec;
+ unsigned long long *flags;
+} cudaGraphExecGetFlags_v12000_params;
+
+typedef struct cudaGraphExecKernelNodeSetParams_v10010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ const struct cudaKernelNodeParams *pNodeParams;
+} cudaGraphExecKernelNodeSetParams_v10010_params;
+
+typedef struct cudaGraphExecMemcpyNodeSetParams_v10020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ const struct cudaMemcpy3DParms *pNodeParams;
+} cudaGraphExecMemcpyNodeSetParams_v10020_params;
+
+typedef struct cudaGraphExecMemcpyNodeSetParamsToSymbol_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphExecMemcpyNodeSetParamsToSymbol_v11010_params;
+
+typedef struct cudaGraphExecMemcpyNodeSetParamsFromSymbol_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaGraphExecMemcpyNodeSetParamsFromSymbol_v11010_params;
+
+typedef struct cudaGraphExecMemcpyNodeSetParams1D_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaGraphExecMemcpyNodeSetParams1D_v11010_params;
+
+typedef struct cudaGraphExecMemsetNodeSetParams_v10020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ const struct cudaMemsetParams *pNodeParams;
+} cudaGraphExecMemsetNodeSetParams_v10020_params;
+
+typedef struct cudaGraphExecHostNodeSetParams_v10020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ const struct cudaHostNodeParams *pNodeParams;
+} cudaGraphExecHostNodeSetParams_v10020_params;
+
+typedef struct cudaGraphExecChildGraphNodeSetParams_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t node;
+ cudaGraph_t childGraph;
+} cudaGraphExecChildGraphNodeSetParams_v11010_params;
+
+typedef struct cudaGraphExecEventRecordNodeSetEvent_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ cudaEvent_t event;
+} cudaGraphExecEventRecordNodeSetEvent_v11010_params;
+
+typedef struct cudaGraphExecEventWaitNodeSetEvent_v11010_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ cudaEvent_t event;
+} cudaGraphExecEventWaitNodeSetEvent_v11010_params;
+
+typedef struct cudaGraphExecExternalSemaphoresSignalNodeSetParams_v11020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ const struct cudaExternalSemaphoreSignalNodeParams *nodeParams;
+} cudaGraphExecExternalSemaphoresSignalNodeSetParams_v11020_params;
+
+typedef struct cudaGraphExecExternalSemaphoresWaitNodeSetParams_v11020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ const struct cudaExternalSemaphoreWaitNodeParams *nodeParams;
+} cudaGraphExecExternalSemaphoresWaitNodeSetParams_v11020_params;
+
+typedef struct cudaGraphNodeSetEnabled_v11060_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ unsigned int isEnabled;
+} cudaGraphNodeSetEnabled_v11060_params;
+
+typedef struct cudaGraphNodeGetEnabled_v11060_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraphNode_t hNode;
+ unsigned int *isEnabled;
+} cudaGraphNodeGetEnabled_v11060_params;
+
+typedef struct cudaGraphExecUpdate_v10020_params_st {
+ cudaGraphExec_t hGraphExec;
+ cudaGraph_t hGraph;
+ cudaGraphExecUpdateResultInfo *resultInfo;
+} cudaGraphExecUpdate_v10020_params;
+
+typedef struct cudaGraphUpload_ptsz_v10000_params_st {
+ cudaGraphExec_t graphExec;
+ cudaStream_t stream;
+} cudaGraphUpload_ptsz_v10000_params;
+
+typedef struct cudaGraphLaunch_ptsz_v10000_params_st {
+ cudaGraphExec_t graphExec;
+ cudaStream_t stream;
+} cudaGraphLaunch_ptsz_v10000_params;
+
+typedef struct cudaGraphExecDestroy_v10000_params_st {
+ cudaGraphExec_t graphExec;
+} cudaGraphExecDestroy_v10000_params;
+
+typedef struct cudaGraphDestroy_v10000_params_st {
+ cudaGraph_t graph;
+} cudaGraphDestroy_v10000_params;
+
+typedef struct cudaGraphDebugDotPrint_v11030_params_st {
+ cudaGraph_t graph;
+ const char *path;
+ unsigned int flags;
+} cudaGraphDebugDotPrint_v11030_params;
+
+typedef struct cudaUserObjectCreate_v11030_params_st {
+ cudaUserObject_t *object_out;
+ void *ptr;
+ cudaHostFn_t destroy;
+ unsigned int initialRefcount;
+ unsigned int flags;
+} cudaUserObjectCreate_v11030_params;
+
+typedef struct cudaUserObjectRetain_v11030_params_st {
+ cudaUserObject_t object;
+ unsigned int count;
+} cudaUserObjectRetain_v11030_params;
+
+typedef struct cudaUserObjectRelease_v11030_params_st {
+ cudaUserObject_t object;
+ unsigned int count;
+} cudaUserObjectRelease_v11030_params;
+
+typedef struct cudaGraphRetainUserObject_v11030_params_st {
+ cudaGraph_t graph;
+ cudaUserObject_t object;
+ unsigned int count;
+ unsigned int flags;
+} cudaGraphRetainUserObject_v11030_params;
+
+typedef struct cudaGraphReleaseUserObject_v11030_params_st {
+ cudaGraph_t graph;
+ cudaUserObject_t object;
+ unsigned int count;
+} cudaGraphReleaseUserObject_v11030_params;
+
+typedef struct cudaGraphAddNode_v12020_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ size_t numDependencies;
+ struct cudaGraphNodeParams *nodeParams;
+} cudaGraphAddNode_v12020_params;
+
+typedef struct cudaGraphAddNode_v2_v12030_params_st {
+ cudaGraphNode_t *pGraphNode;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *pDependencies;
+ const cudaGraphEdgeData *dependencyData;
+ size_t numDependencies;
+ struct cudaGraphNodeParams *nodeParams;
+} cudaGraphAddNode_v2_v12030_params;
+
+typedef struct cudaGraphNodeSetParams_v12020_params_st {
+ cudaGraphNode_t node;
+ struct cudaGraphNodeParams *nodeParams;
+} cudaGraphNodeSetParams_v12020_params;
+
+typedef struct cudaGraphExecNodeSetParams_v12020_params_st {
+ cudaGraphExec_t graphExec;
+ cudaGraphNode_t node;
+ struct cudaGraphNodeParams *nodeParams;
+} cudaGraphExecNodeSetParams_v12020_params;
+
+typedef struct cudaGraphConditionalHandleCreate_v12030_params_st {
+ cudaGraphConditionalHandle *pHandle_out;
+ cudaGraph_t graph;
+ unsigned int defaultLaunchValue;
+ unsigned int flags;
+} cudaGraphConditionalHandleCreate_v12030_params;
+
+typedef struct cudaGetDriverEntryPoint_ptsz_v11030_params_st {
+ const char *symbol;
+ void **funcPtr;
+ unsigned long long flags;
+ enum cudaDriverEntryPointQueryResult *driverStatus;
+} cudaGetDriverEntryPoint_ptsz_v11030_params;
+
+typedef struct cudaGetDriverEntryPointByVersion_ptsz_v12050_params_st {
+ const char *symbol;
+ void **funcPtr;
+ unsigned int cudaVersion;
+ unsigned long long flags;
+ enum cudaDriverEntryPointQueryResult *driverStatus;
+} cudaGetDriverEntryPointByVersion_ptsz_v12050_params;
+
+typedef struct cudaGetFuncBySymbol_v11000_params_st {
+ cudaFunction_t *functionPtr;
+ const void *symbolPtr;
+} cudaGetFuncBySymbol_v11000_params;
+
+typedef struct cudaGetKernel_v12000_params_st {
+ cudaKernel_t *kernelPtr;
+ const void *entryFuncAddr;
+} cudaGetKernel_v12000_params;
+
+typedef struct cudaMemcpy_v3020_params_st {
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy_v3020_params;
+
+typedef struct cudaMemcpyToSymbol_v3020_params_st {
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyToSymbol_v3020_params;
+
+typedef struct cudaMemcpyFromSymbol_v3020_params_st {
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyFromSymbol_v3020_params;
+
+typedef struct cudaMemcpy2D_v3020_params_st {
+ void *dst;
+ size_t dpitch;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2D_v3020_params;
+
+typedef struct cudaMemcpyToArray_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyToArray_v3020_params;
+
+typedef struct cudaMemcpy2DToArray_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DToArray_v3020_params;
+
+typedef struct cudaMemcpyFromArray_v3020_params_st {
+ void *dst;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyFromArray_v3020_params;
+
+typedef struct cudaMemcpy2DFromArray_v3020_params_st {
+ void *dst;
+ size_t dpitch;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DFromArray_v3020_params;
+
+typedef struct cudaMemcpyArrayToArray_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffsetDst;
+ size_t hOffsetDst;
+ cudaArray_const_t src;
+ size_t wOffsetSrc;
+ size_t hOffsetSrc;
+ size_t count;
+ enum cudaMemcpyKind kind;
+} cudaMemcpyArrayToArray_v3020_params;
+
+typedef struct cudaMemcpy2DArrayToArray_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffsetDst;
+ size_t hOffsetDst;
+ cudaArray_const_t src;
+ size_t wOffsetSrc;
+ size_t hOffsetSrc;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+} cudaMemcpy2DArrayToArray_v3020_params;
+
+typedef struct cudaMemcpy3D_v3020_params_st {
+ const struct cudaMemcpy3DParms *p;
+} cudaMemcpy3D_v3020_params;
+
+typedef struct cudaMemcpy3DPeer_v4000_params_st {
+ const struct cudaMemcpy3DPeerParms *p;
+} cudaMemcpy3DPeer_v4000_params;
+
+typedef struct cudaMemcpyBatchAsync_v12080_params_st {
+ void **dsts;
+ void **srcs;
+ size_t *sizes;
+ size_t count;
+ struct cudaMemcpyAttributes *attrs;
+ size_t *attrsIdxs;
+ size_t numAttrs;
+ size_t *failIdx;
+ cudaStream_t stream;
+} cudaMemcpyBatchAsync_v12080_params;
+
+typedef struct cudaMemcpy3DBatchAsync_v12080_params_st {
+ size_t numOps;
+ struct cudaMemcpy3DBatchOp *opList;
+ size_t *failIdx;
+ unsigned long long flags;
+ cudaStream_t stream;
+} cudaMemcpy3DBatchAsync_v12080_params;
+
+typedef struct cudaMemset_v3020_params_st {
+ void *devPtr;
+ int value;
+ size_t count;
+} cudaMemset_v3020_params;
+
+typedef struct cudaMemset2D_v3020_params_st {
+ void *devPtr;
+ size_t pitch;
+ int value;
+ size_t width;
+ size_t height;
+} cudaMemset2D_v3020_params;
+
+typedef struct cudaMemset3D_v3020_params_st {
+ struct cudaPitchedPtr pitchedDevPtr;
+ int value;
+ struct cudaExtent extent;
+} cudaMemset3D_v3020_params;
+
+typedef struct cudaMemcpyAsync_v3020_params_st {
+ void *dst;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyAsync_v3020_params;
+
+typedef struct cudaMemcpyToSymbolAsync_v3020_params_st {
+ const void *symbol;
+ const void *src;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyToSymbolAsync_v3020_params;
+
+typedef struct cudaMemcpyFromSymbolAsync_v3020_params_st {
+ void *dst;
+ const void *symbol;
+ size_t count;
+ size_t offset;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyFromSymbolAsync_v3020_params;
+
+typedef struct cudaMemcpy2DAsync_v3020_params_st {
+ void *dst;
+ size_t dpitch;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DAsync_v3020_params;
+
+typedef struct cudaMemcpyToArrayAsync_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyToArrayAsync_v3020_params;
+
+typedef struct cudaMemcpy2DToArrayAsync_v3020_params_st {
+ cudaArray_t dst;
+ size_t wOffset;
+ size_t hOffset;
+ const void *src;
+ size_t spitch;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DToArrayAsync_v3020_params;
+
+typedef struct cudaMemcpyFromArrayAsync_v3020_params_st {
+ void *dst;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t count;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpyFromArrayAsync_v3020_params;
+
+typedef struct cudaMemcpy2DFromArrayAsync_v3020_params_st {
+ void *dst;
+ size_t dpitch;
+ cudaArray_const_t src;
+ size_t wOffset;
+ size_t hOffset;
+ size_t width;
+ size_t height;
+ enum cudaMemcpyKind kind;
+ cudaStream_t stream;
+} cudaMemcpy2DFromArrayAsync_v3020_params;
+
+typedef struct cudaMemcpy3DAsync_v3020_params_st {
+ const struct cudaMemcpy3DParms *p;
+ cudaStream_t stream;
+} cudaMemcpy3DAsync_v3020_params;
+
+typedef struct cudaMemcpy3DPeerAsync_v4000_params_st {
+ const struct cudaMemcpy3DPeerParms *p;
+ cudaStream_t stream;
+} cudaMemcpy3DPeerAsync_v4000_params;
+
+typedef struct cudaMemsetAsync_v3020_params_st {
+ void *devPtr;
+ int value;
+ size_t count;
+ cudaStream_t stream;
+} cudaMemsetAsync_v3020_params;
+
+typedef struct cudaMemset2DAsync_v3020_params_st {
+ void *devPtr;
+ size_t pitch;
+ int value;
+ size_t width;
+ size_t height;
+ cudaStream_t stream;
+} cudaMemset2DAsync_v3020_params;
+
+typedef struct cudaMemset3DAsync_v3020_params_st {
+ struct cudaPitchedPtr pitchedDevPtr;
+ int value;
+ struct cudaExtent extent;
+ cudaStream_t stream;
+} cudaMemset3DAsync_v3020_params;
+
+typedef struct cudaStreamQuery_v3020_params_st {
+ cudaStream_t stream;
+} cudaStreamQuery_v3020_params;
+
+typedef struct cudaStreamGetDevice_v12080_params_st {
+ cudaStream_t hStream;
+ int *device;
+} cudaStreamGetDevice_v12080_params;
+
+typedef struct cudaStreamGetFlags_v5050_params_st {
+ cudaStream_t hStream;
+ unsigned int *flags;
+} cudaStreamGetFlags_v5050_params;
+
+typedef struct cudaStreamGetId_v12000_params_st {
+ cudaStream_t hStream;
+ unsigned long long *streamId;
+} cudaStreamGetId_v12000_params;
+
+typedef struct cudaStreamGetPriority_v5050_params_st {
+ cudaStream_t hStream;
+ int *priority;
+} cudaStreamGetPriority_v5050_params;
+
+typedef struct cudaEventRecord_v3020_params_st {
+ cudaEvent_t event;
+ cudaStream_t stream;
+} cudaEventRecord_v3020_params;
+
+typedef struct cudaEventRecordWithFlags_v11010_params_st {
+ cudaEvent_t event;
+ cudaStream_t stream;
+ unsigned int flags;
+} cudaEventRecordWithFlags_v11010_params;
+
+typedef struct cudaStreamWaitEvent_v3020_params_st {
+ cudaStream_t stream;
+ cudaEvent_t event;
+ unsigned int flags;
+} cudaStreamWaitEvent_v3020_params;
+
+typedef struct cudaStreamAddCallback_v5000_params_st {
+ cudaStream_t stream;
+ cudaStreamCallback_t callback;
+ void *userData;
+ unsigned int flags;
+} cudaStreamAddCallback_v5000_params;
+
+typedef struct cudaStreamAttachMemAsync_v6000_params_st {
+ cudaStream_t stream;
+ void *devPtr;
+ size_t length;
+ unsigned int flags;
+} cudaStreamAttachMemAsync_v6000_params;
+
+typedef struct cudaStreamSynchronize_v3020_params_st {
+ cudaStream_t stream;
+} cudaStreamSynchronize_v3020_params;
+
+typedef struct cudaLaunchKernel_v7000_params_st {
+ const void *func;
+ dim3 gridDim;
+ dim3 blockDim;
+ void **args;
+ size_t sharedMem;
+ cudaStream_t stream;
+} cudaLaunchKernel_v7000_params;
+
+typedef struct cudaLaunchKernelExC_v11060_params_st {
+ const cudaLaunchConfig_t *config;
+ const void *func;
+ void **args;
+} cudaLaunchKernelExC_v11060_params;
+
+typedef struct cudaLaunchCooperativeKernel_v9000_params_st {
+ const void *func;
+ dim3 gridDim;
+ dim3 blockDim;
+ void **args;
+ size_t sharedMem;
+ cudaStream_t stream;
+} cudaLaunchCooperativeKernel_v9000_params;
+
+typedef struct cudaLaunchHostFunc_v10000_params_st {
+ cudaStream_t stream;
+ cudaHostFn_t fn;
+ void *userData;
+} cudaLaunchHostFunc_v10000_params;
+
+typedef struct cudaMemPrefetchAsync_v8000_params_st {
+ const void *devPtr;
+ size_t count;
+ int dstDevice;
+ cudaStream_t stream;
+} cudaMemPrefetchAsync_v8000_params;
+
+typedef struct cudaMemPrefetchAsync_v2_v12020_params_st {
+ const void *devPtr;
+ size_t count;
+ struct cudaMemLocation location;
+ unsigned int flags;
+ cudaStream_t stream;
+} cudaMemPrefetchAsync_v2_v12020_params;
+
+typedef struct cudaSignalExternalSemaphoresAsync_v10000_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreSignalParams_v1 *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaSignalExternalSemaphoresAsync_v10000_params;
+
+typedef struct cudaSignalExternalSemaphoresAsync_ptsz_v10000_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreSignalParams_v1 *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaSignalExternalSemaphoresAsync_ptsz_v10000_params;
+
+typedef struct cudaSignalExternalSemaphoresAsync_v2_v11020_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreSignalParams *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaSignalExternalSemaphoresAsync_v2_v11020_params;
+
+typedef struct cudaWaitExternalSemaphoresAsync_v10000_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreWaitParams_v1 *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaWaitExternalSemaphoresAsync_v10000_params;
+
+typedef struct cudaWaitExternalSemaphoresAsync_ptsz_v10000_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreWaitParams_v1 *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaWaitExternalSemaphoresAsync_ptsz_v10000_params;
+
+typedef struct cudaWaitExternalSemaphoresAsync_v2_v11020_params_st {
+ const cudaExternalSemaphore_t *extSemArray;
+ const struct cudaExternalSemaphoreWaitParams *paramsArray;
+ unsigned int numExtSems;
+ cudaStream_t stream;
+} cudaWaitExternalSemaphoresAsync_v2_v11020_params;
+
+typedef struct cudaGraphInstantiateWithParams_v12000_params_st {
+ cudaGraphExec_t *pGraphExec;
+ cudaGraph_t graph;
+ cudaGraphInstantiateParams *instantiateParams;
+} cudaGraphInstantiateWithParams_v12000_params;
+
+typedef struct cudaGraphUpload_v10000_params_st {
+ cudaGraphExec_t graphExec;
+ cudaStream_t stream;
+} cudaGraphUpload_v10000_params;
+
+typedef struct cudaGraphLaunch_v10000_params_st {
+ cudaGraphExec_t graphExec;
+ cudaStream_t stream;
+} cudaGraphLaunch_v10000_params;
+
+typedef struct cudaStreamBeginCapture_v10000_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureMode mode;
+} cudaStreamBeginCapture_v10000_params;
+
+typedef struct cudaStreamBeginCaptureToGraph_v12030_params_st {
+ cudaStream_t stream;
+ cudaGraph_t graph;
+ const cudaGraphNode_t *dependencies;
+ const cudaGraphEdgeData *dependencyData;
+ size_t numDependencies;
+ enum cudaStreamCaptureMode mode;
+} cudaStreamBeginCaptureToGraph_v12030_params;
+
+typedef struct cudaStreamEndCapture_v10000_params_st {
+ cudaStream_t stream;
+ cudaGraph_t *pGraph;
+} cudaStreamEndCapture_v10000_params;
+
+typedef struct cudaStreamIsCapturing_v10000_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *pCaptureStatus;
+} cudaStreamIsCapturing_v10000_params;
+
+typedef struct cudaStreamGetCaptureInfo_v10010_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+} cudaStreamGetCaptureInfo_v10010_params;
+
+typedef struct cudaStreamGetCaptureInfo_ptsz_v10010_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+} cudaStreamGetCaptureInfo_ptsz_v10010_params;
+
+typedef struct cudaStreamGetCaptureInfo_v2_v11030_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+ cudaGraph_t *graph_out;
+ const cudaGraphNode_t **dependencies_out;
+ size_t *numDependencies_out;
+} cudaStreamGetCaptureInfo_v2_v11030_params;
+
+typedef struct cudaStreamGetCaptureInfo_v3_v12030_params_st {
+ cudaStream_t stream;
+ enum cudaStreamCaptureStatus *captureStatus_out;
+ unsigned long long *id_out;
+ cudaGraph_t *graph_out;
+ const cudaGraphNode_t **dependencies_out;
+ const cudaGraphEdgeData **edgeData_out;
+ size_t *numDependencies_out;
+} cudaStreamGetCaptureInfo_v3_v12030_params;
+
+typedef struct cudaStreamUpdateCaptureDependencies_v11030_params_st {
+ cudaStream_t stream;
+ cudaGraphNode_t *dependencies;
+ size_t numDependencies;
+ unsigned int flags;
+} cudaStreamUpdateCaptureDependencies_v11030_params;
+
+typedef struct cudaStreamUpdateCaptureDependencies_v2_v12030_params_st {
+ cudaStream_t stream;
+ cudaGraphNode_t *dependencies;
+ const cudaGraphEdgeData *dependencyData;
+ size_t numDependencies;
+ unsigned int flags;
+} cudaStreamUpdateCaptureDependencies_v2_v12030_params;
+
+typedef struct cudaStreamCopyAttributes_v11000_params_st {
+ cudaStream_t dstStream;
+ cudaStream_t srcStream;
+} cudaStreamCopyAttributes_v11000_params;
+
+typedef struct cudaStreamGetAttribute_v11000_params_st {
+ cudaStream_t stream;
+ cudaStreamAttrID attr;
+ cudaStreamAttrValue *value;
+} cudaStreamGetAttribute_v11000_params;
+
+typedef struct cudaStreamSetAttribute_v11000_params_st {
+ cudaStream_t stream;
+ cudaStreamAttrID attr;
+ const cudaStreamAttrValue *param;
+} cudaStreamSetAttribute_v11000_params;
+
+typedef struct cudaMallocAsync_v11020_params_st {
+ void **devPtr;
+ size_t size;
+ cudaStream_t hStream;
+} cudaMallocAsync_v11020_params;
+
+typedef struct cudaFreeAsync_v11020_params_st {
+ void *devPtr;
+ cudaStream_t hStream;
+} cudaFreeAsync_v11020_params;
+
+typedef struct cudaMallocFromPoolAsync_v11020_params_st {
+ void **ptr;
+ size_t size;
+ cudaMemPool_t memPool;
+ cudaStream_t stream;
+} cudaMallocFromPoolAsync_v11020_params;
+
+typedef struct cudaGetDriverEntryPoint_v11030_params_st {
+ const char *symbol;
+ void **funcPtr;
+ unsigned long long flags;
+ enum cudaDriverEntryPointQueryResult *driverStatus;
+} cudaGetDriverEntryPoint_v11030_params;
+
+typedef struct cudaGetDriverEntryPointByVersion_v12050_params_st {
+ const char *symbol;
+ void **funcPtr;
+ unsigned int cudaVersion;
+ unsigned long long flags;
+ enum cudaDriverEntryPointQueryResult *driverStatus;
+} cudaGetDriverEntryPointByVersion_v12050_params;
+
+typedef struct cudaGetDeviceProperties_v3020_params_st {
+ struct cudaDeviceProp *prop;
+ int device;
+} cudaGetDeviceProperties_v3020_params;
+
+// Parameter trace structures for removed functions
+
+
+// End of parameter trace structures
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_vdpau_interop_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_vdpau_interop_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..88e79d1957925c4bbacd381e9461d5072de88f24
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cuda_vdpau_interop_meta.h
@@ -0,0 +1,38 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// CUDA public interface, for type definitions and api function prototypes
+#include "cuda_vdpau_interop.h"
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+// Currently used parameter trace structures
+typedef struct cudaVDPAUGetDevice_v3020_params_st {
+ int *device;
+ VdpDevice vdpDevice;
+ VdpGetProcAddress *vdpGetProcAddress;
+} cudaVDPAUGetDevice_v3020_params;
+
+typedef struct cudaVDPAUSetVDPAUDevice_v3020_params_st {
+ int device;
+ VdpDevice vdpDevice;
+ VdpGetProcAddress *vdpGetProcAddress;
+} cudaVDPAUSetVDPAUDevice_v3020_params;
+
+typedef struct cudaGraphicsVDPAURegisterVideoSurface_v3020_params_st {
+ struct cudaGraphicsResource **resource;
+ VdpVideoSurface vdpSurface;
+ unsigned int flags;
+} cudaGraphicsVDPAURegisterVideoSurface_v3020_params;
+
+typedef struct cudaGraphicsVDPAURegisterOutputSurface_v3020_params_st {
+ struct cudaGraphicsResource **resource;
+ VdpOutputSurface vdpSurface;
+ unsigned int flags;
+} cudaGraphicsVDPAURegisterOutputSurface_v3020_params;
+
+// Parameter trace structures for removed functions
+
+
+// End of parameter trace structures
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudart_removed_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudart_removed_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..a0fc27a71bb3fc883db9fe7562eea3f28145430d
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_cudart_removed_meta.h
@@ -0,0 +1,162 @@
+// This file is generated. Any changes you make will be lost during the next clean build.
+
+// CUDA public interface, for type definitions and api function prototypes
+#include "cudart_removed.h"
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+// Currently used parameter trace structures
+typedef struct cudaStreamDestroy_v3020_params_st {
+ cudaStream_t stream;
+} cudaStreamDestroy_v3020_params;
+
+typedef struct cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000_params_st {
+ int *numBlocks;
+ const void *func;
+ size_t numDynamicSmemBytes;
+} cudaOccupancyMaxActiveBlocksPerMultiprocessor_v6000_params;
+
+typedef struct cudaConfigureCall_v3020_params_st {
+ dim3 gridDim;
+ dim3 blockDim;
+ size_t sharedMem __dv;
+ cudaStream_t stream __dv;
+} cudaConfigureCall_v3020_params;
+
+typedef struct cudaSetupArgument_v3020_params_st {
+ const void *arg;
+ size_t size;
+ size_t offset;
+} cudaSetupArgument_v3020_params;
+
+typedef struct cudaLaunch_v3020_params_st {
+ const void *func;
+} cudaLaunch_v3020_params;
+
+typedef struct cudaLaunch_ptsz_v7000_params_st {
+ const void *func;
+} cudaLaunch_ptsz_v7000_params;
+
+typedef struct cudaStreamSetFlags_v10200_params_st {
+ cudaStream_t hStream;
+ unsigned int flags;
+} cudaStreamSetFlags_v10200_params;
+
+typedef struct cudaStreamSetFlags_ptsz_v10200_params_st {
+ cudaStream_t hStream;
+ unsigned int flags;
+} cudaStreamSetFlags_ptsz_v10200_params;
+
+typedef struct cudaProfilerInitialize_v4000_params_st {
+ const char *configFile;
+ const char *outputFile;
+ cudaOutputMode_t outputMode;
+} cudaProfilerInitialize_v4000_params;
+
+typedef struct cudaThreadSetLimit_v3020_params_st {
+ enum cudaLimit limit;
+ size_t value;
+} cudaThreadSetLimit_v3020_params;
+
+typedef struct cudaThreadGetLimit_v3020_params_st {
+ size_t *pValue;
+ enum cudaLimit limit;
+} cudaThreadGetLimit_v3020_params;
+
+typedef struct cudaThreadGetCacheConfig_v3020_params_st {
+ enum cudaFuncCache *pCacheConfig;
+} cudaThreadGetCacheConfig_v3020_params;
+
+typedef struct cudaThreadSetCacheConfig_v3020_params_st {
+ enum cudaFuncCache cacheConfig;
+} cudaThreadSetCacheConfig_v3020_params;
+
+typedef struct cudaSetDoubleForDevice_v3020_params_st {
+ double *d;
+} cudaSetDoubleForDevice_v3020_params;
+
+typedef struct cudaSetDoubleForHost_v3020_params_st {
+ double *d;
+} cudaSetDoubleForHost_v3020_params;
+
+typedef struct cudaCreateTextureObject_v2_v11080_params_st {
+ cudaTextureObject_t *pTexObject;
+ const struct cudaResourceDesc *pResDesc;
+ const struct cudaTextureDesc *pTexDesc;
+ const struct cudaResourceViewDesc *pResViewDesc;
+} cudaCreateTextureObject_v2_v11080_params;
+
+typedef struct cudaGetTextureObjectTextureDesc_v2_v11080_params_st {
+ struct cudaTextureDesc *pTexDesc;
+ cudaTextureObject_t texObject;
+} cudaGetTextureObjectTextureDesc_v2_v11080_params;
+
+typedef struct cudaBindTexture_v3020_params_st {
+ size_t *offset;
+ const struct textureReference *texref;
+ const void *devPtr;
+ const struct cudaChannelFormatDesc *desc;
+ size_t size __dv;
+} cudaBindTexture_v3020_params;
+
+typedef struct cudaBindTexture2D_v3020_params_st {
+ size_t *offset;
+ const struct textureReference *texref;
+ const void *devPtr;
+ const struct cudaChannelFormatDesc *desc;
+ size_t width;
+ size_t height;
+ size_t pitch;
+} cudaBindTexture2D_v3020_params;
+
+typedef struct cudaBindTextureToArray_v3020_params_st {
+ const struct textureReference *texref;
+ cudaArray_const_t array;
+ const struct cudaChannelFormatDesc *desc;
+} cudaBindTextureToArray_v3020_params;
+
+typedef struct cudaBindTextureToMipmappedArray_v5000_params_st {
+ const struct textureReference *texref;
+ cudaMipmappedArray_const_t mipmappedArray;
+ const struct cudaChannelFormatDesc *desc;
+} cudaBindTextureToMipmappedArray_v5000_params;
+
+typedef struct cudaUnbindTexture_v3020_params_st {
+ const struct textureReference *texref;
+} cudaUnbindTexture_v3020_params;
+
+typedef struct cudaGetTextureAlignmentOffset_v3020_params_st {
+ size_t *offset;
+ const struct textureReference *texref;
+} cudaGetTextureAlignmentOffset_v3020_params;
+
+typedef struct cudaGetTextureReference_v3020_params_st {
+ const struct textureReference **texref;
+ const void *symbol;
+} cudaGetTextureReference_v3020_params;
+
+typedef struct cudaBindSurfaceToArray_v3020_params_st {
+ const struct surfaceReference *surfref;
+ cudaArray_const_t array;
+ const struct cudaChannelFormatDesc *desc;
+} cudaBindSurfaceToArray_v3020_params;
+
+typedef struct cudaGetSurfaceReference_v3020_params_st {
+ const struct surfaceReference **surfref;
+ const void *symbol;
+} cudaGetSurfaceReference_v3020_params;
+
+typedef struct cudaGraphInstantiate_v10000_params_st {
+ cudaGraphExec_t *pGraphExec;
+ cudaGraph_t graph;
+ cudaGraphNode_t *pErrorNode;
+ char *pLogBuffer;
+ size_t bufferSize;
+} cudaGraphInstantiate_v10000_params;
+
+// Parameter trace structures for removed functions
+
+
+// End of parameter trace structures
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_nvtx_meta.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_nvtx_meta.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed8877e21f0651fe1564151090850694eb495cfb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/generated_nvtx_meta.h
@@ -0,0 +1,247 @@
+/*
+ * Copyright 2013-2018 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility push(default)
+#endif
+
+// *************************************************************************
+// Definitions of structs to hold parameters for each function
+// *************************************************************************
+
+typedef struct nvtxMarkEx_params_st {
+ const nvtxEventAttributes_t* eventAttrib;
+} nvtxMarkEx_params;
+
+typedef struct nvtxMarkA_params_st {
+ const char* message;
+} nvtxMarkA_params;
+
+typedef struct nvtxMarkW_params_st {
+ const wchar_t* message;
+} nvtxMarkW_params;
+
+typedef struct nvtxRangeStartEx_params_st {
+ const nvtxEventAttributes_t* eventAttrib;
+} nvtxRangeStartEx_params;
+
+typedef struct nvtxRangeStartA_params_st {
+ const char* message;
+} nvtxRangeStartA_params;
+
+typedef struct nvtxRangeStartW_params_st {
+ const wchar_t* message;
+} nvtxRangeStartW_params;
+
+typedef struct nvtxRangeEnd_params_st {
+ nvtxRangeId_t id;
+} nvtxRangeEnd_params;
+
+typedef struct nvtxRangePushEx_params_st {
+ const nvtxEventAttributes_t* eventAttrib;
+} nvtxRangePushEx_params;
+
+typedef struct nvtxRangePushA_params_st {
+ const char* message;
+} nvtxRangePushA_params;
+
+typedef struct nvtxRangePushW_params_st {
+ const wchar_t* message;
+} nvtxRangePushW_params;
+
+typedef struct nvtxRangePop_params_st {
+ /* WAR: Windows compiler doesn't allow empty structs */
+ /* This field shouldn't be used */
+ void *dummy;
+} nvtxRangePop_params;
+
+typedef struct nvtxNameCategoryA_params_st {
+ uint32_t category;
+ const char* name;
+} nvtxNameCategoryA_params;
+
+typedef struct nvtxNameCategoryW_params_st {
+ uint32_t category;
+ const wchar_t* name;
+} nvtxNameCategoryW_params;
+
+typedef struct nvtxNameOsThreadA_params_st {
+ uint32_t threadId;
+ const char* name;
+} nvtxNameOsThreadA_params;
+
+typedef struct nvtxNameOsThreadW_params_st {
+ uint32_t threadId;
+ const wchar_t* name;
+} nvtxNameOsThreadW_params;
+
+typedef struct nvtxNameCuDeviceA_params_st {
+ CUdevice device;
+ const char* name;
+} nvtxNameCuDeviceA_params;
+
+typedef struct nvtxNameCuDeviceW_params_st {
+ CUdevice device;
+ const wchar_t* name;
+} nvtxNameCuDeviceW_params;
+
+typedef struct nvtxNameCuContextA_params_st {
+ CUcontext context;
+ const char* name;
+} nvtxNameCuContextA_params;
+
+typedef struct nvtxNameCuContextW_params_st {
+ CUcontext context;
+ const wchar_t* name;
+} nvtxNameCuContextW_params;
+
+typedef struct nvtxNameCuStreamA_params_st {
+ CUstream stream;
+ const char* name;
+} nvtxNameCuStreamA_params;
+
+typedef struct nvtxNameCuStreamW_params_st {
+ CUstream stream;
+ const wchar_t* name;
+} nvtxNameCuStreamW_params;
+
+typedef struct nvtxNameCuEventA_params_st {
+ CUevent event;
+ const char* name;
+} nvtxNameCuEventA_params;
+
+typedef struct nvtxNameCuEventW_params_st {
+ CUevent event;
+ const wchar_t* name;
+} nvtxNameCuEventW_params;
+
+typedef struct nvtxNameCudaDeviceA_params_st {
+ int device;
+ const char* name;
+} nvtxNameCudaDeviceA_params;
+
+typedef struct nvtxNameCudaDeviceW_params_st {
+ int device;
+ const wchar_t* name;
+} nvtxNameCudaDeviceW_params;
+
+typedef struct nvtxNameCudaStreamA_params_st {
+ cudaStream_t stream;
+ const char* name;
+} nvtxNameCudaStreamA_params;
+
+typedef struct nvtxNameCudaStreamW_params_st {
+ cudaStream_t stream;
+ const wchar_t* name;
+} nvtxNameCudaStreamW_params;
+
+typedef struct nvtxNameCudaEventA_params_st {
+ cudaEvent_t event;
+ const char* name;
+} nvtxNameCudaEventA_params;
+
+typedef struct nvtxNameCudaEventW_params_st {
+ cudaEvent_t event;
+ const wchar_t* name;
+} nvtxNameCudaEventW_params;
+
+typedef struct nvtxDomainCreateA_params_st {
+ const char* name;
+} nvtxDomainCreateA_params;
+
+typedef struct nvtxDomainDestroy_params_st {
+ nvtxDomainHandle_t domain;
+} nvtxDomainDestroy_params;
+
+typedef struct nvtxDomainMarkEx_params_st {
+ nvtxDomainHandle_t domain;
+ nvtxMarkEx_params core;
+} nvtxDomainMarkEx_params;
+
+typedef struct nvtxDomainRangeStartEx_params_st {
+ nvtxDomainHandle_t domain;
+ nvtxRangeStartEx_params core;
+} nvtxDomainRangeStartEx_params;
+
+typedef struct nvtxDomainRangeEnd_params_st {
+ nvtxDomainHandle_t domain;
+ nvtxRangeEnd_params core;
+} nvtxDomainRangeEnd_params;
+
+typedef struct nvtxDomainRangePushEx_params_st {
+ nvtxDomainHandle_t domain;
+ nvtxRangePushEx_params core;
+} nvtxDomainRangePushEx_params;
+
+typedef struct nvtxDomainRangePop_params_st {
+ nvtxDomainHandle_t domain;
+} nvtxDomainRangePop_params;
+
+typedef struct nvtxSyncUserCreate_params_st {
+ nvtxDomainHandle_t domain;
+ const nvtxSyncUserAttributes_t* attribs;
+} nvtxSyncUserCreate_params;
+
+typedef struct nvtxSyncUserCommon_params_st {
+ nvtxSyncUser_t handle;
+} nvtxSyncUserCommon_params;
+
+typedef struct nvtxDomainRegisterStringA_params_st {
+ nvtxDomainHandle_t domain;
+ const char* string;
+} nvtxDomainRegisterStringA_params;
+
+typedef struct nvtxDomainRegisterStringW_params_st {
+ nvtxDomainHandle_t domain;
+ const char* string;
+} nvtxDomainRegisterStringW_params;
+
+#if defined(__GNUC__) && defined(CUPTI_LIB)
+ #pragma GCC visibility pop
+#endif
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_common.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ed01f7bc2851f43678e58efe34fc5579cca3a35
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_common.h
@@ -0,0 +1,393 @@
+#ifndef NVPERF_COMMON_H
+#define NVPERF_COMMON_H
+
+/*
+ * Copyright 2014-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO USER:
+ *
+ * This source code is subject to NVIDIA ownership rights under U.S. and
+ * international Copyright laws.
+ *
+ * This software and the information contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
+ * of a form of NVIDIA software license agreement.
+ *
+ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
+ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+ * OR PERFORMANCE OF THIS SOURCE CODE.
+ *
+ * U.S. Government End Users. This source code is a "commercial item" as
+ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
+ * "commercial computer software" and "commercial computer software
+ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
+ * and is provided to the U.S. Government only as a commercial end item.
+ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
+ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
+ * source code with only those rights set forth herein.
+ *
+ * Any use of this source code in individual and commercial software must
+ * include, in the user documentation and internal comments to the code,
+ * the above Disclaimer and U.S. Government End Users Notice.
+ */
+
+#include
+#include
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility push(default)
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL __attribute__ ((visibility ("hidden")))
+ #endif
+#else
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file nvperf_common.h
+ */
+
+#ifndef NVPERF_NVPA_STATUS_DEFINED
+#define NVPERF_NVPA_STATUS_DEFINED
+
+ /// Error codes.
+ typedef enum NVPA_Status
+ {
+ /// Success
+ NVPA_STATUS_SUCCESS = 0,
+ /// Generic error.
+ NVPA_STATUS_ERROR = 1,
+ /// Internal error. Please file a bug!
+ NVPA_STATUS_INTERNAL_ERROR = 2,
+ /// NVPW_InitializeTarget() or NVPW_InitializeHost() has not been called yet.
+ NVPA_STATUS_NOT_INITIALIZED = 3,
+ /// The NvPerf DLL/DSO could not be loaded during NVPW_Initialize*(). Please ensure they are placed in the
+ /// appropriate location that can be founder by a dynamic linker. And on Linux systems, confirm that the
+ /// LD_LIBRARY_PATH environment variable is set correctly. Alternatively, you may utilize
+ /// NVPW_SetLibraryLoadPaths() to define additional library search paths.
+ NVPA_STATUS_NOT_LOADED = 4,
+ /// The function was not found in this version of the NvPerf DLL/DSO. Or if you are directly calling
+ /// NVPA_GetProcAddress(), please ensure the function name is spelled correctly.
+ NVPA_STATUS_FUNCTION_NOT_FOUND = 5,
+ /// The request was intentionally not supported.
+ NVPA_STATUS_NOT_SUPPORTED = 6,
+ /// The request was not implemented by this version.
+ NVPA_STATUS_NOT_IMPLEMENTED = 7,
+ /// Invalid argument.
+ NVPA_STATUS_INVALID_ARGUMENT = 8,
+ /// UNUSED
+ NVPA_STATUS_INVALID_METRIC_ID = 9,
+ /// No driver has been loaded via NVPW_*_LoadDriver().
+ NVPA_STATUS_DRIVER_NOT_LOADED = 10,
+ /// Failed memory allocation.
+ NVPA_STATUS_OUT_OF_MEMORY = 11,
+ /// UNUSED
+ NVPA_STATUS_INVALID_THREAD_STATE = 12,
+ /// UNUSED
+ NVPA_STATUS_FAILED_CONTEXT_ALLOC = 13,
+ /// The specified GPU is not supported. It is recommended to call IsGpuSupported() for more information
+ NVPA_STATUS_UNSUPPORTED_GPU = 14,
+ /// The installed NVIDIA driver is too old.
+ NVPA_STATUS_INSUFFICIENT_DRIVER_VERSION = 15,
+ /// UNUSED
+ NVPA_STATUS_OBJECT_NOT_REGISTERED = 16,
+ /// Profiling permission not granted; see https://developer.nvidia.com/nvidia-development-tools-solutions-
+ /// ERR_NVGPUCTRPERM-permission-issue-performance-counters
+ NVPA_STATUS_INSUFFICIENT_PRIVILEGE = 17,
+ /// UNUSED
+ NVPA_STATUS_INVALID_CONTEXT_STATE = 18,
+ /// UNUSED
+ NVPA_STATUS_INVALID_OBJECT_STATE = 19,
+ /// The request could not be fulfilled because a system resource is already in use.
+ NVPA_STATUS_RESOURCE_UNAVAILABLE = 20,
+ /// UNUSED
+ NVPA_STATUS_DRIVER_LOADED_TOO_LATE = 21,
+ /// The provided buffer is not large enough.
+ NVPA_STATUS_INSUFFICIENT_SPACE = 22,
+ /// UNUSED
+ NVPA_STATUS_OBJECT_MISMATCH = 23,
+ /// Virtualized GPU (vGPU) is not supported.
+ NVPA_STATUS_VIRTUALIZED_DEVICE_NOT_SUPPORTED = 24,
+ /// Profiling permission was not granted or the device was disabled.
+ NVPA_STATUS_PROFILING_NOT_ALLOWED = 25,
+ NVPA_STATUS__COUNT
+ } NVPA_Status;
+
+
+ inline void NVPW_NVPAStatusToString(NVPA_Status status, const char** ppStatusStr, const char** ppCommentStr)
+ {
+ switch (status)
+ {
+ case NVPA_STATUS_SUCCESS:
+ *ppStatusStr = "NVPA_STATUS_SUCCESS";
+ *ppCommentStr = "Success";
+ return;
+ case NVPA_STATUS_ERROR:
+ *ppStatusStr = "NVPA_STATUS_ERROR";
+ *ppCommentStr = "Generic error.";
+ return;
+ case NVPA_STATUS_INTERNAL_ERROR:
+ *ppStatusStr = "NVPA_STATUS_INTERNAL_ERROR";
+ *ppCommentStr = "Internal error. Please file a bug!";
+ return;
+ case NVPA_STATUS_NOT_INITIALIZED:
+ *ppStatusStr = "NVPA_STATUS_NOT_INITIALIZED";
+ *ppCommentStr = "NVPW_InitializeTarget() or NVPW_InitializeHost() has not been called yet.";
+ return;
+ case NVPA_STATUS_NOT_LOADED:
+ *ppStatusStr = "NVPA_STATUS_NOT_LOADED";
+ *ppCommentStr = "The NvPerf DLL/DSO could not be loaded during NVPW_Initialize*(). Please ensure they are placed in the appropriate location that can be founder by a dynamic linker. And on Linux systems, confirm that the LD_LIBRARY_PATH environment variable is set correctly. Alternatively, you may utilize NVPW_SetLibraryLoadPaths() to define additional library search paths.";
+ return;
+ case NVPA_STATUS_FUNCTION_NOT_FOUND:
+ *ppStatusStr = "NVPA_STATUS_FUNCTION_NOT_FOUND";
+ *ppCommentStr = "The function was not found in this version of the NvPerf DLL/DSO. Or if you are directly calling NVPA_GetProcAddress(), please ensure the function name is spelled correctly.";
+ return;
+ case NVPA_STATUS_NOT_SUPPORTED:
+ *ppStatusStr = "NVPA_STATUS_NOT_SUPPORTED";
+ *ppCommentStr = "The request was intentionally not supported.";
+ return;
+ case NVPA_STATUS_NOT_IMPLEMENTED:
+ *ppStatusStr = "NVPA_STATUS_NOT_IMPLEMENTED";
+ *ppCommentStr = "The request was not implemented by this version.";
+ return;
+ case NVPA_STATUS_INVALID_ARGUMENT:
+ *ppStatusStr = "NVPA_STATUS_INVALID_ARGUMENT";
+ *ppCommentStr = "Invalid argument.";
+ return;
+ case NVPA_STATUS_INVALID_METRIC_ID:
+ *ppStatusStr = "NVPA_STATUS_INVALID_METRIC_ID";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_DRIVER_NOT_LOADED:
+ *ppStatusStr = "NVPA_STATUS_DRIVER_NOT_LOADED";
+ *ppCommentStr = "No driver has been loaded via NVPW_*_LoadDriver().";
+ return;
+ case NVPA_STATUS_OUT_OF_MEMORY:
+ *ppStatusStr = "NVPA_STATUS_OUT_OF_MEMORY";
+ *ppCommentStr = "Failed memory allocation.";
+ return;
+ case NVPA_STATUS_INVALID_THREAD_STATE:
+ *ppStatusStr = "NVPA_STATUS_INVALID_THREAD_STATE";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_FAILED_CONTEXT_ALLOC:
+ *ppStatusStr = "NVPA_STATUS_FAILED_CONTEXT_ALLOC";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_UNSUPPORTED_GPU:
+ *ppStatusStr = "NVPA_STATUS_UNSUPPORTED_GPU";
+ *ppCommentStr = "The specified GPU is not supported. It is recommended to call IsGpuSupported() for more information";
+ return;
+ case NVPA_STATUS_INSUFFICIENT_DRIVER_VERSION:
+ *ppStatusStr = "NVPA_STATUS_INSUFFICIENT_DRIVER_VERSION";
+ *ppCommentStr = "The installed NVIDIA driver is too old.";
+ return;
+ case NVPA_STATUS_OBJECT_NOT_REGISTERED:
+ *ppStatusStr = "NVPA_STATUS_OBJECT_NOT_REGISTERED";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_INSUFFICIENT_PRIVILEGE:
+ *ppStatusStr = "NVPA_STATUS_INSUFFICIENT_PRIVILEGE";
+ *ppCommentStr = "Profiling permission not granted; see https://developer.nvidia.com/nvidia-development-tools-solutions-ERR_NVGPUCTRPERM-permission-issue-performance-counters";
+ return;
+ case NVPA_STATUS_INVALID_CONTEXT_STATE:
+ *ppStatusStr = "NVPA_STATUS_INVALID_CONTEXT_STATE";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_INVALID_OBJECT_STATE:
+ *ppStatusStr = "NVPA_STATUS_INVALID_OBJECT_STATE";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_RESOURCE_UNAVAILABLE:
+ *ppStatusStr = "NVPA_STATUS_RESOURCE_UNAVAILABLE";
+ *ppCommentStr = "The request could not be fulfilled because a system resource is already in use.";
+ return;
+ case NVPA_STATUS_DRIVER_LOADED_TOO_LATE:
+ *ppStatusStr = "NVPA_STATUS_DRIVER_LOADED_TOO_LATE";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_INSUFFICIENT_SPACE:
+ *ppStatusStr = "NVPA_STATUS_INSUFFICIENT_SPACE";
+ *ppCommentStr = "The provided buffer is not large enough.";
+ return;
+ case NVPA_STATUS_OBJECT_MISMATCH:
+ *ppStatusStr = "NVPA_STATUS_OBJECT_MISMATCH";
+ *ppCommentStr = "UNUSED";
+ return;
+ case NVPA_STATUS_VIRTUALIZED_DEVICE_NOT_SUPPORTED:
+ *ppStatusStr = "NVPA_STATUS_VIRTUALIZED_DEVICE_NOT_SUPPORTED";
+ *ppCommentStr = "Virtualized GPU (vGPU) is not supported.";
+ return;
+ case NVPA_STATUS_PROFILING_NOT_ALLOWED:
+ *ppStatusStr = "NVPA_STATUS_PROFILING_NOT_ALLOWED";
+ *ppCommentStr = "Profiling permission was not granted or the device was disabled.";
+ return;
+ default:
+ *ppStatusStr = "Unrecognized status";
+ *ppCommentStr = "This status is unrecognized. Is it coming from a newer version of NvPerf library?";
+ return;
+ }
+ }
+
+
+#endif // NVPERF_NVPA_STATUS_DEFINED
+
+
+#ifndef NVPERF_NVPA_ACTIVITY_KIND_DEFINED
+#define NVPERF_NVPA_ACTIVITY_KIND_DEFINED
+
+ /// The configuration's activity-kind dictates which types of data may be collected.
+ typedef enum NVPA_ActivityKind
+ {
+ /// Invalid value.
+ NVPA_ACTIVITY_KIND_INVALID = 0,
+ /// A workload-centric activity for serialized and pipelined collection.
+ ///
+ /// Profiler is capable of collecting both serialized and pipelined metrics. The library introduces any
+ /// synchronization required to collect serialized metrics.
+ NVPA_ACTIVITY_KIND_PROFILER,
+ /// A realtime activity for sampling counters from the CPU or GPU.
+ NVPA_ACTIVITY_KIND_REALTIME_SAMPLED,
+ /// A realtime activity for profiling counters from the CPU or GPU without CPU/GPU synchronizations.
+ NVPA_ACTIVITY_KIND_REALTIME_PROFILER,
+ NVPA_ACTIVITY_KIND__COUNT
+ } NVPA_ActivityKind;
+
+
+#endif // NVPERF_NVPA_ACTIVITY_KIND_DEFINED
+
+
+#ifndef NVPERF_NVPA_BOOL_DEFINED
+#define NVPERF_NVPA_BOOL_DEFINED
+ /// The type used for boolean values.
+ typedef uint8_t NVPA_Bool;
+#endif // NVPERF_NVPA_BOOL_DEFINED
+
+#ifndef NVPA_STRUCT_SIZE
+#define NVPA_STRUCT_SIZE(type_, lastfield_) (offsetof(type_, lastfield_) + sizeof(((type_*)0)->lastfield_))
+#endif // NVPA_STRUCT_SIZE
+
+#ifndef NVPW_FIELD_EXISTS
+#define NVPW_FIELD_EXISTS(pParams_, name_) \
+ ((pParams_)->structSize >= (size_t)((const uint8_t*)(&(pParams_)->name_) + sizeof(pParams_)->name_ - (const uint8_t*)(pParams_)))
+#endif // NVPW_FIELD_EXISTS
+
+
+#ifndef NVPERF_NVPA_GETPROCADDRESS_DEFINED
+#define NVPERF_NVPA_GETPROCADDRESS_DEFINED
+
+typedef NVPA_Status (*NVPA_GenericFn)(void);
+
+
+ ///
+ /// Gets the address of an NvPerf API function.
+ ///
+ /// \return A function pointer to the function, or NULL if the function is not available.
+ ///
+ /// \param pFunctionName [in] Name of the function to retrieve.
+ NVPA_GenericFn NVPA_GetProcAddress(const char* pFunctionName);
+
+#endif
+
+#ifndef NVPERF_NVPW_SETLIBRARYLOADPATHS_DEFINED
+#define NVPERF_NVPW_SETLIBRARYLOADPATHS_DEFINED
+
+
+ typedef struct NVPW_SetLibraryLoadPaths_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] number of paths in ppPaths
+ size_t numPaths;
+ /// [in] array of null-terminated paths
+ const char** ppPaths;
+ } NVPW_SetLibraryLoadPaths_Params;
+#define NVPW_SetLibraryLoadPaths_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_SetLibraryLoadPaths_Params, ppPaths)
+
+ /// Sets library search path for \ref NVPW_InitializeHost() and \ref NVPW_InitializeTarget().
+ /// \ref NVPW_InitializeHost() and \ref NVPW_InitializeTarget load the NvPerf DLL/DSO. This function sets
+ /// ordered paths that will be searched with the LoadLibrary() or dlopen() call.
+ /// If load paths are set by this function, the default set of load paths
+ /// will not be attempted.
+ /// Each path must point at a directory (not a file name).
+ /// This function is not thread-safe.
+ /// Example Usage:
+ /// \code
+ /// const char* paths[] = {
+ /// "path1", "path2", etc
+ /// };
+ /// NVPW_SetLibraryLoadPaths_Params params{NVPW_SetLibraryLoadPaths_Params_STRUCT_SIZE};
+ /// params.numPaths = sizeof(paths)/sizeof(paths[0]);
+ /// params.ppPaths = paths;
+ /// NVPW_SetLibraryLoadPaths(¶ms);
+ /// NVPW_InitializeHost();
+ /// params.numPaths = 0;
+ /// params.ppPaths = NULL;
+ /// NVPW_SetLibraryLoadPaths(¶ms);
+ /// \endcode
+ NVPA_Status NVPW_SetLibraryLoadPaths(NVPW_SetLibraryLoadPaths_Params* pParams);
+
+ typedef struct NVPW_SetLibraryLoadPathsW_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] number of paths in ppwPaths
+ size_t numPaths;
+ /// [in] array of null-terminated paths
+ const wchar_t** ppwPaths;
+ } NVPW_SetLibraryLoadPathsW_Params;
+#define NVPW_SetLibraryLoadPathsW_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_SetLibraryLoadPathsW_Params, ppwPaths)
+
+ /// Sets library search path for \ref NVPW_InitializeHost() and \ref NVPW_InitializeTarget().
+ /// \ref NVPW_InitializeHost() and \ref NVPW_InitializeTarget load the NvPerf DLL/DSO. This function sets
+ /// ordered paths that will be searched with the LoadLibrary() or dlopen() call.
+ /// If load paths are set by this function, the default set of load paths
+ /// will not be attempted.
+ /// Each path must point at a directory (not a file name).
+ /// This function is not thread-safe.
+ /// Example Usage:
+ /// \code
+ /// const wchar_t* wpaths[] = {
+ /// L"path1", L"path2", etc
+ /// };
+ /// NVPW_SetLibraryLoadPathsW_Params params{NVPW_SetLibraryLoadPathsW_Params_STRUCT_SIZE};
+ /// params.numPaths = sizeof(wpaths)/sizeof(wpaths[0]);
+ /// params.ppwPaths = wpaths;
+ /// NVPW_SetLibraryLoadPathsW(¶ms);
+ /// NVPW_InitializeHost();
+ /// params.numPaths = 0;
+ /// params.ppwPaths = NULL;
+ /// NVPW_SetLibraryLoadPathsW(¶ms);
+ /// \endcode
+ NVPA_Status NVPW_SetLibraryLoadPathsW(NVPW_SetLibraryLoadPathsW_Params* pParams);
+
+#endif
+
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#endif // NVPERF_COMMON_H
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_cuda_host.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_cuda_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b4533b25148b7cd28e0ed30be022893514415a5
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_cuda_host.h
@@ -0,0 +1,179 @@
+#ifndef NVPERF_CUDA_HOST_H
+#define NVPERF_CUDA_HOST_H
+
+/*
+ * Copyright 2014-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO USER:
+ *
+ * This source code is subject to NVIDIA ownership rights under U.S. and
+ * international Copyright laws.
+ *
+ * This software and the information contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
+ * of a form of NVIDIA software license agreement.
+ *
+ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
+ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+ * OR PERFORMANCE OF THIS SOURCE CODE.
+ *
+ * U.S. Government End Users. This source code is a "commercial item" as
+ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
+ * "commercial computer software" and "commercial computer software
+ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
+ * and is provided to the U.S. Government only as a commercial end item.
+ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
+ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
+ * source code with only those rights set forth herein.
+ *
+ * Any use of this source code in individual and commercial software must
+ * include, in the user documentation and internal comments to the code,
+ * the above Disclaimer and U.S. Government End Users Notice.
+ */
+
+#include
+#include
+#include "nvperf_common.h"
+#include "nvperf_host.h"
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility push(default)
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL __attribute__ ((visibility ("hidden")))
+ #endif
+#else
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file nvperf_cuda_host.h
+ */
+
+ typedef struct NVPW_CUDA_RawMetricsConfig_Create_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ NVPA_ActivityKind activityKind;
+ /// [in]
+ const char* pChipName;
+ /// [out] new NVPA_RawMetricsConfig object
+ struct NVPA_RawMetricsConfig* pRawMetricsConfig;
+ } NVPW_CUDA_RawMetricsConfig_Create_Params;
+#define NVPW_CUDA_RawMetricsConfig_Create_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CUDA_RawMetricsConfig_Create_Params, pRawMetricsConfig)
+
+ NVPA_Status NVPW_CUDA_RawMetricsConfig_Create(NVPW_CUDA_RawMetricsConfig_Create_Params* pParams);
+
+ typedef struct NVPW_CUDA_RawMetricsConfig_Create_V2_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ NVPA_ActivityKind activityKind;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ const uint8_t* pCounterAvailabilityImage;
+ /// [out] new NVPA_RawMetricsConfig object
+ struct NVPA_RawMetricsConfig* pRawMetricsConfig;
+ } NVPW_CUDA_RawMetricsConfig_Create_V2_Params;
+#define NVPW_CUDA_RawMetricsConfig_Create_V2_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CUDA_RawMetricsConfig_Create_V2_Params, pRawMetricsConfig)
+
+ /// Use either 'pChipName' or 'pCounterAvailabilityImage'.
+ NVPA_Status NVPW_CUDA_RawMetricsConfig_Create_V2(NVPW_CUDA_RawMetricsConfig_Create_V2_Params* pParams);
+
+ typedef struct NVPW_CUDA_CounterDataBuilder_Create_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ const uint8_t* pCounterAvailabilityImage;
+ /// [out] new NVPA_CounterDataBuilder object
+ struct NVPA_CounterDataBuilder* pCounterDataBuilder;
+ } NVPW_CUDA_CounterDataBuilder_Create_Params;
+#define NVPW_CUDA_CounterDataBuilder_Create_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CUDA_CounterDataBuilder_Create_Params, pCounterDataBuilder)
+
+ /// Use either 'pChipName' or 'pCounterAvailabilityImage'.
+ NVPA_Status NVPW_CUDA_CounterDataBuilder_Create(NVPW_CUDA_CounterDataBuilder_Create_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator NVPW_MetricsEvaluator;
+
+ typedef struct NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ const uint8_t* pCounterAvailabilityImage;
+ /// [out]
+ size_t scratchBufferSize;
+ } NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize_Params;
+#define NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize_Params, scratchBufferSize)
+
+ /// Use either 'pChipName' or 'pCounterAvailabilityImage'.
+ NVPA_Status NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize(NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize_Params* pParams);
+
+ typedef struct NVPW_CUDA_MetricsEvaluator_Initialize_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ uint8_t* pScratchBuffer;
+ /// [in] the size of the 'pScratchBuffer' array, should be at least the size of the 'scratchBufferSize' returned
+ /// by 'NVPW_CUDA_MetricsEvaluator_CalculateScratchBufferSize'
+ size_t scratchBufferSize;
+ /// [in] accepted for chips supported at the time-of-release.
+ const char* pChipName;
+ /// [in] buffer with counter availability image - required for future chip support
+ const uint8_t* pCounterAvailabilityImage;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in] must be provided if 'pCounterDataImage' is not NULL
+ size_t counterDataImageSize;
+ /// [out]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ } NVPW_CUDA_MetricsEvaluator_Initialize_Params;
+#define NVPW_CUDA_MetricsEvaluator_Initialize_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CUDA_MetricsEvaluator_Initialize_Params, pMetricsEvaluator)
+
+ /// Use one of 'pChipName', 'pCounterAvailabilityImage', or 'pCounterDataImage'. 'pChipName' or
+ /// 'pCounterAvailabilityImage' will create a metrics evaluator based on a virtual device while 'pCounterDataImage'
+ /// will create a metrics evaluator based on the actual device.
+ NVPA_Status NVPW_CUDA_MetricsEvaluator_Initialize(NVPW_CUDA_MetricsEvaluator_Initialize_Params* pParams);
+
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#endif // NVPERF_CUDA_HOST_H
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_host.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..62a53528b64d6b3da8daf7058cec21781ae0e8cb
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_host.h
@@ -0,0 +1,1178 @@
+#ifndef NVPERF_HOST_H
+#define NVPERF_HOST_H
+
+/*
+ * Copyright 2014-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO USER:
+ *
+ * This source code is subject to NVIDIA ownership rights under U.S. and
+ * international Copyright laws.
+ *
+ * This software and the information contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
+ * of a form of NVIDIA software license agreement.
+ *
+ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
+ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+ * OR PERFORMANCE OF THIS SOURCE CODE.
+ *
+ * U.S. Government End Users. This source code is a "commercial item" as
+ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
+ * "commercial computer software" and "commercial computer software
+ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
+ * and is provided to the U.S. Government only as a commercial end item.
+ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
+ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
+ * source code with only those rights set forth herein.
+ *
+ * Any use of this source code in individual and commercial software must
+ * include, in the user documentation and internal comments to the code,
+ * the above Disclaimer and U.S. Government End Users Notice.
+ */
+
+#include
+#include
+#include "nvperf_common.h"
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility push(default)
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL __attribute__ ((visibility ("hidden")))
+ #endif
+#else
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file nvperf_host.h
+ */
+
+
+// Guard against multiple definition of NvPerf host types
+#ifndef NVPERF_HOST_API_DEFINED
+#define NVPERF_HOST_API_DEFINED
+
+
+/***************************************************************************//**
+ * @name Host Configuration
+ * @{
+ */
+
+ typedef struct NVPW_InitializeHost_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ } NVPW_InitializeHost_Params;
+#define NVPW_InitializeHost_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_InitializeHost_Params, pPriv)
+
+ /// Load the host library.
+ NVPA_Status NVPW_InitializeHost(NVPW_InitializeHost_Params* pParams);
+
+ typedef struct NVPW_CounterData_CalculateCounterDataImageCopySize_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// The CounterDataPrefix generated from e.g. nvperf2 initdata or
+ /// NVPW_CounterDataBuilder_GetCounterDataPrefix(). Must be align(8).
+ const uint8_t* pCounterDataPrefix;
+ size_t counterDataPrefixSize;
+ /// max number of ranges that can be profiled
+ uint32_t maxNumRanges;
+ /// max number of RangeTree nodes; must be >= maxNumRanges
+ uint32_t maxNumRangeTreeNodes;
+ /// max string length of each RangeName, including the trailing NUL character
+ uint32_t maxRangeNameLength;
+ const uint8_t* pCounterDataSrc;
+ /// [out] required size of the copy buffer
+ size_t copyDataImageCounterSize;
+ } NVPW_CounterData_CalculateCounterDataImageCopySize_Params;
+#define NVPW_CounterData_CalculateCounterDataImageCopySize_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_CalculateCounterDataImageCopySize_Params, copyDataImageCounterSize)
+
+ NVPA_Status NVPW_CounterData_CalculateCounterDataImageCopySize(NVPW_CounterData_CalculateCounterDataImageCopySize_Params* pParams);
+
+ typedef struct NVPW_CounterData_InitializeCounterDataImageCopy_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// The CounterDataPrefix generated from e.g. nvperf2 initdata or
+ /// NVPW_CounterDataBuilder_GetCounterDataPrefix(). Must be align(8).
+ const uint8_t* pCounterDataPrefix;
+ size_t counterDataPrefixSize;
+ /// max number of ranges that can be profiled
+ uint32_t maxNumRanges;
+ /// max number of RangeTree nodes; must be >= maxNumRanges
+ uint32_t maxNumRangeTreeNodes;
+ /// max string length of each RangeName, including the trailing NUL character
+ uint32_t maxRangeNameLength;
+ const uint8_t* pCounterDataSrc;
+ uint8_t* pCounterDataDst;
+ } NVPW_CounterData_InitializeCounterDataImageCopy_Params;
+#define NVPW_CounterData_InitializeCounterDataImageCopy_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_InitializeCounterDataImageCopy_Params, pCounterDataDst)
+
+ NVPA_Status NVPW_CounterData_InitializeCounterDataImageCopy(NVPW_CounterData_InitializeCounterDataImageCopy_Params* pParams);
+
+ typedef struct NVPW_CounterData_ExtractCounterDataPrefix_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// The source buffer to extract the prefix from.
+ const uint8_t* pCounterDataSrc;
+ size_t counterDataSrcSize;
+ /// [in] If not NULL, the prefix will be copied into this buffer.
+ uint8_t* pCounterDataPrefix;
+ /// [inout] if 'pCounterDataPrefix' is NULL, size of counter data prefix will be returned; otherwise it should
+ /// be set to the size of buffer allocated for 'pCounterDataPrefix'.
+ size_t counterDataPrefixSize;
+ } NVPW_CounterData_ExtractCounterDataPrefix_Params;
+#define NVPW_CounterData_ExtractCounterDataPrefix_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_ExtractCounterDataPrefix_Params, counterDataPrefixSize)
+
+ NVPA_Status NVPW_CounterData_ExtractCounterDataPrefix(NVPW_CounterData_ExtractCounterDataPrefix_Params* pParams);
+
+ typedef struct NVPA_CounterDataCombiner NVPA_CounterDataCombiner;
+
+ typedef struct NVPW_CounterDataCombiner_Create_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// The destination counter data into which the source datas will be combined
+ uint8_t* pCounterDataDst;
+ /// [out] The created counter data combiner
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ } NVPW_CounterDataCombiner_Create_Params;
+#define NVPW_CounterDataCombiner_Create_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_Create_Params, pCounterDataCombiner)
+
+ NVPA_Status NVPW_CounterDataCombiner_Create(NVPW_CounterDataCombiner_Create_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_Destroy_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ } NVPW_CounterDataCombiner_Destroy_Params;
+#define NVPW_CounterDataCombiner_Destroy_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_Destroy_Params, pCounterDataCombiner)
+
+ NVPA_Status NVPW_CounterDataCombiner_Destroy(NVPW_CounterDataCombiner_Destroy_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_CreateRange_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ size_t numDescriptions;
+ const char* const* ppDescriptions;
+ /// [out]
+ size_t rangeIndexDst;
+ } NVPW_CounterDataCombiner_CreateRange_Params;
+#define NVPW_CounterDataCombiner_CreateRange_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_CreateRange_Params, rangeIndexDst)
+
+ NVPA_Status NVPW_CounterDataCombiner_CreateRange(NVPW_CounterDataCombiner_CreateRange_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_CopyIntoRange_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ /// [in]
+ size_t rangeIndexDst;
+ /// [in]
+ const uint8_t* pCounterDataSrc;
+ /// [in]
+ size_t rangeIndexSrc;
+ } NVPW_CounterDataCombiner_CopyIntoRange_Params;
+#define NVPW_CounterDataCombiner_CopyIntoRange_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_CopyIntoRange_Params, rangeIndexSrc)
+
+ /// In order to use this API, the source counter data and the destination counter data must have identical counters
+ NVPA_Status NVPW_CounterDataCombiner_CopyIntoRange(NVPW_CounterDataCombiner_CopyIntoRange_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_AccumulateIntoRange_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ size_t rangeIndexDst;
+ uint32_t dstMultiplier;
+ const uint8_t* pCounterDataSrc;
+ size_t rangeIndexSrc;
+ uint32_t srcMultiplier;
+ } NVPW_CounterDataCombiner_AccumulateIntoRange_Params;
+#define NVPW_CounterDataCombiner_AccumulateIntoRange_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_AccumulateIntoRange_Params, srcMultiplier)
+
+ NVPA_Status NVPW_CounterDataCombiner_AccumulateIntoRange(NVPW_CounterDataCombiner_AccumulateIntoRange_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_SumIntoRange_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ size_t rangeIndexDst;
+ const uint8_t* pCounterDataSrc;
+ size_t rangeIndexSrc;
+ } NVPW_CounterDataCombiner_SumIntoRange_Params;
+#define NVPW_CounterDataCombiner_SumIntoRange_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_SumIntoRange_Params, rangeIndexSrc)
+
+ NVPA_Status NVPW_CounterDataCombiner_SumIntoRange(NVPW_CounterDataCombiner_SumIntoRange_Params* pParams);
+
+ typedef struct NVPW_CounterDataCombiner_WeightedSumIntoRange_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataCombiner* pCounterDataCombiner;
+ size_t rangeIndexDst;
+ double dstMultiplier;
+ const uint8_t* pCounterDataSrc;
+ size_t rangeIndexSrc;
+ double srcMultiplier;
+ } NVPW_CounterDataCombiner_WeightedSumIntoRange_Params;
+#define NVPW_CounterDataCombiner_WeightedSumIntoRange_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataCombiner_WeightedSumIntoRange_Params, srcMultiplier)
+
+ NVPA_Status NVPW_CounterDataCombiner_WeightedSumIntoRange(NVPW_CounterDataCombiner_WeightedSumIntoRange_Params* pParams);
+
+/**
+ * @}
+ ******************************************************************************/
+
+/***************************************************************************//**
+ * @name Metrics Configuration
+ * @{
+ */
+
+ typedef struct NVPA_RawMetricsConfig NVPA_RawMetricsConfig;
+
+ typedef struct NVPA_RawMetricRequest
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// in
+ const char* pMetricName;
+ /// in
+ NVPA_Bool isolated;
+ /// in; ignored by AddMetric but observed by CounterData initialization
+ NVPA_Bool keepInstances;
+ } NVPA_RawMetricRequest;
+#define NVPA_RAW_METRIC_REQUEST_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPA_RawMetricRequest, keepInstances)
+
+ typedef struct NVPW_GetSupportedChipNames_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [out]
+ const char* const* ppChipNames;
+ /// [out]
+ size_t numChipNames;
+ } NVPW_GetSupportedChipNames_Params;
+#define NVPW_GetSupportedChipNames_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_GetSupportedChipNames_Params, numChipNames)
+
+ NVPA_Status NVPW_GetSupportedChipNames(NVPW_GetSupportedChipNames_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_Destroy_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ } NVPW_RawMetricsConfig_Destroy_Params;
+#define NVPW_RawMetricsConfig_Destroy_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_Destroy_Params, pRawMetricsConfig)
+
+ NVPA_Status NVPW_RawMetricsConfig_Destroy(NVPW_RawMetricsConfig_Destroy_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_SetCounterAvailability_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [in] buffer with counter availability image
+ const uint8_t* pCounterAvailabilityImage;
+ } NVPW_RawMetricsConfig_SetCounterAvailability_Params;
+#define NVPW_RawMetricsConfig_SetCounterAvailability_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_SetCounterAvailability_Params, pCounterAvailabilityImage)
+
+ NVPA_Status NVPW_RawMetricsConfig_SetCounterAvailability(NVPW_RawMetricsConfig_SetCounterAvailability_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_BeginPassGroup_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ size_t maxPassCount;
+ } NVPW_RawMetricsConfig_BeginPassGroup_Params;
+#define NVPW_RawMetricsConfig_BeginPassGroup_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_BeginPassGroup_Params, maxPassCount)
+
+ NVPA_Status NVPW_RawMetricsConfig_BeginPassGroup(NVPW_RawMetricsConfig_BeginPassGroup_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_EndPassGroup_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ } NVPW_RawMetricsConfig_EndPassGroup_Params;
+#define NVPW_RawMetricsConfig_EndPassGroup_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_EndPassGroup_Params, pRawMetricsConfig)
+
+ NVPA_Status NVPW_RawMetricsConfig_EndPassGroup(NVPW_RawMetricsConfig_EndPassGroup_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetNumMetrics_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [out]
+ size_t numMetrics;
+ } NVPW_RawMetricsConfig_GetNumMetrics_Params;
+#define NVPW_RawMetricsConfig_GetNumMetrics_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetNumMetrics_Params, numMetrics)
+
+ NVPA_Status NVPW_RawMetricsConfig_GetNumMetrics(NVPW_RawMetricsConfig_GetNumMetrics_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetMetricProperties_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ size_t metricIndex;
+ /// [out]
+ const char* pMetricName;
+ /// [out]
+ NVPA_Bool supportsPipelined;
+ /// [out]
+ NVPA_Bool supportsIsolated;
+ } NVPW_RawMetricsConfig_GetMetricProperties_Params;
+#define NVPW_RawMetricsConfig_GetMetricProperties_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetMetricProperties_Params, supportsIsolated)
+
+ NVPA_Status NVPW_RawMetricsConfig_GetMetricProperties(NVPW_RawMetricsConfig_GetMetricProperties_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetMetricProperties_V2_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ size_t metricIndex;
+ /// [out]
+ const char* pMetricName;
+ } NVPW_RawMetricsConfig_GetMetricProperties_V2_Params;
+#define NVPW_RawMetricsConfig_GetMetricProperties_V2_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetMetricProperties_V2_Params, pMetricName)
+
+ NVPA_Status NVPW_RawMetricsConfig_GetMetricProperties_V2(NVPW_RawMetricsConfig_GetMetricProperties_V2_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_AddMetrics_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ const NVPA_RawMetricRequest* pRawMetricRequests;
+ size_t numMetricRequests;
+ } NVPW_RawMetricsConfig_AddMetrics_Params;
+#define NVPW_RawMetricsConfig_AddMetrics_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_AddMetrics_Params, numMetricRequests)
+
+ NVPA_Status NVPW_RawMetricsConfig_AddMetrics(NVPW_RawMetricsConfig_AddMetrics_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_IsAddMetricsPossible_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ const NVPA_RawMetricRequest* pRawMetricRequests;
+ size_t numMetricRequests;
+ /// [out]
+ NVPA_Bool isPossible;
+ } NVPW_RawMetricsConfig_IsAddMetricsPossible_Params;
+#define NVPW_RawMetricsConfig_IsAddMetricsPossible_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_IsAddMetricsPossible_Params, isPossible)
+
+ NVPA_Status NVPW_RawMetricsConfig_IsAddMetricsPossible(NVPW_RawMetricsConfig_IsAddMetricsPossible_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GenerateConfigImage_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [in] If true, all existing pass groups may be merged to reduce number of passes.
+ /// If merge was successful, distribution of counters in passes may be updated as a side-effect. The effects
+ /// will be persistent in pRawMetricsConfig.
+ NVPA_Bool mergeAllPassGroups;
+ } NVPW_RawMetricsConfig_GenerateConfigImage_Params;
+#define NVPW_RawMetricsConfig_GenerateConfigImage_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GenerateConfigImage_Params, mergeAllPassGroups)
+
+ /// This API may fail if called inside a pass group with `mergeAllPassGroups` = true.
+ NVPA_Status NVPW_RawMetricsConfig_GenerateConfigImage(NVPW_RawMetricsConfig_GenerateConfigImage_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetConfigImage_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [in] Number of bytes allocated for pBuffer
+ size_t bytesAllocated;
+ /// [out] [optional] Buffer receiving the config image
+ uint8_t* pBuffer;
+ /// [out] Count of bytes that would be copied into pBuffer
+ size_t bytesCopied;
+ } NVPW_RawMetricsConfig_GetConfigImage_Params;
+#define NVPW_RawMetricsConfig_GetConfigImage_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetConfigImage_Params, bytesCopied)
+
+ NVPA_Status NVPW_RawMetricsConfig_GetConfigImage(NVPW_RawMetricsConfig_GetConfigImage_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetNumPasses_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [out]
+ size_t numPipelinedPasses;
+ /// [out]
+ size_t numIsolatedPasses;
+ } NVPW_RawMetricsConfig_GetNumPasses_Params;
+#define NVPW_RawMetricsConfig_GetNumPasses_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetNumPasses_Params, numIsolatedPasses)
+
+ /// Total num passes = numPipelinedPasses + numIsolatedPasses * numNestingLevels
+ NVPA_Status NVPW_RawMetricsConfig_GetNumPasses(NVPW_RawMetricsConfig_GetNumPasses_Params* pParams);
+
+ typedef struct NVPW_RawMetricsConfig_GetNumPasses_V2_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const NVPA_RawMetricsConfig* pRawMetricsConfig;
+ /// [out]
+ size_t numPasses;
+ } NVPW_RawMetricsConfig_GetNumPasses_V2_Params;
+#define NVPW_RawMetricsConfig_GetNumPasses_V2_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_RawMetricsConfig_GetNumPasses_V2_Params, numPasses)
+
+ /// Total num passes = numPasses * numNestingLevels
+ NVPA_Status NVPW_RawMetricsConfig_GetNumPasses_V2(NVPW_RawMetricsConfig_GetNumPasses_V2_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] Typically created by e.g. NVPW_RawMetricsConfig_GetConfigImage(), must be align(8).
+ const uint8_t* pConfig;
+ /// [in]
+ size_t configSize;
+ /// [out]
+ size_t sampleSize;
+ } NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize_Params;
+#define NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize_Params, sampleSize)
+
+ /// Estimate per sample records size based on a virtual device
+ NVPA_Status NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize(NVPW_PeriodicSampler_Config_GetSocEstimatedSampleSize_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] Typically created by e.g. NVPW_RawMetricsConfig_GetConfigImage(), must be align(8).
+ const uint8_t* pConfig;
+ /// [in]
+ size_t configSize;
+ /// [out]
+ size_t sampleSize;
+ } NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize_Params;
+#define NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize_Params, sampleSize)
+
+ /// Estimate per sample records size based on a virtual device
+ NVPA_Status NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize(NVPW_PeriodicSampler_Config_GetGpuEstimatedSampleSize_Params* pParams);
+
+/**
+ * @}
+ ******************************************************************************/
+
+ typedef struct NVPW_Config_GetRawCounterInfo_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pConfig;
+ /// [in]
+ size_t configSize;
+ /// [in]
+ const char* pRawCounterName;
+ /// [inout] array containing indices of passes the counter resides in. 'pPassIndices' is in, '*pPassIndices' is
+ /// out.
+ size_t* pPassIndices;
+ /// [inout] if 'pPassIndices' is NULL, the count of passes this counter resides in will be returned; otherwise
+ /// it should be set to the capacity of 'pPassIndices' array, and on return, it will be overwritten to reflect
+ /// the actual count filled into 'pPassIndices'
+ size_t numPassIndices;
+ } NVPW_Config_GetRawCounterInfo_Params;
+#define NVPW_Config_GetRawCounterInfo_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Config_GetRawCounterInfo_Params, numPassIndices)
+
+ NVPA_Status NVPW_Config_GetRawCounterInfo(NVPW_Config_GetRawCounterInfo_Params* pParams);
+
+ typedef struct NVPW_Config_GetRawCounters_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pConfig;
+ /// [in]
+ size_t configSize;
+ /// [in]
+ size_t passIndex;
+ /// [inout] array containing raw counter names. 'ppRawCounterNames' is in, '*ppRawCounterNames' is out.
+ const char** ppRawCounterNames;
+ /// [inout] if 'ppRawCounterNames' is NULL, the count of raw counters will be returned; otherwise it should be
+ /// set to the capacity of 'ppRawCounterNames' array, and on return, it will be overwritten to reflect the
+ /// actual count filled into 'ppRawCounterNames'
+ size_t numRawCounters;
+ } NVPW_Config_GetRawCounters_Params;
+#define NVPW_Config_GetRawCounters_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Config_GetRawCounters_Params, numRawCounters)
+
+ NVPA_Status NVPW_Config_GetRawCounters(NVPW_Config_GetRawCounters_Params* pParams);
+
+/***************************************************************************//**
+ * @name CounterData Creation
+ * @{
+ */
+
+ typedef struct NVPA_CounterDataBuilder NVPA_CounterDataBuilder;
+
+ typedef struct NVPW_CounterDataBuilder_Create_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [out]
+ NVPA_CounterDataBuilder* pCounterDataBuilder;
+ const char* pChipName;
+ } NVPW_CounterDataBuilder_Create_Params;
+#define NVPW_CounterDataBuilder_Create_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataBuilder_Create_Params, pChipName)
+
+ NVPA_Status NVPW_CounterDataBuilder_Create(NVPW_CounterDataBuilder_Create_Params* pParams);
+
+ typedef struct NVPW_CounterDataBuilder_Destroy_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataBuilder* pCounterDataBuilder;
+ } NVPW_CounterDataBuilder_Destroy_Params;
+#define NVPW_CounterDataBuilder_Destroy_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataBuilder_Destroy_Params, pCounterDataBuilder)
+
+ NVPA_Status NVPW_CounterDataBuilder_Destroy(NVPW_CounterDataBuilder_Destroy_Params* pParams);
+
+ typedef struct NVPW_CounterDataBuilder_AddMetrics_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataBuilder* pCounterDataBuilder;
+ const NVPA_RawMetricRequest* pRawMetricRequests;
+ size_t numMetricRequests;
+ } NVPW_CounterDataBuilder_AddMetrics_Params;
+#define NVPW_CounterDataBuilder_AddMetrics_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataBuilder_AddMetrics_Params, numMetricRequests)
+
+ NVPA_Status NVPW_CounterDataBuilder_AddMetrics(NVPW_CounterDataBuilder_AddMetrics_Params* pParams);
+
+ typedef struct NVPW_CounterDataBuilder_GetCounterDataPrefix_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ NVPA_CounterDataBuilder* pCounterDataBuilder;
+ /// [in] Number of bytes allocated for pBuffer
+ size_t bytesAllocated;
+ /// [out] [optional] Buffer receiving the counter data prefix
+ uint8_t* pBuffer;
+ /// [out] Count of bytes that would be copied to pBuffer
+ size_t bytesCopied;
+ } NVPW_CounterDataBuilder_GetCounterDataPrefix_Params;
+#define NVPW_CounterDataBuilder_GetCounterDataPrefix_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterDataBuilder_GetCounterDataPrefix_Params, bytesCopied)
+
+ NVPA_Status NVPW_CounterDataBuilder_GetCounterDataPrefix(NVPW_CounterDataBuilder_GetCounterDataPrefix_Params* pParams);
+
+/**
+ * @}
+ ******************************************************************************/
+
+/***************************************************************************//**
+ * @name Metrics Evaluator
+ * @{
+ */
+
+ typedef struct NVPW_MetricsEvaluator NVPW_MetricsEvaluator;
+
+#ifndef NVPW_DIM_UNIT_DEFINED
+#define NVPW_DIM_UNIT_DEFINED
+ typedef enum NVPW_DimUnitName
+ {
+ NVPW_DIM_UNIT_INVALID = 3518299157,
+ NVPW_DIM_UNIT_UNITLESS = 2126137902,
+ NVPW_DIM_UNIT_ATTRIBUTES = 3776338729,
+ NVPW_DIM_UNIT_BYTES = 3797850191,
+ NVPW_DIM_UNIT_CTAS = 1960564139,
+ NVPW_DIM_UNIT_CTC_CYCLES = 2224883873,
+ NVPW_DIM_UNIT_DRAM_CYCLES = 2650981327,
+ NVPW_DIM_UNIT_FBP_CYCLES = 1785238957,
+ NVPW_DIM_UNIT_FE_OPS = 2919159083,
+ NVPW_DIM_UNIT_GPC_CYCLES = 1222631184,
+ NVPW_DIM_UNIT_IDC_REQUESTS = 2012649669,
+ NVPW_DIM_UNIT_INSTRUCTIONS = 1418625543,
+ NVPW_DIM_UNIT_KILOBYTES = 1335980302,
+ NVPW_DIM_UNIT_L1DATA_BANK_ACCESSES = 1479493682,
+ NVPW_DIM_UNIT_L1DATA_BANK_CONFLICTS = 3433170787,
+ NVPW_DIM_UNIT_L1TEX_REQUESTS = 1306473767,
+ NVPW_DIM_UNIT_L1TEX_TAGS = 26573010,
+ NVPW_DIM_UNIT_L1TEX_WAVEFRONTS = 129373765,
+ NVPW_DIM_UNIT_L2_REQUESTS = 1143695106,
+ NVPW_DIM_UNIT_L2_SECTORS = 3424101564,
+ NVPW_DIM_UNIT_L2_TAGS = 3755612781,
+ NVPW_DIM_UNIT_LRC_REQUESTS = 2280914327,
+ NVPW_DIM_UNIT_LRC_SECTORS = 7212034,
+ NVPW_DIM_UNIT_MCC_CYCLES = 1826685787,
+ NVPW_DIM_UNIT_NANOSECONDS = 3047500672,
+ NVPW_DIM_UNIT_NVDLA_CYCLES = 3374059789,
+ NVPW_DIM_UNIT_NVENC_CYCLES = 2267185244,
+ NVPW_DIM_UNIT_NVLRX_CYCLES = 4059934930,
+ NVPW_DIM_UNIT_NVLTX_CYCLES = 1814350488,
+ NVPW_DIM_UNIT_OFA_CYCLES = 4290210307,
+ NVPW_DIM_UNIT_PCIE_CYCLES = 1230450943,
+ NVPW_DIM_UNIT_PERCENT = 1284354694,
+ NVPW_DIM_UNIT_PIXELS = 4227616663,
+ NVPW_DIM_UNIT_PIXEL_SHADER_BARRIERS = 3705502518,
+ NVPW_DIM_UNIT_PRIMITIVES = 2373084002,
+ NVPW_DIM_UNIT_PVAVPU_CYCLES = 2238259366,
+ NVPW_DIM_UNIT_PVA_CYCLES = 202044173,
+ NVPW_DIM_UNIT_QUADS = 1539753497,
+ NVPW_DIM_UNIT_REGISTERS = 2837260947,
+ NVPW_DIM_UNIT_SAMPLES = 746046551,
+ NVPW_DIM_UNIT_SECONDS = 1164825258,
+ NVPW_DIM_UNIT_SYSL2_REQUESTS = 2165109286,
+ NVPW_DIM_UNIT_SYSL2_SECTORS = 2268734175,
+ NVPW_DIM_UNIT_SYSL2_TAGS = 3308651352,
+ NVPW_DIM_UNIT_SYSLRC_REQUESTS = 3328245480,
+ NVPW_DIM_UNIT_SYSLRC_SECTORS = 1190477493,
+ NVPW_DIM_UNIT_SYS_CYCLES = 3310821688,
+ NVPW_DIM_UNIT_TEXELS = 1293214069,
+ NVPW_DIM_UNIT_THREADS = 164261907,
+ NVPW_DIM_UNIT_TMEM_ACCESSES = 3742902067,
+ NVPW_DIM_UNIT_VERTICES = 1873662209,
+ NVPW_DIM_UNIT_VIC_CYCLES = 103143588,
+ NVPW_DIM_UNIT_WARPS = 97951949,
+ NVPW_DIM_UNIT_WORKIDS = 1971113483,
+ NVPW_DIM_UNIT_WORKLOADS = 1728142656
+ } NVPW_DimUnitName;
+#endif //NVPW_DIM_UNIT_DEFINED
+
+#ifndef NVPW_HW_UNIT_DEFINED
+#define NVPW_HW_UNIT_DEFINED
+ typedef enum NVPW_HwUnit
+ {
+ NVPW_HW_UNIT_INVALID = 3498035701,
+ NVPW_HW_UNIT_CROP = 2872137846,
+ NVPW_HW_UNIT_CTC = 4123164475,
+ NVPW_HW_UNIT_DRAM = 1662616918,
+ NVPW_HW_UNIT_DRAMC = 1401232876,
+ NVPW_HW_UNIT_FBP = 2947194306,
+ NVPW_HW_UNIT_FBPA = 690045803,
+ NVPW_HW_UNIT_FE = 2204924321,
+ NVPW_HW_UNIT_GPC = 1911735839,
+ NVPW_HW_UNIT_GPU = 1014363534,
+ NVPW_HW_UNIT_GR = 2933618517,
+ NVPW_HW_UNIT_IDC = 842765289,
+ NVPW_HW_UNIT_L1TEX = 893940957,
+ NVPW_HW_UNIT_LRC = 4004756136,
+ NVPW_HW_UNIT_LTS = 2333266697,
+ NVPW_HW_UNIT_MCC = 3980130194,
+ NVPW_HW_UNIT_NVDLA = 4201167892,
+ NVPW_HW_UNIT_NVENC = 207708260,
+ NVPW_HW_UNIT_NVLRX = 3091684901,
+ NVPW_HW_UNIT_NVLTX = 869679659,
+ NVPW_HW_UNIT_OFA = 70307371,
+ NVPW_HW_UNIT_PCIE = 3433264174,
+ NVPW_HW_UNIT_PDA = 345193251,
+ NVPW_HW_UNIT_PES = 804128425,
+ NVPW_HW_UNIT_PROP = 3339255507,
+ NVPW_HW_UNIT_PVA = 2565499490,
+ NVPW_HW_UNIT_PVAVPU = 1656645655,
+ NVPW_HW_UNIT_RASTER = 187932504,
+ NVPW_HW_UNIT_SM = 724224710,
+ NVPW_HW_UNIT_SMSP = 2837616917,
+ NVPW_HW_UNIT_SYS = 768990063,
+ NVPW_HW_UNIT_SYSLRC = 3247626950,
+ NVPW_HW_UNIT_SYSLTS = 4137740217,
+ NVPW_HW_UNIT_TPC = 1889024613,
+ NVPW_HW_UNIT_VAF = 753670509,
+ NVPW_HW_UNIT_VIC = 322439594,
+ NVPW_HW_UNIT_VPC = 275561583,
+ NVPW_HW_UNIT_ZCULL = 2401248356,
+ NVPW_HW_UNIT_ZROP = 979500456
+ } NVPW_HwUnit;
+#endif //NVPW_HW_UNIT_DEFINED
+
+ typedef enum NVPW_RollupOp
+ {
+ NVPW_ROLLUP_OP_AVG = 0,
+ NVPW_ROLLUP_OP_MAX,
+ NVPW_ROLLUP_OP_MIN,
+ NVPW_ROLLUP_OP_SUM,
+ NVPW_ROLLUP_OP__COUNT
+ } NVPW_RollupOp;
+
+ typedef enum NVPW_MetricType
+ {
+ NVPW_METRIC_TYPE_COUNTER = 0,
+ NVPW_METRIC_TYPE_RATIO,
+ NVPW_METRIC_TYPE_THROUGHPUT,
+ NVPW_METRIC_TYPE__COUNT
+ } NVPW_MetricType;
+
+ typedef enum NVPW_Submetric
+ {
+ NVPW_SUBMETRIC_NONE = 0,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED = 1,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_ACTIVE = 2,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_ACTIVE_PER_SECOND = 3,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_ELAPSED = 4,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_ELAPSED_PER_SECOND = 5,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_FRAME = 6,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_FRAME_PER_SECOND = 7,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_REGION = 8,
+ NVPW_SUBMETRIC_PEAK_SUSTAINED_REGION_PER_SECOND = 9,
+ NVPW_SUBMETRIC_PER_CYCLE_ACTIVE = 10,
+ NVPW_SUBMETRIC_PER_CYCLE_ELAPSED = 11,
+ NVPW_SUBMETRIC_PER_CYCLE_IN_FRAME = 12,
+ NVPW_SUBMETRIC_PER_CYCLE_IN_REGION = 13,
+ NVPW_SUBMETRIC_PER_SECOND = 14,
+ NVPW_SUBMETRIC_PCT_OF_PEAK_SUSTAINED_ACTIVE = 15,
+ NVPW_SUBMETRIC_PCT_OF_PEAK_SUSTAINED_ELAPSED = 16,
+ NVPW_SUBMETRIC_PCT_OF_PEAK_SUSTAINED_FRAME = 17,
+ NVPW_SUBMETRIC_PCT_OF_PEAK_SUSTAINED_REGION = 18,
+ NVPW_SUBMETRIC_MAX_RATE = 19,
+ NVPW_SUBMETRIC_PCT = 20,
+ NVPW_SUBMETRIC_RATIO = 21,
+ NVPW_SUBMETRIC__COUNT
+ } NVPW_Submetric;
+
+ typedef struct NVPW_MetricEvalRequest
+ {
+ /// the metric index as in 'NVPW_MetricsEvaluator_GetMetricNames'
+ size_t metricIndex;
+ /// one of 'NVPW_MetricType'
+ uint8_t metricType;
+ /// one of 'NVPW_RollupOp', required for Counter and Throughput, doesn't apply to Ratio
+ uint8_t rollupOp;
+ /// one of 'NVPW_Submetric', required for Ratio and Throughput, optional for Counter
+ uint16_t submetric;
+ } NVPW_MetricEvalRequest;
+#define NVPW_MetricEvalRequest_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricEvalRequest, submetric)
+
+ typedef struct NVPW_DimUnitFactor
+ {
+ /// one of 'NVPW_DimUnitName'
+ uint32_t dimUnit;
+ int8_t exponent;
+ } NVPW_DimUnitFactor;
+#define NVPW_DimUnitFactor_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_DimUnitFactor, exponent)
+
+ typedef struct NVPW_MetricsEvaluator_Destroy_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ } NVPW_MetricsEvaluator_Destroy_Params;
+#define NVPW_MetricsEvaluator_Destroy_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_Destroy_Params, pMetricsEvaluator)
+
+ NVPA_Status NVPW_MetricsEvaluator_Destroy(NVPW_MetricsEvaluator_Destroy_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetMetricNames_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] one of 'NVPW_MetricType'
+ uint8_t metricType;
+ /// [out]
+ const char* pMetricNames;
+ /// [out]
+ const size_t* pMetricNameBeginIndices;
+ /// [out]
+ size_t numMetrics;
+ } NVPW_MetricsEvaluator_GetMetricNames_Params;
+#define NVPW_MetricsEvaluator_GetMetricNames_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetMetricNames_Params, numMetrics)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetMetricNames(NVPW_MetricsEvaluator_GetMetricNames_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetMetricTypeAndIndex_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] can be either a base metric or a metric
+ const char* pMetricName;
+ /// [out] one of 'NVPW_MetricType'
+ uint8_t metricType;
+ /// [out] the metric index as in 'NVPW_MetricsEvaluator_GetMetricNames'
+ size_t metricIndex;
+ } NVPW_MetricsEvaluator_GetMetricTypeAndIndex_Params;
+#define NVPW_MetricsEvaluator_GetMetricTypeAndIndex_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetMetricTypeAndIndex_Params, metricIndex)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetMetricTypeAndIndex(NVPW_MetricsEvaluator_GetMetricTypeAndIndex_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in]
+ const char* pMetricName;
+ /// [inout] 'pMetricEvalRequest' is in, '*pMetricEvalRequest' is out
+ struct NVPW_MetricEvalRequest* pMetricEvalRequest;
+ /// [in] set to 'NVPW_MetricEvalRequest_STRUCT_SIZE'
+ size_t metricEvalRequestStructSize;
+ } NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest_Params;
+#define NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest_Params, metricEvalRequestStructSize)
+
+ NVPA_Status NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest(NVPW_MetricsEvaluator_ConvertMetricNameToMetricEvalRequest_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_HwUnitToString_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] one of 'NVPW_HwUnit'
+ uint32_t hwUnit;
+ /// [out]
+ const char* pHwUnitName;
+ } NVPW_MetricsEvaluator_HwUnitToString_Params;
+#define NVPW_MetricsEvaluator_HwUnitToString_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_HwUnitToString_Params, pHwUnitName)
+
+ NVPA_Status NVPW_MetricsEvaluator_HwUnitToString(NVPW_MetricsEvaluator_HwUnitToString_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetCounterProperties_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] the metric index as in 'NVPW_MetricsEvaluator_GetMetricNames'
+ size_t counterIndex;
+ /// [out]
+ const char* pDescription;
+ /// [out] one of 'NVPW_HwUnit'
+ uint32_t hwUnit;
+ } NVPW_MetricsEvaluator_GetCounterProperties_Params;
+#define NVPW_MetricsEvaluator_GetCounterProperties_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetCounterProperties_Params, hwUnit)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetCounterProperties(NVPW_MetricsEvaluator_GetCounterProperties_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetRatioMetricProperties_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] the metric index as in 'NVPW_MetricsEvaluator_GetMetricNames'
+ size_t ratioMetricIndex;
+ /// [out]
+ const char* pDescription;
+ /// [out]
+ uint64_t hwUnit;
+ } NVPW_MetricsEvaluator_GetRatioMetricProperties_Params;
+#define NVPW_MetricsEvaluator_GetRatioMetricProperties_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetRatioMetricProperties_Params, hwUnit)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetRatioMetricProperties(NVPW_MetricsEvaluator_GetRatioMetricProperties_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetThroughputMetricProperties_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] the metric index as in 'NVPW_MetricsEvaluator_GetMetricNames'
+ size_t throughputMetricIndex;
+ /// [out]
+ const char* pDescription;
+ /// [out]
+ uint32_t hwUnit;
+ /// [out] number of constituent counters for the throughput metric
+ size_t numCounters;
+ /// [out] metric indices as in 'NVPW_MetricsEvaluator_GetMetricNames', valid if 'numCounters' > 0, otherwise
+ /// returned as nullptr
+ const size_t* pCounterIndices;
+ /// [out] number of constituent sub-throughputs for the throughput metric
+ size_t numSubThroughputs;
+ /// [out] metric indices as in 'NVPW_MetricsEvaluator_GetMetricNames', valid if 'numSubThroughputs' > 0,
+ /// otherwise returned as nullptr
+ const size_t* pSubThroughputIndices;
+ } NVPW_MetricsEvaluator_GetThroughputMetricProperties_Params;
+#define NVPW_MetricsEvaluator_GetThroughputMetricProperties_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetThroughputMetricProperties_Params, pSubThroughputIndices)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetThroughputMetricProperties(NVPW_MetricsEvaluator_GetThroughputMetricProperties_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetSupportedSubmetrics_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] one of 'NVPW_MetricType'
+ uint8_t metricType;
+ /// [out] an array of 'NVPW_Submetric'
+ const uint16_t* pSupportedSubmetrics;
+ /// [out]
+ size_t numSupportedSubmetrics;
+ } NVPW_MetricsEvaluator_GetSupportedSubmetrics_Params;
+#define NVPW_MetricsEvaluator_GetSupportedSubmetrics_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetSupportedSubmetrics_Params, numSupportedSubmetrics)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetSupportedSubmetrics(NVPW_MetricsEvaluator_GetSupportedSubmetrics_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetMetricRawDependencies_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in]
+ const struct NVPW_MetricEvalRequest* pMetricEvalRequests;
+ /// [in]
+ size_t numMetricEvalRequests;
+ /// [in] set to 'NVPW_MetricEvalRequest_STRUCT_SIZE'
+ size_t metricEvalRequestStructSize;
+ /// [in] set to sizeof('NVPW_MetricEvalRequest')
+ size_t metricEvalRequestStrideSize;
+ /// [inout] 'ppRawDependencies' is in, '*ppRawDependencies' is out
+ const char** ppRawDependencies;
+ /// [inout] if 'ppRawDependencies' is NULL, number of raw dependencies available will be returned; otherwise it
+ /// should be set to the number of elements allocated for 'ppRawDependencies', and on return, it will be
+ /// overwritten by number of elements copied to 'ppRawDependencies'
+ size_t numRawDependencies;
+ /// [inout] 'ppOptionalRawDependencies' is in, '*ppOptionalRawDependencies' is out
+ const char** ppOptionalRawDependencies;
+ /// [inout] if 'ppOptionalRawDependencies' is NULL, number of optional raw dependencies available will be
+ /// returned; otherwise it should be set to the number of elements allocated for 'ppOptionalRawDependencies',
+ /// and on return, it will be overwritten by number of elements copied to 'ppOptionalRawDependencies'
+ size_t numOptionalRawDependencies;
+ } NVPW_MetricsEvaluator_GetMetricRawDependencies_Params;
+#define NVPW_MetricsEvaluator_GetMetricRawDependencies_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetMetricRawDependencies_Params, numOptionalRawDependencies)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetMetricRawDependencies(NVPW_MetricsEvaluator_GetMetricRawDependencies_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_DimUnitToString_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] one of 'NVPW_DimUnitName'
+ uint32_t dimUnit;
+ /// [out]
+ const char* pSingularName;
+ /// [out]
+ const char* pPluralName;
+ } NVPW_MetricsEvaluator_DimUnitToString_Params;
+#define NVPW_MetricsEvaluator_DimUnitToString_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_DimUnitToString_Params, pPluralName)
+
+ NVPA_Status NVPW_MetricsEvaluator_DimUnitToString(NVPW_MetricsEvaluator_DimUnitToString_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_GetMetricDimUnits_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in]
+ const struct NVPW_MetricEvalRequest* pMetricEvalRequest;
+ /// [in] set to 'NVPW_MetricEvalRequest_STRUCT_SIZE'
+ size_t metricEvalRequestStructSize;
+ /// [inout] 'pDimUnits' is in, '*pDimUnits' is out
+ NVPW_DimUnitFactor* pDimUnits;
+ /// [inout] if 'pDimUnits' is NULL, number of dim-units available will be returned; otherwise it should be set
+ /// to the number of elements allocated for 'pDimUnits', and on return, it will be overwritten by number of
+ /// elements copied to 'pDimUnits'
+ size_t numDimUnits;
+ /// [in] set to 'NVPW_DimUnitFactor_STRUCT_SIZE'
+ size_t dimUnitFactorStructSize;
+ } NVPW_MetricsEvaluator_GetMetricDimUnits_Params;
+#define NVPW_MetricsEvaluator_GetMetricDimUnits_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_GetMetricDimUnits_Params, dimUnitFactorStructSize)
+
+ NVPA_Status NVPW_MetricsEvaluator_GetMetricDimUnits(NVPW_MetricsEvaluator_GetMetricDimUnits_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_SetUserData_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in] duration in ns of user defined frame
+ double frameDuration;
+ /// [in] duration in ns of user defined region
+ double regionDuration;
+ /// [in]
+ NVPA_Bool isolated;
+ } NVPW_MetricsEvaluator_SetUserData_Params;
+#define NVPW_MetricsEvaluator_SetUserData_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_SetUserData_Params, isolated)
+
+ NVPA_Status NVPW_MetricsEvaluator_SetUserData(NVPW_MetricsEvaluator_SetUserData_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_EvaluateToGpuValues_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in]
+ const struct NVPW_MetricEvalRequest* pMetricEvalRequests;
+ /// [in]
+ size_t numMetricEvalRequests;
+ /// [in] set to 'NVPW_MetricEvalRequest_STRUCT_SIZE'
+ size_t metricEvalRequestStructSize;
+ /// [in] set to sizeof('NVPW_MetricEvalRequest')
+ size_t metricEvalRequestStrideSize;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [in]
+ size_t rangeIndex;
+ /// [in]
+ NVPA_Bool isolated;
+ /// [inout] 'pMetricValues' is in, '*pMetricValues' is out
+ double* pMetricValues;
+ } NVPW_MetricsEvaluator_EvaluateToGpuValues_Params;
+#define NVPW_MetricsEvaluator_EvaluateToGpuValues_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_EvaluateToGpuValues_Params, pMetricValues)
+
+ NVPA_Status NVPW_MetricsEvaluator_EvaluateToGpuValues(NVPW_MetricsEvaluator_EvaluateToGpuValues_Params* pParams);
+
+ typedef struct NVPW_MetricsEvaluator_SetDeviceAttributes_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct NVPW_MetricsEvaluator* pMetricsEvaluator;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ } NVPW_MetricsEvaluator_SetDeviceAttributes_Params;
+#define NVPW_MetricsEvaluator_SetDeviceAttributes_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_MetricsEvaluator_SetDeviceAttributes_Params, counterDataImageSize)
+
+ NVPA_Status NVPW_MetricsEvaluator_SetDeviceAttributes(NVPW_MetricsEvaluator_SetDeviceAttributes_Params* pParams);
+
+/**
+ * @}
+ ******************************************************************************/
+
+
+#endif // NVPERF_HOST_API_DEFINED
+
+
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#endif // NVPERF_HOST_H
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_target.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..b1c5c85b403c5ebb16d66882aa26c1f1db1d5089
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/include/nvperf_target.h
@@ -0,0 +1,626 @@
+#ifndef NVPERF_TARGET_H
+#define NVPERF_TARGET_H
+
+/*
+ * Copyright 2014-2024 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO USER:
+ *
+ * This source code is subject to NVIDIA ownership rights under U.S. and
+ * international Copyright laws.
+ *
+ * This software and the information contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
+ * of a form of NVIDIA software license agreement.
+ *
+ * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
+ * CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
+ * IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+ * OR PERFORMANCE OF THIS SOURCE CODE.
+ *
+ * U.S. Government End Users. This source code is a "commercial item" as
+ * that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
+ * "commercial computer software" and "commercial computer software
+ * documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
+ * and is provided to the U.S. Government only as a commercial end item.
+ * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
+ * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
+ * source code with only those rights set forth herein.
+ *
+ * Any use of this source code in individual and commercial software must
+ * include, in the user documentation and internal comments to the code,
+ * the above Disclaimer and U.S. Government End Users Notice.
+ */
+
+#include
+#include
+#include "nvperf_common.h"
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility push(default)
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL __attribute__ ((visibility ("hidden")))
+ #endif
+#else
+ #if !defined(NVPW_LOCAL)
+ #define NVPW_LOCAL
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file nvperf_target.h
+ */
+
+#ifndef NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_DEFINED
+#define NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_DEFINED
+ /// GPU architecture support level
+ typedef enum NVPW_GpuArchitectureSupportLevel
+ {
+ NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_UNSUPPORTED,
+ NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_SUPPORTED
+ } NVPW_GpuArchitectureSupportLevel;
+#endif //NVPW_GPU_ARCHITECTURE_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_SLI_SUPPORT_LEVEL_DEFINED
+#define NVPW_SLI_SUPPORT_LEVEL_DEFINED
+ /// SLI configuration support level
+ typedef enum NVPW_SliSupportLevel
+ {
+ NVPW_SLI_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_SLI_SUPPORT_LEVEL_UNSUPPORTED,
+ /// Only Non-SLI configurations are supported.
+ NVPW_SLI_SUPPORT_LEVEL_SUPPORTED_NON_SLI_CONFIGURATION
+ } NVPW_SliSupportLevel;
+#endif //NVPW_SLI_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_VGPU_SUPPORT_LEVEL_DEFINED
+#define NVPW_VGPU_SUPPORT_LEVEL_DEFINED
+ /// Virtualized GPU configuration support level
+ typedef enum NVPW_VGpuSupportLevel
+ {
+ NVPW_VGPU_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_VGPU_SUPPORT_LEVEL_UNSUPPORTED,
+ /// Supported but not allowed by system admin.
+ NVPW_VGPU_SUPPORT_LEVEL_SUPPORTED_DISALLOWED,
+ NVPW_VGPU_SUPPORT_LEVEL_SUPPORTED_ALLOWED,
+ NVPW_VGPU_SUPPORT_LEVEL_SUPPORTED_NON_VGPU_CONFIGURATION
+ } NVPW_VGpuSupportLevel;
+#endif //NVPW_VGPU_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_CONF_COMPUTE_SUPPORT_LEVEL_DEFINED
+#define NVPW_CONF_COMPUTE_SUPPORT_LEVEL_DEFINED
+ /// Confidential Compute mode support level
+ typedef enum NVPW_ConfidentialComputeSupportLevel
+ {
+ NVPW_CONF_COMPUTE_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_CONF_COMPUTE_SUPPORT_LEVEL_UNSUPPORTED,
+ NVPW_CONF_COMPUTE_SUPPORT_LEVEL_SUPPORTED_NON_CONF_COMPUTE_CONFIGURATION,
+ NVPW_CONF_COMPUTE_SUPPORT_LEVEL_SUPPORTED_CONF_COMPUTE_DEVTOOLS_MODE
+ } NVPW_ConfidentialComputeSupportLevel;
+#endif //NVPW_CONF_COMPUTE_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_CMP_SUPPORT_LEVEL_DEFINED
+#define NVPW_CMP_SUPPORT_LEVEL_DEFINED
+ /// CMP support level
+ typedef enum NVPW_CmpSupportLevel
+ {
+ NVPW_CMP_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_CMP_SUPPORT_LEVEL_UNSUPPORTED,
+ NVPW_CMP_SUPPORT_LEVEL_SUPPORTED_NON_CMP_CONFIGURATON
+ } NVPW_CmpSupportLevel;
+#endif //NVPW_CMP_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_WSL_SUPPORT_LEVEL_DEFINED
+#define NVPW_WSL_SUPPORT_LEVEL_DEFINED
+ /// WSL support level
+ typedef enum NVPW_WslSupportLevel
+ {
+ NVPW_WSL_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_WSL_SUPPORT_LEVEL_UNSUPPORTED_INSUFFICIENT_DRIVER_VERSION,
+ NVPW_WSL_SUPPORT_LEVEL_SUPPORTED,
+ NVPW_WSL_SUPPORT_LEVEL_SUPPORTED_NON_WSL_CONFIGURATION
+ } NVPW_WslSupportLevel;
+#endif //NVPW_WSL_SUPPORT_LEVEL_DEFINED
+
+#ifndef NVPW_MIG_SUPPORT_LEVEL_DEFINED
+#define NVPW_MIG_SUPPORT_LEVEL_DEFINED
+ /// MIG support level
+ typedef enum NVPW_MigSupportLevel
+ {
+ NVPW_MIG_SUPPORT_LEVEL_UNKNOWN = 0,
+ NVPW_MIG_SUPPORT_LEVEL_UNSUPPORTED,
+ NVPW_MIG_SUPPORT_LEVEL_SUPPORTED,
+ NVPW_MIG_SUPPORT_LEVEL_SUPPORTED_NON_MIG_CONFIGURATION
+ } NVPW_MigSupportLevel;
+#endif //NVPW_MIG_SUPPORT_LEVEL_DEFINED
+
+ typedef struct NVPW_InitializeTarget_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ } NVPW_InitializeTarget_Params;
+#define NVPW_InitializeTarget_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_InitializeTarget_Params, pPriv)
+
+ /// Load the target library.
+ NVPA_Status NVPW_InitializeTarget(NVPW_InitializeTarget_Params* pParams);
+
+ typedef struct NVPW_GetDeviceCount_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ size_t numDevices;
+ } NVPW_GetDeviceCount_Params;
+#define NVPW_GetDeviceCount_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_GetDeviceCount_Params, numDevices)
+
+ NVPA_Status NVPW_GetDeviceCount(NVPW_GetDeviceCount_Params* pParams);
+
+ typedef struct NVPW_Device_GetNames_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ size_t deviceIndex;
+ const char* pDeviceName;
+ const char* pChipName;
+ } NVPW_Device_GetNames_Params;
+#define NVPW_Device_GetNames_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Device_GetNames_Params, pChipName)
+
+ NVPA_Status NVPW_Device_GetNames(NVPW_Device_GetNames_Params* pParams);
+
+ typedef struct NVPW_PciBusId
+ {
+ /// The PCI domain on which the device bus resides.
+ uint32_t domain;
+ /// The bus on which the device resides.
+ uint16_t bus;
+ /// device ID.
+ uint16_t device;
+ } NVPW_PciBusId;
+#define NVPW_PciBusId_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PciBusId, device)
+
+ typedef struct NVPW_Device_GetPciBusIds_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in] caller-allocated array of NVPW_PciBusId, indexed by NVPW deviceIndex
+ NVPW_PciBusId* pBusIds;
+ /// [in] size of the pBusIDs array; use result from NVPW_GetDeviceCount
+ size_t numDevices;
+ } NVPW_Device_GetPciBusIds_Params;
+#define NVPW_Device_GetPciBusIds_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Device_GetPciBusIds_Params, numDevices)
+
+ NVPA_Status NVPW_Device_GetPciBusIds(NVPW_Device_GetPciBusIds_Params* pParams);
+
+
+#define NVPW_DEVICE_MIG_GPU_INSTANCE_ID_INVALID 0xFFFFFFFFu
+#define NVPW_DEVICE_MIG_GPU_INSTANCE_ID_FULLCHIP 0xFFFFFFFEu
+
+
+ typedef struct NVPW_Device_GetMigAttributes_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ size_t deviceIndex;
+ /// [out]
+ NVPA_Bool isMigPartition;
+ /// [out]
+ uint32_t gpuInstanceId;
+ /// [out]
+ uint32_t computeInstanceId;
+ } NVPW_Device_GetMigAttributes_Params;
+#define NVPW_Device_GetMigAttributes_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Device_GetMigAttributes_Params, computeInstanceId)
+
+ NVPA_Status NVPW_Device_GetMigAttributes(NVPW_Device_GetMigAttributes_Params* pParams);
+
+ typedef struct NVPW_Adapter_GetDeviceIndex_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ struct IDXGIAdapter* pAdapter;
+ /// [in]
+ size_t sliIndex;
+ /// [out]
+ size_t deviceIndex;
+ } NVPW_Adapter_GetDeviceIndex_Params;
+#define NVPW_Adapter_GetDeviceIndex_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Adapter_GetDeviceIndex_Params, deviceIndex)
+
+ NVPA_Status NVPW_Adapter_GetDeviceIndex(NVPW_Adapter_GetDeviceIndex_Params* pParams);
+
+ typedef struct NVPW_CounterData_GetNumRanges_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const uint8_t* pCounterDataImage;
+ size_t numRanges;
+ } NVPW_CounterData_GetNumRanges_Params;
+#define NVPW_CounterData_GetNumRanges_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_GetNumRanges_Params, numRanges)
+
+ NVPA_Status NVPW_CounterData_GetNumRanges(NVPW_CounterData_GetNumRanges_Params* pParams);
+
+ typedef struct NVPW_CounterData_GetChipName_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [out]
+ const char* pChipName;
+ } NVPW_CounterData_GetChipName_Params;
+#define NVPW_CounterData_GetChipName_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_GetChipName_Params, pChipName)
+
+ NVPA_Status NVPW_CounterData_GetChipName(NVPW_CounterData_GetChipName_Params* pParams);
+
+ typedef struct NVPW_Config_GetNumPasses_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pConfig;
+ /// [out]
+ size_t numPipelinedPasses;
+ /// [out]
+ size_t numIsolatedPasses;
+ } NVPW_Config_GetNumPasses_Params;
+#define NVPW_Config_GetNumPasses_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Config_GetNumPasses_Params, numIsolatedPasses)
+
+ /// Total num passes = numPipelinedPasses + numIsolatedPasses * numNestingLevels
+ NVPA_Status NVPW_Config_GetNumPasses(NVPW_Config_GetNumPasses_Params* pParams);
+
+ typedef struct NVPW_Config_GetNumPasses_V2_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pConfig;
+ /// [out]
+ size_t numPasses;
+ } NVPW_Config_GetNumPasses_V2_Params;
+#define NVPW_Config_GetNumPasses_V2_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Config_GetNumPasses_V2_Params, numPasses)
+
+ /// Total num passes = numPasses * numNestingLevels
+ NVPA_Status NVPW_Config_GetNumPasses_V2(NVPW_Config_GetNumPasses_V2_Params* pParams);
+
+#define NVPW_API_SET_CUDA_PROFILER 0x18209d0775b2f89dULL
+
+#define NVPW_API_SET_D3D11_PROFILER 0xca55c6738445db2bULL
+
+#define NVPW_API_SET_D3D12_PROFILER 0xc0c2d46dd7c7ad78ULL
+
+#define NVPW_API_SET_EGL_PROFILER 0x3c3747dae1f9565cULL
+
+#define NVPW_API_SET_GPU_PERIODICSAMPLER 0x9f4c2571fc0b2e8aULL
+
+#define NVPW_API_SET_METRICSEVALUATOR 0x0368a8768d811af9ULL
+
+#define NVPW_API_SET_METRICS_AD10X_COMP 0xbe57278e12cb5288ULL
+
+#define NVPW_API_SET_METRICS_AD10X_GRFX 0x5cbf0774f81bf491ULL
+
+#define NVPW_API_SET_METRICS_GA100_COMP 0x16b7d8c20d8b4915ULL
+
+#define NVPW_API_SET_METRICS_GA100_GRFX 0xc94eaabec04a94faULL
+
+#define NVPW_API_SET_METRICS_GA10X_COMP 0xb5d6391c2e299ab5ULL
+
+#define NVPW_API_SET_METRICS_GA10X_GRFX 0x6ebc121178b5ce0bULL
+
+#define NVPW_API_SET_METRICS_GV100_COMP 0x863705cc57919f72ULL
+
+#define NVPW_API_SET_METRICS_GV100_GRFX 0x9900da75d164fecfULL
+
+#define NVPW_API_SET_METRICS_GV11B_COMP 0xd3f79a859235848fULL
+
+#define NVPW_API_SET_METRICS_GV11B_GRFX 0xeb8e26220106e227ULL
+
+#define NVPW_API_SET_METRICS_TU10X_COMP 0x70f40be0afd35da8ULL
+
+#define NVPW_API_SET_METRICS_TU10X_GRFX 0xdf219cb838db6968ULL
+
+#define NVPW_API_SET_METRICS_TU11X_COMP 0xeb0069d7d0956678ULL
+
+#define NVPW_API_SET_METRICS_TU11X_GRFX 0x0977d9342bd62743ULL
+
+#define NVPW_API_SET_OPENGL_PROFILER 0xe4cd9ea40f2ee777ULL
+
+#define NVPW_API_SET_VULKAN_PROFILER 0x8c56b6a03d779689ULL
+
+#define NVPW_SDK_VERSION 0x1e128b6f001423fcULL
+
+ typedef struct NVPW_QueryVersionNumber_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ uint64_t apiSet;
+ /// [out]
+ uint32_t major;
+ /// [out]
+ uint32_t minor;
+ /// [out]
+ uint32_t patch;
+ /// [out]
+ uint32_t relMajor;
+ /// [out]
+ uint32_t relMinor;
+ /// [out]
+ uint32_t relPatch;
+ } NVPW_QueryVersionNumber_Params;
+#define NVPW_QueryVersionNumber_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_QueryVersionNumber_Params, relPatch)
+
+ /// Query version number of an API set
+ NVPA_Status NVPW_QueryVersionNumber(NVPW_QueryVersionNumber_Params* pParams);
+
+ typedef enum NVPW_Device_ClockStatus
+ {
+ /// clock status is unknown
+ NVPW_DEVICE_CLOCK_STATUS_UNKNOWN,
+ /// clocks are locked to rated tdp values - Deprecated, use NVPW_DEVICE_CLOCK_STATUS_LOCKED instead
+ NVPW_DEVICE_CLOCK_STATUS_LOCKED_TO_RATED_TDP,
+ /// clocks are not locked and can boost above rated tdp
+ NVPW_DEVICE_CLOCK_STATUS_BOOST_ENABLED,
+ /// clocks are not locked and will not go above rated tdp
+ NVPW_DEVICE_CLOCK_STATUS_BOOST_DISABLED,
+ /// clocks are locked
+ NVPW_DEVICE_CLOCK_STATUS_LOCKED,
+ /// clocks are not locked
+ NVPW_DEVICE_CLOCK_STATUS_UNLOCKED,
+ NVPW_DEVICE_CLOCK_STATUS__COUNT
+ } NVPW_Device_ClockStatus;
+
+ typedef enum NVPW_Device_ClockLevel
+ {
+ /// clock level is invalid
+ NVPW_DEVICE_CLOCK_LEVEL_INVALID,
+ /// clock level is at rated tdp
+ NVPW_DEVICE_CLOCK_LEVEL_RATED_TDP,
+ /// clock level is at turbo boost
+ NVPW_DEVICE_CLOCK_LEVEL_TURBO_BOOST,
+ NVPW_DEVICE_CLOCK_LEVEL__COUNT
+ } NVPW_Device_ClockLevel;
+
+ typedef struct NVPW_Device_GetClockStatus_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ size_t deviceIndex;
+ /// [in]
+ NVPW_Device_ClockStatus clockStatus;
+ /// [in]
+ NVPW_Device_ClockLevel clockLevel;
+ } NVPW_Device_GetClockStatus_Params;
+#define NVPW_Device_GetClockStatus_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Device_GetClockStatus_Params, clockLevel)
+
+ NVPA_Status NVPW_Device_GetClockStatus(NVPW_Device_GetClockStatus_Params* pParams);
+
+ typedef enum NVPW_Device_ClockSetting
+ {
+ /// invalid op, specify valid clocks operation during profiling
+ NVPW_DEVICE_CLOCK_SETTING_INVALID,
+ /// default to driver/application config (normally unlocked and not boosted, but could be unlocked boosted, or
+ /// locked to rated TDP)
+ NVPW_DEVICE_CLOCK_SETTING_DEFAULT,
+ /// lock clocks at rated tdp base values
+ NVPW_DEVICE_CLOCK_SETTING_LOCK_TO_RATED_TDP,
+ /// lock clocks at turbo boost values
+ NVPW_DEVICE_CLOCK_SETTING_LOCK_TO_TURBO_BOOST,
+ NVPW_DEVICE_CLOCK_SETTING__COUNT
+ } NVPW_Device_ClockSetting;
+
+ typedef struct NVPW_Device_SetClockSetting_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ size_t deviceIndex;
+ /// [in]
+ NVPW_Device_ClockSetting clockSetting;
+ } NVPW_Device_SetClockSetting_Params;
+#define NVPW_Device_SetClockSetting_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Device_SetClockSetting_Params, clockSetting)
+
+ NVPA_Status NVPW_Device_SetClockSetting(NVPW_Device_SetClockSetting_Params* pParams);
+
+ typedef struct NVPW_CounterData_GetRangeDescriptions_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const uint8_t* pCounterDataImage;
+ size_t rangeIndex;
+ /// [inout] Number of descriptions allocated in ppDescriptions
+ size_t numDescriptions;
+ const char** ppDescriptions;
+ } NVPW_CounterData_GetRangeDescriptions_Params;
+#define NVPW_CounterData_GetRangeDescriptions_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_CounterData_GetRangeDescriptions_Params, ppDescriptions)
+
+ NVPA_Status NVPW_CounterData_GetRangeDescriptions(NVPW_CounterData_GetRangeDescriptions_Params* pParams);
+
+ typedef struct NVPW_Profiler_CounterData_GetRangeDescriptions_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ const uint8_t* pCounterDataImage;
+ size_t rangeIndex;
+ /// [inout] Number of descriptions allocated in ppDescriptions
+ size_t numDescriptions;
+ const char** ppDescriptions;
+ } NVPW_Profiler_CounterData_GetRangeDescriptions_Params;
+#define NVPW_Profiler_CounterData_GetRangeDescriptions_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_Profiler_CounterData_GetRangeDescriptions_Params, ppDescriptions)
+
+ NVPA_Status NVPW_Profiler_CounterData_GetRangeDescriptions(NVPW_Profiler_CounterData_GetRangeDescriptions_Params* pParams);
+
+#ifndef NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE_DEFINED
+#define NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE_DEFINED
+ typedef enum NVPW_PeriodicSampler_CounterData_AppendMode
+ {
+ NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE_LINEAR = 0,
+ NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE_CIRCULAR = 1,
+ NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE__COUNT
+ } NVPW_PeriodicSampler_CounterData_AppendMode;
+#endif //NVPW_PERIODIC_SAMPLER_COUNTER_DATA_APPEND_MODE_DEFINED
+
+ typedef struct NVPW_PeriodicSampler_CounterData_GetSampleTime_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t rangeIndex;
+ /// [out]
+ uint64_t timestampStart;
+ /// [out]
+ uint64_t timestampEnd;
+ } NVPW_PeriodicSampler_CounterData_GetSampleTime_Params;
+#define NVPW_PeriodicSampler_CounterData_GetSampleTime_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_CounterData_GetSampleTime_Params, timestampEnd)
+
+ NVPA_Status NVPW_PeriodicSampler_CounterData_GetSampleTime(NVPW_PeriodicSampler_CounterData_GetSampleTime_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_CounterData_TrimInPlace_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [out]
+ size_t counterDataImageTrimmedSize;
+ } NVPW_PeriodicSampler_CounterData_TrimInPlace_Params;
+#define NVPW_PeriodicSampler_CounterData_TrimInPlace_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_CounterData_TrimInPlace_Params, counterDataImageTrimmedSize)
+
+ NVPA_Status NVPW_PeriodicSampler_CounterData_TrimInPlace(NVPW_PeriodicSampler_CounterData_TrimInPlace_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_CounterData_GetInfo_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [out] total number of ranges in the counter data
+ size_t numTotalRanges;
+ /// [out] if in "linear" mode, this API returns the number of "populated" ranges; if it's in "circular" mode,
+ /// then it returns the last "populated" range index + 1, when there is no such range, it returns 0.
+ size_t numPopulatedRanges;
+ /// [out] if in "linear" mode, this API returns the number of "completed" ranges; if it's in "circular" mode,
+ /// then it returns the last "completed" range index + 1, when there is no such range, it returns 0.
+ size_t numCompletedRanges;
+ } NVPW_PeriodicSampler_CounterData_GetInfo_Params;
+#define NVPW_PeriodicSampler_CounterData_GetInfo_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_CounterData_GetInfo_Params, numCompletedRanges)
+
+ /// In periodic sampler, a range in counter data stores exactly one sample's data. For better performance, periodic
+ /// sampler may operate in an out-of-order fashion when populating sample data, i.e. it may not fully populate all
+ /// counters of a sample/range before starting to populate the next sample/range. As a result, we have two concepts
+ /// here, "populated" & "completed": a range is considered "populated" even if only partial counters have been
+ /// written; on the other hand, a range is only considered "completed" if all the collecting counters have been
+ /// written.
+ NVPA_Status NVPW_PeriodicSampler_CounterData_GetInfo(NVPW_PeriodicSampler_CounterData_GetInfo_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_CounterData_GetTriggerCount_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [in]
+ size_t rangeIndex;
+ /// [out]
+ uint32_t triggerCount;
+ } NVPW_PeriodicSampler_CounterData_GetTriggerCount_Params;
+#define NVPW_PeriodicSampler_CounterData_GetTriggerCount_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_CounterData_GetTriggerCount_Params, triggerCount)
+
+ NVPA_Status NVPW_PeriodicSampler_CounterData_GetTriggerCount(NVPW_PeriodicSampler_CounterData_GetTriggerCount_Params* pParams);
+
+ typedef struct NVPW_PeriodicSampler_CounterData_IsDataComplete_Params
+ {
+ /// [in]
+ size_t structSize;
+ /// [in] assign to NULL
+ void* pPriv;
+ /// [in]
+ const uint8_t* pCounterDataImage;
+ /// [in]
+ size_t counterDataImageSize;
+ /// [in]
+ size_t rangeIndex;
+ /// [out]
+ NVPA_Bool isComplete;
+ } NVPW_PeriodicSampler_CounterData_IsDataComplete_Params;
+#define NVPW_PeriodicSampler_CounterData_IsDataComplete_Params_STRUCT_SIZE NVPA_STRUCT_SIZE(NVPW_PeriodicSampler_CounterData_IsDataComplete_Params, isComplete)
+
+ /// Checks whether a given sample's data is complete. See also 'NVPW_PeriodicSampler_CounterData_GetInfo'
+ NVPA_Status NVPW_PeriodicSampler_CounterData_IsDataComplete(NVPW_PeriodicSampler_CounterData_IsDataComplete_Params* pParams);
+
+
+ typedef struct NVPW_TimestampReport
+ {
+ uint32_t payload;
+ uint8_t reserved0004[4];
+ uint64_t timestamp;
+ } NVPW_TimestampReport;
+
+
+
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#if defined(__GNUC__) && defined(NVPA_SHARED_LIB)
+ #pragma GCC visibility pop
+#endif
+
+#endif // NVPERF_TARGET_H
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so
new file mode 100644
index 0000000000000000000000000000000000000000..221583bed327fcea48fee44f96ff29532106f0e4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:06ba82bd09237b934cf16da2172ed5943c582caa35c79b52cfcfeb0ff71f7250
+size 1644872
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12
new file mode 100644
index 0000000000000000000000000000000000000000..277e6a8743a6175aa88f51ee597b507e243647a4
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fccdc5fcc7c32f8cf4b3ed9b17f7f187a185a6fa0a5bcc06e3434cbd1687c808
+size 7595792
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so
new file mode 100644
index 0000000000000000000000000000000000000000..4dcf914441ef17f77fc607d8d6dab7e5219e9d35
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e6fa2783077974fb2765bfa9cbaebf980736df74eebf994c59c7596988aec83b
+size 970064
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/include/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/include/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/include/nvrtc.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/include/nvrtc.h
new file mode 100644
index 0000000000000000000000000000000000000000..48cc9638fded05ae260b79c511cb4f42c11cb07a
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/include/nvrtc.h
@@ -0,0 +1,1141 @@
+//
+// NVIDIA_COPYRIGHT_BEGIN
+//
+// Copyright (c) 2014-2024, NVIDIA CORPORATION. All rights reserved.
+//
+// NVIDIA CORPORATION and its licensors retain all intellectual property
+// and proprietary rights in and to this software, related documentation
+// and any modifications thereto. Any use, reproduction, disclosure or
+// distribution of this software and related documentation without an express
+// license agreement from NVIDIA CORPORATION is strictly prohibited.
+//
+// NVIDIA_COPYRIGHT_END
+//
+
+#ifndef __NVRTC_H__
+#define __NVRTC_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include
+
+
+/*************************************************************************//**
+ *
+ * \defgroup error Error Handling
+ *
+ * NVRTC defines the following enumeration type and function for API call
+ * error handling.
+ *
+ ****************************************************************************/
+
+
+/**
+ * \ingroup error
+ * \brief The enumerated type nvrtcResult defines API call result codes.
+ * NVRTC API functions return nvrtcResult to indicate the call
+ * result.
+ */
+typedef enum {
+ NVRTC_SUCCESS = 0,
+ NVRTC_ERROR_OUT_OF_MEMORY = 1,
+ NVRTC_ERROR_PROGRAM_CREATION_FAILURE = 2,
+ NVRTC_ERROR_INVALID_INPUT = 3,
+ NVRTC_ERROR_INVALID_PROGRAM = 4,
+ NVRTC_ERROR_INVALID_OPTION = 5,
+ NVRTC_ERROR_COMPILATION = 6,
+ NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7,
+ NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8,
+ NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9,
+ NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10,
+ NVRTC_ERROR_INTERNAL_ERROR = 11,
+ NVRTC_ERROR_TIME_FILE_WRITE_FAILED = 12,
+ NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = 13,
+ NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = 14,
+ NVRTC_ERROR_PCH_CREATE = 15,
+ NVRTC_ERROR_CANCELLED = 16
+} nvrtcResult;
+
+
+/**
+ * \ingroup error
+ * \brief nvrtcGetErrorString is a helper function that returns a string
+ * describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to
+ * \c "NVRTC_SUCCESS".
+ * For unrecognized enumeration values, it returns
+ * \c "NVRTC_ERROR unknown".
+ *
+ * \param [in] result CUDA Runtime Compilation API result code.
+ * \return Message string for the given #nvrtcResult code.
+ */
+const char *nvrtcGetErrorString(nvrtcResult result);
+
+
+/*************************************************************************//**
+ *
+ * \defgroup query General Information Query
+ *
+ * NVRTC defines the following function for general information query.
+ *
+ ****************************************************************************/
+
+
+/**
+ * \ingroup query
+ * \brief nvrtcVersion sets the output parameters \p major and \p minor
+ * with the CUDA Runtime Compilation version number.
+ *
+ * \param [out] major CUDA Runtime Compilation major version number.
+ * \param [out] minor CUDA Runtime Compilation minor version number.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ *
+ */
+nvrtcResult nvrtcVersion(int *major, int *minor);
+
+
+/**
+ * \ingroup query
+ * \brief nvrtcGetNumSupportedArchs sets the output parameter \p numArchs
+ * with the number of architectures supported by NVRTC. This can
+ * then be used to pass an array to ::nvrtcGetSupportedArchs to
+ * get the supported architectures.
+ *
+ * \param [out] numArchs number of supported architectures.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ *
+ * see ::nvrtcGetSupportedArchs
+ */
+nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs);
+
+
+/**
+ * \ingroup query
+ * \brief nvrtcGetSupportedArchs populates the array passed via the output parameter
+ * \p supportedArchs with the architectures supported by NVRTC. The array is
+ * sorted in the ascending order. The size of the array to be passed can be
+ * determined using ::nvrtcGetNumSupportedArchs.
+ *
+ * \param [out] supportedArchs sorted array of supported architectures.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ *
+ * see ::nvrtcGetNumSupportedArchs
+ */
+nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs);
+
+
+/*************************************************************************//**
+ *
+ * \defgroup compilation Compilation
+ *
+ * NVRTC defines the following type and functions for actual compilation.
+ *
+ ****************************************************************************/
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcProgram is the unit of compilation, and an opaque handle for
+ * a program.
+ *
+ * To compile a CUDA program string, an instance of nvrtcProgram must be
+ * created first with ::nvrtcCreateProgram, then compiled with
+ * ::nvrtcCompileProgram.
+ */
+typedef struct _nvrtcProgram *nvrtcProgram;
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcCreateProgram creates an instance of nvrtcProgram with the
+ * given input parameters, and sets the output parameter \p prog with
+ * it.
+ *
+ * \param [out] prog CUDA Runtime Compilation program.
+ * \param [in] src CUDA program source.
+ * \param [in] name CUDA program name.\n
+ * \p name can be \c NULL; \c "default_program" is
+ * used when \p name is \c NULL or "".
+ * \param [in] numHeaders Number of headers used.\n
+ * \p numHeaders must be greater than or equal to 0.
+ * \param [in] headers Sources of the headers.\n
+ * \p headers can be \c NULL when \p numHeaders is
+ * 0.
+ * \param [in] includeNames Name of each header by which they can be
+ * included in the CUDA program source.\n
+ * \p includeNames can be \c NULL when \p numHeaders
+ * is 0. These headers must be included with the exact
+ * names specified here.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_OUT_OF_MEMORY \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_PROGRAM_CREATION_FAILURE \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcDestroyProgram
+ */
+nvrtcResult nvrtcCreateProgram(nvrtcProgram *prog,
+ const char *src,
+ const char *name,
+ int numHeaders,
+ const char * const *headers,
+ const char * const *includeNames);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcDestroyProgram destroys the given program.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcCreateProgram
+ */
+nvrtcResult nvrtcDestroyProgram(nvrtcProgram *prog);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcCompileProgram compiles the given program.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [in] numOptions Number of compiler options passed.
+ * \param [in] options Compiler options in the form of C string array.\n
+ * \p options can be \c NULL when \p numOptions is 0.
+ *
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_OUT_OF_MEMORY \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_OPTION \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_COMPILATION \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_BUILTIN_OPERATION_FAILURE \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_TIME_FILE_WRITE_FAILED \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_CANCELLED \endlink
+ *
+ * It supports compile options listed in \ref options.
+ */
+nvrtcResult nvrtcCompileProgram(nvrtcProgram prog,
+ int numOptions, const char * const *options);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetPTXSize sets the value of \p ptxSizeRet with the size of the PTX
+ * generated by the previous compilation of \p prog (including the
+ * trailing \c NULL).
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] ptxSizeRet Size of the generated PTX (including the trailing
+ * \c NULL).
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetPTX
+ */
+nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t *ptxSizeRet);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetPTX stores the PTX generated by the previous compilation
+ * of \p prog in the memory pointed by \p ptx.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] ptx Compiled result.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetPTXSize
+ */
+nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char *ptx);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetCUBINSize sets the value of \p cubinSizeRet with the size of the cubin
+ * generated by the previous compilation of \p prog. The value of
+ * cubinSizeRet is set to 0 if the value specified to \c -arch is a
+ * virtual architecture instead of an actual architecture.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] cubinSizeRet Size of the generated cubin.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetCUBIN
+ */
+nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t *cubinSizeRet);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetCUBIN stores the cubin generated by the previous compilation
+ * of \p prog in the memory pointed by \p cubin. No cubin is available
+ * if the value specified to \c -arch is a virtual architecture instead
+ * of an actual architecture.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] cubin Compiled and assembled result.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetCUBINSize
+ */
+nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char *cubin);
+
+
+#if defined(_WIN32)
+# define __DEPRECATED__(msg) __declspec(deprecated(msg))
+#elif (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5 && !defined(__clang__))))
+# define __DEPRECATED__(msg) __attribute__((deprecated))
+#elif (defined(__GNUC__))
+# define __DEPRECATED__(msg) __attribute__((deprecated(msg)))
+#else
+# define __DEPRECATED__(msg)
+#endif
+
+/**
+ * \ingroup compilation
+ * \brief
+ * DEPRECATION NOTICE: This function will be removed in a future release. Please use
+ * nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead.
+ */
+__DEPRECATED__("This function will be removed in a future release. Please use nvrtcGetLTOIRSize instead")
+nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t *nvvmSizeRet);
+
+/**
+ * \ingroup compilation
+ * \brief
+ * DEPRECATION NOTICE: This function will be removed in a future release. Please use
+ * nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead.
+ */
+__DEPRECATED__("This function will be removed in a future release. Please use nvrtcGetLTOIR instead")
+nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char *nvvm);
+
+#undef __DEPRECATED__
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetLTOIRSize sets the value of \p LTOIRSizeRet with the size of the LTO IR
+ * generated by the previous compilation of \p prog. The value of
+ * LTOIRSizeRet is set to 0 if the program was not compiled with
+ * \c -dlto.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] LTOIRSizeRet Size of the generated LTO IR.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetLTOIR
+ */
+nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t *LTOIRSizeRet);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetLTOIR stores the LTO IR generated by the previous compilation
+ * of \p prog in the memory pointed by \p LTOIR. No LTO IR is available
+ * if the program was compiled without \c -dlto.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] LTOIR Compiled result.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetLTOIRSize
+ */
+nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char *LTOIR);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetOptiXIRSize sets the value of \p optixirSizeRet with the size of the OptiX IR
+ * generated by the previous compilation of \p prog. The value of
+ * nvrtcGetOptiXIRSize is set to 0 if the program was compiled with
+ * options incompatible with OptiX IR generation.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] optixirSizeRet Size of the generated LTO IR.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetOptiXIR
+ */
+nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t *optixirSizeRet);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation
+ * of \p prog in the memory pointed by \p optixir. No OptiX IR is available
+ * if the program was compiled with options incompatible with OptiX IR generation.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] optixir Optix IR Compiled result.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetOptiXIRSize
+ */
+nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char *optixir);
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetProgramLogSize sets \p logSizeRet with the size of the
+ * log generated by the previous compilation of \p prog (including the
+ * trailing \c NULL).
+ *
+ * Note that compilation log may be generated with warnings and informative
+ * messages, even when the compilation of \p prog succeeds.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] logSizeRet Size of the compilation log
+ * (including the trailing \c NULL).
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetProgramLog
+ */
+nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t *logSizeRet);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetProgramLog stores the log generated by the previous
+ * compilation of \p prog in the memory pointed by \p log.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] log Compilation log.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * \see ::nvrtcGetProgramLogSize
+ */
+nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char *log);
+
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcAddNameExpression notes the given name expression
+ * denoting the address of a __global__ function
+ * or __device__/__constant__ variable.
+ *
+ * The identical name expression string must be provided on a subsequent
+ * call to nvrtcGetLoweredName to extract the lowered name.
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [in] name_expression constant expression denoting the address of
+ * a __global__ function or __device__/__constant__ variable.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION \endlink
+ *
+ * \see ::nvrtcGetLoweredName
+ */
+nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog,
+ const char * const name_expression);
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcGetLoweredName extracts the lowered (mangled) name
+ * for a __global__ function or __device__/__constant__ variable,
+ * and updates *lowered_name to point to it. The memory containing
+ * the name is released when the NVRTC program is destroyed by
+ * nvrtcDestroyProgram.
+ * The identical name expression must have been previously
+ * provided to nvrtcAddNameExpression.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [in] name_expression constant expression denoting the address of
+ * a __global__ function or __device__/__constant__ variable.
+ * \param [out] lowered_name initialized by the function to point to a
+ * C string containing the lowered (mangled)
+ * name corresponding to the provided name expression.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID \endlink
+ *
+ * \see ::nvrtcAddNameExpression
+ */
+nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog,
+ const char *const name_expression,
+ const char** lowered_name);
+
+
+/*************************************************************************//**
+ *
+ * \defgroup precompiled_header Precompiled header (PCH) (CUDA 12.8+)
+ *
+ * NVRTC defines the following function related to PCH. Also see PCH related
+ * flags passed to nvrtcCompileProgram.
+ ****************************************************************************/
+
+
+/**
+ * \ingroup precompiled_header
+ * \brief retrieve the current size of the PCH Heap.
+ *
+ * \param [out] ret pointer to location where the size of the PCH Heap
+ * will be stored
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ *
+ */
+nvrtcResult nvrtcGetPCHHeapSize(size_t* ret);
+
+/**
+ * \ingroup precompiled_header
+ * \brief set the size of the PCH Heap.
+ *
+ * \param [in] size requested size of the PCH Heap, in bytes
+ *
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ *
+ * The requested size may be rounded up to a platform dependent
+ * alignment (e.g. page size). If the PCH Heap has already been allocated,
+ * the heap memory will be freed and a new PCH Heap will be allocated.
+ */
+nvrtcResult nvrtcSetPCHHeapSize(size_t size);
+
+/**
+ * \ingroup precompiled_header
+ * \brief returns the PCH creation status.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ *
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_PCH_CREATE \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ *
+ * NVRTC_SUCCESS indicates that the PCH was successfully created.
+ * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation
+ * was attempted, either because PCH functionality was not requested during
+ * the preceding nvrtcCompileProgram call, or automatic PCH processing was
+ * requested, and compiler chose not to create a PCH file.
+ * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could
+ * potentially have been created, but the compiler ran out space in the PCH
+ * heap. In this scenario, the nvrtcGetPCHHeapSizeRequired() can be used to
+ * query the required heap size, the heap can be reallocated for this size with
+ * nvrtcSetPCHHeapSize() and PCH creation may be reattempted again invoking
+ * nvrtcCompileProgram() with a new NVRTC program instance.
+ * NVRTC_ERROR_PCH_CREATE indicates that an error condition prevented the
+ * PCH file from being created.
+ */
+nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog);
+
+/**
+ * \ingroup precompiled_header
+ * \brief retrieve the required size of the PCH heap required to compile
+ * the given program.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [out] size pointer to location where the required size of the PCH Heap
+ * will be stored
+ *
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ * The size retrieved using this function is only valid if nvrtcGetPCHCreateStatus()
+ * returned NVRTC_SUCCESS or NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED
+ */
+nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size);
+
+/**
+ * \ingroup compilation
+ * \brief nvrtcSetFlowCallback registers a callback function that the compiler
+ * will invoke at different points during a call to nvrtcCompileProgram,
+ * and the callback function can decide whether to cancel compilation by
+ * returning specific values.
+ *
+ * The callback function must satisfy the following constraints:
+ *
+ * (1) Its signature should be:
+ * @code
+ * int callback(void* param1, void* param2);
+ * @endcode
+ * When invoking the callback, the compiler will always pass \p payload to
+ * param1 so that the callback may make decisions based on \p payload . It'll
+ * always pass NULL to param2 for now which is reserved for future extensions.
+ *
+ * (2) It must return 1 to cancel compilation or 0 to continue.
+ * Other return values are reserved for future use.
+ *
+ * (3) It must return consistent values. Once it returns 1 at one point, it must
+ * return 1 in all following invocations during the current nvrtcCompileProgram
+ * call in progress.
+ *
+ * (4) It must be thread-safe.
+ *
+ * (5) It must not invoke any nvrtc/libnvvm/ptx APIs.
+ *
+ * \param [in] prog CUDA Runtime Compilation program.
+ * \param [in] callback the callback that issues cancellation signal.
+ * \param [in] payload to be passed as a parameter when invoking the callback.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink
+ */
+nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, int (*callback)(void*, void*), void *payload);
+
+/**
+ * \defgroup options Supported Compile Options
+ *
+ * NVRTC supports the compile options below.
+ * Option names with two preceding dashs (\c --) are long option names and
+ * option names with one preceding dash (\c -) are short option names.
+ * Short option names can be used instead of long option names.
+ * When a compile option takes an argument, an assignment operator (\c =)
+ * is used to separate the compile option argument from the compile option
+ * name, e.g., \c "--gpu-architecture=compute_60".
+ * Alternatively, the compile option name and the argument can be specified in
+ * separate strings without an assignment operator, .e.g,
+ * \c "--gpu-architecture" \c "compute_60".
+ * Single-character short option names, such as \c -D, \c -U, and \c -I, do
+ * not require an assignment operator, and the compile option name and the
+ * argument can be present in the same string with or without spaces between
+ * them.
+ * For instance, \c "-D=", \c "-D", and \c "-D " are all
+ * supported.
+ *
+ * The valid compiler options are:
+ *
+ * - Compilation targets
+ * - \c --gpu-architecture=\ (\c -arch)
+ *
+ * Specify the name of the class of GPU architectures for which the
+ * input must be compiled.\n
+ * - Valid \s:
+ * - \c compute_50
+ * - \c compute_52
+ * - \c compute_53
+ * - \c compute_60
+ * - \c compute_61
+ * - \c compute_62
+ * - \c compute_70
+ * - \c compute_72
+ * - \c compute_75
+ * - \c compute_80
+ * - \c compute_87
+ * - \c compute_89
+ * - \c compute_90
+ * - \c compute_90a
+ * - \c compute_100
+ * - \c compute_100a
+ * - \c sm_50
+ * - \c sm_52
+ * - \c sm_53
+ * - \c sm_60
+ * - \c sm_61
+ * - \c sm_62
+ * - \c sm_70
+ * - \c sm_72
+ * - \c sm_75
+ * - \c sm_80
+ * - \c sm_87
+ * - \c sm_89
+ * - \c sm_90
+ * - \c sm_90a
+ * - \c sm_100
+ * - \c sm_100a
+ * - Default: \c compute_52
+ * - Separate compilation / whole-program compilation
+ * - \c --device-c (\c -dc)
+ *
+ * Generate relocatable code that can be linked with other relocatable
+ * device code. It is equivalent to \c --relocatable-device-code=true.
+ * - \c --device-w (\c -dw)
+ *
+ * Generate non-relocatable code. It is equivalent to \c --relocatable-device-code=false.
+ * - \c --relocatable-device-code={true|false} (\c -rdc)
+ *
+ * Enable (disable) the generation of relocatable device code.
+ * - Default: \c false
+ * - \c --extensible-whole-program (\c -ewp)
+ *
+ * Do extensible whole program compilation of device code.
+ * - Default: \c false
+ * - Debugging support
+ * - \c --device-debug (\c -G)
+ *
+ * Generate debug information. If \c --dopt is not specified, then turns off all optimizations.
+ * - \c --generate-line-info (\c -lineinfo)
+ *
+ * Generate line-number information.
+ * - Code generation
+ * - \c --dopt \c on (\c -dopt)
+ *
+ * - \c --dopt=on
+ *
+ * Enable device code optimization. When specified along with \c -G, enables
+ * limited debug information generation for optimized device code (currently,
+ * only line number information). When \c -G is not specified, \c -dopt=on is implicit.
+ *
+ * - \c --ptxas-options \ (\c -Xptxas)
+ *
+ * - \c --ptxas-options=\
+ *
+ * Specify options directly to ptxas, the PTX optimizing assembler.
+ * - \c --maxrregcount=\ (\c -maxrregcount)
+ *
+ * Specify the maximum amount of registers that GPU functions can use.
+ * Until a function-specific limit, a higher value will generally
+ * increase the performance of individual GPU threads that execute this
+ * function. However, because thread registers are allocated from a
+ * global register pool on each GPU, a higher value of this option will
+ * also reduce the maximum thread block size, thereby reducing the amount
+ * of thread parallelism. Hence, a good maxrregcount value is the result
+ * of a trade-off. If this option is not specified, then no maximum is
+ * assumed. Value less than the minimum registers required by ABI will
+ * be bumped up by the compiler to ABI minimum limit.
+ *
+ * - \c --ftz={true|false} (\c -ftz)
+ *
+ * When performing single-precision floating-point operations, flush
+ * denormal values to zero or preserve denormal values.
+ *
+ * \c --use_fast_math implies \c --ftz=true.
+ * - Default: \c false
+ *
+ * - \c --prec-sqrt={true|false} (\c -prec-sqrt)
+ *
+ * For single-precision floating-point square root, use IEEE
+ * round-to-nearest mode or use a faster approximation.
+ * \c --use_fast_math implies \c --prec-sqrt=false.
+ * - Default: \c true
+ *
+ * - \c --prec-div={true|false} (\c -prec-div)
+ * For single-precision floating-point division and reciprocals, use IEEE
+ * round-to-nearest mode or use a faster approximation.
+ * \c --use_fast_math implies \c --prec-div=false.
+ * - Default: \c true
+ *
+ * - \c --fmad={true|false} (\c -fmad)
+ *
+ * Enables (disables) the contraction of floating-point multiplies and
+ * adds/subtracts into floating-point multiply-add operations (FMAD,
+ * FFMA, or DFMA). \c --use_fast_math implies \c --fmad=true.
+ * - Default: \c true
+ *
+ * - \c --use_fast_math (\c -use_fast_math)
+ *
+ * Make use of fast math operations.
+ * \c --use_fast_math implies \c --ftz=true \c --prec-div=false
+ * \c --prec-sqrt=false \c --fmad=true.
+ *
+ * - \c --extra-device-vectorization (\c -extra-device-vectorization)
+ *
+ * Enables more aggressive device code vectorization in the NVVM optimizer.
+ *
+ * - \c --modify-stack-limit={true|false} (\c -modify-stack-limit)
+ *
+ * On Linux, during compilation, use \c setrlimit() to increase stack size
+ * to maximum allowed. The limit is reset to the previous value at the
+ * end of compilation.
+ * Note: \c setrlimit() changes the value for the entire process.
+ * - Default: \c true
+ *
+ * - \c --dlink-time-opt (\c -dlto)
+ *
+ * Generate intermediate code for later link-time optimization.
+ * It implies \c -rdc=true.
+ * Note: when this option is used the \c nvrtcGetLTOIR API should be used,
+ * as PTX or Cubin will not be generated.
+ *
+ * - \c --gen-opt-lto (\c -gen-opt-lto)
+ *
+ * Run the optimizer passes before generating the LTO IR.
+ *
+ * - \c --optix-ir (\c -optix-ir)
+ *
+ * Generate OptiX IR. The Optix IR is only intended for consumption by OptiX
+ * through appropriate APIs. This feature is not supported with
+ * link-time-optimization (\c -dlto).
+ *
+ * Note: when this option is used the nvrtcGetOptiX API should be used,
+ * as PTX or Cubin will not be generated.
+ *
+ * - \c --jump-table-density=[0-101] (\c -jtd)
+ *
+ * Specify the case density percentage in switch statements, and use it as
+ * a minimal threshold to determine whether jump table(brx.idx instruction)
+ * will be used to implement a switch statement. Default value is 101. The
+ * percentage ranges from 0 to 101 inclusively.
+ *
+ * - \c --device-stack-protector={true|false} (\c -device-stack-protector)
+ *
+ * Enable (disable) the generation of stack canaries in device code.
+ *
+ * - Default: \c false
+ *
+ * - Preprocessing
+ * - \c --define-macro=\ (\c -D)
+ *
+ * \c \ can be either \c \ or \c \.
+ * - \c \
+ *
+ * Predefine \c \ as a macro with definition \c 1.
+ * - \c \=\
+ *
+ * The contents of \c \ are tokenized and preprocessed
+ * as if they appeared during translation phase three in a \c \#define
+ * directive. In particular, the definition will be truncated by
+ * embedded new line characters.
+ *
+ * - \c --undefine-macro=\ (\c -U)
+ *
+ * Cancel any previous definition of \c \.
+ *
+ * - \c --include-path=\ (\c -I)
+ *
+ * Add the directory \c \ to the list of directories to be
+ * searched for headers. These paths are searched after the list of
+ * headers given to ::nvrtcCreateProgram.
+ *
+ * - \c --pre-include=\ (\c -include)
+ *
+ * Preinclude \c \ during preprocessing.
+ *
+ * - \c --no-source-include (\c -no-source-include)
+ *
+ * The preprocessor by default adds the directory of each input sources
+ * to the include path. This option disables this feature and only
+ * considers the path specified explicitly.
+ *
+ * - Language Dialect
+ * - \c --std={c++03|c++11|c++14|c++17|c++20} (\c -std)
+ *
+ * Set language dialect to C++03, C++11, C++14, C++17 or C++20
+ * - Default: \c c++17
+ *
+ * - \c --builtin-move-forward={true|false} (\c -builtin-move-forward)
+ *
+ * Provide builtin definitions of \c std::move and \c std::forward,
+ * when C++11 or later language dialect is selected.
+ * - Default: \c true
+ *
+ * - \c --builtin-initializer-list={true|false}
+ * (\c -builtin-initializer-list)
+ *
+ * Provide builtin definitions of \c std::initializer_list class and
+ * member functions when C++11 or later language dialect is selected.
+ * - Default: \c true
+ *
+ * - Precompiled header support (CUDA 12.8+)
+ * - \c --pch (\c -pch)
+ *
+ * Enable automatic PCH processing.
+ *
+ * - \c --create-pch= (\c -create-pch)
+ *
+ * Create a PCH file.
+ *
+ * - \c --use-pch= (\c -use-pch)
+ *
+ * Use the specified PCH file.
+ *
+ * - \c --pch-dir= (\c -pch-dir)
+ *
+ * When using automatic PCH (\c -pch), look for and create PCH files in the
+ * specified directory. When using explicit PCH (\c -create-pch or \c -use-pch),
+ * the directory name is prefixed before the specified file name, unless
+ * the file name is an absolute path name.
+ *
+ * - \c --pch-verbose={true|false} (\c -pch-verbose)
+ *
+ * In automatic PCH mode, for each PCH file that could not be used in current
+ * compilation, print the reason in the compilation log.
+ * - Default: \c true
+ *
+ * - \c --pch-messages={true|false} (\c -pch-messages)
+ *
+ * Print a message in the compilation log, if a PCH file was created or used
+ * in the current compilation.
+ * - Default: \c true
+ *
+ * - \c --instantiate-templates-in-pch={true|false} (\c -instantiate-templates-in-pch)
+ *
+ * Enable or disable instantiatiation of templates before PCH creation. Instantiating
+ * templates may increase the size of the PCH file, while reducing the compilation
+ * cost when using the PCH file (since some template instantiations can be skipped).
+ * - Default: \c true
+ *
+ * - Misc.
+ * - \c --disable-warnings (\c -w)
+ *
+ * Inhibit all warning messages.
+ *
+ * - \c --restrict (\c -restrict)
+ *
+ * Programmer assertion that all kernel pointer parameters are restrict
+ * pointers.
+ *
+ * - \c --device-as-default-execution-space
+ * (\c -default-device)
+ *
+ * Treat entities with no execution space annotation as \c __device__
+ * entities.
+ *
+ * - \c --device-int128 (\c -device-int128)
+ *
+ * Allow the \c __int128 type in device code. Also causes the macro \c __CUDACC_RTC_INT128__
+ * to be defined.
+ *
+ * - \c --device-float128 (\c -device-float128)
+ *
+ * Allow the \c __float128 and \c _Float128 types in device code. Also
+ * causes the macro \c D__CUDACC_RTC_FLOAT128__ to be defined.
+ *
+ * - \c --optimization-info=\ (\c -opt-info)
+ *
+ * Provide optimization reports for the specified kind of optimization.
+ * The following kind tags are supported:
+ * - \c inline : emit a remark when a function is inlined.
+ *
+ * - \c --display-error-number (\c -err-no)
+ *
+ * Display diagnostic number for warning messages. (Default)
+ *
+ * - \c --no-display-error-number (\c -no-err-no)
+ *
+ * Disables the display of a diagnostic number for warning messages.
+ *
+ * - \c --diag-error=,... (\c -diag-error)
+ *
+ * Emit error for specified diagnostic message number(s). Message numbers can be separated by comma.
+ *
+ * - \c --diag-suppress=,... (\c -diag-suppress)
+ *
+ * Suppress specified diagnostic message number(s). Message numbers can be separated by comma.
+ *
+ * - \c --diag-warn=,... (\c -diag-warn)
+ *
+ * Emit warning for specified diagnostic message number(s). Message numbers can be separated by comma.
+ *
+ * - \c --brief-diagnostics={true|false} (\c -brief-diag)
+ *
+ * This option disables or enables showing source line and column info
+ * in a diagnostic.
+ * The \c --brief-diagnostics=true will not show the source line and column info.
+ * - Default: \c false
+ *
+ * - \c --time= (\c -time)
+ *
+ * Generate a comma separated value table with the time taken by each compilation
+ * phase, and append it at the end of the file given as the option argument.
+ * If the file does not exist, the column headings are generated in the first row
+ * of the table. If the file name is '-', the timing data is written to the compilation log.
+ *
+ * - \c --split-compile= (\c -split-compile=)
+ *
+ * Perform compiler optimizations in parallel.
+ * Split compilation attempts to reduce compile time by enabling the compiler to run certain
+ * optimization passes concurrently. This option accepts a numerical value that specifies the
+ * maximum number of threads the compiler can use. One can also allow the compiler to use the maximum
+ * threads available on the system by setting \c --split-compile=0.
+ * Setting \c --split-compile=1 will cause this option to be ignored.
+ *
+ * - \c --fdevice-syntax-only (\c -fdevice-syntax-only)
+ *
+ * Ends device compilation after front-end syntax checking. This option does not generate valid
+ * device code.
+ *
+ * - \c --minimal (\c -minimal)
+ *
+ * Omit certain language features to reduce compile time for small programs.
+ * In particular, the following are omitted:
+ * - Texture and surface functions and associated types, e.g., \c cudaTextureObject_t.
+ * - CUDA Runtime Functions that are provided by the cudadevrt device code library,
+ * typically named with prefix "cuda", e.g., \c cudaMalloc.
+ * - Kernel launch from device code.
+ * - Types and macros associated with CUDA Runtime and Driver APIs,
+ * provided by \c cuda/tools/cudart/driver_types.h, typically named with prefix "cuda", e.g., \c cudaError_t.
+ *
+ * - \c --device-stack-protector (\c -device-stack-protector)
+ *
+ * Enable stack canaries in device code.
+ * Stack canaries make it more difficult to exploit certain types of memory safety bugs involving
+ * stack-local variables. The compiler uses heuristics to assess the risk of such a bug in each function.
+ * Only those functions which are deemed high-risk make use of a stack canary.
+ *
+ * - \c --fdevice-time-trace= (\c -fdevice-time-trace=)
+ * Enables the time profiler, outputting a JSON file based on given . Results can be analyzed on
+ * chrome://tracing for a flamegraph visualization.
+ *
+ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+/* The utility function 'nvrtcGetTypeName' is not available by default. Define
+ the macro 'NVRTC_GET_TYPE_NAME' to a non-zero value to make it available.
+*/
+
+#if NVRTC_GET_TYPE_NAME || __DOXYGEN_ONLY__
+
+#if NVRTC_USE_CXXABI || __clang__ || __GNUC__ || __DOXYGEN_ONLY__
+#include
+#include
+
+#elif defined(_WIN32)
+#include
+#include
+#endif /* NVRTC_USE_CXXABI || __clang__ || __GNUC__ */
+
+
+#include
+#include
+
+template struct __nvrtcGetTypeName_helper_t { };
+
+/*************************************************************************//**
+ *
+ * \defgroup hosthelper Host Helper
+ *
+ * NVRTC defines the following functions for easier interaction with host code.
+ *
+ ****************************************************************************/
+
+/**
+ * \ingroup hosthelper
+ * \brief nvrtcGetTypeName stores the source level name of a type in the given
+ * std::string location.
+ *
+ * This function is only provided when the macro NVRTC_GET_TYPE_NAME is
+ * defined with a non-zero value. It uses abi::__cxa_demangle or UnDecorateSymbolName
+ * function calls to extract the type name, when using gcc/clang or cl.exe compilers,
+ * respectively. If the name extraction fails, it will return NVRTC_INTERNAL_ERROR,
+ * otherwise *result is initialized with the extracted name.
+ *
+ * Windows-specific notes:
+ * - nvrtcGetTypeName() is not multi-thread safe because it calls UnDecorateSymbolName(),
+ * which is not multi-thread safe.
+ * - The returned string may contain Microsoft-specific keywords such as __ptr64 and __cdecl.
+ *
+ * \param [in] tinfo: reference to object of type std::type_info for a given type.
+ * \param [in] result: pointer to std::string in which to store the type name.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INTERNAL_ERROR \endlink
+ *
+ */
+inline nvrtcResult nvrtcGetTypeName(const std::type_info &tinfo, std::string *result)
+{
+#if USE_CXXABI || __clang__ || __GNUC__
+ const char *name = tinfo.name();
+ int status;
+ char *undecorated_name = abi::__cxa_demangle(name, 0, 0, &status);
+ if (status == 0) {
+ *result = undecorated_name;
+ free(undecorated_name);
+ return NVRTC_SUCCESS;
+ }
+#elif defined(_WIN32)
+ const char *name = tinfo.raw_name();
+ if (!name || *name != '.') {
+ return NVRTC_ERROR_INTERNAL_ERROR;
+ }
+ char undecorated_name[4096];
+ //name+1 skips over the '.' prefix
+ if(UnDecorateSymbolName(name+1, undecorated_name,
+ sizeof(undecorated_name) / sizeof(*undecorated_name),
+ //note: doesn't seem to work correctly without UNDNAME_NO_ARGUMENTS.
+ UNDNAME_NO_ARGUMENTS | UNDNAME_NAME_ONLY ) ) {
+ *result = undecorated_name;
+ return NVRTC_SUCCESS;
+ }
+#endif /* USE_CXXABI || __clang__ || __GNUC__ */
+
+ return NVRTC_ERROR_INTERNAL_ERROR;
+}
+
+/**
+ * \ingroup hosthelper
+ * \brief nvrtcGetTypeName stores the source level name of the template type argument
+ * T in the given std::string location.
+ *
+ * This function is only provided when the macro NVRTC_GET_TYPE_NAME is
+ * defined with a non-zero value. It uses abi::__cxa_demangle or UnDecorateSymbolName
+ * function calls to extract the type name, when using gcc/clang or cl.exe compilers,
+ * respectively. If the name extraction fails, it will return NVRTC_INTERNAL_ERROR,
+ * otherwise *result is initialized with the extracted name.
+ *
+ * Windows-specific notes:
+ * - nvrtcGetTypeName() is not multi-thread safe because it calls UnDecorateSymbolName(),
+ * which is not multi-thread safe.
+ * - The returned string may contain Microsoft-specific keywords such as __ptr64 and __cdecl.
+ *
+ * \param [in] result: pointer to std::string in which to store the type name.
+ * \return
+ * - \link #nvrtcResult NVRTC_SUCCESS \endlink
+ * - \link #nvrtcResult NVRTC_ERROR_INTERNAL_ERROR \endlink
+ *
+ */
+
+template
+nvrtcResult nvrtcGetTypeName(std::string *result)
+{
+ nvrtcResult res = nvrtcGetTypeName(typeid(__nvrtcGetTypeName_helper_t),
+ result);
+ if (res != NVRTC_SUCCESS)
+ return res;
+
+ std::string repr = *result;
+ std::size_t idx = repr.find("__nvrtcGetTypeName_helper_t");
+ idx = (idx != std::string::npos) ? repr.find("<", idx) : idx;
+ std::size_t last_idx = repr.find_last_of('>');
+ if (idx == std::string::npos || last_idx == std::string::npos) {
+ return NVRTC_ERROR_INTERNAL_ERROR;
+ }
+ ++idx;
+ *result = repr.substr(idx, last_idx - idx);
+ return NVRTC_SUCCESS;
+}
+
+#endif /* NVRTC_GET_TYPE_NAME */
+
+#endif /* __NVRTC_H__ */
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.alt.so.12.8 b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.alt.so.12.8
new file mode 100644
index 0000000000000000000000000000000000000000..42c9ab575e23eb0427a5262923021b25afbc0a1b
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.alt.so.12.8
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9e971f2dcced2628f327ddb037d02c41b834f2c3dbfbff03c9d2c3177f1b9b6d
+size 6309832
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/__init__.py b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/builtin_types.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/builtin_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..5247c40807f0dd36a886513ab1bff5d2977364db
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/builtin_types.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright 1993-2014 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+/*******************************************************************************
+* *
+* *
+* *
+*******************************************************************************/
+
+#include "device_types.h"
+#if !defined(__CUDACC_RTC__)
+#define EXCLUDE_FROM_RTC
+#include "driver_types.h"
+#undef EXCLUDE_FROM_RTC
+#endif /* !__CUDACC_RTC__ */
+#include "surface_types.h"
+#include "texture_types.h"
+#include "vector_types.h"
diff --git a/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/channel_descriptor.h b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/channel_descriptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4fba89435ec69efeddaaaacfe2b6e2f4144dd34
--- /dev/null
+++ b/code/LaDi-RL-old-qwen-cod/LaDi-RL-old-qwen-cod/venv/lib64/python3.10/site-packages/nvidia/cuda_runtime/include/channel_descriptor.h
@@ -0,0 +1,597 @@
+/*
+ * Copyright 1993-2012 NVIDIA Corporation. All rights reserved.
+ *
+ * NOTICE TO LICENSEE:
+ *
+ * This source code and/or documentation ("Licensed Deliverables") are
+ * subject to NVIDIA intellectual property rights under U.S. and
+ * international Copyright laws.
+ *
+ * These Licensed Deliverables contained herein is PROPRIETARY and
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
+ * conditions of a form of NVIDIA software license agreement by and
+ * between NVIDIA and Licensee ("License Agreement") or electronically
+ * accepted by Licensee. Notwithstanding any terms or conditions to
+ * the contrary in the License Agreement, reproduction or disclosure
+ * of the Licensed Deliverables to any third party without the express
+ * written consent of NVIDIA is prohibited.
+ *
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THESE LICENSED DELIVERABLES.
+ *
+ * U.S. Government End Users. These Licensed Deliverables are a
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
+ * 1995), consisting of "commercial computer software" and "commercial
+ * computer software documentation" as such terms are used in 48
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
+ * U.S. Government End Users acquire the Licensed Deliverables with
+ * only those rights set forth herein.
+ *
+ * Any use of the Licensed Deliverables in individual and commercial
+ * software must include, in the user documentation and internal
+ * comments to the code, the above Disclaimer and U.S. Government End
+ * Users Notice.
+ */
+
+#if !defined(__CHANNEL_DESCRIPTOR_H__)
+#define __CHANNEL_DESCRIPTOR_H__
+
+#if defined(__cplusplus)
+
+/*******************************************************************************
+* *
+* *
+* *
+*******************************************************************************/
+
+#include "cuda_runtime_api.h"
+
+/*******************************************************************************
+* *
+* *
+* *
+*******************************************************************************/
+
+/**
+ * \addtogroup CUDART_HIGHLEVEL
+ *
+ * @{
+ */
+
+/**
+ * \brief \hl Returns a channel descriptor using the specified format
+ *
+ * Returns a channel descriptor with format \p f and number of bits of each
+ * component \p x, \p y, \p z, and \p w. The ::cudaChannelFormatDesc is
+ * defined as:
+ * \code
+ struct cudaChannelFormatDesc {
+ int x, y, z, w;
+ enum cudaChannelFormatKind f;
+ };
+ * \endcode
+ *
+ * where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,
+ * ::cudaChannelFormatKindUnsigned, cudaChannelFormatKindFloat,
+ * ::cudaChannelFormatKindSignedNormalized8X1, ::cudaChannelFormatKindSignedNormalized8X2,
+ * ::cudaChannelFormatKindSignedNormalized8X4,
+ * ::cudaChannelFormatKindUnsignedNormalized8X1, ::cudaChannelFormatKindUnsignedNormalized8X2,
+ * ::cudaChannelFormatKindUnsignedNormalized8X4,
+ * ::cudaChannelFormatKindSignedNormalized16X1, ::cudaChannelFormatKindSignedNormalized16X2,
+ * ::cudaChannelFormatKindSignedNormalized16X4,
+ * ::cudaChannelFormatKindUnsignedNormalized16X1, ::cudaChannelFormatKindUnsignedNormalized16X2,
+ * ::cudaChannelFormatKindUnsignedNormalized16X4,
+ * ::cudaChannelFormatKindUnsignedNormalized1010102
+ * or ::cudaChannelFormatKindNV12.
+ *
+ * The format is specified by the template specialization.
+ *
+ * The template function specializes for the following scalar types:
+ * char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, and float.
+ * The template function specializes for the following vector types:
+ * char{1|2|4}, uchar{1|2|4}, short{1|2|4}, ushort{1|2|4}, int{1|2|4}, uint{1|2|4}, long{1|2|4}, ulong{1|2|4}, float{1|2|4}.
+ * The template function specializes for following cudaChannelFormatKind enum values:
+ * ::cudaChannelFormatKind{Uns|S}ignedNormalized{8|16}X{1|2|4},
+ * ::cudaChannelFormatKindUnsignedNormalized1010102
+ * and ::cudaChannelFormatKindNV12.
+ *
+ * Invoking the function on a type without a specialization defaults to creating a channel format of kind ::cudaChannelFormatKindNone
+ *
+ * \return
+ * Channel descriptor with format \p f
+ *
+ * \sa \ref ::cudaCreateChannelDesc(int,int,int,int,cudaChannelFormatKind) "cudaCreateChannelDesc (Low level)",
+ * ::cudaGetChannelDesc,
+ */
+template __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone);
+}
+
+static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
+}
+
+static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf1(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
+}
+
+static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf2(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
+}
+
+static __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDescHalf4(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(char) * 8;
+
+#if defined(_CHAR_UNSIGNED) || defined(__CHAR_UNSIGNED__)
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+#else /* _CHAR_UNSIGNED || __CHAR_UNSIGNED__ */
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+#endif /* _CHAR_UNSIGNED || __CHAR_UNSIGNED__ */
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(signed char) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned char) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(signed char) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned char) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(signed char) * 8;
+
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned char) * 8;
+
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(signed char) * 8;
+
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned char) * 8;
+
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(short) * 8;
+
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(short) * 8;
+
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned short) * 8;
+
+ return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(int) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)
+{
+ int e = (int)sizeof(unsigned int) * 8;
+
+ return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned);
+}
+
+template<> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc